research-agent-ui 0.1.92 → 0.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/dist/lib/file-sources.d.ts +12 -0
- package/dist/types/fileSource.d.ts +119 -0
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
<br />
|
|
3
3
|
<a href="https://www.npmjs.com/package/research-agent-ui"><img src="https://img.shields.io/npm/dm/research-agent-ui.svg" alt="NPM Monthly Downloads"></a>
|
|
4
4
|
<a href="https://www.npmjs.com/package/research-agent-ui"><img src="https://img.shields.io/npm/v/research-agent-ui.svg" alt="npm version"></a>
|
|
5
|
-
<a href="https://
|
|
6
|
-
<img
|
|
7
|
-
src="https://img.shields.io/bundlephobia/minzip/research-agent-ui?style=flat&label=size"
|
|
8
|
-
alt="npm bundle size "
|
|
9
|
-
/>
|
|
5
|
+
<a href="https://packagephobia.com/result?p=research-agent-ui" target="_blank" rel="noopener noreferrer">
|
|
6
|
+
<img src="https://packagephobia.com/badge?p=research-agent-ui" alt="install size" />
|
|
10
7
|
</a>
|
|
11
8
|
<a href="https://discord.gg/SJdBqBz3tV">
|
|
12
9
|
<img src="https://img.shields.io/discord/1110227955554209923.svg?label=Chat&logo=Discord&colorB=7289da&style=flat"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnyFileSource } from '../types/fileSource';
|
|
2
|
+
export type { FileSource, AnyFileSource } from '../types/fileSource';
|
|
3
|
+
export type { FileSourceType, SSHCredentials, S3Credentials, R2Credentials, B2Credentials, GoogleDocsCredentials, TursoDBCredentials, LocalFileSource, SSHFileSource, S3FileSource, R2FileSource, B2FileSource, GoogleDocsFileSource, TursoDBFileSource } from '../types/fileSource';
|
|
4
|
+
export declare function getFileSources(): AnyFileSource[];
|
|
5
|
+
export declare function saveFileSources(sources: AnyFileSource[]): void;
|
|
6
|
+
export declare function addFileSource(source: Omit<AnyFileSource, 'id' | 'createdAt' | 'updatedAt'>): AnyFileSource;
|
|
7
|
+
export declare function updateFileSource(id: string, updates: Partial<AnyFileSource>): void;
|
|
8
|
+
export declare function deleteFileSource(id: string): void;
|
|
9
|
+
export declare function getActiveFileSourceId(): string;
|
|
10
|
+
export declare function setActiveFileSourceId(id: string): void;
|
|
11
|
+
export declare function getActiveFileSource(): AnyFileSource;
|
|
12
|
+
export declare function testFileSourceConnection(source: AnyFileSource): Promise<boolean>;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export type FileSourceType = 'local' | 'ssh' | 's3' | 'r2' | 'b2' | 'gdocs' | 'turso';
|
|
2
|
+
export interface SSHCredentials {
|
|
3
|
+
/** SSH host name or IP address. */
|
|
4
|
+
host: string;
|
|
5
|
+
/** SSH port used for connection. */
|
|
6
|
+
port: number;
|
|
7
|
+
/** SSH user account name. */
|
|
8
|
+
username: string;
|
|
9
|
+
/** Optional password for password-based auth. */
|
|
10
|
+
password?: string;
|
|
11
|
+
/** Optional private key contents for key-based auth. */
|
|
12
|
+
privateKey?: string;
|
|
13
|
+
/** Optional passphrase for the private key. */
|
|
14
|
+
passphrase?: string;
|
|
15
|
+
/** Optional base path used as the root directory. */
|
|
16
|
+
basePath?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface S3Credentials {
|
|
19
|
+
/** AWS access key ID or S3-compatible key ID. */
|
|
20
|
+
accessKeyId: string;
|
|
21
|
+
/** AWS secret access key or S3-compatible secret. */
|
|
22
|
+
secretAccessKey: string;
|
|
23
|
+
/** Region where the bucket is hosted. */
|
|
24
|
+
region: string;
|
|
25
|
+
/** Bucket name to read/write files from. */
|
|
26
|
+
bucket: string;
|
|
27
|
+
/** Optional custom endpoint for S3-compatible providers. */
|
|
28
|
+
endpoint?: string;
|
|
29
|
+
/** Optional base path prefix inside the bucket. */
|
|
30
|
+
basePath?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface R2Credentials {
|
|
33
|
+
/** Cloudflare account ID owning the R2 bucket. */
|
|
34
|
+
accountId: string;
|
|
35
|
+
/** R2 access key ID. */
|
|
36
|
+
accessKeyId: string;
|
|
37
|
+
/** R2 secret access key. */
|
|
38
|
+
secretAccessKey: string;
|
|
39
|
+
/** R2 bucket name. */
|
|
40
|
+
bucket: string;
|
|
41
|
+
/** Optional path prefix inside the bucket. */
|
|
42
|
+
basePath?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface B2Credentials {
|
|
45
|
+
/** Backblaze access key ID. */
|
|
46
|
+
accessKeyId: string;
|
|
47
|
+
/** Backblaze secret access key. */
|
|
48
|
+
secretAccessKey: string;
|
|
49
|
+
/** Backblaze B2 bucket name. */
|
|
50
|
+
bucket: string;
|
|
51
|
+
endpoint?: string;
|
|
52
|
+
/** Optional path prefix inside the bucket. */
|
|
53
|
+
basePath?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface GoogleDocsCredentials {
|
|
56
|
+
/** OAuth access token for Google API requests. */
|
|
57
|
+
accessToken?: string;
|
|
58
|
+
/** OAuth refresh token to renew expired access tokens. */
|
|
59
|
+
refreshToken?: string;
|
|
60
|
+
/** Connected Google account email. */
|
|
61
|
+
email?: string;
|
|
62
|
+
folderIds?: string[];
|
|
63
|
+
/** Indicates whether the Google connection is active. */
|
|
64
|
+
isAuthenticated: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface TursoDBCredentials {
|
|
67
|
+
/** Turso database endpoint URL. */
|
|
68
|
+
endpoint: string;
|
|
69
|
+
/** Optional Turso auth token for protected instances. */
|
|
70
|
+
authToken?: string;
|
|
71
|
+
/** Optional database name when endpoint hosts multiple DBs. */
|
|
72
|
+
database?: string;
|
|
73
|
+
enableGoogleDocsSync?: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface FileSource {
|
|
76
|
+
/** Unique source identifier. */
|
|
77
|
+
id: string;
|
|
78
|
+
/** Human-readable source label shown in UI. */
|
|
79
|
+
name: string;
|
|
80
|
+
/** Source backend type discriminator. */
|
|
81
|
+
type: FileSourceType;
|
|
82
|
+
/** Backend-specific connection credentials. */
|
|
83
|
+
credentials?: SSHCredentials | S3Credentials | R2Credentials | B2Credentials | GoogleDocsCredentials | TursoDBCredentials;
|
|
84
|
+
/** Marks this source as the default selection. */
|
|
85
|
+
isDefault?: boolean;
|
|
86
|
+
/** ISO timestamp when the source was created. */
|
|
87
|
+
createdAt: string;
|
|
88
|
+
/** ISO timestamp when the source was last updated. */
|
|
89
|
+
updatedAt: string;
|
|
90
|
+
}
|
|
91
|
+
export interface LocalFileSource extends FileSource {
|
|
92
|
+
type: 'local';
|
|
93
|
+
credentials: undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface SSHFileSource extends FileSource {
|
|
96
|
+
type: 'ssh';
|
|
97
|
+
credentials: SSHCredentials;
|
|
98
|
+
}
|
|
99
|
+
export interface S3FileSource extends FileSource {
|
|
100
|
+
type: 's3';
|
|
101
|
+
credentials: S3Credentials;
|
|
102
|
+
}
|
|
103
|
+
export interface R2FileSource extends FileSource {
|
|
104
|
+
type: 'r2';
|
|
105
|
+
credentials: R2Credentials;
|
|
106
|
+
}
|
|
107
|
+
export interface B2FileSource extends FileSource {
|
|
108
|
+
type: 'b2';
|
|
109
|
+
credentials: B2Credentials;
|
|
110
|
+
}
|
|
111
|
+
export interface GoogleDocsFileSource extends FileSource {
|
|
112
|
+
type: 'gdocs';
|
|
113
|
+
credentials: GoogleDocsCredentials;
|
|
114
|
+
}
|
|
115
|
+
export interface TursoDBFileSource extends FileSource {
|
|
116
|
+
type: 'turso';
|
|
117
|
+
credentials: TursoDBCredentials;
|
|
118
|
+
}
|
|
119
|
+
export type AnyFileSource = LocalFileSource | SSHFileSource | S3FileSource | R2FileSource | B2FileSource | GoogleDocsFileSource | TursoDBFileSource;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "research-agent-ui",
|
|
3
3
|
"description": "Chat research agent UI: conversation window, article reader, search config, file uploads, and chat history",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.93",
|
|
5
5
|
"author": "vtempest",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
"types": "./dist/api.d.ts",
|
|
28
28
|
"import": "./dist/api.mjs",
|
|
29
29
|
"require": "./dist/api.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./file-sources": {
|
|
32
|
+
"types": "./src/lib/file-sources.ts",
|
|
33
|
+
"import": "./src/lib/file-sources.ts"
|
|
30
34
|
}
|
|
31
35
|
},
|
|
32
36
|
"files": [
|
|
@@ -66,19 +70,19 @@
|
|
|
66
70
|
"@radix-ui/react-tooltip": "^1.2.9",
|
|
67
71
|
"@ricky0123/vad-web": "^0.0.30",
|
|
68
72
|
"ai": "^5.0.0",
|
|
69
|
-
"chat-agent-toolkit": "^1.2.
|
|
70
|
-
"domain-rank": "^0.1.
|
|
73
|
+
"chat-agent-toolkit": "^1.2.117",
|
|
74
|
+
"domain-rank": "^0.1.106",
|
|
71
75
|
"drizzle-orm": "^0.45.2",
|
|
72
76
|
"fuse.js": "^7.1.0",
|
|
73
77
|
"class-variance-authority": "^0.7.1",
|
|
74
78
|
"clsx": "^2.1.1",
|
|
75
79
|
"dompurify": "^3.4.9",
|
|
76
|
-
"extract-webpage": "^1.2.
|
|
77
|
-
"search-web-api": "^1.0.
|
|
80
|
+
"extract-webpage": "^1.2.117",
|
|
81
|
+
"search-web-api": "^1.0.75",
|
|
78
82
|
"framer-motion": "^12.40.0",
|
|
79
83
|
"grab-url": "^1.6.22",
|
|
80
84
|
"kokoro-js": "^1.2.1",
|
|
81
|
-
"qwksearch-api-client": "^0.9.
|
|
85
|
+
"qwksearch-api-client": "^0.9.64",
|
|
82
86
|
"html2canvas": "^1.4.1",
|
|
83
87
|
"lucide-react": "^1.17.0",
|
|
84
88
|
"markdown-to-jsx": "^9.8.2",
|