@promptbook/node 0.92.0-3 → 0.92.0-31

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.
Files changed (172) hide show
  1. package/esm/index.es.js +796 -426
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/browser.index.d.ts +2 -0
  4. package/esm/typings/src/_packages/core.index.d.ts +22 -6
  5. package/esm/typings/src/_packages/deepseek.index.d.ts +2 -0
  6. package/esm/typings/src/_packages/google.index.d.ts +2 -0
  7. package/esm/typings/src/_packages/types.index.d.ts +4 -2
  8. package/esm/typings/src/_packages/utils.index.d.ts +2 -0
  9. package/esm/typings/src/cli/common/$provideLlmToolsForCli.d.ts +1 -1
  10. package/esm/typings/src/collection/PipelineCollection.d.ts +0 -2
  11. package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
  12. package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +6 -6
  13. package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +0 -2
  14. package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
  15. package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
  16. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
  17. package/esm/typings/src/config.d.ts +41 -11
  18. package/esm/typings/src/constants.d.ts +43 -2
  19. package/esm/typings/src/conversion/archive/loadArchive.d.ts +2 -2
  20. package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
  21. package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -1
  22. package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +2 -1
  23. package/esm/typings/src/executables/apps/locatePandoc.d.ts +2 -1
  24. package/esm/typings/src/executables/locateApp.d.ts +2 -2
  25. package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +2 -1
  26. package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +2 -1
  27. package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +2 -1
  28. package/esm/typings/src/execution/AbstractTaskResult.d.ts +1 -1
  29. package/esm/typings/src/execution/CommonToolsOptions.d.ts +5 -1
  30. package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +2 -1
  31. package/esm/typings/src/execution/PipelineExecutorResult.d.ts +4 -2
  32. package/esm/typings/src/execution/createPipelineExecutor/$OngoingTaskResult.d.ts +12 -9
  33. package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +13 -10
  34. package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +12 -9
  35. package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +15 -3
  36. package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +20 -14
  37. package/esm/typings/src/execution/createPipelineExecutor/computeCosineSimilarity.d.ts +13 -0
  38. package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +7 -6
  39. package/esm/typings/src/execution/createPipelineExecutor/getContextForTask.d.ts +5 -1
  40. package/esm/typings/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +1 -1
  41. package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +21 -5
  42. package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +19 -5
  43. package/esm/typings/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +9 -0
  44. package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +4 -4
  45. package/esm/typings/src/execution/utils/checkExpectations.d.ts +1 -1
  46. package/esm/typings/src/execution/utils/uncertainNumber.d.ts +3 -2
  47. package/esm/typings/src/formats/_common/{FormatDefinition.d.ts → FormatParser.d.ts} +8 -6
  48. package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +66 -0
  49. package/esm/typings/src/formats/csv/CsvFormatParser.d.ts +17 -0
  50. package/esm/typings/src/formats/csv/CsvSettings.d.ts +2 -2
  51. package/esm/typings/src/formats/csv/utils/csvParse.d.ts +12 -0
  52. package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
  53. package/esm/typings/src/formats/index.d.ts +2 -2
  54. package/esm/typings/src/formats/json/{JsonFormatDefinition.d.ts → JsonFormatParser.d.ts} +6 -6
  55. package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
  56. package/esm/typings/src/formats/json/utils/jsonParse.d.ts +8 -0
  57. package/esm/typings/src/formats/text/{TextFormatDefinition.d.ts → TextFormatParser.d.ts} +7 -7
  58. package/esm/typings/src/formats/xml/XmlFormatParser.d.ts +19 -0
  59. package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
  60. package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
  61. package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +16 -7
  62. package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +3 -1
  63. package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
  64. package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +2 -2
  65. package/esm/typings/src/formfactors/completion/CompletionFormfactorDefinition.d.ts +29 -0
  66. package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +2 -1
  67. package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
  68. package/esm/typings/src/formfactors/index.d.ts +33 -8
  69. package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +4 -2
  70. package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
  71. package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +3 -2
  72. package/esm/typings/src/high-level-abstractions/index.d.ts +2 -2
  73. package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
  74. package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
  75. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
  76. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +4 -3
  77. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +17 -4
  78. package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +11 -4
  79. package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +27 -5
  80. package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +9 -2
  81. package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +12 -3
  82. package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +10 -5
  83. package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +5 -3
  84. package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
  85. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
  86. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  87. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -0
  88. package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +23 -0
  89. package/esm/typings/src/llm-providers/google/google-models.d.ts +23 -0
  90. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +4 -0
  91. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
  92. package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
  93. package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
  94. package/esm/typings/src/migrations/migratePipeline.d.ts +9 -0
  95. package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
  96. package/esm/typings/src/personas/preparePersona.d.ts +1 -1
  97. package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
  98. package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
  99. package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
  100. package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
  101. package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
  102. package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +9 -6
  103. package/esm/typings/src/pipeline/PipelineJson/PersonaJson.d.ts +4 -2
  104. package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +3 -2
  105. package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
  106. package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
  107. package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +1 -1
  108. package/esm/typings/src/prepare/prepareTasks.d.ts +7 -4
  109. package/esm/typings/src/remote-server/openapi-types.d.ts +348 -6
  110. package/esm/typings/src/remote-server/openapi.d.ts +398 -4
  111. package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
  112. package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
  113. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
  114. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
  115. package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
  116. package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
  117. package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
  118. package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
  119. package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
  120. package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
  121. package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +3 -3
  122. package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
  123. package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
  124. package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
  125. package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
  126. package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
  127. package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
  128. package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
  129. package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
  130. package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
  131. package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
  132. package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
  133. package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
  134. package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
  135. package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
  136. package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
  137. package/esm/typings/src/storage/local-storage/getIndexedDbStorage.d.ts +10 -0
  138. package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +7 -0
  139. package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
  140. package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
  141. package/esm/typings/src/types/ModelVariant.d.ts +5 -5
  142. package/esm/typings/src/types/typeAliases.d.ts +17 -13
  143. package/esm/typings/src/utils/$Register.d.ts +8 -7
  144. package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
  145. package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
  146. package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
  147. package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
  148. package/esm/typings/src/utils/expectation-counters/index.d.ts +1 -1
  149. package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
  150. package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
  151. package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
  152. package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
  153. package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
  154. package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
  155. package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
  156. package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
  157. package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
  158. package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
  159. package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
  160. package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
  161. package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
  162. package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
  163. package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
  164. package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
  165. package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
  166. package/esm/typings/src/version.d.ts +2 -1
  167. package/package.json +2 -2
  168. package/umd/index.umd.js +799 -429
  169. package/umd/index.umd.js.map +1 -1
  170. package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +0 -31
  171. package/esm/typings/src/formats/csv/CsvFormatDefinition.d.ts +0 -17
  172. package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +0 -19
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @private !!!! Decide how to expose this
2
+ * @private [🥺] Decide how to expose this
3
3
  */
4
4
  export declare const openapiJson: {
5
5
  openapi: string;
@@ -16,6 +16,13 @@ export declare const openapiJson: {
16
16
  responses: {
17
17
  '200': {
18
18
  description: string;
19
+ content: {
20
+ 'text/markdown': {
21
+ schema: {
22
+ type: string;
23
+ };
24
+ };
25
+ };
19
26
  };
20
27
  };
21
28
  };
@@ -46,13 +53,22 @@ export declare const openapiJson: {
46
53
  };
47
54
  };
48
55
  responses: {
49
- '200': {
56
+ '201': {
50
57
  description: string;
51
58
  content: {
52
59
  'application/json': {
53
60
  schema: {
54
61
  type: string;
55
62
  properties: {
63
+ isSuccess: {
64
+ type: string;
65
+ };
66
+ message: {
67
+ type: string;
68
+ };
69
+ error: {
70
+ type: string;
71
+ };
56
72
  identification: {
57
73
  type: string;
58
74
  };
@@ -61,6 +77,43 @@ export declare const openapiJson: {
61
77
  };
62
78
  };
63
79
  };
80
+ '400': {
81
+ description: string;
82
+ content: {
83
+ 'application/json': {
84
+ schema: {
85
+ type: string;
86
+ properties: {
87
+ error: {
88
+ type: string;
89
+ };
90
+ };
91
+ };
92
+ };
93
+ };
94
+ };
95
+ '401': {
96
+ description: string;
97
+ content: {
98
+ 'application/json': {
99
+ schema: {
100
+ type: string;
101
+ properties: {
102
+ isSuccess: {
103
+ type: string;
104
+ enum: boolean[];
105
+ };
106
+ message: {
107
+ type: string;
108
+ };
109
+ error: {
110
+ type: string;
111
+ };
112
+ };
113
+ };
114
+ };
115
+ };
116
+ };
64
117
  };
65
118
  };
66
119
  };
@@ -82,6 +135,16 @@ export declare const openapiJson: {
82
135
  };
83
136
  };
84
137
  };
138
+ '500': {
139
+ description: string;
140
+ content: {
141
+ 'text/plain': {
142
+ schema: {
143
+ type: string;
144
+ };
145
+ };
146
+ };
147
+ };
85
148
  };
86
149
  };
87
150
  };
@@ -111,6 +174,28 @@ export declare const openapiJson: {
111
174
  };
112
175
  '404': {
113
176
  description: string;
177
+ content: {
178
+ 'application/json': {
179
+ schema: {
180
+ type: string;
181
+ properties: {
182
+ error: {
183
+ type: string;
184
+ };
185
+ };
186
+ };
187
+ };
188
+ };
189
+ };
190
+ '500': {
191
+ description: string;
192
+ content: {
193
+ 'text/plain': {
194
+ schema: {
195
+ type: string;
196
+ };
197
+ };
198
+ };
114
199
  };
115
200
  };
116
201
  };
@@ -128,11 +213,172 @@ export declare const openapiJson: {
128
213
  type: string;
129
214
  items: {
130
215
  type: string;
216
+ properties: {
217
+ nonce: {
218
+ type: string;
219
+ };
220
+ taskId: {
221
+ type: string;
222
+ };
223
+ taskType: {
224
+ type: string;
225
+ };
226
+ status: {
227
+ type: string;
228
+ };
229
+ createdAt: {
230
+ type: string;
231
+ format: string;
232
+ };
233
+ updatedAt: {
234
+ type: string;
235
+ format: string;
236
+ };
237
+ };
238
+ };
239
+ };
240
+ };
241
+ };
242
+ };
243
+ };
244
+ };
245
+ };
246
+ '/executions/last': {
247
+ get: {
248
+ summary: string;
249
+ description: string;
250
+ responses: {
251
+ '200': {
252
+ description: string;
253
+ content: {
254
+ 'application/json': {
255
+ schema: {
256
+ type: string;
257
+ properties: {
258
+ nonce: {
259
+ type: string;
260
+ };
261
+ taskId: {
262
+ type: string;
263
+ };
264
+ taskType: {
265
+ type: string;
266
+ };
267
+ status: {
268
+ type: string;
269
+ };
270
+ errors: {
271
+ type: string;
272
+ items: {
273
+ type: string;
274
+ };
275
+ };
276
+ warnings: {
277
+ type: string;
278
+ items: {
279
+ type: string;
280
+ };
281
+ };
282
+ createdAt: {
283
+ type: string;
284
+ format: string;
285
+ };
286
+ updatedAt: {
287
+ type: string;
288
+ format: string;
289
+ };
290
+ currentValue: {
291
+ type: string;
292
+ };
293
+ };
294
+ };
295
+ };
296
+ };
297
+ };
298
+ '404': {
299
+ description: string;
300
+ content: {
301
+ 'text/plain': {
302
+ schema: {
303
+ type: string;
304
+ };
305
+ };
306
+ };
307
+ };
308
+ };
309
+ };
310
+ };
311
+ '/executions/{taskId}': {
312
+ get: {
313
+ summary: string;
314
+ description: string;
315
+ parameters: {
316
+ in: string;
317
+ name: string;
318
+ required: boolean;
319
+ schema: {
320
+ type: string;
321
+ };
322
+ description: string;
323
+ }[];
324
+ responses: {
325
+ '200': {
326
+ description: string;
327
+ content: {
328
+ 'application/json': {
329
+ schema: {
330
+ type: string;
331
+ properties: {
332
+ nonce: {
333
+ type: string;
334
+ };
335
+ taskId: {
336
+ type: string;
337
+ };
338
+ taskType: {
339
+ type: string;
340
+ };
341
+ status: {
342
+ type: string;
343
+ };
344
+ errors: {
345
+ type: string;
346
+ items: {
347
+ type: string;
348
+ };
349
+ };
350
+ warnings: {
351
+ type: string;
352
+ items: {
353
+ type: string;
354
+ };
355
+ };
356
+ createdAt: {
357
+ type: string;
358
+ format: string;
359
+ };
360
+ updatedAt: {
361
+ type: string;
362
+ format: string;
363
+ };
364
+ currentValue: {
365
+ type: string;
366
+ };
131
367
  };
132
368
  };
133
369
  };
134
370
  };
135
371
  };
372
+ '404': {
373
+ description: string;
374
+ content: {
375
+ 'text/plain': {
376
+ schema: {
377
+ type: string;
378
+ };
379
+ };
380
+ };
381
+ };
136
382
  };
137
383
  };
138
384
  };
@@ -149,12 +395,19 @@ export declare const openapiJson: {
149
395
  properties: {
150
396
  pipelineUrl: {
151
397
  type: string;
398
+ description: string;
399
+ };
400
+ book: {
401
+ type: string;
402
+ description: string;
152
403
  };
153
404
  inputParameters: {
154
405
  type: string;
406
+ description: string;
155
407
  };
156
408
  identification: {
157
409
  type: string;
410
+ description: string;
158
411
  };
159
412
  };
160
413
  };
@@ -174,13 +427,154 @@ export declare const openapiJson: {
174
427
  };
175
428
  '400': {
176
429
  description: string;
430
+ content: {
431
+ 'application/json': {
432
+ schema: {
433
+ type: string;
434
+ properties: {
435
+ error: {
436
+ type: string;
437
+ };
438
+ };
439
+ };
440
+ };
441
+ };
442
+ };
443
+ '404': {
444
+ description: string;
445
+ content: {
446
+ 'text/plain': {
447
+ schema: {
448
+ type: string;
449
+ };
450
+ };
451
+ };
452
+ };
453
+ };
454
+ };
455
+ };
456
+ '/api-docs': {
457
+ get: {
458
+ summary: string;
459
+ description: string;
460
+ responses: {
461
+ '200': {
462
+ description: string;
463
+ };
464
+ };
465
+ };
466
+ };
467
+ '/swagger': {
468
+ get: {
469
+ summary: string;
470
+ description: string;
471
+ responses: {
472
+ '200': {
473
+ description: string;
474
+ };
475
+ };
476
+ };
477
+ };
478
+ '/openapi': {
479
+ get: {
480
+ summary: string;
481
+ description: string;
482
+ responses: {
483
+ '200': {
484
+ description: string;
485
+ content: {
486
+ 'application/json': {
487
+ schema: {
488
+ type: string;
489
+ };
490
+ };
491
+ };
177
492
  };
178
493
  };
179
494
  };
180
495
  };
181
496
  };
182
- components: {};
183
- tags: never[];
497
+ components: {
498
+ schemas: {
499
+ Error: {
500
+ type: string;
501
+ properties: {
502
+ error: {
503
+ type: string;
504
+ };
505
+ };
506
+ };
507
+ ExecutionTaskSummary: {
508
+ type: string;
509
+ properties: {
510
+ nonce: {
511
+ type: string;
512
+ };
513
+ taskId: {
514
+ type: string;
515
+ };
516
+ taskType: {
517
+ type: string;
518
+ };
519
+ status: {
520
+ type: string;
521
+ };
522
+ createdAt: {
523
+ type: string;
524
+ format: string;
525
+ };
526
+ updatedAt: {
527
+ type: string;
528
+ format: string;
529
+ };
530
+ };
531
+ };
532
+ ExecutionTaskFull: {
533
+ type: string;
534
+ properties: {
535
+ nonce: {
536
+ type: string;
537
+ };
538
+ taskId: {
539
+ type: string;
540
+ };
541
+ taskType: {
542
+ type: string;
543
+ };
544
+ status: {
545
+ type: string;
546
+ };
547
+ errors: {
548
+ type: string;
549
+ items: {
550
+ type: string;
551
+ };
552
+ };
553
+ warnings: {
554
+ type: string;
555
+ items: {
556
+ type: string;
557
+ };
558
+ };
559
+ createdAt: {
560
+ type: string;
561
+ format: string;
562
+ };
563
+ updatedAt: {
564
+ type: string;
565
+ format: string;
566
+ };
567
+ currentValue: {
568
+ type: string;
569
+ };
570
+ };
571
+ };
572
+ };
573
+ };
574
+ tags: {
575
+ name: string;
576
+ description: string;
577
+ }[];
184
578
  };
185
579
  /**
186
580
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -13,7 +13,7 @@ import type { string_user_id } from '../../types/typeAliases';
13
13
  import type { ApplicationModeIdentification } from '../socket-types/_subtypes/Identification';
14
14
  import type { Identification } from '../socket-types/_subtypes/Identification';
15
15
  /**
16
- * @@@
16
+ * Options for configuring the Promptbook remote server.
17
17
  *
18
18
  * There are two modes of remote server:
19
19
  *
@@ -28,6 +28,7 @@ import type { Identification } from '../socket-types/_subtypes/Identification';
28
28
  export type RemoteServerOptions<TCustomOptions> = CommonToolsOptions & {
29
29
  /**
30
30
  * Port on which the server will listen
31
+ * @property {number} port The port number the server will listen on.
31
32
  */
32
33
  readonly port: number;
33
34
  /**
@@ -7,7 +7,7 @@ import type { Scraper } from '../_common/Scraper';
7
7
  import type { ScraperSourceHandler } from '../_common/Scraper';
8
8
  import type { ScraperIntermediateSource } from '../_common/ScraperIntermediateSource';
9
9
  /**
10
- * Scraper of @@@ files
10
+ * Scraper of @@ files
11
11
  *
12
12
  * @see `documentationUrl` for more details
13
13
  * @public exported from `@promptbook/boilerplate`
@@ -25,7 +25,7 @@ export declare class BoilerplateScraper implements Converter, Scraper {
25
25
  private readonly markdownScraper;
26
26
  constructor(tools: Pick<ExecutionTools, 'fs' | 'llm' | 'executables'>, options: PrepareAndScrapeOptions);
27
27
  /**
28
- * Convert the `.@@@` to `.md` file and returns intermediate source
28
+ * Convert the `.@@` to `.md` file and returns intermediate source
29
29
  *
30
30
  * Note: `$` is used to indicate that this function is not a pure function - it leaves files on the disk and you are responsible for cleaning them by calling `destroy` method of returned object
31
31
  */
@@ -39,5 +39,5 @@ export declare class BoilerplateScraper implements Converter, Scraper {
39
39
  * TODO: [👣] Converted documents can act as cached items - there is no need to run conversion each time
40
40
  * TODO: [🪂] Do it in parallel
41
41
  * Note: No need to aggregate usage here, it is done by intercepting the llmTools
42
- * @@@ Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
42
+ * @@ Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
43
43
  */
@@ -11,7 +11,7 @@ export declare const createBoilerplateScraper: ((tools: Pick<ExecutionTools, 'll
11
11
  packageName: string;
12
12
  className: string;
13
13
  mimeTypes: string[];
14
- documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@@";
14
+ documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
15
15
  isAvilableInBrowser: false;
16
16
  requiredExecutables: never[];
17
17
  }>;
@@ -9,7 +9,7 @@ export declare const boilerplateScraperMetadata: import("type-fest/source/readon
9
9
  packageName: string;
10
10
  className: string;
11
11
  mimeTypes: string[];
12
- documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@@";
12
+ documentationUrl: "https://github.com/webgptorg/promptbook/discussions/@@";
13
13
  isAvilableInBrowser: false;
14
14
  requiredExecutables: never[];
15
15
  }>;
@@ -2,7 +2,9 @@ import type { ScraperAndConverterMetadata } from './register/ScraperAndConverter
2
2
  import type { ScraperSourceHandler } from './Scraper';
3
3
  import type { ScraperIntermediateSource } from './ScraperIntermediateSource';
4
4
  /**
5
- * @@@
5
+ * Interface defining the requirements for converter implementations.
6
+ * Converters transform scraped content from one format to another,
7
+ * optimizing it for knowledge extraction and processing.
6
8
  *
7
9
  * Note: [🌏] Converters are not usable in browser because they produce a files
8
10
  */
@@ -6,7 +6,8 @@ import type { string_mime_type } from '../../types/typeAliases';
6
6
  import type { string_url } from '../../types/typeAliases';
7
7
  import type { ScraperAndConverterMetadata } from './register/ScraperAndConverterMetadata';
8
8
  /**
9
- * @@@
9
+ * Interface defining the requirements for scraper implementations.
10
+ * Scrapers are responsible for extracting structured content from various knowledge sources.
10
11
  */
11
12
  export type Scraper = {
12
13
  /**
@@ -19,7 +20,8 @@ export type Scraper = {
19
20
  scrape(source: ScraperSourceHandler): Promisable<ReadonlyArray<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>> | null>;
20
21
  };
21
22
  /**
22
- * @@@
23
+ * Handler for accessing and processing content from diverse knowledge sources.
24
+ * Provides standardized methods to interact with files, URLs and raw text sources.
23
25
  */
24
26
  export type ScraperSourceHandler = {
25
27
  /**
@@ -54,6 +56,5 @@ export type ScraperSourceHandler = {
54
56
  /**
55
57
  * TODO: [🧠] Maybe split `ScraperSourceHandler` into `ScraperWebsiteSourceHandler` + `ScraperFileSourceHandler`
56
58
  * TODO: [🥽] Add ` asBlob(): Promisable<Blob>;` or asFile
57
- * TODO: [🐝] @@@ Annotate all
58
59
  * TODO: [🔼] Export via types
59
60
  */
@@ -1,11 +1,13 @@
1
1
  import type { IDestroyable } from 'destroyable';
2
2
  import type { string_absolute_filename } from '../../types/typeAliases';
3
3
  /**
4
- * @@@
4
+ * Interface representing an intermediate storage location for scraper results.
5
+ * Provides functionality for caching and managing temporary data during scraping operations.
5
6
  */
6
7
  export type ScraperIntermediateSource = IDestroyable & {
7
8
  /**
8
- * @@@
9
+ * The absolute path to the file where intermediate data is stored.
10
+ * This file serves as a cache for scraped content to avoid redundant processing.
9
11
  */
10
12
  readonly filename: string_absolute_filename;
11
13
  };
@@ -1,7 +1,8 @@
1
1
  import type { FilesystemTools } from '../../../execution/FilesystemTools';
2
2
  import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions';
3
3
  /**
4
- * @@@
4
+ * Provides filesystem access (for example for Node.js-based scrapers)
5
+ * Creates a standardized filesystem interface that scrapers can use for file operations.
5
6
  *
6
7
  * @public exported from `@promptbook/node`
7
8
  */
@@ -2,10 +2,13 @@ import type { ExecutionTools } from '../../../execution/ExecutionTools';
2
2
  import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions';
3
3
  import type { Scraper } from '../Scraper';
4
4
  /**
5
- * @@@
5
+ * Provides a collection of scrapers optimized for browser environments.
6
+ * Only includes scrapers that can safely run in a browser context.
6
7
  *
7
- * 1) @@@
8
- * 2) @@@
8
+ * Note: Browser scrapers have limitations compared to Node.js scrapers.
9
+ *
10
+ * 1) `provideScrapersForNode` use as default
11
+ * 2) `provideScrapersForBrowser` use in limited browser environment
9
12
  *
10
13
  * @public exported from `@promptbook/browser`
11
14
  */
@@ -2,11 +2,9 @@ import type { ExecutionTools } from '../../../execution/ExecutionTools';
2
2
  import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeOptions';
3
3
  import type { Scraper } from '../Scraper';
4
4
  /**
5
- * @@@
6
- *
7
- * 1) @@@
8
- * 2) @@@
9
- *
5
+ * Provides a collection of scrapers optimized for Node.js environment.
6
+ * 1) `provideScrapersForNode` use as default
7
+ * 2) `provideScrapersForBrowser` use in limited browser environment *
10
8
  * @public exported from `@promptbook/node`
11
9
  */
12
10
  export declare function $provideScrapersForNode(tools: Pick<ExecutionTools, 'fs' | 'llm' | 'executables'>, options?: PrepareAndScrapeOptions): Promise<ReadonlyArray<Scraper>>;
@@ -1,10 +1,10 @@
1
1
  import { $Register } from '../../../utils/$Register';
2
2
  import type { ScraperAndConverterMetadata } from './ScraperAndConverterMetadata';
3
3
  /**
4
- * @@@
4
+ * Global registry for storing metadata about all available scrapers and converters.
5
5
  *
6
- * Note: `$` is used to indicate that this interacts with the global scope
7
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
6
+ * Note: `$` is used to indicate that this interacts with the global scope.
7
+ * @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
8
8
  * @public exported from `@promptbook/core`
9
9
  */
10
10
  export declare const $scrapersMetadataRegister: $Register<ScraperAndConverterMetadata>;
@@ -1,10 +1,11 @@
1
1
  import { $Register } from '../../../utils/$Register';
2
2
  import type { ScraperConstructor } from './ScraperConstructor';
3
3
  /**
4
- * @@@
4
+ * Registry for all available scrapers in the system.
5
+ * Central point for registering and accessing different types of content scrapers.
5
6
  *
6
7
  * Note: `$` is used to indicate that this interacts with the global scope
7
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
8
+ * @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
8
9
  * @public exported from `@promptbook/core`
9
10
  */
10
11
  export declare const $scrapersRegister: $Register<ScraperConstructor>;