@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.
- package/dist/chunk-4H6PEYL7.mjs +1221 -0
- package/dist/chunk-HGSJ2UZZ.mjs +625 -0
- package/dist/chunk-HT5X5ZSB.mjs +7231 -0
- package/dist/encryption-5J2VZDSY.mjs +11 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +9336 -0
- package/dist/index.mjs +318 -0
- package/dist/mongodbService-PJCZZWQ3.mjs +23 -0
- package/dist/notion-3VBQFXSQ.mjs +52 -0
- package/dist/protocol/index.d.mts +589 -0
- package/dist/protocol/index.d.ts +589 -0
- package/dist/protocol/index.js +735 -0
- package/dist/protocol/index.mjs +174 -0
- package/dist/runtime/index.d.mts +957 -0
- package/dist/runtime/index.d.ts +957 -0
- package/dist/runtime/index.js +8628 -0
- package/dist/runtime/index.mjs +146 -0
- package/package.json +64 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ACTION_TYPES,
|
|
3
|
+
DAFDocumentBuilder,
|
|
4
|
+
DAF_VERSION,
|
|
5
|
+
DEFAULT_SCRAPE_TIMEOUT,
|
|
6
|
+
DEFAULT_SEARCH_LIMIT,
|
|
7
|
+
EDITOR_ACTION_TYPES,
|
|
8
|
+
LOOP_TYPES,
|
|
9
|
+
MAX_PROCESS_DEPTH,
|
|
10
|
+
PROCESS_TYPES,
|
|
11
|
+
ProcessBuilder,
|
|
12
|
+
RESOURCE_TYPES,
|
|
13
|
+
STEP_TYPES,
|
|
14
|
+
SUPPORTED_VERSIONS,
|
|
15
|
+
WRITE_OPERATIONS,
|
|
16
|
+
actionSchema,
|
|
17
|
+
addDocumentAction,
|
|
18
|
+
addFolderAction,
|
|
19
|
+
completeSentenceAction,
|
|
20
|
+
completionWithoutPromptStep,
|
|
21
|
+
conditionalLoopStep,
|
|
22
|
+
createDatabaseAction,
|
|
23
|
+
dafDocumentSchema,
|
|
24
|
+
deleteDatabaseAction,
|
|
25
|
+
directiveAction,
|
|
26
|
+
directiveParamsSchema,
|
|
27
|
+
duplicateDatabaseAction,
|
|
28
|
+
duplicateDocumentAction,
|
|
29
|
+
editorActionBaseParamsSchema,
|
|
30
|
+
editorActionSchema,
|
|
31
|
+
extendTextAction,
|
|
32
|
+
fixSpellingGrammarAction,
|
|
33
|
+
fixedLoopStep,
|
|
34
|
+
formatDocumentAction,
|
|
35
|
+
formatTextAction,
|
|
36
|
+
googleDocResource,
|
|
37
|
+
googleDriveFolderResource,
|
|
38
|
+
isValidAction,
|
|
39
|
+
isValidDAFDocument,
|
|
40
|
+
isValidEditorAction,
|
|
41
|
+
isValidProcess,
|
|
42
|
+
isValidResource,
|
|
43
|
+
isValidStep,
|
|
44
|
+
newsSearchAction,
|
|
45
|
+
newsSearchParamsSchema,
|
|
46
|
+
notionPageResource,
|
|
47
|
+
previewSearchAction,
|
|
48
|
+
previewSearchParamsSchema,
|
|
49
|
+
processSchema,
|
|
50
|
+
processStep,
|
|
51
|
+
promptStep,
|
|
52
|
+
readDatabaseAction,
|
|
53
|
+
readDocumentAction,
|
|
54
|
+
readDocumentParamsSchema,
|
|
55
|
+
readFolderAction,
|
|
56
|
+
reduceTextAction,
|
|
57
|
+
removeDocumentAction,
|
|
58
|
+
removeFolderAction,
|
|
59
|
+
renameDocumentAction,
|
|
60
|
+
renameFolderAction,
|
|
61
|
+
resourceSchema,
|
|
62
|
+
rewriteAction,
|
|
63
|
+
scrapeAction,
|
|
64
|
+
scrapeParamsSchema,
|
|
65
|
+
searchAction,
|
|
66
|
+
searchParamsSchema,
|
|
67
|
+
sendEmailAction,
|
|
68
|
+
sendEmailParamsSchema,
|
|
69
|
+
simplifyAction,
|
|
70
|
+
skipCompletionStep,
|
|
71
|
+
stepSchema,
|
|
72
|
+
tavilySearchAction,
|
|
73
|
+
tavilySearchParamsSchema,
|
|
74
|
+
translateAction,
|
|
75
|
+
translateParamsSchema,
|
|
76
|
+
updateDatabaseAction,
|
|
77
|
+
userFeedbackStep,
|
|
78
|
+
validateAction,
|
|
79
|
+
validateDAFDocument,
|
|
80
|
+
validateEditorAction,
|
|
81
|
+
validateProcess,
|
|
82
|
+
validateResource,
|
|
83
|
+
validateStep,
|
|
84
|
+
writeDatabaseAction,
|
|
85
|
+
writeDocumentAction,
|
|
86
|
+
writeDocumentParamsSchema
|
|
87
|
+
} from "./chunk-HGSJ2UZZ.mjs";
|
|
88
|
+
import {
|
|
89
|
+
GENERIC_VARIABLES,
|
|
90
|
+
MODEL_PRICING,
|
|
91
|
+
TIER_TOKEN_LIMITS,
|
|
92
|
+
appendGoogleDoc,
|
|
93
|
+
buildTokenUsage,
|
|
94
|
+
calculateTokenCost,
|
|
95
|
+
canUserAffordApiCall,
|
|
96
|
+
checkAndUpdateCostLimit,
|
|
97
|
+
createGoogleDocInFolder,
|
|
98
|
+
createGoogleDriveFolder,
|
|
99
|
+
deleteGoogleDoc,
|
|
100
|
+
deleteGoogleDriveFolder,
|
|
101
|
+
duplicateGoogleDoc,
|
|
102
|
+
exchangeGoogleCode,
|
|
103
|
+
executeAction,
|
|
104
|
+
executeChatTurn,
|
|
105
|
+
executeProcess,
|
|
106
|
+
executeProcessInRun,
|
|
107
|
+
extractActionsFromMessage,
|
|
108
|
+
extractDocIdFromUrl,
|
|
109
|
+
extractFolderIdFromUrl,
|
|
110
|
+
formatActionResult,
|
|
111
|
+
formatGoogleDoc,
|
|
112
|
+
getDescAllActions,
|
|
113
|
+
getDescChatActions,
|
|
114
|
+
getDescEditorActions,
|
|
115
|
+
getGenericVariable,
|
|
116
|
+
getGenericVariableNames,
|
|
117
|
+
getGenericVariables,
|
|
118
|
+
getGoogleAccessToken,
|
|
119
|
+
getGoogleAuthUrl,
|
|
120
|
+
getGoogleOAuth2Client,
|
|
121
|
+
getModelProvider,
|
|
122
|
+
getProviderFromModel,
|
|
123
|
+
isGenericVariable,
|
|
124
|
+
listGoogleDriveFolderContents,
|
|
125
|
+
mergeVariables,
|
|
126
|
+
processMessageActions,
|
|
127
|
+
readGoogleDoc,
|
|
128
|
+
refreshGoogleToken,
|
|
129
|
+
renameGoogleDoc,
|
|
130
|
+
renameGoogleDriveFolder,
|
|
131
|
+
resumeProcessExecution,
|
|
132
|
+
selectiveUpdateGoogleDoc,
|
|
133
|
+
substituteVariables,
|
|
134
|
+
writeGoogleDoc
|
|
135
|
+
} from "./chunk-HT5X5ZSB.mjs";
|
|
136
|
+
import {
|
|
137
|
+
appendNotionPage,
|
|
138
|
+
createNotionDatabase,
|
|
139
|
+
createNotionDatabasePage,
|
|
140
|
+
createNotionSubpage,
|
|
141
|
+
deleteNotionDatabase,
|
|
142
|
+
deleteNotionPage,
|
|
143
|
+
duplicateNotionDatabase,
|
|
144
|
+
duplicateNotionPage,
|
|
145
|
+
exchangeNotionCode,
|
|
146
|
+
extractDatabaseIdFromUrl,
|
|
147
|
+
extractPageIdFromUrl,
|
|
148
|
+
getNotionAccessToken,
|
|
149
|
+
getNotionAuthUrl,
|
|
150
|
+
getNotionDatabase,
|
|
151
|
+
getNotionPageTitle,
|
|
152
|
+
listNotionPageChildren,
|
|
153
|
+
queryNotionDatabase,
|
|
154
|
+
readNotionDatabase,
|
|
155
|
+
readNotionPage,
|
|
156
|
+
renameNotionPage,
|
|
157
|
+
selectiveUpdateNotionPage,
|
|
158
|
+
updateNotionDatabase,
|
|
159
|
+
updateNotionDatabasePage,
|
|
160
|
+
writeNotionPage
|
|
161
|
+
} from "./chunk-4H6PEYL7.mjs";
|
|
162
|
+
export {
|
|
163
|
+
ACTION_TYPES,
|
|
164
|
+
DAFDocumentBuilder,
|
|
165
|
+
DAF_VERSION,
|
|
166
|
+
DEFAULT_SCRAPE_TIMEOUT,
|
|
167
|
+
DEFAULT_SEARCH_LIMIT,
|
|
168
|
+
EDITOR_ACTION_TYPES,
|
|
169
|
+
GENERIC_VARIABLES,
|
|
170
|
+
LOOP_TYPES,
|
|
171
|
+
MAX_PROCESS_DEPTH,
|
|
172
|
+
MODEL_PRICING,
|
|
173
|
+
PROCESS_TYPES,
|
|
174
|
+
ProcessBuilder,
|
|
175
|
+
RESOURCE_TYPES,
|
|
176
|
+
STEP_TYPES,
|
|
177
|
+
SUPPORTED_VERSIONS,
|
|
178
|
+
TIER_TOKEN_LIMITS,
|
|
179
|
+
WRITE_OPERATIONS,
|
|
180
|
+
actionSchema,
|
|
181
|
+
addDocumentAction,
|
|
182
|
+
addFolderAction,
|
|
183
|
+
appendGoogleDoc,
|
|
184
|
+
appendNotionPage,
|
|
185
|
+
buildTokenUsage,
|
|
186
|
+
calculateTokenCost,
|
|
187
|
+
canUserAffordApiCall,
|
|
188
|
+
checkAndUpdateCostLimit,
|
|
189
|
+
completeSentenceAction,
|
|
190
|
+
completionWithoutPromptStep,
|
|
191
|
+
conditionalLoopStep,
|
|
192
|
+
createDatabaseAction,
|
|
193
|
+
createGoogleDocInFolder,
|
|
194
|
+
createGoogleDriveFolder,
|
|
195
|
+
createNotionDatabase,
|
|
196
|
+
createNotionDatabasePage,
|
|
197
|
+
createNotionSubpage,
|
|
198
|
+
dafDocumentSchema,
|
|
199
|
+
deleteDatabaseAction,
|
|
200
|
+
deleteGoogleDoc,
|
|
201
|
+
deleteGoogleDriveFolder,
|
|
202
|
+
deleteNotionDatabase,
|
|
203
|
+
deleteNotionPage,
|
|
204
|
+
directiveAction,
|
|
205
|
+
directiveParamsSchema,
|
|
206
|
+
duplicateDatabaseAction,
|
|
207
|
+
duplicateDocumentAction,
|
|
208
|
+
duplicateGoogleDoc,
|
|
209
|
+
duplicateNotionDatabase,
|
|
210
|
+
duplicateNotionPage,
|
|
211
|
+
editorActionBaseParamsSchema,
|
|
212
|
+
editorActionSchema,
|
|
213
|
+
exchangeGoogleCode,
|
|
214
|
+
exchangeNotionCode,
|
|
215
|
+
executeAction,
|
|
216
|
+
executeChatTurn,
|
|
217
|
+
executeProcess,
|
|
218
|
+
executeProcessInRun,
|
|
219
|
+
extendTextAction,
|
|
220
|
+
extractActionsFromMessage,
|
|
221
|
+
extractDatabaseIdFromUrl,
|
|
222
|
+
extractDocIdFromUrl,
|
|
223
|
+
extractFolderIdFromUrl,
|
|
224
|
+
extractPageIdFromUrl,
|
|
225
|
+
fixSpellingGrammarAction,
|
|
226
|
+
fixedLoopStep,
|
|
227
|
+
formatActionResult,
|
|
228
|
+
formatDocumentAction,
|
|
229
|
+
formatGoogleDoc,
|
|
230
|
+
formatTextAction,
|
|
231
|
+
getDescAllActions,
|
|
232
|
+
getDescChatActions,
|
|
233
|
+
getDescEditorActions,
|
|
234
|
+
getGenericVariable,
|
|
235
|
+
getGenericVariableNames,
|
|
236
|
+
getGenericVariables,
|
|
237
|
+
getGoogleAccessToken,
|
|
238
|
+
getGoogleAuthUrl,
|
|
239
|
+
getGoogleOAuth2Client,
|
|
240
|
+
getModelProvider,
|
|
241
|
+
getNotionAccessToken,
|
|
242
|
+
getNotionAuthUrl,
|
|
243
|
+
getNotionDatabase,
|
|
244
|
+
getNotionPageTitle,
|
|
245
|
+
getProviderFromModel,
|
|
246
|
+
googleDocResource,
|
|
247
|
+
googleDriveFolderResource,
|
|
248
|
+
isGenericVariable,
|
|
249
|
+
isValidAction,
|
|
250
|
+
isValidDAFDocument,
|
|
251
|
+
isValidEditorAction,
|
|
252
|
+
isValidProcess,
|
|
253
|
+
isValidResource,
|
|
254
|
+
isValidStep,
|
|
255
|
+
listGoogleDriveFolderContents,
|
|
256
|
+
listNotionPageChildren,
|
|
257
|
+
mergeVariables,
|
|
258
|
+
newsSearchAction,
|
|
259
|
+
newsSearchParamsSchema,
|
|
260
|
+
notionPageResource,
|
|
261
|
+
previewSearchAction,
|
|
262
|
+
previewSearchParamsSchema,
|
|
263
|
+
processMessageActions,
|
|
264
|
+
processSchema,
|
|
265
|
+
processStep,
|
|
266
|
+
promptStep,
|
|
267
|
+
queryNotionDatabase,
|
|
268
|
+
readDatabaseAction,
|
|
269
|
+
readDocumentAction,
|
|
270
|
+
readDocumentParamsSchema,
|
|
271
|
+
readFolderAction,
|
|
272
|
+
readGoogleDoc,
|
|
273
|
+
readNotionDatabase,
|
|
274
|
+
readNotionPage,
|
|
275
|
+
reduceTextAction,
|
|
276
|
+
refreshGoogleToken,
|
|
277
|
+
removeDocumentAction,
|
|
278
|
+
removeFolderAction,
|
|
279
|
+
renameDocumentAction,
|
|
280
|
+
renameFolderAction,
|
|
281
|
+
renameGoogleDoc,
|
|
282
|
+
renameGoogleDriveFolder,
|
|
283
|
+
renameNotionPage,
|
|
284
|
+
resourceSchema,
|
|
285
|
+
resumeProcessExecution,
|
|
286
|
+
rewriteAction,
|
|
287
|
+
scrapeAction,
|
|
288
|
+
scrapeParamsSchema,
|
|
289
|
+
searchAction,
|
|
290
|
+
searchParamsSchema,
|
|
291
|
+
selectiveUpdateGoogleDoc,
|
|
292
|
+
selectiveUpdateNotionPage,
|
|
293
|
+
sendEmailAction,
|
|
294
|
+
sendEmailParamsSchema,
|
|
295
|
+
simplifyAction,
|
|
296
|
+
skipCompletionStep,
|
|
297
|
+
stepSchema,
|
|
298
|
+
substituteVariables,
|
|
299
|
+
tavilySearchAction,
|
|
300
|
+
tavilySearchParamsSchema,
|
|
301
|
+
translateAction,
|
|
302
|
+
translateParamsSchema,
|
|
303
|
+
updateDatabaseAction,
|
|
304
|
+
updateNotionDatabase,
|
|
305
|
+
updateNotionDatabasePage,
|
|
306
|
+
userFeedbackStep,
|
|
307
|
+
validateAction,
|
|
308
|
+
validateDAFDocument,
|
|
309
|
+
validateEditorAction,
|
|
310
|
+
validateProcess,
|
|
311
|
+
validateResource,
|
|
312
|
+
validateStep,
|
|
313
|
+
writeDatabaseAction,
|
|
314
|
+
writeDocumentAction,
|
|
315
|
+
writeDocumentParamsSchema,
|
|
316
|
+
writeGoogleDoc,
|
|
317
|
+
writeNotionPage
|
|
318
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/runtime/mongodbService.ts
|
|
2
|
+
async function getMongoCollection(_resourceUrl, _userId, _adapter) {
|
|
3
|
+
throw new Error("MongoDB integration not configured.");
|
|
4
|
+
}
|
|
5
|
+
async function dbFind(_collection, _filter, _options) {
|
|
6
|
+
throw new Error("MongoDB integration not configured.");
|
|
7
|
+
}
|
|
8
|
+
async function dbInsert(_collection, _document, _options) {
|
|
9
|
+
throw new Error("MongoDB integration not configured.");
|
|
10
|
+
}
|
|
11
|
+
async function dbUpdate(_collection, _filter, _update, _options) {
|
|
12
|
+
throw new Error("MongoDB integration not configured.");
|
|
13
|
+
}
|
|
14
|
+
async function dbDelete(_collection, _filter, _options) {
|
|
15
|
+
throw new Error("MongoDB integration not configured.");
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
dbDelete,
|
|
19
|
+
dbFind,
|
|
20
|
+
dbInsert,
|
|
21
|
+
dbUpdate,
|
|
22
|
+
getMongoCollection
|
|
23
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
appendNotionPage,
|
|
3
|
+
createNotionDatabase,
|
|
4
|
+
createNotionDatabasePage,
|
|
5
|
+
createNotionSubpage,
|
|
6
|
+
deleteNotionDatabase,
|
|
7
|
+
deleteNotionPage,
|
|
8
|
+
duplicateNotionDatabase,
|
|
9
|
+
duplicateNotionPage,
|
|
10
|
+
exchangeNotionCode,
|
|
11
|
+
extractDatabaseIdFromUrl,
|
|
12
|
+
extractPageIdFromUrl,
|
|
13
|
+
getNotionAccessToken,
|
|
14
|
+
getNotionAuthUrl,
|
|
15
|
+
getNotionDatabase,
|
|
16
|
+
getNotionPageTitle,
|
|
17
|
+
listNotionPageChildren,
|
|
18
|
+
queryNotionDatabase,
|
|
19
|
+
readNotionDatabase,
|
|
20
|
+
readNotionPage,
|
|
21
|
+
renameNotionPage,
|
|
22
|
+
selectiveUpdateNotionPage,
|
|
23
|
+
updateNotionDatabase,
|
|
24
|
+
updateNotionDatabasePage,
|
|
25
|
+
writeNotionPage
|
|
26
|
+
} from "./chunk-4H6PEYL7.mjs";
|
|
27
|
+
export {
|
|
28
|
+
appendNotionPage,
|
|
29
|
+
createNotionDatabase,
|
|
30
|
+
createNotionDatabasePage,
|
|
31
|
+
createNotionSubpage,
|
|
32
|
+
deleteNotionDatabase,
|
|
33
|
+
deleteNotionPage,
|
|
34
|
+
duplicateNotionDatabase,
|
|
35
|
+
duplicateNotionPage,
|
|
36
|
+
exchangeNotionCode,
|
|
37
|
+
extractDatabaseIdFromUrl,
|
|
38
|
+
extractPageIdFromUrl,
|
|
39
|
+
getNotionAccessToken,
|
|
40
|
+
getNotionAuthUrl,
|
|
41
|
+
getNotionDatabase,
|
|
42
|
+
getNotionPageTitle,
|
|
43
|
+
listNotionPageChildren,
|
|
44
|
+
queryNotionDatabase,
|
|
45
|
+
readNotionDatabase,
|
|
46
|
+
readNotionPage,
|
|
47
|
+
renameNotionPage,
|
|
48
|
+
selectiveUpdateNotionPage,
|
|
49
|
+
updateNotionDatabase,
|
|
50
|
+
updateNotionDatabasePage,
|
|
51
|
+
writeNotionPage
|
|
52
|
+
};
|