ai-vault 1.2.1
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 +21 -0
- package/README.md +287 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +49 -0
- package/dist/cli.js.map +1 -0
- package/dist/providers/_template/index.d.ts +35 -0
- package/dist/providers/_template/index.d.ts.map +1 -0
- package/dist/providers/_template/index.js +146 -0
- package/dist/providers/_template/index.js.map +1 -0
- package/dist/providers/base.d.ts +34 -0
- package/dist/providers/base.d.ts.map +1 -0
- package/dist/providers/base.js +91 -0
- package/dist/providers/base.js.map +1 -0
- package/dist/providers/grok/index.d.ts +47 -0
- package/dist/providers/grok/index.d.ts.map +1 -0
- package/dist/providers/grok/index.js +250 -0
- package/dist/providers/grok/index.js.map +1 -0
- package/dist/providers/index.d.ts +21 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +35 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/types/index.d.ts +141 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/provider.d.ts +85 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/provider.js +25 -0
- package/dist/types/provider.js.map +1 -0
- package/dist/types/schemas.d.ts +532 -0
- package/dist/types/schemas.d.ts.map +1 -0
- package/dist/types/schemas.js +106 -0
- package/dist/types/schemas.js.map +1 -0
- package/dist/utils/api-client.d.ts +54 -0
- package/dist/utils/api-client.d.ts.map +1 -0
- package/dist/utils/api-client.js +138 -0
- package/dist/utils/api-client.js.map +1 -0
- package/dist/utils/scraper.d.ts +58 -0
- package/dist/utils/scraper.d.ts.map +1 -0
- package/dist/utils/scraper.js +146 -0
- package/dist/utils/scraper.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider interface - all AI platform providers must implement this
|
|
3
|
+
*/
|
|
4
|
+
import type { ProviderName, ProviderConfig, Conversation } from './index';
|
|
5
|
+
export interface ListConversationsOptions {
|
|
6
|
+
since?: Date;
|
|
7
|
+
until?: Date;
|
|
8
|
+
limit?: number;
|
|
9
|
+
offset?: number;
|
|
10
|
+
includeArchived?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface Provider {
|
|
13
|
+
/** Unique provider identifier */
|
|
14
|
+
readonly name: ProviderName;
|
|
15
|
+
/** Human-readable display name */
|
|
16
|
+
readonly displayName: string;
|
|
17
|
+
/** Supported authentication methods */
|
|
18
|
+
readonly supportedAuthMethods: ('api-key' | 'cookies' | 'oauth')[];
|
|
19
|
+
/**
|
|
20
|
+
* Authenticate with the provider
|
|
21
|
+
* @param config Provider configuration
|
|
22
|
+
* @returns true if authentication successful
|
|
23
|
+
* @throws {AuthenticationError} if authentication fails
|
|
24
|
+
*/
|
|
25
|
+
authenticate(config: ProviderConfig): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Test if current authentication is still valid
|
|
28
|
+
* @returns true if authenticated and valid
|
|
29
|
+
*/
|
|
30
|
+
isAuthenticated(): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* List all conversations accessible to the authenticated user
|
|
33
|
+
* @param options Filtering and pagination options
|
|
34
|
+
* @returns Array of conversation summaries
|
|
35
|
+
*/
|
|
36
|
+
listConversations(options?: ListConversationsOptions): Promise<ConversationSummary[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Fetch complete conversation with all messages
|
|
39
|
+
* @param id Conversation ID
|
|
40
|
+
* @returns Complete conversation object
|
|
41
|
+
* @throws {NotFoundError} if conversation doesn't exist
|
|
42
|
+
*/
|
|
43
|
+
fetchConversation(id: string): Promise<Conversation>;
|
|
44
|
+
/**
|
|
45
|
+
* Download media file from provider
|
|
46
|
+
* @param url Media URL
|
|
47
|
+
* @param outputPath Local file path to save to
|
|
48
|
+
* @returns Metadata about downloaded file
|
|
49
|
+
*/
|
|
50
|
+
downloadMedia(url: string, outputPath: string): Promise<MediaDownloadResult>;
|
|
51
|
+
/**
|
|
52
|
+
* Extract cookies from browser for authentication
|
|
53
|
+
* @param browser Browser name ('chrome', 'firefox', 'safari', 'edge')
|
|
54
|
+
* @returns Cookie object
|
|
55
|
+
*/
|
|
56
|
+
extractCookies?(browser: string): Promise<Record<string, string>>;
|
|
57
|
+
}
|
|
58
|
+
/** Lightweight conversation summary for listing */
|
|
59
|
+
export interface ConversationSummary {
|
|
60
|
+
id: string;
|
|
61
|
+
title: string;
|
|
62
|
+
messageCount: number;
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
updatedAt: Date;
|
|
65
|
+
hasMedia: boolean;
|
|
66
|
+
preview?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface MediaDownloadResult {
|
|
69
|
+
path: string;
|
|
70
|
+
size: number;
|
|
71
|
+
mimeType: string;
|
|
72
|
+
hash?: string;
|
|
73
|
+
}
|
|
74
|
+
/** Custom error types */
|
|
75
|
+
export declare class AuthenticationError extends Error {
|
|
76
|
+
constructor(message: string);
|
|
77
|
+
}
|
|
78
|
+
export declare class NotFoundError extends Error {
|
|
79
|
+
constructor(message: string);
|
|
80
|
+
}
|
|
81
|
+
export declare class RateLimitError extends Error {
|
|
82
|
+
retryAfter?: number | undefined;
|
|
83
|
+
constructor(message: string, retryAfter?: number | undefined);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/types/provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACvB,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAE5B,kCAAkC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,uCAAuC;IACvC,QAAQ,CAAC,oBAAoB,EAAE,CAAC,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;IAEnE;;;;;OAKG;IACH,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvD;;;OAGG;IACH,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpC;;;;OAIG;IACH,iBAAiB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAEtF;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAErD;;;;;OAKG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE7E;;;;OAIG;IACH,cAAc,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACnE;AAED,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAyB;AACzB,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,cAAe,SAAQ,KAAK;IAG9B,UAAU,CAAC,EAAE,MAAM;gBAD1B,OAAO,EAAE,MAAM,EACR,UAAU,CAAC,EAAE,MAAM,YAAA;CAK7B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider interface - all AI platform providers must implement this
|
|
3
|
+
*/
|
|
4
|
+
/** Custom error types */
|
|
5
|
+
export class AuthenticationError extends Error {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = 'AuthenticationError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export class NotFoundError extends Error {
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.name = 'NotFoundError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class RateLimitError extends Error {
|
|
18
|
+
retryAfter;
|
|
19
|
+
constructor(message, retryAfter) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.retryAfter = retryAfter;
|
|
22
|
+
this.name = 'RateLimitError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/types/provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAqFH,yBAAyB;AACzB,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,KAAK;IAG9B;IAFT,YACE,OAAe,EACR,UAAmB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,eAAU,GAAV,UAAU,CAAS;QAG1B,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for runtime validation
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export declare const ProviderNameSchema: z.ZodEnum<["grok", "chatgpt", "claude", "gemini", "perplexity"]>;
|
|
6
|
+
export declare const AuthMethodSchema: z.ZodEnum<["api-key", "cookies", "oauth"]>;
|
|
7
|
+
export declare const ProviderConfigSchema: z.ZodObject<{
|
|
8
|
+
name: z.ZodEnum<["grok", "chatgpt", "claude", "gemini", "perplexity"]>;
|
|
9
|
+
enabled: z.ZodBoolean;
|
|
10
|
+
authMethod: z.ZodEnum<["api-key", "cookies", "oauth"]>;
|
|
11
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
12
|
+
cookies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
|
+
customEndpoint: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
name: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
authMethod: "api-key" | "cookies" | "oauth";
|
|
18
|
+
cookies?: Record<string, string> | undefined;
|
|
19
|
+
apiKey?: string | undefined;
|
|
20
|
+
customEndpoint?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
name: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
authMethod: "api-key" | "cookies" | "oauth";
|
|
25
|
+
cookies?: Record<string, string> | undefined;
|
|
26
|
+
apiKey?: string | undefined;
|
|
27
|
+
customEndpoint?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const MessageSchema: z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
role: z.ZodEnum<["user", "assistant", "system"]>;
|
|
32
|
+
content: z.ZodString;
|
|
33
|
+
timestamp: z.ZodDate;
|
|
34
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
35
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
type: z.ZodEnum<["image", "video", "audio", "document", "code"]>;
|
|
38
|
+
url: z.ZodString;
|
|
39
|
+
localPath: z.ZodOptional<z.ZodString>;
|
|
40
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
41
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
url: string;
|
|
45
|
+
id: string;
|
|
46
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
47
|
+
size?: number | undefined;
|
|
48
|
+
mimeType?: string | undefined;
|
|
49
|
+
metadata?: Record<string, any> | undefined;
|
|
50
|
+
localPath?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
url: string;
|
|
53
|
+
id: string;
|
|
54
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
55
|
+
size?: number | undefined;
|
|
56
|
+
mimeType?: string | undefined;
|
|
57
|
+
metadata?: Record<string, any> | undefined;
|
|
58
|
+
localPath?: string | undefined;
|
|
59
|
+
}>, "many">>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
id: string;
|
|
62
|
+
role: "user" | "assistant" | "system";
|
|
63
|
+
content: string;
|
|
64
|
+
timestamp: Date;
|
|
65
|
+
metadata?: Record<string, any> | undefined;
|
|
66
|
+
attachments?: {
|
|
67
|
+
url: string;
|
|
68
|
+
id: string;
|
|
69
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
70
|
+
size?: number | undefined;
|
|
71
|
+
mimeType?: string | undefined;
|
|
72
|
+
metadata?: Record<string, any> | undefined;
|
|
73
|
+
localPath?: string | undefined;
|
|
74
|
+
}[] | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
id: string;
|
|
77
|
+
role: "user" | "assistant" | "system";
|
|
78
|
+
content: string;
|
|
79
|
+
timestamp: Date;
|
|
80
|
+
metadata?: Record<string, any> | undefined;
|
|
81
|
+
attachments?: {
|
|
82
|
+
url: string;
|
|
83
|
+
id: string;
|
|
84
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
85
|
+
size?: number | undefined;
|
|
86
|
+
mimeType?: string | undefined;
|
|
87
|
+
metadata?: Record<string, any> | undefined;
|
|
88
|
+
localPath?: string | undefined;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
export declare const ConversationSchema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
provider: z.ZodEnum<["grok", "chatgpt", "claude", "gemini", "perplexity"]>;
|
|
94
|
+
title: z.ZodString;
|
|
95
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
role: z.ZodEnum<["user", "assistant", "system"]>;
|
|
98
|
+
content: z.ZodString;
|
|
99
|
+
timestamp: z.ZodDate;
|
|
100
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
101
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
type: z.ZodEnum<["image", "video", "audio", "document", "code"]>;
|
|
104
|
+
url: z.ZodString;
|
|
105
|
+
localPath: z.ZodOptional<z.ZodString>;
|
|
106
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
107
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
url: string;
|
|
111
|
+
id: string;
|
|
112
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
113
|
+
size?: number | undefined;
|
|
114
|
+
mimeType?: string | undefined;
|
|
115
|
+
metadata?: Record<string, any> | undefined;
|
|
116
|
+
localPath?: string | undefined;
|
|
117
|
+
}, {
|
|
118
|
+
url: string;
|
|
119
|
+
id: string;
|
|
120
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
121
|
+
size?: number | undefined;
|
|
122
|
+
mimeType?: string | undefined;
|
|
123
|
+
metadata?: Record<string, any> | undefined;
|
|
124
|
+
localPath?: string | undefined;
|
|
125
|
+
}>, "many">>;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
id: string;
|
|
128
|
+
role: "user" | "assistant" | "system";
|
|
129
|
+
content: string;
|
|
130
|
+
timestamp: Date;
|
|
131
|
+
metadata?: Record<string, any> | undefined;
|
|
132
|
+
attachments?: {
|
|
133
|
+
url: string;
|
|
134
|
+
id: string;
|
|
135
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
136
|
+
size?: number | undefined;
|
|
137
|
+
mimeType?: string | undefined;
|
|
138
|
+
metadata?: Record<string, any> | undefined;
|
|
139
|
+
localPath?: string | undefined;
|
|
140
|
+
}[] | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
id: string;
|
|
143
|
+
role: "user" | "assistant" | "system";
|
|
144
|
+
content: string;
|
|
145
|
+
timestamp: Date;
|
|
146
|
+
metadata?: Record<string, any> | undefined;
|
|
147
|
+
attachments?: {
|
|
148
|
+
url: string;
|
|
149
|
+
id: string;
|
|
150
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
151
|
+
size?: number | undefined;
|
|
152
|
+
mimeType?: string | undefined;
|
|
153
|
+
metadata?: Record<string, any> | undefined;
|
|
154
|
+
localPath?: string | undefined;
|
|
155
|
+
}[] | undefined;
|
|
156
|
+
}>, "many">;
|
|
157
|
+
createdAt: z.ZodDate;
|
|
158
|
+
updatedAt: z.ZodDate;
|
|
159
|
+
metadata: z.ZodObject<{
|
|
160
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
161
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
162
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
163
|
+
folder: z.ZodOptional<z.ZodString>;
|
|
164
|
+
messageCount: z.ZodNumber;
|
|
165
|
+
characterCount: z.ZodNumber;
|
|
166
|
+
mediaCount: z.ZodNumber;
|
|
167
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
168
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
169
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
folder: z.ZodOptional<z.ZodString>;
|
|
172
|
+
messageCount: z.ZodNumber;
|
|
173
|
+
characterCount: z.ZodNumber;
|
|
174
|
+
mediaCount: z.ZodNumber;
|
|
175
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
176
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
177
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
178
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
folder: z.ZodOptional<z.ZodString>;
|
|
180
|
+
messageCount: z.ZodNumber;
|
|
181
|
+
characterCount: z.ZodNumber;
|
|
182
|
+
mediaCount: z.ZodNumber;
|
|
183
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
title: string;
|
|
186
|
+
metadata: {
|
|
187
|
+
messageCount: number;
|
|
188
|
+
characterCount: number;
|
|
189
|
+
mediaCount: number;
|
|
190
|
+
tags?: string[] | undefined;
|
|
191
|
+
archived?: boolean | undefined;
|
|
192
|
+
starred?: boolean | undefined;
|
|
193
|
+
folder?: string | undefined;
|
|
194
|
+
} & {
|
|
195
|
+
[k: string]: unknown;
|
|
196
|
+
};
|
|
197
|
+
messages: {
|
|
198
|
+
id: string;
|
|
199
|
+
role: "user" | "assistant" | "system";
|
|
200
|
+
content: string;
|
|
201
|
+
timestamp: Date;
|
|
202
|
+
metadata?: Record<string, any> | undefined;
|
|
203
|
+
attachments?: {
|
|
204
|
+
url: string;
|
|
205
|
+
id: string;
|
|
206
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
207
|
+
size?: number | undefined;
|
|
208
|
+
mimeType?: string | undefined;
|
|
209
|
+
metadata?: Record<string, any> | undefined;
|
|
210
|
+
localPath?: string | undefined;
|
|
211
|
+
}[] | undefined;
|
|
212
|
+
}[];
|
|
213
|
+
id: string;
|
|
214
|
+
provider: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
215
|
+
createdAt: Date;
|
|
216
|
+
updatedAt: Date;
|
|
217
|
+
}, {
|
|
218
|
+
title: string;
|
|
219
|
+
metadata: {
|
|
220
|
+
messageCount: number;
|
|
221
|
+
characterCount: number;
|
|
222
|
+
mediaCount: number;
|
|
223
|
+
tags?: string[] | undefined;
|
|
224
|
+
archived?: boolean | undefined;
|
|
225
|
+
starred?: boolean | undefined;
|
|
226
|
+
folder?: string | undefined;
|
|
227
|
+
} & {
|
|
228
|
+
[k: string]: unknown;
|
|
229
|
+
};
|
|
230
|
+
messages: {
|
|
231
|
+
id: string;
|
|
232
|
+
role: "user" | "assistant" | "system";
|
|
233
|
+
content: string;
|
|
234
|
+
timestamp: Date;
|
|
235
|
+
metadata?: Record<string, any> | undefined;
|
|
236
|
+
attachments?: {
|
|
237
|
+
url: string;
|
|
238
|
+
id: string;
|
|
239
|
+
type: "image" | "video" | "audio" | "document" | "code";
|
|
240
|
+
size?: number | undefined;
|
|
241
|
+
mimeType?: string | undefined;
|
|
242
|
+
metadata?: Record<string, any> | undefined;
|
|
243
|
+
localPath?: string | undefined;
|
|
244
|
+
}[] | undefined;
|
|
245
|
+
}[];
|
|
246
|
+
id: string;
|
|
247
|
+
provider: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
248
|
+
createdAt: Date;
|
|
249
|
+
updatedAt: Date;
|
|
250
|
+
}>;
|
|
251
|
+
export declare const StorageConfigSchema: z.ZodObject<{
|
|
252
|
+
basePath: z.ZodString;
|
|
253
|
+
organizationStrategy: z.ZodEnum<["by-provider", "by-date", "flat"]>;
|
|
254
|
+
compression: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
+
encryption: z.ZodOptional<z.ZodBoolean>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
basePath: string;
|
|
258
|
+
organizationStrategy: "by-provider" | "by-date" | "flat";
|
|
259
|
+
compression?: boolean | undefined;
|
|
260
|
+
encryption?: boolean | undefined;
|
|
261
|
+
}, {
|
|
262
|
+
basePath: string;
|
|
263
|
+
organizationStrategy: "by-provider" | "by-date" | "flat";
|
|
264
|
+
compression?: boolean | undefined;
|
|
265
|
+
encryption?: boolean | undefined;
|
|
266
|
+
}>;
|
|
267
|
+
export declare const ScheduleConfigSchema: z.ZodObject<{
|
|
268
|
+
enabled: z.ZodBoolean;
|
|
269
|
+
cron: z.ZodOptional<z.ZodString>;
|
|
270
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
271
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodEnum<["grok", "chatgpt", "claude", "gemini", "perplexity"]>, "many">>;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
enabled: boolean;
|
|
274
|
+
cron?: string | undefined;
|
|
275
|
+
timezone?: string | undefined;
|
|
276
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
277
|
+
}, {
|
|
278
|
+
enabled: boolean;
|
|
279
|
+
cron?: string | undefined;
|
|
280
|
+
timezone?: string | undefined;
|
|
281
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
282
|
+
}>;
|
|
283
|
+
export declare const MediaConfigSchema: z.ZodObject<{
|
|
284
|
+
enabled: z.ZodBoolean;
|
|
285
|
+
deduplication: z.ZodBoolean;
|
|
286
|
+
maxFileSize: z.ZodOptional<z.ZodNumber>;
|
|
287
|
+
allowedTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
288
|
+
quality: z.ZodOptional<z.ZodEnum<["original", "high", "medium", "low"]>>;
|
|
289
|
+
}, "strip", z.ZodTypeAny, {
|
|
290
|
+
enabled: boolean;
|
|
291
|
+
deduplication: boolean;
|
|
292
|
+
maxFileSize?: number | undefined;
|
|
293
|
+
allowedTypes?: string[] | undefined;
|
|
294
|
+
quality?: "original" | "high" | "medium" | "low" | undefined;
|
|
295
|
+
}, {
|
|
296
|
+
enabled: boolean;
|
|
297
|
+
deduplication: boolean;
|
|
298
|
+
maxFileSize?: number | undefined;
|
|
299
|
+
allowedTypes?: string[] | undefined;
|
|
300
|
+
quality?: "original" | "high" | "medium" | "low" | undefined;
|
|
301
|
+
}>;
|
|
302
|
+
export declare const ExportConfigSchema: z.ZodObject<{
|
|
303
|
+
formats: z.ZodArray<z.ZodEnum<["json", "markdown", "html", "txt"]>, "many">;
|
|
304
|
+
includeMetadata: z.ZodBoolean;
|
|
305
|
+
prettyPrint: z.ZodBoolean;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
formats: ("json" | "markdown" | "html" | "txt")[];
|
|
308
|
+
includeMetadata: boolean;
|
|
309
|
+
prettyPrint: boolean;
|
|
310
|
+
}, {
|
|
311
|
+
formats: ("json" | "markdown" | "html" | "txt")[];
|
|
312
|
+
includeMetadata: boolean;
|
|
313
|
+
prettyPrint: boolean;
|
|
314
|
+
}>;
|
|
315
|
+
export declare const VaultConfigSchema: z.ZodObject<{
|
|
316
|
+
version: z.ZodString;
|
|
317
|
+
storage: z.ZodObject<{
|
|
318
|
+
basePath: z.ZodString;
|
|
319
|
+
organizationStrategy: z.ZodEnum<["by-provider", "by-date", "flat"]>;
|
|
320
|
+
compression: z.ZodOptional<z.ZodBoolean>;
|
|
321
|
+
encryption: z.ZodOptional<z.ZodBoolean>;
|
|
322
|
+
}, "strip", z.ZodTypeAny, {
|
|
323
|
+
basePath: string;
|
|
324
|
+
organizationStrategy: "by-provider" | "by-date" | "flat";
|
|
325
|
+
compression?: boolean | undefined;
|
|
326
|
+
encryption?: boolean | undefined;
|
|
327
|
+
}, {
|
|
328
|
+
basePath: string;
|
|
329
|
+
organizationStrategy: "by-provider" | "by-date" | "flat";
|
|
330
|
+
compression?: boolean | undefined;
|
|
331
|
+
encryption?: boolean | undefined;
|
|
332
|
+
}>;
|
|
333
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
334
|
+
name: z.ZodEnum<["grok", "chatgpt", "claude", "gemini", "perplexity"]>;
|
|
335
|
+
enabled: z.ZodBoolean;
|
|
336
|
+
authMethod: z.ZodEnum<["api-key", "cookies", "oauth"]>;
|
|
337
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
338
|
+
cookies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
339
|
+
customEndpoint: z.ZodOptional<z.ZodString>;
|
|
340
|
+
}, "strip", z.ZodTypeAny, {
|
|
341
|
+
name: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
342
|
+
enabled: boolean;
|
|
343
|
+
authMethod: "api-key" | "cookies" | "oauth";
|
|
344
|
+
cookies?: Record<string, string> | undefined;
|
|
345
|
+
apiKey?: string | undefined;
|
|
346
|
+
customEndpoint?: string | undefined;
|
|
347
|
+
}, {
|
|
348
|
+
name: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
349
|
+
enabled: boolean;
|
|
350
|
+
authMethod: "api-key" | "cookies" | "oauth";
|
|
351
|
+
cookies?: Record<string, string> | undefined;
|
|
352
|
+
apiKey?: string | undefined;
|
|
353
|
+
customEndpoint?: string | undefined;
|
|
354
|
+
}>, "many">;
|
|
355
|
+
scheduling: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
enabled: z.ZodBoolean;
|
|
357
|
+
cron: z.ZodOptional<z.ZodString>;
|
|
358
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
359
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodEnum<["grok", "chatgpt", "claude", "gemini", "perplexity"]>, "many">>;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
enabled: boolean;
|
|
362
|
+
cron?: string | undefined;
|
|
363
|
+
timezone?: string | undefined;
|
|
364
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
365
|
+
}, {
|
|
366
|
+
enabled: boolean;
|
|
367
|
+
cron?: string | undefined;
|
|
368
|
+
timezone?: string | undefined;
|
|
369
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
370
|
+
}>>;
|
|
371
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
372
|
+
enabled: z.ZodBoolean;
|
|
373
|
+
deduplication: z.ZodBoolean;
|
|
374
|
+
maxFileSize: z.ZodOptional<z.ZodNumber>;
|
|
375
|
+
allowedTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
376
|
+
quality: z.ZodOptional<z.ZodEnum<["original", "high", "medium", "low"]>>;
|
|
377
|
+
}, "strip", z.ZodTypeAny, {
|
|
378
|
+
enabled: boolean;
|
|
379
|
+
deduplication: boolean;
|
|
380
|
+
maxFileSize?: number | undefined;
|
|
381
|
+
allowedTypes?: string[] | undefined;
|
|
382
|
+
quality?: "original" | "high" | "medium" | "low" | undefined;
|
|
383
|
+
}, {
|
|
384
|
+
enabled: boolean;
|
|
385
|
+
deduplication: boolean;
|
|
386
|
+
maxFileSize?: number | undefined;
|
|
387
|
+
allowedTypes?: string[] | undefined;
|
|
388
|
+
quality?: "original" | "high" | "medium" | "low" | undefined;
|
|
389
|
+
}>>;
|
|
390
|
+
export: z.ZodOptional<z.ZodObject<{
|
|
391
|
+
formats: z.ZodArray<z.ZodEnum<["json", "markdown", "html", "txt"]>, "many">;
|
|
392
|
+
includeMetadata: z.ZodBoolean;
|
|
393
|
+
prettyPrint: z.ZodBoolean;
|
|
394
|
+
}, "strip", z.ZodTypeAny, {
|
|
395
|
+
formats: ("json" | "markdown" | "html" | "txt")[];
|
|
396
|
+
includeMetadata: boolean;
|
|
397
|
+
prettyPrint: boolean;
|
|
398
|
+
}, {
|
|
399
|
+
formats: ("json" | "markdown" | "html" | "txt")[];
|
|
400
|
+
includeMetadata: boolean;
|
|
401
|
+
prettyPrint: boolean;
|
|
402
|
+
}>>;
|
|
403
|
+
}, "strip", z.ZodTypeAny, {
|
|
404
|
+
providers: {
|
|
405
|
+
name: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
406
|
+
enabled: boolean;
|
|
407
|
+
authMethod: "api-key" | "cookies" | "oauth";
|
|
408
|
+
cookies?: Record<string, string> | undefined;
|
|
409
|
+
apiKey?: string | undefined;
|
|
410
|
+
customEndpoint?: string | undefined;
|
|
411
|
+
}[];
|
|
412
|
+
version: string;
|
|
413
|
+
storage: {
|
|
414
|
+
basePath: string;
|
|
415
|
+
organizationStrategy: "by-provider" | "by-date" | "flat";
|
|
416
|
+
compression?: boolean | undefined;
|
|
417
|
+
encryption?: boolean | undefined;
|
|
418
|
+
};
|
|
419
|
+
scheduling?: {
|
|
420
|
+
enabled: boolean;
|
|
421
|
+
cron?: string | undefined;
|
|
422
|
+
timezone?: string | undefined;
|
|
423
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
424
|
+
} | undefined;
|
|
425
|
+
media?: {
|
|
426
|
+
enabled: boolean;
|
|
427
|
+
deduplication: boolean;
|
|
428
|
+
maxFileSize?: number | undefined;
|
|
429
|
+
allowedTypes?: string[] | undefined;
|
|
430
|
+
quality?: "original" | "high" | "medium" | "low" | undefined;
|
|
431
|
+
} | undefined;
|
|
432
|
+
export?: {
|
|
433
|
+
formats: ("json" | "markdown" | "html" | "txt")[];
|
|
434
|
+
includeMetadata: boolean;
|
|
435
|
+
prettyPrint: boolean;
|
|
436
|
+
} | undefined;
|
|
437
|
+
}, {
|
|
438
|
+
providers: {
|
|
439
|
+
name: "grok" | "chatgpt" | "claude" | "gemini" | "perplexity";
|
|
440
|
+
enabled: boolean;
|
|
441
|
+
authMethod: "api-key" | "cookies" | "oauth";
|
|
442
|
+
cookies?: Record<string, string> | undefined;
|
|
443
|
+
apiKey?: string | undefined;
|
|
444
|
+
customEndpoint?: string | undefined;
|
|
445
|
+
}[];
|
|
446
|
+
version: string;
|
|
447
|
+
storage: {
|
|
448
|
+
basePath: string;
|
|
449
|
+
organizationStrategy: "by-provider" | "by-date" | "flat";
|
|
450
|
+
compression?: boolean | undefined;
|
|
451
|
+
encryption?: boolean | undefined;
|
|
452
|
+
};
|
|
453
|
+
scheduling?: {
|
|
454
|
+
enabled: boolean;
|
|
455
|
+
cron?: string | undefined;
|
|
456
|
+
timezone?: string | undefined;
|
|
457
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
458
|
+
} | undefined;
|
|
459
|
+
media?: {
|
|
460
|
+
enabled: boolean;
|
|
461
|
+
deduplication: boolean;
|
|
462
|
+
maxFileSize?: number | undefined;
|
|
463
|
+
allowedTypes?: string[] | undefined;
|
|
464
|
+
quality?: "original" | "high" | "medium" | "low" | undefined;
|
|
465
|
+
} | undefined;
|
|
466
|
+
export?: {
|
|
467
|
+
formats: ("json" | "markdown" | "html" | "txt")[];
|
|
468
|
+
includeMetadata: boolean;
|
|
469
|
+
prettyPrint: boolean;
|
|
470
|
+
} | undefined;
|
|
471
|
+
}>;
|
|
472
|
+
export declare const ArchiveOptionsSchema: z.ZodObject<{
|
|
473
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodEnum<["grok", "chatgpt", "claude", "gemini", "perplexity"]>, "many">>;
|
|
474
|
+
since: z.ZodOptional<z.ZodDate>;
|
|
475
|
+
until: z.ZodOptional<z.ZodDate>;
|
|
476
|
+
includeMedia: z.ZodOptional<z.ZodBoolean>;
|
|
477
|
+
outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<["json", "markdown", "html", "txt"]>, "many">>;
|
|
478
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
479
|
+
starred: z.ZodOptional<z.ZodBoolean>;
|
|
480
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
482
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
483
|
+
searchQuery: z.ZodOptional<z.ZodString>;
|
|
484
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
485
|
+
}, "strip", z.ZodTypeAny, {
|
|
486
|
+
tags?: string[] | undefined;
|
|
487
|
+
archived?: boolean | undefined;
|
|
488
|
+
starred?: boolean | undefined;
|
|
489
|
+
minMessages?: number | undefined;
|
|
490
|
+
maxMessages?: number | undefined;
|
|
491
|
+
searchQuery?: string | undefined;
|
|
492
|
+
}, {
|
|
493
|
+
tags?: string[] | undefined;
|
|
494
|
+
archived?: boolean | undefined;
|
|
495
|
+
starred?: boolean | undefined;
|
|
496
|
+
minMessages?: number | undefined;
|
|
497
|
+
maxMessages?: number | undefined;
|
|
498
|
+
searchQuery?: string | undefined;
|
|
499
|
+
}>>;
|
|
500
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
501
|
+
}, "strip", z.ZodTypeAny, {
|
|
502
|
+
filter?: {
|
|
503
|
+
tags?: string[] | undefined;
|
|
504
|
+
archived?: boolean | undefined;
|
|
505
|
+
starred?: boolean | undefined;
|
|
506
|
+
minMessages?: number | undefined;
|
|
507
|
+
maxMessages?: number | undefined;
|
|
508
|
+
searchQuery?: string | undefined;
|
|
509
|
+
} | undefined;
|
|
510
|
+
since?: Date | undefined;
|
|
511
|
+
until?: Date | undefined;
|
|
512
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
513
|
+
includeMedia?: boolean | undefined;
|
|
514
|
+
outputFormat?: ("json" | "markdown" | "html" | "txt")[] | undefined;
|
|
515
|
+
dryRun?: boolean | undefined;
|
|
516
|
+
}, {
|
|
517
|
+
filter?: {
|
|
518
|
+
tags?: string[] | undefined;
|
|
519
|
+
archived?: boolean | undefined;
|
|
520
|
+
starred?: boolean | undefined;
|
|
521
|
+
minMessages?: number | undefined;
|
|
522
|
+
maxMessages?: number | undefined;
|
|
523
|
+
searchQuery?: string | undefined;
|
|
524
|
+
} | undefined;
|
|
525
|
+
since?: Date | undefined;
|
|
526
|
+
until?: Date | undefined;
|
|
527
|
+
providers?: ("grok" | "chatgpt" | "claude" | "gemini" | "perplexity")[] | undefined;
|
|
528
|
+
includeMedia?: boolean | undefined;
|
|
529
|
+
outputFormat?: ("json" | "markdown" | "html" | "txt")[] | undefined;
|
|
530
|
+
dryRun?: boolean | undefined;
|
|
531
|
+
}>;
|
|
532
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/types/schemas.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB,kEAAgE,CAAC;AAEhG,eAAO,MAAM,gBAAgB,4CAA0C,CAAC;AAExE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AAIH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBxB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB7B,CAAC;AAIH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC;AAIH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB/B,CAAC"}
|