@struktoai/mirage-browser 0.0.1-alpha.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/README.md +230 -0
- package/dist/box-Y2SJWAAO.js +8 -0
- package/dist/box-Y2SJWAAO.js.map +1 -0
- package/dist/chunk-27UVUTJH.js +126 -0
- package/dist/chunk-27UVUTJH.js.map +1 -0
- package/dist/chunk-33SBWNB4.js +103 -0
- package/dist/chunk-33SBWNB4.js.map +1 -0
- package/dist/chunk-3PWPFOPS.js +88 -0
- package/dist/chunk-3PWPFOPS.js.map +1 -0
- package/dist/chunk-5Q5GJUAF.js +88 -0
- package/dist/chunk-5Q5GJUAF.js.map +1 -0
- package/dist/chunk-7GZXXXAS.js +24 -0
- package/dist/chunk-7GZXXXAS.js.map +1 -0
- package/dist/chunk-B4SYG2FD.js +24 -0
- package/dist/chunk-B4SYG2FD.js.map +1 -0
- package/dist/chunk-BIZONEJC.js +24 -0
- package/dist/chunk-BIZONEJC.js.map +1 -0
- package/dist/chunk-CQJTW45B.js +92 -0
- package/dist/chunk-CQJTW45B.js.map +1 -0
- package/dist/chunk-CZOTICOC.js +93 -0
- package/dist/chunk-CZOTICOC.js.map +1 -0
- package/dist/chunk-DDM2Z7YA.js +94 -0
- package/dist/chunk-DDM2Z7YA.js.map +1 -0
- package/dist/chunk-DPC7QRYO.js +99 -0
- package/dist/chunk-DPC7QRYO.js.map +1 -0
- package/dist/chunk-FL7YLP7D.js +107 -0
- package/dist/chunk-FL7YLP7D.js.map +1 -0
- package/dist/chunk-GFWWDQUZ.js +24 -0
- package/dist/chunk-GFWWDQUZ.js.map +1 -0
- package/dist/chunk-LG6GVNOL.js +94 -0
- package/dist/chunk-LG6GVNOL.js.map +1 -0
- package/dist/chunk-LSSB3AEW.js +94 -0
- package/dist/chunk-LSSB3AEW.js.map +1 -0
- package/dist/chunk-LUDXUYIA.js +89 -0
- package/dist/chunk-LUDXUYIA.js.map +1 -0
- package/dist/chunk-LZRPA2P7.js +99 -0
- package/dist/chunk-LZRPA2P7.js.map +1 -0
- package/dist/chunk-ML57VOCK.js +7590 -0
- package/dist/chunk-ML57VOCK.js.map +1 -0
- package/dist/chunk-MSNVGH6T.js +92 -0
- package/dist/chunk-MSNVGH6T.js.map +1 -0
- package/dist/chunk-NBWTZXH2.js +27 -0
- package/dist/chunk-NBWTZXH2.js.map +1 -0
- package/dist/chunk-ONQ5JGPR.js +96 -0
- package/dist/chunk-ONQ5JGPR.js.map +1 -0
- package/dist/chunk-OPROOV6J.js +24 -0
- package/dist/chunk-OPROOV6J.js.map +1 -0
- package/dist/chunk-QARIHW3I.js +23 -0
- package/dist/chunk-QARIHW3I.js.map +1 -0
- package/dist/chunk-QYFCHCGX.js +144 -0
- package/dist/chunk-QYFCHCGX.js.map +1 -0
- package/dist/chunk-SQQI4A6Y.js +94 -0
- package/dist/chunk-SQQI4A6Y.js.map +1 -0
- package/dist/chunk-UFXEZ56G.js +79 -0
- package/dist/chunk-UFXEZ56G.js.map +1 -0
- package/dist/chunk-UW3D2AF6.js +94 -0
- package/dist/chunk-UW3D2AF6.js.map +1 -0
- package/dist/chunk-UZWJ462U.js +93 -0
- package/dist/chunk-UZWJ462U.js.map +1 -0
- package/dist/chunk-VLFE4FGD.js +178 -0
- package/dist/chunk-VLFE4FGD.js.map +1 -0
- package/dist/chunk-XIURBEVZ.js +24 -0
- package/dist/chunk-XIURBEVZ.js.map +1 -0
- package/dist/chunk-ZJ6ROCTP.js +114 -0
- package/dist/chunk-ZJ6ROCTP.js.map +1 -0
- package/dist/config-4FABMWVK.js +9 -0
- package/dist/config-4FABMWVK.js.map +1 -0
- package/dist/config-DGIUMGBB.js +9 -0
- package/dist/config-DGIUMGBB.js.map +1 -0
- package/dist/config-G3TTNXLY.js +9 -0
- package/dist/config-G3TTNXLY.js.map +1 -0
- package/dist/config-GPCEEKCB.js +9 -0
- package/dist/config-GPCEEKCB.js.map +1 -0
- package/dist/config-KQ5VR2KZ.js +9 -0
- package/dist/config-KQ5VR2KZ.js.map +1 -0
- package/dist/config-LPMMVXLS.js +9 -0
- package/dist/config-LPMMVXLS.js.map +1 -0
- package/dist/config-U4UI4OKA.js +9 -0
- package/dist/config-U4UI4OKA.js.map +1 -0
- package/dist/config-VZGK63Z5.js +9 -0
- package/dist/config-VZGK63Z5.js.map +1 -0
- package/dist/discord-RG6URXXS.js +7 -0
- package/dist/discord-RG6URXXS.js.map +1 -0
- package/dist/dropbox-P7SOL7GN.js +8 -0
- package/dist/dropbox-P7SOL7GN.js.map +1 -0
- package/dist/gcs-2QHB4CBT.js +8 -0
- package/dist/gcs-2QHB4CBT.js.map +1 -0
- package/dist/gdocs-JNZTOZ33.js +8 -0
- package/dist/gdocs-JNZTOZ33.js.map +1 -0
- package/dist/gdrive-6MEIVN2F.js +8 -0
- package/dist/gdrive-6MEIVN2F.js.map +1 -0
- package/dist/github-M7WODJR2.js +7 -0
- package/dist/github-M7WODJR2.js.map +1 -0
- package/dist/github_ci-4XELEFSZ.js +8 -0
- package/dist/github_ci-4XELEFSZ.js.map +1 -0
- package/dist/gmail-AO6A3URH.js +8 -0
- package/dist/gmail-AO6A3URH.js.map +1 -0
- package/dist/gsheets-RFOKXMOJ.js +8 -0
- package/dist/gsheets-RFOKXMOJ.js.map +1 -0
- package/dist/gslides-GTVZPLLB.js +8 -0
- package/dist/gslides-GTVZPLLB.js.map +1 -0
- package/dist/index.d.ts +1127 -0
- package/dist/index.js +743 -0
- package/dist/index.js.map +1 -0
- package/dist/langfuse-CDOLELMB.js +7 -0
- package/dist/langfuse-CDOLELMB.js.map +1 -0
- package/dist/linear-SXOQGG6B.js +7 -0
- package/dist/linear-SXOQGG6B.js.map +1 -0
- package/dist/mongodb-HA7FAKDJ.js +7 -0
- package/dist/mongodb-HA7FAKDJ.js.map +1 -0
- package/dist/notion-ANZNMM3L.js +7 -0
- package/dist/notion-ANZNMM3L.js.map +1 -0
- package/dist/oci-ML5ZRVZ2.js +8 -0
- package/dist/oci-ML5ZRVZ2.js.map +1 -0
- package/dist/opfs-57XFMWWE.js +7 -0
- package/dist/opfs-57XFMWWE.js.map +1 -0
- package/dist/postgres-CK4HWZSL.js +7 -0
- package/dist/postgres-CK4HWZSL.js.map +1 -0
- package/dist/r2-56O4Q2J4.js +8 -0
- package/dist/r2-56O4Q2J4.js.map +1 -0
- package/dist/s3-A4XFE6QV.js +9 -0
- package/dist/s3-A4XFE6QV.js.map +1 -0
- package/dist/slack-QA7H7WLM.js +7 -0
- package/dist/slack-QA7H7WLM.js.map +1 -0
- package/dist/supabase-NNK2RWG3.js +8 -0
- package/dist/supabase-NNK2RWG3.js.map +1 -0
- package/dist/trello-H6PZT2IT.js +7 -0
- package/dist/trello-H6PZT2IT.js.map +1 -0
- package/package.json +74 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1127 @@
|
|
|
1
|
+
import { Workspace as Workspace$1, Resource, WorkspaceOptions, Accessor, RegisteredOp, RegisteredCommand, PathSpec, FileStat, FindOptions, S3Config, S3Accessor, IndexCacheStore, S3ConfigRedacted, S3BrowserPresignedUrlProvider, SlackAccessor, DiscordAccessor, PostgresConfigResolved, PgDriver, PostgresAccessor, PostgresConfig, PgQueryResult, MongoDBConfigResolved, MongoDriver, MongoDBAccessor, MongoDBConfig, MongoFindOptions, SSCholarConfigResolved, SSCholarDriver, SSCholarAccessor, SSCholarConfig, VercelConfigResolved, VercelDriver, VercelAccessor, VercelConfig, PostHogConfigResolved, PostHogDriver, PostHogAccessor, PostHogConfig, TrelloAccessor, LinearAccessor, NotionAccessor, LangfuseAccessor, GitHubAccessor, GitHubCIAccessor, GDocsAccessor, GSheetsAccessor, GSlidesAccessor, GDriveAccessor, DropboxAccessor, BoxAccessor, GmailAccessor } from '@struktoai/mirage-core';
|
|
2
|
+
export * from '@struktoai/mirage-core';
|
|
3
|
+
export { HttpPostHogDriver, HttpPostHogDriverOptions, HttpSSCholarDriver, HttpSSCholarDriverOptions, HttpVercelDriver, HttpVercelDriverOptions, MountMode, S3BrowserOperation, S3BrowserPresignedUrlProvider, S3BrowserSignOptions, S3Config, S3ConfigRedacted, redactS3Config } from '@struktoai/mirage-core';
|
|
4
|
+
import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
|
|
5
|
+
|
|
6
|
+
declare class Workspace extends Workspace$1 {
|
|
7
|
+
constructor(resources: Record<string, Resource>, options?: WorkspaceOptions);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface OPFSHandleProvider {
|
|
11
|
+
requireHandle(): FileSystemDirectoryHandle;
|
|
12
|
+
}
|
|
13
|
+
declare class OPFSAccessor extends Accessor {
|
|
14
|
+
private readonly provider;
|
|
15
|
+
constructor(provider: OPFSHandleProvider);
|
|
16
|
+
get rootHandle(): FileSystemDirectoryHandle;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface OPFSResourceOptions {
|
|
20
|
+
root?: string;
|
|
21
|
+
}
|
|
22
|
+
interface OPFSResourceState {
|
|
23
|
+
type: string;
|
|
24
|
+
needsOverride: boolean;
|
|
25
|
+
files: Record<string, Uint8Array>;
|
|
26
|
+
dirs: string[];
|
|
27
|
+
}
|
|
28
|
+
declare class OPFSResource implements Resource {
|
|
29
|
+
readonly kind: "opfs";
|
|
30
|
+
readonly prompt = "{prefix}\n Browser Origin Private File System. Persistent per-origin storage that survives page reloads.\n Standard commands: ls, cat, head, tail, grep, wc, find, tree, mkdir, touch, cp, mv, rm, tee.";
|
|
31
|
+
readonly rootName: string;
|
|
32
|
+
readonly accessor: OPFSAccessor;
|
|
33
|
+
private rootHandle;
|
|
34
|
+
private openPromise;
|
|
35
|
+
constructor(options?: OPFSResourceOptions);
|
|
36
|
+
open(): Promise<void>;
|
|
37
|
+
close(): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Lazily resolve to a usable root handle. Memoizes `navigator.storage`
|
|
40
|
+
* traversal so the resource self-initializes on first method call without
|
|
41
|
+
* relying on an external orchestrator.
|
|
42
|
+
*/
|
|
43
|
+
private ensureOpen;
|
|
44
|
+
requireHandle(): FileSystemDirectoryHandle;
|
|
45
|
+
ops(): readonly RegisteredOp[];
|
|
46
|
+
commands(): readonly RegisteredCommand[];
|
|
47
|
+
streamPath(p: PathSpec): AsyncIterable<Uint8Array>;
|
|
48
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
49
|
+
writeFile(p: PathSpec, data: Uint8Array): Promise<void>;
|
|
50
|
+
appendFile(p: PathSpec, data: Uint8Array): Promise<void>;
|
|
51
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
52
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
53
|
+
exists(p: PathSpec): Promise<boolean>;
|
|
54
|
+
mkdir(p: PathSpec, options?: {
|
|
55
|
+
recursive?: boolean;
|
|
56
|
+
}): Promise<void>;
|
|
57
|
+
rmdir(p: PathSpec): Promise<void>;
|
|
58
|
+
unlink(p: PathSpec): Promise<void>;
|
|
59
|
+
rename(src: PathSpec, dst: PathSpec): Promise<void>;
|
|
60
|
+
truncate(p: PathSpec, length: number): Promise<void>;
|
|
61
|
+
copy(src: PathSpec, dst: PathSpec): Promise<void>;
|
|
62
|
+
rmR(p: PathSpec): Promise<void>;
|
|
63
|
+
du(p: PathSpec): Promise<number>;
|
|
64
|
+
find(p: PathSpec, options?: FindOptions): Promise<string[]>;
|
|
65
|
+
glob(paths: readonly PathSpec[]): Promise<PathSpec[]>;
|
|
66
|
+
getState(): Promise<OPFSResourceState>;
|
|
67
|
+
loadState(state: OPFSResourceState): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare const OPFS_PROMPT = "{prefix}\n Browser Origin Private File System. Persistent per-origin storage that survives page reloads.\n Standard commands: ls, cat, head, tail, grep, wc, find, tree, mkdir, touch, cp, mv, rm, tee.";
|
|
71
|
+
|
|
72
|
+
declare const OPFS_OPS: readonly RegisteredOp[];
|
|
73
|
+
|
|
74
|
+
declare const OPFS_COMMANDS: readonly RegisteredCommand[];
|
|
75
|
+
|
|
76
|
+
declare const S3_BROWSER_PROMPT = "{prefix}\n Remote S3 bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE \u2014 see S3BrowserPresignedUrlProvider docs.";
|
|
77
|
+
interface S3ResourceState {
|
|
78
|
+
type: string;
|
|
79
|
+
needsOverride: boolean;
|
|
80
|
+
redactedFields: readonly string[];
|
|
81
|
+
config: S3ConfigRedacted;
|
|
82
|
+
}
|
|
83
|
+
declare class S3Resource implements Resource {
|
|
84
|
+
readonly kind: string;
|
|
85
|
+
readonly isRemote: boolean;
|
|
86
|
+
readonly indexTtl: number;
|
|
87
|
+
readonly prompt: string;
|
|
88
|
+
readonly config: S3Config;
|
|
89
|
+
readonly accessor: S3Accessor;
|
|
90
|
+
readonly index: IndexCacheStore;
|
|
91
|
+
constructor(config: S3Config);
|
|
92
|
+
open(): Promise<void>;
|
|
93
|
+
close(): Promise<void>;
|
|
94
|
+
commands(): readonly RegisteredCommand[];
|
|
95
|
+
ops(): readonly RegisteredOp[];
|
|
96
|
+
streamPath(p: PathSpec): AsyncIterable<Uint8Array>;
|
|
97
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
98
|
+
writeFile(p: PathSpec, data: Uint8Array): Promise<void>;
|
|
99
|
+
appendFile(p: PathSpec, data: Uint8Array): Promise<void>;
|
|
100
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
101
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
102
|
+
exists(p: PathSpec): Promise<boolean>;
|
|
103
|
+
mkdir(p: PathSpec): Promise<void>;
|
|
104
|
+
rmdir(p: PathSpec): Promise<void>;
|
|
105
|
+
unlink(p: PathSpec): Promise<void>;
|
|
106
|
+
rename(src: PathSpec, dst: PathSpec): Promise<void>;
|
|
107
|
+
truncate(p: PathSpec, length: number): Promise<void>;
|
|
108
|
+
copy(src: PathSpec, dst: PathSpec): Promise<void>;
|
|
109
|
+
rmR(p: PathSpec): Promise<void>;
|
|
110
|
+
du(p: PathSpec): Promise<number>;
|
|
111
|
+
find(p: PathSpec, options?: FindOptions): Promise<string[]>;
|
|
112
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
113
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
114
|
+
getState(): Promise<S3ResourceState>;
|
|
115
|
+
loadState(_state: S3ResourceState): Promise<void>;
|
|
116
|
+
_duAll(p: PathSpec): Promise<[string, number][]>;
|
|
117
|
+
_rangeRead(p: PathSpec, offset: number, size: number): Promise<Uint8Array>;
|
|
118
|
+
_create(p: PathSpec): Promise<void>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface GCSConfig {
|
|
122
|
+
bucket: string;
|
|
123
|
+
presignedUrlProvider: S3BrowserPresignedUrlProvider;
|
|
124
|
+
region?: string;
|
|
125
|
+
endpoint?: string;
|
|
126
|
+
defaultContentType?: string;
|
|
127
|
+
}
|
|
128
|
+
interface GCSConfigRedacted extends Omit<GCSConfig, 'presignedUrlProvider'> {
|
|
129
|
+
presignedUrlProvider: '<REDACTED>';
|
|
130
|
+
}
|
|
131
|
+
declare function gcsToS3Config(config: GCSConfig): S3Config;
|
|
132
|
+
declare function redactGcsConfig(config: GCSConfig): GCSConfigRedacted;
|
|
133
|
+
|
|
134
|
+
interface GCSResourceState {
|
|
135
|
+
type: string;
|
|
136
|
+
needsOverride: boolean;
|
|
137
|
+
redactedFields: readonly string[];
|
|
138
|
+
config: GCSConfigRedacted;
|
|
139
|
+
}
|
|
140
|
+
declare class GCSResource extends S3Resource {
|
|
141
|
+
readonly kind: string;
|
|
142
|
+
readonly prompt: string;
|
|
143
|
+
readonly gcsConfig: GCSConfig;
|
|
144
|
+
private readonly gcsOps;
|
|
145
|
+
private readonly gcsCommands;
|
|
146
|
+
constructor(config: GCSConfig);
|
|
147
|
+
ops(): readonly RegisteredOp[];
|
|
148
|
+
commands(): readonly RegisteredCommand[];
|
|
149
|
+
getState(): Promise<GCSResourceState>;
|
|
150
|
+
loadState(_state: GCSResourceState): Promise<void>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare const GCS_BROWSER_PROMPT = "{prefix}\n Remote Google Cloud Storage bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE \u2014 see S3BrowserPresignedUrlProvider docs.";
|
|
154
|
+
|
|
155
|
+
interface R2Config {
|
|
156
|
+
bucket: string;
|
|
157
|
+
presignedUrlProvider: S3BrowserPresignedUrlProvider;
|
|
158
|
+
accountId?: string;
|
|
159
|
+
region?: string;
|
|
160
|
+
endpoint?: string;
|
|
161
|
+
defaultContentType?: string;
|
|
162
|
+
}
|
|
163
|
+
interface R2ConfigRedacted extends Omit<R2Config, 'presignedUrlProvider'> {
|
|
164
|
+
presignedUrlProvider: '<REDACTED>';
|
|
165
|
+
}
|
|
166
|
+
declare function resolvedR2Endpoint(config: R2Config): string | undefined;
|
|
167
|
+
declare function r2ToS3Config(config: R2Config): S3Config;
|
|
168
|
+
declare function redactR2Config(config: R2Config): R2ConfigRedacted;
|
|
169
|
+
|
|
170
|
+
interface R2ResourceState {
|
|
171
|
+
type: string;
|
|
172
|
+
needsOverride: boolean;
|
|
173
|
+
redactedFields: readonly string[];
|
|
174
|
+
config: R2ConfigRedacted;
|
|
175
|
+
}
|
|
176
|
+
declare class R2Resource extends S3Resource {
|
|
177
|
+
readonly kind: string;
|
|
178
|
+
readonly prompt: string;
|
|
179
|
+
readonly r2Config: R2Config;
|
|
180
|
+
private readonly r2Ops;
|
|
181
|
+
private readonly r2Commands;
|
|
182
|
+
constructor(config: R2Config);
|
|
183
|
+
ops(): readonly RegisteredOp[];
|
|
184
|
+
commands(): readonly RegisteredCommand[];
|
|
185
|
+
getState(): Promise<R2ResourceState>;
|
|
186
|
+
loadState(_state: R2ResourceState): Promise<void>;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare const R2_BROWSER_PROMPT = "{prefix}\n Remote Cloudflare R2 bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE \u2014 see S3BrowserPresignedUrlProvider docs.";
|
|
190
|
+
|
|
191
|
+
interface OCIConfig {
|
|
192
|
+
bucket: string;
|
|
193
|
+
presignedUrlProvider: S3BrowserPresignedUrlProvider;
|
|
194
|
+
namespace?: string;
|
|
195
|
+
region?: string;
|
|
196
|
+
endpoint?: string;
|
|
197
|
+
defaultContentType?: string;
|
|
198
|
+
}
|
|
199
|
+
interface OCIConfigRedacted extends Omit<OCIConfig, 'presignedUrlProvider'> {
|
|
200
|
+
presignedUrlProvider: '<REDACTED>';
|
|
201
|
+
}
|
|
202
|
+
declare function resolvedOciEndpoint(config: OCIConfig): string | undefined;
|
|
203
|
+
declare function ociToS3Config(config: OCIConfig): S3Config;
|
|
204
|
+
declare function redactOciConfig(config: OCIConfig): OCIConfigRedacted;
|
|
205
|
+
|
|
206
|
+
interface OCIResourceState {
|
|
207
|
+
type: string;
|
|
208
|
+
needsOverride: boolean;
|
|
209
|
+
redactedFields: readonly string[];
|
|
210
|
+
config: OCIConfigRedacted;
|
|
211
|
+
}
|
|
212
|
+
declare class OCIResource extends S3Resource {
|
|
213
|
+
readonly kind: string;
|
|
214
|
+
readonly prompt: string;
|
|
215
|
+
readonly ociConfig: OCIConfig;
|
|
216
|
+
private readonly ociOps;
|
|
217
|
+
private readonly ociCommands;
|
|
218
|
+
constructor(config: OCIConfig);
|
|
219
|
+
ops(): readonly RegisteredOp[];
|
|
220
|
+
commands(): readonly RegisteredCommand[];
|
|
221
|
+
getState(): Promise<OCIResourceState>;
|
|
222
|
+
loadState(_state: OCIResourceState): Promise<void>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare const OCI_BROWSER_PROMPT = "{prefix}\n Remote Oracle Cloud Object Storage accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE \u2014 see S3BrowserPresignedUrlProvider docs.";
|
|
226
|
+
|
|
227
|
+
interface SupabaseConfig {
|
|
228
|
+
bucket: string;
|
|
229
|
+
presignedUrlProvider: S3BrowserPresignedUrlProvider;
|
|
230
|
+
projectRef?: string;
|
|
231
|
+
region?: string;
|
|
232
|
+
endpoint?: string;
|
|
233
|
+
defaultContentType?: string;
|
|
234
|
+
}
|
|
235
|
+
interface SupabaseConfigRedacted extends Omit<SupabaseConfig, 'presignedUrlProvider'> {
|
|
236
|
+
presignedUrlProvider: '<REDACTED>';
|
|
237
|
+
}
|
|
238
|
+
declare function resolvedSupabaseEndpoint(config: SupabaseConfig): string | undefined;
|
|
239
|
+
declare function supabaseToS3Config(config: SupabaseConfig): S3Config;
|
|
240
|
+
declare function redactSupabaseConfig(config: SupabaseConfig): SupabaseConfigRedacted;
|
|
241
|
+
|
|
242
|
+
interface SupabaseResourceState {
|
|
243
|
+
type: string;
|
|
244
|
+
needsOverride: boolean;
|
|
245
|
+
redactedFields: readonly string[];
|
|
246
|
+
config: SupabaseConfigRedacted;
|
|
247
|
+
}
|
|
248
|
+
declare class SupabaseResource extends S3Resource {
|
|
249
|
+
readonly kind: string;
|
|
250
|
+
readonly prompt: string;
|
|
251
|
+
readonly supabaseConfig: SupabaseConfig;
|
|
252
|
+
private readonly supabaseOps;
|
|
253
|
+
private readonly supabaseCommands;
|
|
254
|
+
constructor(config: SupabaseConfig);
|
|
255
|
+
ops(): readonly RegisteredOp[];
|
|
256
|
+
commands(): readonly RegisteredCommand[];
|
|
257
|
+
getState(): Promise<SupabaseResourceState>;
|
|
258
|
+
loadState(_state: SupabaseResourceState): Promise<void>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
declare const SUPABASE_BROWSER_PROMPT = "{prefix}\n Remote Supabase Storage bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE \u2014 see S3BrowserPresignedUrlProvider docs.";
|
|
262
|
+
|
|
263
|
+
interface SlackConfig {
|
|
264
|
+
proxyUrl: string;
|
|
265
|
+
getHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
266
|
+
}
|
|
267
|
+
interface SlackConfigRedacted {
|
|
268
|
+
proxyUrl: string;
|
|
269
|
+
getHeaders?: '<REDACTED>';
|
|
270
|
+
}
|
|
271
|
+
declare function redactSlackConfig(config: SlackConfig): SlackConfigRedacted;
|
|
272
|
+
|
|
273
|
+
interface SlackResourceState {
|
|
274
|
+
type: string;
|
|
275
|
+
needsOverride: boolean;
|
|
276
|
+
redactedFields: readonly string[];
|
|
277
|
+
config: SlackConfigRedacted;
|
|
278
|
+
}
|
|
279
|
+
declare class SlackResource implements Resource {
|
|
280
|
+
readonly kind: string;
|
|
281
|
+
readonly isRemote: boolean;
|
|
282
|
+
readonly indexTtl: number;
|
|
283
|
+
readonly prompt: string;
|
|
284
|
+
readonly writePrompt: string;
|
|
285
|
+
readonly config: SlackConfig;
|
|
286
|
+
readonly accessor: SlackAccessor;
|
|
287
|
+
readonly index: IndexCacheStore;
|
|
288
|
+
constructor(config: SlackConfig);
|
|
289
|
+
open(): Promise<void>;
|
|
290
|
+
close(): Promise<void>;
|
|
291
|
+
commands(): readonly RegisteredCommand[];
|
|
292
|
+
ops(): readonly RegisteredOp[];
|
|
293
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
294
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
295
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
296
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
297
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
298
|
+
getState(): Promise<SlackResourceState>;
|
|
299
|
+
loadState(_state: SlackResourceState): Promise<void>;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
interface DiscordConfig {
|
|
303
|
+
proxyUrl: string;
|
|
304
|
+
getHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
305
|
+
}
|
|
306
|
+
interface DiscordConfigRedacted {
|
|
307
|
+
proxyUrl: string;
|
|
308
|
+
getHeaders?: '<REDACTED>';
|
|
309
|
+
}
|
|
310
|
+
declare function redactDiscordConfig(config: DiscordConfig): DiscordConfigRedacted;
|
|
311
|
+
|
|
312
|
+
interface DiscordResourceState {
|
|
313
|
+
type: string;
|
|
314
|
+
needsOverride: boolean;
|
|
315
|
+
redactedFields: readonly string[];
|
|
316
|
+
config: DiscordConfigRedacted;
|
|
317
|
+
}
|
|
318
|
+
declare class DiscordResource implements Resource {
|
|
319
|
+
readonly kind: string;
|
|
320
|
+
readonly isRemote: boolean;
|
|
321
|
+
readonly indexTtl: number;
|
|
322
|
+
readonly prompt: string;
|
|
323
|
+
readonly writePrompt: string;
|
|
324
|
+
readonly config: DiscordConfig;
|
|
325
|
+
readonly accessor: DiscordAccessor;
|
|
326
|
+
readonly index: IndexCacheStore;
|
|
327
|
+
constructor(config: DiscordConfig);
|
|
328
|
+
open(): Promise<void>;
|
|
329
|
+
close(): Promise<void>;
|
|
330
|
+
commands(): readonly RegisteredCommand[];
|
|
331
|
+
ops(): readonly RegisteredOp[];
|
|
332
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
333
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
334
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
335
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
336
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
337
|
+
getState(): Promise<DiscordResourceState>;
|
|
338
|
+
loadState(_state: DiscordResourceState): Promise<void>;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
interface PostgresResourceOptions {
|
|
342
|
+
config: PostgresConfig;
|
|
343
|
+
prefix?: string;
|
|
344
|
+
driver?: PgDriver;
|
|
345
|
+
}
|
|
346
|
+
declare class PostgresResource implements Resource {
|
|
347
|
+
readonly kind: string;
|
|
348
|
+
readonly isRemote: boolean;
|
|
349
|
+
readonly indexTtl: number;
|
|
350
|
+
readonly prompt: string;
|
|
351
|
+
readonly config: PostgresConfigResolved;
|
|
352
|
+
readonly driver: PgDriver;
|
|
353
|
+
readonly accessor: PostgresAccessor;
|
|
354
|
+
readonly index: IndexCacheStore;
|
|
355
|
+
constructor(options: PostgresResourceOptions | PostgresConfig);
|
|
356
|
+
open(): Promise<void>;
|
|
357
|
+
close(): Promise<void>;
|
|
358
|
+
ops(): readonly RegisteredOp[];
|
|
359
|
+
commands(): readonly RegisteredCommand[];
|
|
360
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
361
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
362
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
363
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
declare class NeonPgDriver implements PgDriver {
|
|
367
|
+
private readonly sql;
|
|
368
|
+
constructor(dsn: string);
|
|
369
|
+
query<R = Record<string, unknown>>(text: string, params?: readonly unknown[]): Promise<PgQueryResult<R>>;
|
|
370
|
+
close(): Promise<void>;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
interface MongoDBResourceOptions {
|
|
374
|
+
config: MongoDBConfig;
|
|
375
|
+
prefix?: string;
|
|
376
|
+
driver?: MongoDriver;
|
|
377
|
+
endpoint?: string;
|
|
378
|
+
}
|
|
379
|
+
declare class MongoDBResource implements Resource {
|
|
380
|
+
readonly kind: string;
|
|
381
|
+
readonly isRemote: boolean;
|
|
382
|
+
readonly indexTtl: number;
|
|
383
|
+
readonly prompt: string;
|
|
384
|
+
readonly config: MongoDBConfigResolved;
|
|
385
|
+
readonly driver: MongoDriver;
|
|
386
|
+
readonly accessor: MongoDBAccessor;
|
|
387
|
+
readonly index: IndexCacheStore;
|
|
388
|
+
constructor(options: MongoDBResourceOptions | MongoDBConfig);
|
|
389
|
+
open(): Promise<void>;
|
|
390
|
+
close(): Promise<void>;
|
|
391
|
+
ops(): readonly RegisteredOp[];
|
|
392
|
+
commands(): readonly RegisteredCommand[];
|
|
393
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
394
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
395
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
396
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
interface HttpMongoDriverOptions {
|
|
400
|
+
endpoint: string;
|
|
401
|
+
fetchImpl?: typeof fetch;
|
|
402
|
+
headers?: Record<string, string>;
|
|
403
|
+
}
|
|
404
|
+
declare class HttpMongoDriver implements MongoDriver {
|
|
405
|
+
readonly endpoint: string;
|
|
406
|
+
private readonly fetchImpl;
|
|
407
|
+
private readonly headers;
|
|
408
|
+
constructor(options: HttpMongoDriverOptions);
|
|
409
|
+
private post;
|
|
410
|
+
listDatabases(): Promise<string[]>;
|
|
411
|
+
listCollections(database: string): Promise<string[]>;
|
|
412
|
+
findDocuments<T = Record<string, unknown>>(database: string, collection: string, filter?: Record<string, unknown>, options?: MongoFindOptions): Promise<T[]>;
|
|
413
|
+
countDocuments(database: string, collection: string, filter?: Record<string, unknown>): Promise<number>;
|
|
414
|
+
listIndexes(database: string, collection: string): Promise<Record<string, unknown>[]>;
|
|
415
|
+
close(): Promise<void>;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
interface SSCholarPaperResourceOptions {
|
|
419
|
+
config?: SSCholarConfig;
|
|
420
|
+
prefix?: string;
|
|
421
|
+
driver?: SSCholarDriver;
|
|
422
|
+
}
|
|
423
|
+
declare class SSCholarPaperResource implements Resource {
|
|
424
|
+
readonly kind: string;
|
|
425
|
+
readonly isRemote: boolean;
|
|
426
|
+
readonly indexTtl: number;
|
|
427
|
+
readonly prompt: string;
|
|
428
|
+
readonly config: SSCholarConfigResolved;
|
|
429
|
+
readonly driver: SSCholarDriver;
|
|
430
|
+
readonly accessor: SSCholarAccessor;
|
|
431
|
+
readonly index: IndexCacheStore;
|
|
432
|
+
constructor(options?: SSCholarPaperResourceOptions | SSCholarConfig);
|
|
433
|
+
open(): Promise<void>;
|
|
434
|
+
close(): Promise<void>;
|
|
435
|
+
ops(): readonly RegisteredOp[];
|
|
436
|
+
commands(): readonly RegisteredCommand[];
|
|
437
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
438
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
439
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
440
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
interface SSCholarAuthorResourceOptions {
|
|
444
|
+
config?: SSCholarConfig;
|
|
445
|
+
prefix?: string;
|
|
446
|
+
driver?: SSCholarDriver;
|
|
447
|
+
}
|
|
448
|
+
declare class SSCholarAuthorResource implements Resource {
|
|
449
|
+
readonly kind: string;
|
|
450
|
+
readonly isRemote: boolean;
|
|
451
|
+
readonly indexTtl: number;
|
|
452
|
+
readonly prompt: string;
|
|
453
|
+
readonly config: SSCholarConfigResolved;
|
|
454
|
+
readonly driver: SSCholarDriver;
|
|
455
|
+
readonly accessor: SSCholarAccessor;
|
|
456
|
+
readonly index: IndexCacheStore;
|
|
457
|
+
constructor(options?: SSCholarAuthorResourceOptions | SSCholarConfig);
|
|
458
|
+
open(): Promise<void>;
|
|
459
|
+
close(): Promise<void>;
|
|
460
|
+
ops(): readonly RegisteredOp[];
|
|
461
|
+
commands(): readonly RegisteredCommand[];
|
|
462
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
463
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
464
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
465
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
interface VercelResourceOptions {
|
|
469
|
+
config?: VercelConfig;
|
|
470
|
+
prefix?: string;
|
|
471
|
+
driver?: VercelDriver;
|
|
472
|
+
}
|
|
473
|
+
declare class VercelResource implements Resource {
|
|
474
|
+
readonly kind: string;
|
|
475
|
+
readonly isRemote: boolean;
|
|
476
|
+
readonly indexTtl: number;
|
|
477
|
+
readonly prompt: string;
|
|
478
|
+
readonly config: VercelConfigResolved;
|
|
479
|
+
readonly driver: VercelDriver;
|
|
480
|
+
readonly accessor: VercelAccessor;
|
|
481
|
+
readonly index: IndexCacheStore;
|
|
482
|
+
constructor(options?: VercelResourceOptions | VercelConfig);
|
|
483
|
+
open(): Promise<void>;
|
|
484
|
+
close(): Promise<void>;
|
|
485
|
+
ops(): readonly RegisteredOp[];
|
|
486
|
+
commands(): readonly RegisteredCommand[];
|
|
487
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
488
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
489
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
490
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
interface PostHogResourceOptions {
|
|
494
|
+
config?: PostHogConfig;
|
|
495
|
+
prefix?: string;
|
|
496
|
+
driver?: PostHogDriver;
|
|
497
|
+
}
|
|
498
|
+
declare class PostHogResource implements Resource {
|
|
499
|
+
readonly kind: string;
|
|
500
|
+
readonly isRemote: boolean;
|
|
501
|
+
readonly indexTtl: number;
|
|
502
|
+
readonly prompt: string;
|
|
503
|
+
readonly config: PostHogConfigResolved;
|
|
504
|
+
readonly driver: PostHogDriver;
|
|
505
|
+
readonly accessor: PostHogAccessor;
|
|
506
|
+
readonly index: IndexCacheStore;
|
|
507
|
+
constructor(options?: PostHogResourceOptions | PostHogConfig);
|
|
508
|
+
open(): Promise<void>;
|
|
509
|
+
close(): Promise<void>;
|
|
510
|
+
ops(): readonly RegisteredOp[];
|
|
511
|
+
commands(): readonly RegisteredCommand[];
|
|
512
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
513
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
514
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
515
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
interface TrelloConfig {
|
|
519
|
+
apiKey: string;
|
|
520
|
+
apiToken: string;
|
|
521
|
+
workspaceId?: string;
|
|
522
|
+
boardIds?: readonly string[];
|
|
523
|
+
baseUrl?: string;
|
|
524
|
+
}
|
|
525
|
+
interface TrelloConfigRedacted {
|
|
526
|
+
apiKey: '<REDACTED>';
|
|
527
|
+
apiToken: '<REDACTED>';
|
|
528
|
+
workspaceId?: string;
|
|
529
|
+
boardIds?: readonly string[];
|
|
530
|
+
baseUrl?: string;
|
|
531
|
+
}
|
|
532
|
+
declare function redactTrelloConfig(config: TrelloConfig): TrelloConfigRedacted;
|
|
533
|
+
|
|
534
|
+
interface TrelloResourceState {
|
|
535
|
+
type: string;
|
|
536
|
+
needsOverride: boolean;
|
|
537
|
+
redactedFields: readonly string[];
|
|
538
|
+
config: TrelloConfigRedacted;
|
|
539
|
+
}
|
|
540
|
+
declare class TrelloResource implements Resource {
|
|
541
|
+
readonly kind: string;
|
|
542
|
+
readonly isRemote: boolean;
|
|
543
|
+
readonly indexTtl: number;
|
|
544
|
+
readonly prompt: string;
|
|
545
|
+
readonly writePrompt: string;
|
|
546
|
+
readonly config: TrelloConfig;
|
|
547
|
+
readonly accessor: TrelloAccessor;
|
|
548
|
+
readonly index: IndexCacheStore;
|
|
549
|
+
constructor(config: TrelloConfig);
|
|
550
|
+
open(): Promise<void>;
|
|
551
|
+
close(): Promise<void>;
|
|
552
|
+
commands(): readonly RegisteredCommand[];
|
|
553
|
+
ops(): readonly RegisteredOp[];
|
|
554
|
+
private filter;
|
|
555
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
556
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
557
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
558
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
559
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
560
|
+
getState(): Promise<TrelloResourceState>;
|
|
561
|
+
loadState(_state: TrelloResourceState): Promise<void>;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
interface LinearConfig {
|
|
565
|
+
apiKey: string;
|
|
566
|
+
workspace?: string;
|
|
567
|
+
teamIds?: readonly string[];
|
|
568
|
+
baseUrl?: string;
|
|
569
|
+
}
|
|
570
|
+
interface LinearConfigRedacted {
|
|
571
|
+
apiKey: '<REDACTED>';
|
|
572
|
+
workspace?: string;
|
|
573
|
+
teamIds?: readonly string[];
|
|
574
|
+
baseUrl?: string;
|
|
575
|
+
}
|
|
576
|
+
declare function redactLinearConfig(config: LinearConfig): LinearConfigRedacted;
|
|
577
|
+
|
|
578
|
+
interface LinearResourceState {
|
|
579
|
+
type: string;
|
|
580
|
+
needsOverride: boolean;
|
|
581
|
+
redactedFields: readonly string[];
|
|
582
|
+
config: LinearConfigRedacted;
|
|
583
|
+
}
|
|
584
|
+
declare class LinearResource implements Resource {
|
|
585
|
+
readonly kind: string;
|
|
586
|
+
readonly isRemote: boolean;
|
|
587
|
+
readonly indexTtl: number;
|
|
588
|
+
readonly prompt: string;
|
|
589
|
+
readonly writePrompt: string;
|
|
590
|
+
readonly config: LinearConfig;
|
|
591
|
+
readonly accessor: LinearAccessor;
|
|
592
|
+
readonly index: IndexCacheStore;
|
|
593
|
+
constructor(config: LinearConfig);
|
|
594
|
+
open(): Promise<void>;
|
|
595
|
+
close(): Promise<void>;
|
|
596
|
+
commands(): readonly RegisteredCommand[];
|
|
597
|
+
ops(): readonly RegisteredOp[];
|
|
598
|
+
private filter;
|
|
599
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
600
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
601
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
602
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
603
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
604
|
+
getState(): Promise<LinearResourceState>;
|
|
605
|
+
loadState(_state: LinearResourceState): Promise<void>;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
interface NotionConfig {
|
|
609
|
+
authProvider: OAuthClientProvider;
|
|
610
|
+
serverUrl?: string;
|
|
611
|
+
}
|
|
612
|
+
interface NotionConfigRedacted {
|
|
613
|
+
authProvider: '<REDACTED>';
|
|
614
|
+
serverUrl?: string;
|
|
615
|
+
}
|
|
616
|
+
declare function redactNotionConfig(config: NotionConfig): NotionConfigRedacted;
|
|
617
|
+
|
|
618
|
+
interface NotionResourceState {
|
|
619
|
+
type: string;
|
|
620
|
+
needsOverride: boolean;
|
|
621
|
+
redactedFields: readonly string[];
|
|
622
|
+
config: NotionConfigRedacted;
|
|
623
|
+
}
|
|
624
|
+
declare class NotionResource implements Resource {
|
|
625
|
+
readonly kind: string;
|
|
626
|
+
readonly isRemote: boolean;
|
|
627
|
+
readonly indexTtl: number;
|
|
628
|
+
readonly prompt: string;
|
|
629
|
+
readonly writePrompt: string;
|
|
630
|
+
readonly config: NotionConfig;
|
|
631
|
+
readonly accessor: NotionAccessor;
|
|
632
|
+
readonly index: IndexCacheStore;
|
|
633
|
+
constructor(config: NotionConfig);
|
|
634
|
+
open(): Promise<void>;
|
|
635
|
+
close(): Promise<void>;
|
|
636
|
+
commands(): readonly RegisteredCommand[];
|
|
637
|
+
ops(): readonly RegisteredOp[];
|
|
638
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
639
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
640
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
641
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
642
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
643
|
+
getState(): Promise<NotionResourceState>;
|
|
644
|
+
loadState(_state: NotionResourceState): Promise<void>;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
interface LangfuseConfig {
|
|
648
|
+
publicKey: string;
|
|
649
|
+
secretKey: string;
|
|
650
|
+
host?: string;
|
|
651
|
+
defaultTraceLimit?: number;
|
|
652
|
+
defaultSearchLimit?: number;
|
|
653
|
+
defaultFromTimestamp?: string;
|
|
654
|
+
}
|
|
655
|
+
interface LangfuseConfigRedacted {
|
|
656
|
+
publicKey: string;
|
|
657
|
+
secretKey: '<REDACTED>';
|
|
658
|
+
host?: string;
|
|
659
|
+
defaultTraceLimit?: number;
|
|
660
|
+
defaultSearchLimit?: number;
|
|
661
|
+
defaultFromTimestamp?: string;
|
|
662
|
+
}
|
|
663
|
+
declare function redactLangfuseConfig(config: LangfuseConfig): LangfuseConfigRedacted;
|
|
664
|
+
|
|
665
|
+
interface LangfuseResourceState {
|
|
666
|
+
type: string;
|
|
667
|
+
needsOverride: boolean;
|
|
668
|
+
redactedFields: readonly string[];
|
|
669
|
+
config: LangfuseConfigRedacted;
|
|
670
|
+
}
|
|
671
|
+
declare class LangfuseResource implements Resource {
|
|
672
|
+
readonly kind: string;
|
|
673
|
+
readonly isRemote: boolean;
|
|
674
|
+
readonly indexTtl: number;
|
|
675
|
+
readonly prompt: string;
|
|
676
|
+
readonly config: LangfuseConfig;
|
|
677
|
+
readonly accessor: LangfuseAccessor;
|
|
678
|
+
readonly index: IndexCacheStore;
|
|
679
|
+
constructor(config: LangfuseConfig);
|
|
680
|
+
open(): Promise<void>;
|
|
681
|
+
close(): Promise<void>;
|
|
682
|
+
commands(): readonly RegisteredCommand[];
|
|
683
|
+
ops(): readonly RegisteredOp[];
|
|
684
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
685
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
686
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
687
|
+
fingerprint(_p: PathSpec): Promise<string | null>;
|
|
688
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
689
|
+
getState(): Promise<LangfuseResourceState>;
|
|
690
|
+
loadState(_state: LangfuseResourceState): Promise<void>;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
interface GitHubConfig {
|
|
694
|
+
token: string;
|
|
695
|
+
owner: string;
|
|
696
|
+
repo: string;
|
|
697
|
+
ref?: string;
|
|
698
|
+
baseUrl?: string;
|
|
699
|
+
}
|
|
700
|
+
interface GitHubConfigRedacted {
|
|
701
|
+
token: '<REDACTED>';
|
|
702
|
+
owner: string;
|
|
703
|
+
repo: string;
|
|
704
|
+
ref?: string;
|
|
705
|
+
baseUrl?: string;
|
|
706
|
+
}
|
|
707
|
+
declare function redactGitHubConfig(config: GitHubConfig): GitHubConfigRedacted;
|
|
708
|
+
declare function normalizeGitHubConfig(input: Record<string, unknown>): GitHubConfig;
|
|
709
|
+
|
|
710
|
+
interface GitHubResourceState {
|
|
711
|
+
type: string;
|
|
712
|
+
needsOverride: boolean;
|
|
713
|
+
redactedFields: readonly string[];
|
|
714
|
+
config: GitHubConfigRedacted;
|
|
715
|
+
defaultBranch: string;
|
|
716
|
+
truncated: boolean;
|
|
717
|
+
}
|
|
718
|
+
declare class GitHubResource implements Resource {
|
|
719
|
+
readonly kind: string;
|
|
720
|
+
readonly isRemote: boolean;
|
|
721
|
+
readonly indexTtl: number;
|
|
722
|
+
readonly prompt: string;
|
|
723
|
+
readonly config: GitHubConfig;
|
|
724
|
+
readonly accessor: GitHubAccessor;
|
|
725
|
+
readonly index: IndexCacheStore;
|
|
726
|
+
private constructor();
|
|
727
|
+
static create(config: GitHubConfig): Promise<GitHubResource>;
|
|
728
|
+
open(): Promise<void>;
|
|
729
|
+
close(): Promise<void>;
|
|
730
|
+
commands(): readonly RegisteredCommand[];
|
|
731
|
+
ops(): readonly RegisteredOp[];
|
|
732
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
733
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
734
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
735
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
736
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
737
|
+
getState(): Promise<GitHubResourceState>;
|
|
738
|
+
loadState(_state: GitHubResourceState): Promise<void>;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
interface GitHubCIConfig {
|
|
742
|
+
token: string;
|
|
743
|
+
owner: string;
|
|
744
|
+
repo: string;
|
|
745
|
+
days?: number;
|
|
746
|
+
baseUrl?: string;
|
|
747
|
+
}
|
|
748
|
+
interface GitHubCIConfigRedacted {
|
|
749
|
+
token: '<REDACTED>';
|
|
750
|
+
owner: string;
|
|
751
|
+
repo: string;
|
|
752
|
+
days?: number;
|
|
753
|
+
baseUrl?: string;
|
|
754
|
+
}
|
|
755
|
+
declare function redactGitHubCIConfig(config: GitHubCIConfig): GitHubCIConfigRedacted;
|
|
756
|
+
declare function normalizeGitHubCIConfig(input: Record<string, unknown>): GitHubCIConfig;
|
|
757
|
+
|
|
758
|
+
interface GitHubCIResourceState {
|
|
759
|
+
type: string;
|
|
760
|
+
needsOverride: boolean;
|
|
761
|
+
redactedFields: readonly string[];
|
|
762
|
+
config: GitHubCIConfigRedacted;
|
|
763
|
+
}
|
|
764
|
+
declare class GitHubCIResource implements Resource {
|
|
765
|
+
readonly kind: string;
|
|
766
|
+
readonly isRemote: boolean;
|
|
767
|
+
readonly indexTtl: number;
|
|
768
|
+
readonly prompt: string;
|
|
769
|
+
readonly config: GitHubCIConfig;
|
|
770
|
+
readonly accessor: GitHubCIAccessor;
|
|
771
|
+
readonly index: IndexCacheStore;
|
|
772
|
+
constructor(config: GitHubCIConfig);
|
|
773
|
+
open(): Promise<void>;
|
|
774
|
+
close(): Promise<void>;
|
|
775
|
+
commands(): readonly RegisteredCommand[];
|
|
776
|
+
ops(): readonly RegisteredOp[];
|
|
777
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
778
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
779
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
780
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
781
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
782
|
+
getState(): Promise<GitHubCIResourceState>;
|
|
783
|
+
loadState(_state: GitHubCIResourceState): Promise<void>;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
interface GDocsConfig {
|
|
787
|
+
clientId: string;
|
|
788
|
+
clientSecret?: string;
|
|
789
|
+
refreshToken: string;
|
|
790
|
+
refreshFn?: (refreshToken: string) => Promise<{
|
|
791
|
+
accessToken: string;
|
|
792
|
+
expiresIn: number;
|
|
793
|
+
}>;
|
|
794
|
+
}
|
|
795
|
+
interface GDocsConfigRedacted {
|
|
796
|
+
clientId: string;
|
|
797
|
+
clientSecret?: '<REDACTED>';
|
|
798
|
+
refreshToken: '<REDACTED>';
|
|
799
|
+
}
|
|
800
|
+
declare function redactGDocsConfig(config: GDocsConfig): GDocsConfigRedacted;
|
|
801
|
+
declare function normalizeGDocsConfig(input: Record<string, unknown>): GDocsConfig;
|
|
802
|
+
|
|
803
|
+
interface GDocsResourceState {
|
|
804
|
+
type: string;
|
|
805
|
+
needsOverride: boolean;
|
|
806
|
+
redactedFields: readonly string[];
|
|
807
|
+
config: GDocsConfigRedacted;
|
|
808
|
+
}
|
|
809
|
+
declare class GDocsResource implements Resource {
|
|
810
|
+
readonly kind: string;
|
|
811
|
+
readonly isRemote: boolean;
|
|
812
|
+
readonly indexTtl: number;
|
|
813
|
+
readonly prompt: string;
|
|
814
|
+
readonly writePrompt: string;
|
|
815
|
+
readonly config: GDocsConfig;
|
|
816
|
+
readonly accessor: GDocsAccessor;
|
|
817
|
+
readonly index: IndexCacheStore;
|
|
818
|
+
constructor(config: GDocsConfig);
|
|
819
|
+
open(): Promise<void>;
|
|
820
|
+
close(): Promise<void>;
|
|
821
|
+
commands(): readonly RegisteredCommand[];
|
|
822
|
+
ops(): readonly RegisteredOp[];
|
|
823
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
824
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
825
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
826
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
827
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
828
|
+
getState(): Promise<GDocsResourceState>;
|
|
829
|
+
loadState(_state: GDocsResourceState): Promise<void>;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
interface GSheetsConfig {
|
|
833
|
+
clientId: string;
|
|
834
|
+
clientSecret?: string;
|
|
835
|
+
refreshToken: string;
|
|
836
|
+
refreshFn?: (refreshToken: string) => Promise<{
|
|
837
|
+
accessToken: string;
|
|
838
|
+
expiresIn: number;
|
|
839
|
+
}>;
|
|
840
|
+
}
|
|
841
|
+
interface GSheetsConfigRedacted {
|
|
842
|
+
clientId: string;
|
|
843
|
+
clientSecret?: '<REDACTED>';
|
|
844
|
+
refreshToken: '<REDACTED>';
|
|
845
|
+
}
|
|
846
|
+
declare function redactGSheetsConfig(config: GSheetsConfig): GSheetsConfigRedacted;
|
|
847
|
+
declare function normalizeGSheetsConfig(input: Record<string, unknown>): GSheetsConfig;
|
|
848
|
+
|
|
849
|
+
interface GSheetsResourceState {
|
|
850
|
+
type: string;
|
|
851
|
+
needsOverride: boolean;
|
|
852
|
+
redactedFields: readonly string[];
|
|
853
|
+
config: GSheetsConfigRedacted;
|
|
854
|
+
}
|
|
855
|
+
declare class GSheetsResource implements Resource {
|
|
856
|
+
readonly kind: string;
|
|
857
|
+
readonly isRemote: boolean;
|
|
858
|
+
readonly indexTtl: number;
|
|
859
|
+
readonly prompt: string;
|
|
860
|
+
readonly writePrompt: string;
|
|
861
|
+
readonly config: GSheetsConfig;
|
|
862
|
+
readonly accessor: GSheetsAccessor;
|
|
863
|
+
readonly index: IndexCacheStore;
|
|
864
|
+
constructor(config: GSheetsConfig);
|
|
865
|
+
open(): Promise<void>;
|
|
866
|
+
close(): Promise<void>;
|
|
867
|
+
commands(): readonly RegisteredCommand[];
|
|
868
|
+
ops(): readonly RegisteredOp[];
|
|
869
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
870
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
871
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
872
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
873
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
874
|
+
getState(): Promise<GSheetsResourceState>;
|
|
875
|
+
loadState(_state: GSheetsResourceState): Promise<void>;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
interface GSlidesConfig {
|
|
879
|
+
clientId: string;
|
|
880
|
+
clientSecret?: string;
|
|
881
|
+
refreshToken: string;
|
|
882
|
+
refreshFn?: (refreshToken: string) => Promise<{
|
|
883
|
+
accessToken: string;
|
|
884
|
+
expiresIn: number;
|
|
885
|
+
}>;
|
|
886
|
+
}
|
|
887
|
+
interface GSlidesConfigRedacted {
|
|
888
|
+
clientId: string;
|
|
889
|
+
clientSecret?: '<REDACTED>';
|
|
890
|
+
refreshToken: '<REDACTED>';
|
|
891
|
+
}
|
|
892
|
+
declare function redactGSlidesConfig(config: GSlidesConfig): GSlidesConfigRedacted;
|
|
893
|
+
declare function normalizeGSlidesConfig(input: Record<string, unknown>): GSlidesConfig;
|
|
894
|
+
|
|
895
|
+
interface GSlidesResourceState {
|
|
896
|
+
type: string;
|
|
897
|
+
needsOverride: boolean;
|
|
898
|
+
redactedFields: readonly string[];
|
|
899
|
+
config: GSlidesConfigRedacted;
|
|
900
|
+
}
|
|
901
|
+
declare class GSlidesResource implements Resource {
|
|
902
|
+
readonly kind: string;
|
|
903
|
+
readonly isRemote: boolean;
|
|
904
|
+
readonly indexTtl: number;
|
|
905
|
+
readonly prompt: string;
|
|
906
|
+
readonly writePrompt: string;
|
|
907
|
+
readonly config: GSlidesConfig;
|
|
908
|
+
readonly accessor: GSlidesAccessor;
|
|
909
|
+
readonly index: IndexCacheStore;
|
|
910
|
+
constructor(config: GSlidesConfig);
|
|
911
|
+
open(): Promise<void>;
|
|
912
|
+
close(): Promise<void>;
|
|
913
|
+
commands(): readonly RegisteredCommand[];
|
|
914
|
+
ops(): readonly RegisteredOp[];
|
|
915
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
916
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
917
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
918
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
919
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
920
|
+
getState(): Promise<GSlidesResourceState>;
|
|
921
|
+
loadState(_state: GSlidesResourceState): Promise<void>;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
interface GDriveConfig {
|
|
925
|
+
clientId: string;
|
|
926
|
+
clientSecret?: string;
|
|
927
|
+
refreshToken: string;
|
|
928
|
+
refreshFn?: (refreshToken: string) => Promise<{
|
|
929
|
+
accessToken: string;
|
|
930
|
+
expiresIn: number;
|
|
931
|
+
}>;
|
|
932
|
+
}
|
|
933
|
+
interface GDriveConfigRedacted {
|
|
934
|
+
clientId: string;
|
|
935
|
+
clientSecret?: '<REDACTED>';
|
|
936
|
+
refreshToken: '<REDACTED>';
|
|
937
|
+
}
|
|
938
|
+
declare function redactGDriveConfig(config: GDriveConfig): GDriveConfigRedacted;
|
|
939
|
+
declare function normalizeGDriveConfig(input: Record<string, unknown>): GDriveConfig;
|
|
940
|
+
|
|
941
|
+
interface GDriveResourceState {
|
|
942
|
+
type: string;
|
|
943
|
+
needsOverride: boolean;
|
|
944
|
+
redactedFields: readonly string[];
|
|
945
|
+
config: GDriveConfigRedacted;
|
|
946
|
+
}
|
|
947
|
+
declare class GDriveResource implements Resource {
|
|
948
|
+
readonly kind: string;
|
|
949
|
+
readonly isRemote: boolean;
|
|
950
|
+
readonly indexTtl: number;
|
|
951
|
+
readonly prompt: string;
|
|
952
|
+
readonly config: GDriveConfig;
|
|
953
|
+
readonly accessor: GDriveAccessor;
|
|
954
|
+
readonly index: IndexCacheStore;
|
|
955
|
+
constructor(config: GDriveConfig);
|
|
956
|
+
open(): Promise<void>;
|
|
957
|
+
close(): Promise<void>;
|
|
958
|
+
commands(): readonly RegisteredCommand[];
|
|
959
|
+
ops(): readonly RegisteredOp[];
|
|
960
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
961
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
962
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
963
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
964
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
965
|
+
getState(): Promise<GDriveResourceState>;
|
|
966
|
+
loadState(_state: GDriveResourceState): Promise<void>;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
interface DropboxConfig {
|
|
970
|
+
clientId: string;
|
|
971
|
+
clientSecret?: string;
|
|
972
|
+
refreshToken: string;
|
|
973
|
+
refreshFn?: (refreshToken: string) => Promise<{
|
|
974
|
+
accessToken: string;
|
|
975
|
+
expiresIn: number;
|
|
976
|
+
}>;
|
|
977
|
+
}
|
|
978
|
+
interface DropboxConfigRedacted {
|
|
979
|
+
clientId: string;
|
|
980
|
+
clientSecret?: '<REDACTED>';
|
|
981
|
+
refreshToken: '<REDACTED>';
|
|
982
|
+
}
|
|
983
|
+
declare function redactDropboxConfig(config: DropboxConfig): DropboxConfigRedacted;
|
|
984
|
+
declare function normalizeDropboxConfig(input: Record<string, unknown>): DropboxConfig;
|
|
985
|
+
|
|
986
|
+
interface DropboxResourceState {
|
|
987
|
+
type: string;
|
|
988
|
+
needsOverride: boolean;
|
|
989
|
+
redactedFields: readonly string[];
|
|
990
|
+
config: DropboxConfigRedacted;
|
|
991
|
+
}
|
|
992
|
+
declare class DropboxResource implements Resource {
|
|
993
|
+
readonly kind: string;
|
|
994
|
+
readonly isRemote: boolean;
|
|
995
|
+
readonly indexTtl: number;
|
|
996
|
+
readonly prompt: string;
|
|
997
|
+
readonly config: DropboxConfig;
|
|
998
|
+
readonly accessor: DropboxAccessor;
|
|
999
|
+
readonly index: IndexCacheStore;
|
|
1000
|
+
constructor(config: DropboxConfig);
|
|
1001
|
+
open(): Promise<void>;
|
|
1002
|
+
close(): Promise<void>;
|
|
1003
|
+
commands(): readonly RegisteredCommand[];
|
|
1004
|
+
ops(): readonly RegisteredOp[];
|
|
1005
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
1006
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
1007
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
1008
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
1009
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
1010
|
+
getState(): Promise<DropboxResourceState>;
|
|
1011
|
+
loadState(_state: DropboxResourceState): Promise<void>;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
interface BoxConfig {
|
|
1015
|
+
clientId?: string;
|
|
1016
|
+
clientSecret?: string;
|
|
1017
|
+
refreshToken?: string;
|
|
1018
|
+
accessToken?: string;
|
|
1019
|
+
refreshFn?: (refreshToken: string) => Promise<{
|
|
1020
|
+
accessToken: string;
|
|
1021
|
+
refreshToken: string;
|
|
1022
|
+
expiresIn: number;
|
|
1023
|
+
}>;
|
|
1024
|
+
onRefreshTokenRotated?: (newRefreshToken: string) => void | Promise<void>;
|
|
1025
|
+
}
|
|
1026
|
+
interface BoxConfigRedacted {
|
|
1027
|
+
clientId?: string;
|
|
1028
|
+
clientSecret?: '<REDACTED>';
|
|
1029
|
+
refreshToken?: '<REDACTED>';
|
|
1030
|
+
accessToken?: '<REDACTED>';
|
|
1031
|
+
}
|
|
1032
|
+
declare function redactBoxConfig(config: BoxConfig): BoxConfigRedacted;
|
|
1033
|
+
declare function normalizeBoxConfig(input: Record<string, unknown>): BoxConfig;
|
|
1034
|
+
|
|
1035
|
+
interface BoxResourceState {
|
|
1036
|
+
type: string;
|
|
1037
|
+
needsOverride: boolean;
|
|
1038
|
+
redactedFields: readonly string[];
|
|
1039
|
+
config: BoxConfigRedacted;
|
|
1040
|
+
}
|
|
1041
|
+
declare class BoxResource implements Resource {
|
|
1042
|
+
readonly kind: string;
|
|
1043
|
+
readonly isRemote: boolean;
|
|
1044
|
+
readonly indexTtl: number;
|
|
1045
|
+
readonly prompt: string;
|
|
1046
|
+
readonly config: BoxConfig;
|
|
1047
|
+
readonly accessor: BoxAccessor;
|
|
1048
|
+
readonly index: IndexCacheStore;
|
|
1049
|
+
constructor(config: BoxConfig);
|
|
1050
|
+
open(): Promise<void>;
|
|
1051
|
+
close(): Promise<void>;
|
|
1052
|
+
commands(): readonly RegisteredCommand[];
|
|
1053
|
+
ops(): readonly RegisteredOp[];
|
|
1054
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
1055
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
1056
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
1057
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
1058
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
1059
|
+
getState(): Promise<BoxResourceState>;
|
|
1060
|
+
loadState(_state: BoxResourceState): Promise<void>;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
interface GmailConfig {
|
|
1064
|
+
clientId: string;
|
|
1065
|
+
clientSecret?: string;
|
|
1066
|
+
refreshToken: string;
|
|
1067
|
+
refreshFn?: (refreshToken: string) => Promise<{
|
|
1068
|
+
accessToken: string;
|
|
1069
|
+
expiresIn: number;
|
|
1070
|
+
}>;
|
|
1071
|
+
}
|
|
1072
|
+
interface GmailConfigRedacted {
|
|
1073
|
+
clientId: string;
|
|
1074
|
+
clientSecret?: '<REDACTED>';
|
|
1075
|
+
refreshToken: '<REDACTED>';
|
|
1076
|
+
}
|
|
1077
|
+
declare function redactGmailConfig(config: GmailConfig): GmailConfigRedacted;
|
|
1078
|
+
declare function normalizeGmailConfig(input: Record<string, unknown>): GmailConfig;
|
|
1079
|
+
|
|
1080
|
+
interface GmailResourceState {
|
|
1081
|
+
type: string;
|
|
1082
|
+
needsOverride: boolean;
|
|
1083
|
+
redactedFields: readonly string[];
|
|
1084
|
+
config: GmailConfigRedacted;
|
|
1085
|
+
}
|
|
1086
|
+
declare class GmailResource implements Resource {
|
|
1087
|
+
readonly kind: string;
|
|
1088
|
+
readonly isRemote: boolean;
|
|
1089
|
+
readonly indexTtl: number;
|
|
1090
|
+
readonly prompt: string;
|
|
1091
|
+
readonly writePrompt: string;
|
|
1092
|
+
readonly config: GmailConfig;
|
|
1093
|
+
readonly accessor: GmailAccessor;
|
|
1094
|
+
readonly index: IndexCacheStore;
|
|
1095
|
+
constructor(config: GmailConfig);
|
|
1096
|
+
open(): Promise<void>;
|
|
1097
|
+
close(): Promise<void>;
|
|
1098
|
+
commands(): readonly RegisteredCommand[];
|
|
1099
|
+
ops(): readonly RegisteredOp[];
|
|
1100
|
+
readFile(p: PathSpec): Promise<Uint8Array>;
|
|
1101
|
+
readdir(p: PathSpec): Promise<string[]>;
|
|
1102
|
+
stat(p: PathSpec): Promise<FileStat>;
|
|
1103
|
+
fingerprint(p: PathSpec): Promise<string | null>;
|
|
1104
|
+
glob(paths: readonly PathSpec[], prefix?: string): Promise<PathSpec[]>;
|
|
1105
|
+
getState(): Promise<GmailResourceState>;
|
|
1106
|
+
loadState(_state: GmailResourceState): Promise<void>;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Construct a resource by registry name in the browser runtime.
|
|
1111
|
+
* Mirrors Python's `mirage.resource.registry.build_resource` and the
|
|
1112
|
+
* Node TS counterpart at `@struktoai/mirage-node/resource/registry`.
|
|
1113
|
+
*
|
|
1114
|
+
* Configs are normalized from Python-style snake_case to TS camelCase so
|
|
1115
|
+
* the same YAML schema works across both runtimes.
|
|
1116
|
+
*
|
|
1117
|
+
* The S3 entry expects a browser-shaped config — bucket + a
|
|
1118
|
+
* `presignedUrlProvider` function. Since functions can't be encoded
|
|
1119
|
+
* in JSON/YAML, browser configs are typically constructed
|
|
1120
|
+
* programmatically and passed in directly.
|
|
1121
|
+
*/
|
|
1122
|
+
type ResourceFactory = (config: Record<string, unknown>) => Promise<Resource>;
|
|
1123
|
+
declare function knownResources(): string[];
|
|
1124
|
+
declare function register(name: string, factory: ResourceFactory): void;
|
|
1125
|
+
declare function buildResource(name: string, config?: Record<string, unknown>): Promise<Resource>;
|
|
1126
|
+
|
|
1127
|
+
export { type BoxConfig, type BoxConfigRedacted, BoxResource, type BoxResourceState, type DiscordConfig, type DiscordConfigRedacted, DiscordResource, type DiscordResourceState, type DropboxConfig, type DropboxConfigRedacted, DropboxResource, type DropboxResourceState, type GCSConfig, type GCSConfigRedacted, GCSResource, type GCSResourceState, GCS_BROWSER_PROMPT, type GDocsConfig, type GDocsConfigRedacted, GDocsResource, type GDocsResourceState, type GDriveConfig, type GDriveConfigRedacted, GDriveResource, type GDriveResourceState, type GSheetsConfig, type GSheetsConfigRedacted, GSheetsResource, type GSheetsResourceState, type GSlidesConfig, type GSlidesConfigRedacted, GSlidesResource, type GSlidesResourceState, type GitHubCIConfig, type GitHubCIConfigRedacted, GitHubCIResource, type GitHubCIResourceState, type GitHubConfig, type GitHubConfigRedacted, GitHubResource, type GitHubResourceState, type GmailConfig, type GmailConfigRedacted, GmailResource, type GmailResourceState, HttpMongoDriver, type HttpMongoDriverOptions, type LangfuseConfig, type LangfuseConfigRedacted, LangfuseResource, type LangfuseResourceState, type LinearConfig, type LinearConfigRedacted, LinearResource, type LinearResourceState, MongoDBResource, type MongoDBResourceOptions, NeonPgDriver, type NotionConfig, type NotionConfigRedacted, NotionResource, type NotionResourceState, type OCIConfig, type OCIConfigRedacted, OCIResource, type OCIResourceState, OCI_BROWSER_PROMPT, OPFSAccessor, OPFSResource, type OPFSResourceOptions, type OPFSResourceState, OPFS_COMMANDS, OPFS_OPS, OPFS_PROMPT, PostHogResource, type PostHogResourceOptions, PostgresResource, type PostgresResourceOptions, type R2Config, type R2ConfigRedacted, R2Resource, type R2ResourceState, R2_BROWSER_PROMPT, type ResourceFactory, S3Resource, type S3ResourceState, S3_BROWSER_PROMPT, SSCholarAuthorResource, type SSCholarAuthorResourceOptions, SSCholarPaperResource, type SSCholarPaperResourceOptions, SUPABASE_BROWSER_PROMPT, type SlackConfig, type SlackConfigRedacted, SlackResource, type SlackResourceState, type SupabaseConfig, type SupabaseConfigRedacted, SupabaseResource, type SupabaseResourceState, type TrelloConfig, type TrelloConfigRedacted, TrelloResource, type TrelloResourceState, VercelResource, type VercelResourceOptions, Workspace, buildResource, gcsToS3Config, knownResources, normalizeBoxConfig, normalizeDropboxConfig, normalizeGDocsConfig, normalizeGDriveConfig, normalizeGSheetsConfig, normalizeGSlidesConfig, normalizeGitHubCIConfig, normalizeGitHubConfig, normalizeGmailConfig, ociToS3Config, r2ToS3Config, redactBoxConfig, redactDiscordConfig, redactDropboxConfig, redactGDocsConfig, redactGDriveConfig, redactGSheetsConfig, redactGSlidesConfig, redactGcsConfig, redactGitHubCIConfig, redactGitHubConfig, redactGmailConfig, redactLangfuseConfig, redactLinearConfig, redactNotionConfig, redactOciConfig, redactR2Config, redactSlackConfig, redactSupabaseConfig, redactTrelloConfig, register as registerResourceFactory, resolvedOciEndpoint, resolvedR2Endpoint, resolvedSupabaseEndpoint, supabaseToS3Config };
|