@daf-sdk/runtime 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,589 @@
1
+ import { z } from 'zod';
2
+
3
+ interface DAFDocument {
4
+ dafVersion: string;
5
+ variables?: Record<string, string>;
6
+ resources?: DAFResource[];
7
+ processes: DAFProcess[];
8
+ }
9
+ type ResourceType = 'google_doc' | 'notion_page' | 'google_drive_folder';
10
+ interface DAFResource {
11
+ name: string;
12
+ type: ResourceType;
13
+ url: string;
14
+ isGlobal: boolean;
15
+ }
16
+ type ProcessType = 'STATIC_DIALOGUE' | 'ADVANCED_DIALOGUE';
17
+ interface DAFProcess {
18
+ name: string;
19
+ description?: string;
20
+ processType: ProcessType;
21
+ stopProcessKeyword?: string;
22
+ resources?: DAFResource[];
23
+ steps: DAFStep[];
24
+ }
25
+ type StepType = 'prompt' | 'process' | 'userFeedback' | 'completionWithoutPrompt';
26
+ type LoopType = 'fixed' | 'stopOn';
27
+ interface DAFStep {
28
+ type: StepType;
29
+ prompt?: string;
30
+ processId?: string;
31
+ loopType?: LoopType;
32
+ forLoopCount?: number;
33
+ stopOnKeyword?: string;
34
+ stopOnMaxLoops?: number;
35
+ skipCompletion?: boolean;
36
+ }
37
+ type ActionVariant = 'sendEmail' | 'scrape' | 'search' | 'newsSearch' | 'previewSearch' | 'tavilySearch' | 'readDocument' | 'writeDocument' | 'formatDocument' | 'removeDocument' | 'renameDocument' | 'duplicateDocument' | 'addFolder' | 'removeFolder' | 'readFolder' | 'renameFolder' | 'addDocument' | 'createDatabase' | 'readDatabase' | 'updateDatabase' | 'deleteDatabase' | 'writeDatabase' | 'duplicateDatabase';
38
+ type EditorActionVariant = 'fixSpellingGrammar' | 'rewrite' | 'extendText' | 'reduceText' | 'simplify' | 'completeSentence' | 'translate' | 'formatText' | 'directive';
39
+ interface DAFAction {
40
+ type: 'action';
41
+ variant: ActionVariant;
42
+ parameters: Record<string, any>;
43
+ }
44
+ interface DAFEditorAction {
45
+ type: 'editorAction';
46
+ variant: EditorActionVariant;
47
+ parameters: Record<string, any>;
48
+ }
49
+ interface SendEmailParams {
50
+ to: string;
51
+ subject: string;
52
+ content: string;
53
+ }
54
+ interface ScrapeParams {
55
+ url: string;
56
+ timeout?: number;
57
+ }
58
+ interface SearchParams {
59
+ query: string;
60
+ limit?: number;
61
+ }
62
+ interface ReadDocumentParams {
63
+ resourceName: string;
64
+ }
65
+ type WriteOperation = 'replace' | 'append' | 'selective';
66
+ interface WriteDocumentParams {
67
+ resourceName: string;
68
+ operation: WriteOperation;
69
+ content: string;
70
+ findText?: string;
71
+ replaceText?: string;
72
+ replaceWithContent?: boolean;
73
+ }
74
+ interface FormatDocumentParams {
75
+ resourceUrl: string;
76
+ range?: {
77
+ startIndex: number;
78
+ endIndex: number;
79
+ };
80
+ formatting: {
81
+ bold?: boolean;
82
+ italic?: boolean;
83
+ fontSize?: number;
84
+ };
85
+ }
86
+ interface RemoveDocumentParams {
87
+ resourceUrl: string;
88
+ }
89
+ interface RenameDocumentParams {
90
+ resourceUrl: string;
91
+ newName: string;
92
+ }
93
+ interface DuplicateDocumentParams {
94
+ resourceUrl: string;
95
+ newName: string;
96
+ }
97
+ interface AddFolderParams {
98
+ folderName: string;
99
+ parentUrl?: string;
100
+ provider: 'google' | 'notion';
101
+ }
102
+ interface RemoveFolderParams {
103
+ folderUrl: string;
104
+ }
105
+ interface ReadFolderParams {
106
+ folderUrl: string;
107
+ }
108
+ interface RenameFolderParams {
109
+ folderUrl: string;
110
+ newName: string;
111
+ }
112
+ interface AddDocumentParams {
113
+ documentName: string;
114
+ provider: 'google' | 'notion';
115
+ locationUrl?: string;
116
+ content?: string;
117
+ }
118
+ interface CreateDatabaseParams {
119
+ databaseName: string;
120
+ parentPageUrl?: string;
121
+ }
122
+ interface ReadDatabaseParams {
123
+ databaseUrl: string;
124
+ }
125
+ interface UpdateDatabaseParams {
126
+ databaseUrl: string;
127
+ databaseName?: string;
128
+ properties?: Record<string, any>;
129
+ }
130
+ interface DeleteDatabaseParams {
131
+ databaseUrl: string;
132
+ }
133
+ interface WriteDatabaseParams {
134
+ databaseUrl: string;
135
+ properties: Record<string, any>;
136
+ content?: string;
137
+ }
138
+ interface DuplicateDatabaseParams {
139
+ databaseUrl: string;
140
+ newDatabaseName?: string;
141
+ }
142
+ interface NewsSearchParams {
143
+ query: string;
144
+ limit?: number;
145
+ ignoreInvalidURLs?: boolean;
146
+ tbs?: string;
147
+ location?: string;
148
+ }
149
+ interface PreviewSearchParams {
150
+ query: string;
151
+ limit?: number;
152
+ sources?: Array<'web' | 'news'>;
153
+ }
154
+ interface TavilySearchParams {
155
+ query: string;
156
+ maxResults?: number;
157
+ searchDepth?: 'basic' | 'advanced';
158
+ includeAnswer?: boolean;
159
+ }
160
+ interface EditorActionBaseParams {
161
+ selectedText: string;
162
+ from?: number;
163
+ to?: number;
164
+ }
165
+ interface TranslateParams extends EditorActionBaseParams {
166
+ language: string;
167
+ }
168
+ interface DirectiveParams extends EditorActionBaseParams {
169
+ directive: string;
170
+ }
171
+ interface ValidationResult {
172
+ valid: boolean;
173
+ errors: ValidationError[];
174
+ }
175
+ interface ValidationError {
176
+ path: string;
177
+ message: string;
178
+ code?: string;
179
+ }
180
+
181
+ declare const DAF_VERSION = "1.2.0";
182
+ declare const SUPPORTED_VERSIONS: readonly ["1.0.0", "1.1.0", "1.2.0"];
183
+ declare const PROCESS_TYPES: {
184
+ readonly STATIC_DIALOGUE: "STATIC_DIALOGUE";
185
+ readonly ADVANCED_DIALOGUE: "ADVANCED_DIALOGUE";
186
+ };
187
+ declare const STEP_TYPES: {
188
+ readonly PROMPT: "prompt";
189
+ readonly PROCESS: "process";
190
+ readonly USER_FEEDBACK: "userFeedback";
191
+ readonly COMPLETION_WITHOUT_PROMPT: "completionWithoutPrompt";
192
+ };
193
+ declare const LOOP_TYPES: {
194
+ readonly FIXED: "fixed";
195
+ readonly STOP_ON: "stopOn";
196
+ };
197
+ declare const ACTION_TYPES: {
198
+ readonly SEND_EMAIL: "sendEmail";
199
+ readonly SCRAPE: "scrape";
200
+ readonly SEARCH: "search";
201
+ readonly NEWS_SEARCH: "newsSearch";
202
+ readonly PREVIEW_SEARCH: "previewSearch";
203
+ readonly TAVILY_SEARCH: "tavilySearch";
204
+ readonly READ_DOCUMENT: "readDocument";
205
+ readonly WRITE_DOCUMENT: "writeDocument";
206
+ readonly FORMAT_DOCUMENT: "formatDocument";
207
+ readonly REMOVE_DOCUMENT: "removeDocument";
208
+ readonly RENAME_DOCUMENT: "renameDocument";
209
+ readonly DUPLICATE_DOCUMENT: "duplicateDocument";
210
+ readonly ADD_DOCUMENT: "addDocument";
211
+ readonly ADD_FOLDER: "addFolder";
212
+ readonly REMOVE_FOLDER: "removeFolder";
213
+ readonly READ_FOLDER: "readFolder";
214
+ readonly RENAME_FOLDER: "renameFolder";
215
+ readonly CREATE_DATABASE: "createDatabase";
216
+ readonly READ_DATABASE: "readDatabase";
217
+ readonly UPDATE_DATABASE: "updateDatabase";
218
+ readonly DELETE_DATABASE: "deleteDatabase";
219
+ readonly WRITE_DATABASE: "writeDatabase";
220
+ readonly DUPLICATE_DATABASE: "duplicateDatabase";
221
+ };
222
+ declare const EDITOR_ACTION_TYPES: {
223
+ readonly FIX_SPELLING_GRAMMAR: "fixSpellingGrammar";
224
+ readonly REWRITE: "rewrite";
225
+ readonly EXTEND_TEXT: "extendText";
226
+ readonly REDUCE_TEXT: "reduceText";
227
+ readonly SIMPLIFY: "simplify";
228
+ readonly COMPLETE_SENTENCE: "completeSentence";
229
+ readonly TRANSLATE: "translate";
230
+ readonly FORMAT_TEXT: "formatText";
231
+ readonly DIRECTIVE: "directive";
232
+ };
233
+ declare const RESOURCE_TYPES: {
234
+ readonly GOOGLE_DOC: "google_doc";
235
+ readonly NOTION_PAGE: "notion_page";
236
+ readonly GOOGLE_DRIVE_FOLDER: "google_drive_folder";
237
+ };
238
+ declare const WRITE_OPERATIONS: {
239
+ readonly REPLACE: "replace";
240
+ readonly APPEND: "append";
241
+ readonly SELECTIVE: "selective";
242
+ };
243
+ declare const MAX_PROCESS_DEPTH = 10;
244
+ declare const DEFAULT_SCRAPE_TIMEOUT = 30000;
245
+ declare const DEFAULT_SEARCH_LIMIT = 5;
246
+
247
+ declare const resourceSchema: z.ZodObject<{
248
+ name: z.ZodString;
249
+ type: z.ZodEnum<{
250
+ google_doc: "google_doc";
251
+ notion_page: "notion_page";
252
+ google_drive_folder: "google_drive_folder";
253
+ }>;
254
+ url: z.ZodURL;
255
+ isGlobal: z.ZodBoolean;
256
+ }, z.core.$strip>;
257
+ declare const stepSchema: z.ZodObject<{
258
+ type: z.ZodEnum<{
259
+ prompt: "prompt";
260
+ process: "process";
261
+ userFeedback: "userFeedback";
262
+ completionWithoutPrompt: "completionWithoutPrompt";
263
+ }>;
264
+ prompt: z.ZodOptional<z.ZodString>;
265
+ processId: z.ZodOptional<z.ZodString>;
266
+ loopType: z.ZodOptional<z.ZodEnum<{
267
+ fixed: "fixed";
268
+ stopOn: "stopOn";
269
+ }>>;
270
+ forLoopCount: z.ZodOptional<z.ZodInt>;
271
+ stopOnKeyword: z.ZodOptional<z.ZodString>;
272
+ stopOnMaxLoops: z.ZodOptional<z.ZodInt>;
273
+ skipCompletion: z.ZodOptional<z.ZodBoolean>;
274
+ }, z.core.$strip>;
275
+ declare const processSchema: z.ZodObject<{
276
+ name: z.ZodString;
277
+ description: z.ZodOptional<z.ZodString>;
278
+ processType: z.ZodEnum<{
279
+ STATIC_DIALOGUE: "STATIC_DIALOGUE";
280
+ ADVANCED_DIALOGUE: "ADVANCED_DIALOGUE";
281
+ }>;
282
+ stopProcessKeyword: z.ZodOptional<z.ZodString>;
283
+ resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
284
+ name: z.ZodString;
285
+ type: z.ZodEnum<{
286
+ google_doc: "google_doc";
287
+ notion_page: "notion_page";
288
+ google_drive_folder: "google_drive_folder";
289
+ }>;
290
+ url: z.ZodURL;
291
+ isGlobal: z.ZodBoolean;
292
+ }, z.core.$strip>>>;
293
+ steps: z.ZodArray<z.ZodObject<{
294
+ type: z.ZodEnum<{
295
+ prompt: "prompt";
296
+ process: "process";
297
+ userFeedback: "userFeedback";
298
+ completionWithoutPrompt: "completionWithoutPrompt";
299
+ }>;
300
+ prompt: z.ZodOptional<z.ZodString>;
301
+ processId: z.ZodOptional<z.ZodString>;
302
+ loopType: z.ZodOptional<z.ZodEnum<{
303
+ fixed: "fixed";
304
+ stopOn: "stopOn";
305
+ }>>;
306
+ forLoopCount: z.ZodOptional<z.ZodInt>;
307
+ stopOnKeyword: z.ZodOptional<z.ZodString>;
308
+ stopOnMaxLoops: z.ZodOptional<z.ZodInt>;
309
+ skipCompletion: z.ZodOptional<z.ZodBoolean>;
310
+ }, z.core.$strip>>;
311
+ }, z.core.$strip>;
312
+ declare const dafDocumentSchema: z.ZodObject<{
313
+ dafVersion: z.ZodEnum<{
314
+ [x: string]: any;
315
+ }>;
316
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
317
+ resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
318
+ name: z.ZodString;
319
+ type: z.ZodEnum<{
320
+ google_doc: "google_doc";
321
+ notion_page: "notion_page";
322
+ google_drive_folder: "google_drive_folder";
323
+ }>;
324
+ url: z.ZodURL;
325
+ isGlobal: z.ZodBoolean;
326
+ }, z.core.$strip>>>;
327
+ processes: z.ZodArray<z.ZodObject<{
328
+ name: z.ZodString;
329
+ description: z.ZodOptional<z.ZodString>;
330
+ processType: z.ZodEnum<{
331
+ STATIC_DIALOGUE: "STATIC_DIALOGUE";
332
+ ADVANCED_DIALOGUE: "ADVANCED_DIALOGUE";
333
+ }>;
334
+ stopProcessKeyword: z.ZodOptional<z.ZodString>;
335
+ resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
336
+ name: z.ZodString;
337
+ type: z.ZodEnum<{
338
+ google_doc: "google_doc";
339
+ notion_page: "notion_page";
340
+ google_drive_folder: "google_drive_folder";
341
+ }>;
342
+ url: z.ZodURL;
343
+ isGlobal: z.ZodBoolean;
344
+ }, z.core.$strip>>>;
345
+ steps: z.ZodArray<z.ZodObject<{
346
+ type: z.ZodEnum<{
347
+ prompt: "prompt";
348
+ process: "process";
349
+ userFeedback: "userFeedback";
350
+ completionWithoutPrompt: "completionWithoutPrompt";
351
+ }>;
352
+ prompt: z.ZodOptional<z.ZodString>;
353
+ processId: z.ZodOptional<z.ZodString>;
354
+ loopType: z.ZodOptional<z.ZodEnum<{
355
+ fixed: "fixed";
356
+ stopOn: "stopOn";
357
+ }>>;
358
+ forLoopCount: z.ZodOptional<z.ZodInt>;
359
+ stopOnKeyword: z.ZodOptional<z.ZodString>;
360
+ stopOnMaxLoops: z.ZodOptional<z.ZodInt>;
361
+ skipCompletion: z.ZodOptional<z.ZodBoolean>;
362
+ }, z.core.$strip>>;
363
+ }, z.core.$strip>>;
364
+ }, z.core.$strip>;
365
+ declare const sendEmailParamsSchema: z.ZodObject<{
366
+ to: z.ZodEmail;
367
+ subject: z.ZodString;
368
+ content: z.ZodString;
369
+ }, z.core.$strip>;
370
+ declare const scrapeParamsSchema: z.ZodObject<{
371
+ url: z.ZodURL;
372
+ timeout: z.ZodOptional<z.ZodInt>;
373
+ }, z.core.$strip>;
374
+ declare const searchParamsSchema: z.ZodObject<{
375
+ query: z.ZodString;
376
+ limit: z.ZodOptional<z.ZodInt>;
377
+ }, z.core.$strip>;
378
+ declare const readDocumentParamsSchema: z.ZodObject<{
379
+ resourceName: z.ZodString;
380
+ }, z.core.$strip>;
381
+ declare const writeDocumentParamsSchema: z.ZodObject<{
382
+ resourceName: z.ZodString;
383
+ operation: z.ZodEnum<{
384
+ replace: "replace";
385
+ append: "append";
386
+ selective: "selective";
387
+ }>;
388
+ content: z.ZodString;
389
+ findText: z.ZodOptional<z.ZodString>;
390
+ replaceText: z.ZodOptional<z.ZodString>;
391
+ replaceWithContent: z.ZodOptional<z.ZodBoolean>;
392
+ }, z.core.$strip>;
393
+ declare const newsSearchParamsSchema: z.ZodObject<{
394
+ query: z.ZodString;
395
+ limit: z.ZodOptional<z.ZodInt>;
396
+ ignoreInvalidURLs: z.ZodOptional<z.ZodBoolean>;
397
+ tbs: z.ZodOptional<z.ZodString>;
398
+ location: z.ZodOptional<z.ZodString>;
399
+ }, z.core.$strip>;
400
+ declare const previewSearchParamsSchema: z.ZodObject<{
401
+ query: z.ZodString;
402
+ limit: z.ZodOptional<z.ZodInt>;
403
+ sources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
404
+ web: "web";
405
+ news: "news";
406
+ }>>>;
407
+ }, z.core.$strip>;
408
+ declare const tavilySearchParamsSchema: z.ZodObject<{
409
+ query: z.ZodString;
410
+ maxResults: z.ZodOptional<z.ZodInt>;
411
+ searchDepth: z.ZodOptional<z.ZodEnum<{
412
+ basic: "basic";
413
+ advanced: "advanced";
414
+ }>>;
415
+ includeAnswer: z.ZodOptional<z.ZodBoolean>;
416
+ }, z.core.$strip>;
417
+ declare const editorActionBaseParamsSchema: z.ZodObject<{
418
+ selectedText: z.ZodString;
419
+ from: z.ZodOptional<z.ZodInt>;
420
+ to: z.ZodOptional<z.ZodInt>;
421
+ }, z.core.$strip>;
422
+ declare const translateParamsSchema: z.ZodObject<{
423
+ selectedText: z.ZodString;
424
+ from: z.ZodOptional<z.ZodInt>;
425
+ to: z.ZodOptional<z.ZodInt>;
426
+ language: z.ZodString;
427
+ }, z.core.$strip>;
428
+ declare const directiveParamsSchema: z.ZodObject<{
429
+ selectedText: z.ZodString;
430
+ from: z.ZodOptional<z.ZodInt>;
431
+ to: z.ZodOptional<z.ZodInt>;
432
+ directive: z.ZodString;
433
+ }, z.core.$strip>;
434
+ declare const actionSchema: z.ZodObject<{
435
+ type: z.ZodLiteral<"action">;
436
+ variant: z.ZodEnum<{
437
+ sendEmail: "sendEmail";
438
+ scrape: "scrape";
439
+ search: "search";
440
+ newsSearch: "newsSearch";
441
+ previewSearch: "previewSearch";
442
+ tavilySearch: "tavilySearch";
443
+ readDocument: "readDocument";
444
+ writeDocument: "writeDocument";
445
+ formatDocument: "formatDocument";
446
+ removeDocument: "removeDocument";
447
+ renameDocument: "renameDocument";
448
+ duplicateDocument: "duplicateDocument";
449
+ addFolder: "addFolder";
450
+ removeFolder: "removeFolder";
451
+ readFolder: "readFolder";
452
+ renameFolder: "renameFolder";
453
+ addDocument: "addDocument";
454
+ createDatabase: "createDatabase";
455
+ readDatabase: "readDatabase";
456
+ updateDatabase: "updateDatabase";
457
+ deleteDatabase: "deleteDatabase";
458
+ writeDatabase: "writeDatabase";
459
+ duplicateDatabase: "duplicateDatabase";
460
+ }>;
461
+ parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
462
+ }, z.core.$strip>;
463
+ declare const editorActionSchema: z.ZodObject<{
464
+ type: z.ZodLiteral<"editorAction">;
465
+ variant: z.ZodEnum<{
466
+ fixSpellingGrammar: "fixSpellingGrammar";
467
+ rewrite: "rewrite";
468
+ extendText: "extendText";
469
+ reduceText: "reduceText";
470
+ simplify: "simplify";
471
+ completeSentence: "completeSentence";
472
+ translate: "translate";
473
+ formatText: "formatText";
474
+ directive: "directive";
475
+ }>;
476
+ parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
477
+ }, z.core.$strip>;
478
+
479
+ declare function validateDAFDocument(doc: unknown): ValidationResult;
480
+ declare function validateProcess(process: unknown): ValidationResult;
481
+ declare function validateStep(step: unknown): ValidationResult;
482
+ declare function validateResource(resource: unknown): ValidationResult;
483
+ declare function validateAction(action: unknown): ValidationResult;
484
+ declare function validateEditorAction(action: unknown): ValidationResult;
485
+ declare function isValidDAFDocument(doc: unknown): doc is DAFDocument;
486
+ declare function isValidProcess(process: unknown): process is DAFProcess;
487
+ declare function isValidStep(step: unknown): step is DAFStep;
488
+ declare function isValidResource(resource: unknown): resource is DAFResource;
489
+ declare function isValidAction(action: unknown): action is DAFAction;
490
+ declare function isValidEditorAction(action: unknown): action is DAFEditorAction;
491
+
492
+ declare class DAFDocumentBuilder {
493
+ private doc;
494
+ constructor();
495
+ variables(vars: Record<string, string>): this;
496
+ variable(name: string, value: string): this;
497
+ resources(resources: DAFResource[]): this;
498
+ resource(resource: DAFResource): this;
499
+ process(process: DAFProcess): this;
500
+ build(): DAFDocument;
501
+ }
502
+ declare class ProcessBuilder {
503
+ private process;
504
+ constructor(name: string, processType?: ProcessType);
505
+ description(desc: string): this;
506
+ stopKeyword(keyword: string): this;
507
+ resources(resources: DAFResource[]): this;
508
+ resource(resource: DAFResource): this;
509
+ step(step: DAFStep): this;
510
+ build(): DAFProcess;
511
+ }
512
+ declare function promptStep(prompt: string): DAFStep;
513
+ declare function processStep(processId: string): DAFStep;
514
+ declare function fixedLoopStep(prompt: string, count: number): DAFStep;
515
+ declare function conditionalLoopStep(prompt: string, stopKeyword: string, maxLoops?: number): DAFStep;
516
+ declare function skipCompletionStep(prompt: string): DAFStep;
517
+ declare function userFeedbackStep(): DAFStep;
518
+ declare function completionWithoutPromptStep(): DAFStep;
519
+ declare function googleDocResource(name: string, url: string, isGlobal?: boolean): DAFResource;
520
+ declare function notionPageResource(name: string, url: string, isGlobal?: boolean): DAFResource;
521
+ declare function googleDriveFolderResource(name: string, url: string, isGlobal?: boolean): DAFResource;
522
+ declare function sendEmailAction(to: string, subject: string, content: string): DAFAction;
523
+ declare function scrapeAction(url: string, timeout?: number): DAFAction;
524
+ declare function searchAction(query: string, limit?: number): DAFAction;
525
+ declare function readDocumentAction(resourceName: string): DAFAction;
526
+ declare function writeDocumentAction(resourceName: string, operation: WriteOperation, content: string, options?: {
527
+ findText?: string;
528
+ replaceText?: string;
529
+ replaceWithContent?: boolean;
530
+ }): DAFAction;
531
+ declare function formatDocumentAction(resourceUrl: string, formatting: FormatDocumentParams['formatting'], range?: FormatDocumentParams['range']): DAFAction;
532
+ declare function removeDocumentAction(resourceUrl: string): DAFAction;
533
+ declare function renameDocumentAction(resourceUrl: string, newName: string): DAFAction;
534
+ declare function duplicateDocumentAction(resourceUrl: string, newName: string): DAFAction;
535
+ declare function addFolderAction(folderName: string, provider: 'google' | 'notion', parentUrl?: string): DAFAction;
536
+ declare function removeFolderAction(folderUrl: string): DAFAction;
537
+ declare function readFolderAction(folderUrl: string): DAFAction;
538
+ declare function renameFolderAction(folderUrl: string, newName: string): DAFAction;
539
+ declare function addDocumentAction(documentName: string, provider: 'google' | 'notion', locationUrl?: string, content?: string): DAFAction;
540
+ declare function createDatabaseAction(databaseName: string, parentPageUrl?: string): DAFAction;
541
+ declare function readDatabaseAction(databaseUrl: string): DAFAction;
542
+ declare function updateDatabaseAction(databaseUrl: string, options?: {
543
+ databaseName?: string;
544
+ properties?: Record<string, any>;
545
+ }): DAFAction;
546
+ declare function deleteDatabaseAction(databaseUrl: string): DAFAction;
547
+ declare function writeDatabaseAction(databaseUrl: string, properties: Record<string, any>, content?: string): DAFAction;
548
+ declare function duplicateDatabaseAction(databaseUrl: string, newDatabaseName?: string): DAFAction;
549
+ declare function newsSearchAction(query: string, options?: Omit<NewsSearchParams, 'query'>): DAFAction;
550
+ declare function previewSearchAction(query: string, options?: Omit<PreviewSearchParams, 'query'>): DAFAction;
551
+ declare function tavilySearchAction(query: string, options?: Omit<TavilySearchParams, 'query'>): DAFAction;
552
+ declare function fixSpellingGrammarAction(selectedText: string, options?: {
553
+ from?: number;
554
+ to?: number;
555
+ }): DAFEditorAction;
556
+ declare function rewriteAction(selectedText: string, options?: {
557
+ from?: number;
558
+ to?: number;
559
+ }): DAFEditorAction;
560
+ declare function extendTextAction(selectedText: string, options?: {
561
+ from?: number;
562
+ to?: number;
563
+ }): DAFEditorAction;
564
+ declare function reduceTextAction(selectedText: string, options?: {
565
+ from?: number;
566
+ to?: number;
567
+ }): DAFEditorAction;
568
+ declare function simplifyAction(selectedText: string, options?: {
569
+ from?: number;
570
+ to?: number;
571
+ }): DAFEditorAction;
572
+ declare function completeSentenceAction(selectedText: string, options?: {
573
+ from?: number;
574
+ to?: number;
575
+ }): DAFEditorAction;
576
+ declare function translateAction(selectedText: string, language: string, options?: {
577
+ from?: number;
578
+ to?: number;
579
+ }): DAFEditorAction;
580
+ declare function formatTextAction(selectedText: string, options?: {
581
+ from?: number;
582
+ to?: number;
583
+ }): DAFEditorAction;
584
+ declare function directiveAction(selectedText: string, directive: string, options?: {
585
+ from?: number;
586
+ to?: number;
587
+ }): DAFEditorAction;
588
+
589
+ export { ACTION_TYPES, type ActionVariant, type AddDocumentParams, type AddFolderParams, type CreateDatabaseParams, type DAFAction, type DAFDocument, DAFDocumentBuilder, type DAFEditorAction, type DAFProcess, type DAFResource, type DAFStep, DAF_VERSION, DEFAULT_SCRAPE_TIMEOUT, DEFAULT_SEARCH_LIMIT, type DeleteDatabaseParams, type DirectiveParams, type DuplicateDatabaseParams, type DuplicateDocumentParams, EDITOR_ACTION_TYPES, type EditorActionBaseParams, type EditorActionVariant, type FormatDocumentParams, LOOP_TYPES, type LoopType, MAX_PROCESS_DEPTH, type NewsSearchParams, PROCESS_TYPES, type PreviewSearchParams, ProcessBuilder, type ProcessType, RESOURCE_TYPES, type ReadDatabaseParams, type ReadDocumentParams, type ReadFolderParams, type RemoveDocumentParams, type RemoveFolderParams, type RenameDocumentParams, type RenameFolderParams, type ResourceType, STEP_TYPES, SUPPORTED_VERSIONS, type ScrapeParams, type SearchParams, type SendEmailParams, type StepType, type TavilySearchParams, type TranslateParams, type UpdateDatabaseParams, type ValidationError, type ValidationResult, WRITE_OPERATIONS, type WriteDatabaseParams, type WriteDocumentParams, type WriteOperation, actionSchema, addDocumentAction, addFolderAction, completeSentenceAction, completionWithoutPromptStep, conditionalLoopStep, createDatabaseAction, dafDocumentSchema, deleteDatabaseAction, directiveAction, directiveParamsSchema, duplicateDatabaseAction, duplicateDocumentAction, editorActionBaseParamsSchema, editorActionSchema, extendTextAction, fixSpellingGrammarAction, fixedLoopStep, formatDocumentAction, formatTextAction, googleDocResource, googleDriveFolderResource, isValidAction, isValidDAFDocument, isValidEditorAction, isValidProcess, isValidResource, isValidStep, newsSearchAction, newsSearchParamsSchema, notionPageResource, previewSearchAction, previewSearchParamsSchema, processSchema, processStep, promptStep, readDatabaseAction, readDocumentAction, readDocumentParamsSchema, readFolderAction, reduceTextAction, removeDocumentAction, removeFolderAction, renameDocumentAction, renameFolderAction, resourceSchema, rewriteAction, scrapeAction, scrapeParamsSchema, searchAction, searchParamsSchema, sendEmailAction, sendEmailParamsSchema, simplifyAction, skipCompletionStep, stepSchema, tavilySearchAction, tavilySearchParamsSchema, translateAction, translateParamsSchema, updateDatabaseAction, userFeedbackStep, validateAction, validateDAFDocument, validateEditorAction, validateProcess, validateResource, validateStep, writeDatabaseAction, writeDocumentAction, writeDocumentParamsSchema };