@promptbook/node 0.89.0-9 → 0.92.0-10

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 (56) hide show
  1. package/README.md +9 -7
  2. package/esm/index.es.js +320 -97
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/servers.d.ts +40 -0
  5. package/esm/typings/src/_packages/core.index.d.ts +14 -4
  6. package/esm/typings/src/_packages/deepseek.index.d.ts +2 -0
  7. package/esm/typings/src/_packages/google.index.d.ts +2 -0
  8. package/esm/typings/src/_packages/types.index.d.ts +18 -0
  9. package/esm/typings/src/_packages/utils.index.d.ts +6 -0
  10. package/esm/typings/src/cli/cli-commands/login.d.ts +0 -1
  11. package/esm/typings/src/cli/common/$provideLlmToolsForCli.d.ts +16 -3
  12. package/esm/typings/src/cli/test/ptbk.d.ts +1 -1
  13. package/esm/typings/src/commands/EXPECT/expectCommandParser.d.ts +2 -0
  14. package/esm/typings/src/config.d.ts +10 -19
  15. package/esm/typings/src/conversion/archive/loadArchive.d.ts +2 -2
  16. package/esm/typings/src/errors/0-index.d.ts +7 -4
  17. package/esm/typings/src/errors/PipelineExecutionError.d.ts +1 -1
  18. package/esm/typings/src/errors/WrappedError.d.ts +10 -0
  19. package/esm/typings/src/errors/assertsError.d.ts +11 -0
  20. package/esm/typings/src/execution/CommonToolsOptions.d.ts +4 -0
  21. package/esm/typings/src/execution/PromptbookFetch.d.ts +1 -1
  22. package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +12 -0
  23. package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +5 -0
  24. package/esm/typings/src/formats/csv/utils/csvParse.d.ts +12 -0
  25. package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +9 -0
  26. package/esm/typings/src/formats/csv/utils/isValidCsvString.test.d.ts +1 -0
  27. package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +3 -0
  28. package/esm/typings/src/formats/json/utils/jsonParse.d.ts +11 -0
  29. package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +9 -0
  30. package/esm/typings/src/formats/xml/utils/isValidXmlString.test.d.ts +1 -0
  31. package/esm/typings/src/llm-providers/_common/filterModels.d.ts +15 -0
  32. package/esm/typings/src/llm-providers/_common/register/{$provideEnvFilepath.d.ts → $provideEnvFilename.d.ts} +2 -2
  33. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  34. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +1 -1
  35. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizzardOrCli.d.ts +11 -2
  36. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  37. package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +43 -0
  38. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -0
  39. package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +23 -0
  40. package/esm/typings/src/llm-providers/google/google-models.d.ts +23 -0
  41. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +4 -0
  42. package/esm/typings/src/personas/preparePersona.d.ts +1 -1
  43. package/esm/typings/src/pipeline/PipelineJson/PersonaJson.d.ts +4 -2
  44. package/esm/typings/src/remote-server/openapi-types.d.ts +626 -0
  45. package/esm/typings/src/remote-server/openapi.d.ts +581 -0
  46. package/esm/typings/src/remote-server/socket-types/_subtypes/Identification.d.ts +7 -1
  47. package/esm/typings/src/remote-server/socket-types/_subtypes/identificationToPromptbookToken.d.ts +11 -0
  48. package/esm/typings/src/remote-server/socket-types/_subtypes/promptbookTokenToIdentification.d.ts +10 -0
  49. package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -2
  50. package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +15 -9
  51. package/esm/typings/src/storage/env-storage/$EnvStorage.d.ts +40 -0
  52. package/esm/typings/src/types/typeAliases.d.ts +26 -0
  53. package/package.json +9 -5
  54. package/umd/index.umd.js +320 -97
  55. package/umd/index.umd.js.map +1 -1
  56. package/esm/typings/src/cli/test/ptbk2.d.ts +0 -5
@@ -0,0 +1,626 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export type paths = {
6
+ readonly "/": {
7
+ readonly parameters: {
8
+ readonly query?: never;
9
+ readonly header?: never;
10
+ readonly path?: never;
11
+ readonly cookie?: never;
12
+ };
13
+ /**
14
+ * Get server details
15
+ * @description Returns details about the Promptbook server.
16
+ */
17
+ readonly get: {
18
+ readonly parameters: {
19
+ readonly query?: never;
20
+ readonly header?: never;
21
+ readonly path?: never;
22
+ readonly cookie?: never;
23
+ };
24
+ readonly requestBody?: never;
25
+ readonly responses: {
26
+ /** @description Server details in markdown format. */
27
+ readonly 200: {
28
+ headers: {
29
+ readonly [name: string]: unknown;
30
+ };
31
+ content: {
32
+ readonly "text/markdown": string;
33
+ };
34
+ };
35
+ };
36
+ };
37
+ readonly put?: never;
38
+ readonly post?: never;
39
+ readonly delete?: never;
40
+ readonly options?: never;
41
+ readonly head?: never;
42
+ readonly patch?: never;
43
+ readonly trace?: never;
44
+ };
45
+ readonly "/login": {
46
+ readonly parameters: {
47
+ readonly query?: never;
48
+ readonly header?: never;
49
+ readonly path?: never;
50
+ readonly cookie?: never;
51
+ };
52
+ readonly get?: never;
53
+ readonly put?: never;
54
+ /**
55
+ * Login to the server
56
+ * @description Login to the server and get identification.
57
+ */
58
+ readonly post: {
59
+ readonly parameters: {
60
+ readonly query?: never;
61
+ readonly header?: never;
62
+ readonly path?: never;
63
+ readonly cookie?: never;
64
+ };
65
+ readonly requestBody: {
66
+ readonly content: {
67
+ readonly "application/json": {
68
+ readonly username?: string;
69
+ readonly password?: string;
70
+ readonly appId?: string;
71
+ };
72
+ };
73
+ };
74
+ readonly responses: {
75
+ /** @description Successful login */
76
+ readonly 201: {
77
+ headers: {
78
+ readonly [name: string]: unknown;
79
+ };
80
+ content: {
81
+ readonly "application/json": {
82
+ readonly isSuccess?: boolean;
83
+ readonly message?: string;
84
+ readonly error?: Record<string, never>;
85
+ readonly identification?: Record<string, never>;
86
+ };
87
+ };
88
+ };
89
+ /** @description Bad request or login failed */
90
+ readonly 400: {
91
+ headers: {
92
+ readonly [name: string]: unknown;
93
+ };
94
+ content: {
95
+ readonly "application/json": {
96
+ readonly error?: Record<string, never>;
97
+ };
98
+ };
99
+ };
100
+ /** @description Authentication error */
101
+ readonly 401: {
102
+ headers: {
103
+ readonly [name: string]: unknown;
104
+ };
105
+ content: {
106
+ readonly "application/json": {
107
+ /** @enum {boolean} */
108
+ readonly isSuccess?: false;
109
+ readonly message?: string;
110
+ readonly error?: Record<string, never>;
111
+ };
112
+ };
113
+ };
114
+ };
115
+ };
116
+ readonly delete?: never;
117
+ readonly options?: never;
118
+ readonly head?: never;
119
+ readonly patch?: never;
120
+ readonly trace?: never;
121
+ };
122
+ readonly "/books": {
123
+ readonly parameters: {
124
+ readonly query?: never;
125
+ readonly header?: never;
126
+ readonly path?: never;
127
+ readonly cookie?: never;
128
+ };
129
+ /**
130
+ * List all books
131
+ * @description Returns a list of all available books in the collection.
132
+ */
133
+ readonly get: {
134
+ readonly parameters: {
135
+ readonly query?: never;
136
+ readonly header?: never;
137
+ readonly path?: never;
138
+ readonly cookie?: never;
139
+ };
140
+ readonly requestBody?: never;
141
+ readonly responses: {
142
+ /** @description A list of books. */
143
+ readonly 200: {
144
+ headers: {
145
+ readonly [name: string]: unknown;
146
+ };
147
+ content: {
148
+ readonly "application/json": readonly string[];
149
+ };
150
+ };
151
+ /** @description No collection available */
152
+ readonly 500: {
153
+ headers: {
154
+ readonly [name: string]: unknown;
155
+ };
156
+ content: {
157
+ readonly "text/plain": string;
158
+ };
159
+ };
160
+ };
161
+ };
162
+ readonly put?: never;
163
+ readonly post?: never;
164
+ readonly delete?: never;
165
+ readonly options?: never;
166
+ readonly head?: never;
167
+ readonly patch?: never;
168
+ readonly trace?: never;
169
+ };
170
+ readonly "/books/{bookId}": {
171
+ readonly parameters: {
172
+ readonly query?: never;
173
+ readonly header?: never;
174
+ readonly path?: never;
175
+ readonly cookie?: never;
176
+ };
177
+ /**
178
+ * Get book content
179
+ * @description Returns the content of a specific book.
180
+ */
181
+ readonly get: {
182
+ readonly parameters: {
183
+ readonly query?: never;
184
+ readonly header?: never;
185
+ readonly path: {
186
+ /** @description The ID of the book to retrieve. */
187
+ readonly bookId: string;
188
+ };
189
+ readonly cookie?: never;
190
+ };
191
+ readonly requestBody?: never;
192
+ readonly responses: {
193
+ /** @description The content of the book. */
194
+ readonly 200: {
195
+ headers: {
196
+ readonly [name: string]: unknown;
197
+ };
198
+ content: {
199
+ readonly "text/markdown": string;
200
+ };
201
+ };
202
+ /** @description Book not found. */
203
+ readonly 404: {
204
+ headers: {
205
+ readonly [name: string]: unknown;
206
+ };
207
+ content: {
208
+ readonly "application/json": {
209
+ readonly error?: Record<string, never>;
210
+ };
211
+ };
212
+ };
213
+ /** @description No collection available */
214
+ readonly 500: {
215
+ headers: {
216
+ readonly [name: string]: unknown;
217
+ };
218
+ content: {
219
+ readonly "text/plain": string;
220
+ };
221
+ };
222
+ };
223
+ };
224
+ readonly put?: never;
225
+ readonly post?: never;
226
+ readonly delete?: never;
227
+ readonly options?: never;
228
+ readonly head?: never;
229
+ readonly patch?: never;
230
+ readonly trace?: never;
231
+ };
232
+ readonly "/executions": {
233
+ readonly parameters: {
234
+ readonly query?: never;
235
+ readonly header?: never;
236
+ readonly path?: never;
237
+ readonly cookie?: never;
238
+ };
239
+ /**
240
+ * List all executions
241
+ * @description Returns a list of all running execution tasks.
242
+ */
243
+ readonly get: {
244
+ readonly parameters: {
245
+ readonly query?: never;
246
+ readonly header?: never;
247
+ readonly path?: never;
248
+ readonly cookie?: never;
249
+ };
250
+ readonly requestBody?: never;
251
+ readonly responses: {
252
+ /** @description A list of execution tasks. */
253
+ readonly 200: {
254
+ headers: {
255
+ readonly [name: string]: unknown;
256
+ };
257
+ content: {
258
+ readonly "application/json": readonly {
259
+ readonly nonce?: string;
260
+ readonly taskId?: string;
261
+ readonly taskType?: string;
262
+ readonly status?: string;
263
+ /** Format: date-time */
264
+ readonly createdAt?: string;
265
+ /** Format: date-time */
266
+ readonly updatedAt?: string;
267
+ }[];
268
+ };
269
+ };
270
+ };
271
+ };
272
+ readonly put?: never;
273
+ readonly post?: never;
274
+ readonly delete?: never;
275
+ readonly options?: never;
276
+ readonly head?: never;
277
+ readonly patch?: never;
278
+ readonly trace?: never;
279
+ };
280
+ readonly "/executions/last": {
281
+ readonly parameters: {
282
+ readonly query?: never;
283
+ readonly header?: never;
284
+ readonly path?: never;
285
+ readonly cookie?: never;
286
+ };
287
+ /**
288
+ * Get the last execution
289
+ * @description Returns details of the last execution task.
290
+ */
291
+ readonly get: {
292
+ readonly parameters: {
293
+ readonly query?: never;
294
+ readonly header?: never;
295
+ readonly path?: never;
296
+ readonly cookie?: never;
297
+ };
298
+ readonly requestBody?: never;
299
+ readonly responses: {
300
+ /** @description The last execution task with full details. */
301
+ readonly 200: {
302
+ headers: {
303
+ readonly [name: string]: unknown;
304
+ };
305
+ content: {
306
+ readonly "application/json": {
307
+ readonly nonce?: string;
308
+ readonly taskId?: string;
309
+ readonly taskType?: string;
310
+ readonly status?: string;
311
+ readonly errors?: readonly Record<string, never>[];
312
+ readonly warnings?: readonly Record<string, never>[];
313
+ /** Format: date-time */
314
+ readonly createdAt?: string;
315
+ /** Format: date-time */
316
+ readonly updatedAt?: string;
317
+ readonly currentValue?: Record<string, never>;
318
+ };
319
+ };
320
+ };
321
+ /** @description No execution tasks found. */
322
+ readonly 404: {
323
+ headers: {
324
+ readonly [name: string]: unknown;
325
+ };
326
+ content: {
327
+ readonly "text/plain": string;
328
+ };
329
+ };
330
+ };
331
+ };
332
+ readonly put?: never;
333
+ readonly post?: never;
334
+ readonly delete?: never;
335
+ readonly options?: never;
336
+ readonly head?: never;
337
+ readonly patch?: never;
338
+ readonly trace?: never;
339
+ };
340
+ readonly "/executions/{taskId}": {
341
+ readonly parameters: {
342
+ readonly query?: never;
343
+ readonly header?: never;
344
+ readonly path?: never;
345
+ readonly cookie?: never;
346
+ };
347
+ /**
348
+ * Get specific execution
349
+ * @description Returns details of a specific execution task.
350
+ */
351
+ readonly get: {
352
+ readonly parameters: {
353
+ readonly query?: never;
354
+ readonly header?: never;
355
+ readonly path: {
356
+ /** @description The ID of the execution task to retrieve. */
357
+ readonly taskId: string;
358
+ };
359
+ readonly cookie?: never;
360
+ };
361
+ readonly requestBody?: never;
362
+ readonly responses: {
363
+ /** @description The execution task with full details. */
364
+ readonly 200: {
365
+ headers: {
366
+ readonly [name: string]: unknown;
367
+ };
368
+ content: {
369
+ readonly "application/json": {
370
+ readonly nonce?: string;
371
+ readonly taskId?: string;
372
+ readonly taskType?: string;
373
+ readonly status?: string;
374
+ readonly errors?: readonly Record<string, never>[];
375
+ readonly warnings?: readonly Record<string, never>[];
376
+ /** Format: date-time */
377
+ readonly createdAt?: string;
378
+ /** Format: date-time */
379
+ readonly updatedAt?: string;
380
+ readonly currentValue?: Record<string, never>;
381
+ };
382
+ };
383
+ };
384
+ /** @description Execution task not found. */
385
+ readonly 404: {
386
+ headers: {
387
+ readonly [name: string]: unknown;
388
+ };
389
+ content: {
390
+ readonly "text/plain": string;
391
+ };
392
+ };
393
+ };
394
+ };
395
+ readonly put?: never;
396
+ readonly post?: never;
397
+ readonly delete?: never;
398
+ readonly options?: never;
399
+ readonly head?: never;
400
+ readonly patch?: never;
401
+ readonly trace?: never;
402
+ };
403
+ readonly "/executions/new": {
404
+ readonly parameters: {
405
+ readonly query?: never;
406
+ readonly header?: never;
407
+ readonly path?: never;
408
+ readonly cookie?: never;
409
+ };
410
+ readonly get?: never;
411
+ readonly put?: never;
412
+ /**
413
+ * Start a new execution
414
+ * @description Starts a new execution task for a given pipeline.
415
+ */
416
+ readonly post: {
417
+ readonly parameters: {
418
+ readonly query?: never;
419
+ readonly header?: never;
420
+ readonly path?: never;
421
+ readonly cookie?: never;
422
+ };
423
+ readonly requestBody: {
424
+ readonly content: {
425
+ readonly "application/json": {
426
+ /** @description URL of the pipeline to execute */
427
+ readonly pipelineUrl?: string;
428
+ /** @description Alternative field for pipelineUrl */
429
+ readonly book?: string;
430
+ /** @description Parameters for pipeline execution */
431
+ readonly inputParameters?: Record<string, never>;
432
+ /** @description User identification data */
433
+ readonly identification?: Record<string, never>;
434
+ };
435
+ };
436
+ };
437
+ readonly responses: {
438
+ /** @description The newly created execution task. */
439
+ readonly 200: {
440
+ headers: {
441
+ readonly [name: string]: unknown;
442
+ };
443
+ content: {
444
+ readonly "application/json": Record<string, never>;
445
+ };
446
+ };
447
+ /** @description Invalid input. */
448
+ readonly 400: {
449
+ headers: {
450
+ readonly [name: string]: unknown;
451
+ };
452
+ content: {
453
+ readonly "application/json": {
454
+ readonly error?: Record<string, never>;
455
+ };
456
+ };
457
+ };
458
+ /** @description Pipeline not found. */
459
+ readonly 404: {
460
+ headers: {
461
+ readonly [name: string]: unknown;
462
+ };
463
+ content: {
464
+ readonly "text/plain": string;
465
+ };
466
+ };
467
+ };
468
+ };
469
+ readonly delete?: never;
470
+ readonly options?: never;
471
+ readonly head?: never;
472
+ readonly patch?: never;
473
+ readonly trace?: never;
474
+ };
475
+ readonly "/api-docs": {
476
+ readonly parameters: {
477
+ readonly query?: never;
478
+ readonly header?: never;
479
+ readonly path?: never;
480
+ readonly cookie?: never;
481
+ };
482
+ /**
483
+ * API documentation UI
484
+ * @description Swagger UI for API documentation
485
+ */
486
+ readonly get: {
487
+ readonly parameters: {
488
+ readonly query?: never;
489
+ readonly header?: never;
490
+ readonly path?: never;
491
+ readonly cookie?: never;
492
+ };
493
+ readonly requestBody?: never;
494
+ readonly responses: {
495
+ /** @description HTML Swagger UI */
496
+ readonly 200: {
497
+ headers: {
498
+ readonly [name: string]: unknown;
499
+ };
500
+ content?: never;
501
+ };
502
+ };
503
+ };
504
+ readonly put?: never;
505
+ readonly post?: never;
506
+ readonly delete?: never;
507
+ readonly options?: never;
508
+ readonly head?: never;
509
+ readonly patch?: never;
510
+ readonly trace?: never;
511
+ };
512
+ readonly "/swagger": {
513
+ readonly parameters: {
514
+ readonly query?: never;
515
+ readonly header?: never;
516
+ readonly path?: never;
517
+ readonly cookie?: never;
518
+ };
519
+ /**
520
+ * API documentation UI (alternative path)
521
+ * @description Swagger UI for API documentation
522
+ */
523
+ readonly get: {
524
+ readonly parameters: {
525
+ readonly query?: never;
526
+ readonly header?: never;
527
+ readonly path?: never;
528
+ readonly cookie?: never;
529
+ };
530
+ readonly requestBody?: never;
531
+ readonly responses: {
532
+ /** @description HTML Swagger UI */
533
+ readonly 200: {
534
+ headers: {
535
+ readonly [name: string]: unknown;
536
+ };
537
+ content?: never;
538
+ };
539
+ };
540
+ };
541
+ readonly put?: never;
542
+ readonly post?: never;
543
+ readonly delete?: never;
544
+ readonly options?: never;
545
+ readonly head?: never;
546
+ readonly patch?: never;
547
+ readonly trace?: never;
548
+ };
549
+ readonly "/openapi": {
550
+ readonly parameters: {
551
+ readonly query?: never;
552
+ readonly header?: never;
553
+ readonly path?: never;
554
+ readonly cookie?: never;
555
+ };
556
+ /**
557
+ * OpenAPI specification
558
+ * @description Returns the OpenAPI JSON specification
559
+ */
560
+ readonly get: {
561
+ readonly parameters: {
562
+ readonly query?: never;
563
+ readonly header?: never;
564
+ readonly path?: never;
565
+ readonly cookie?: never;
566
+ };
567
+ readonly requestBody?: never;
568
+ readonly responses: {
569
+ /** @description OpenAPI specification */
570
+ readonly 200: {
571
+ headers: {
572
+ readonly [name: string]: unknown;
573
+ };
574
+ content: {
575
+ readonly "application/json": Record<string, never>;
576
+ };
577
+ };
578
+ };
579
+ };
580
+ readonly put?: never;
581
+ readonly post?: never;
582
+ readonly delete?: never;
583
+ readonly options?: never;
584
+ readonly head?: never;
585
+ readonly patch?: never;
586
+ readonly trace?: never;
587
+ };
588
+ };
589
+ export type webhooks = Record<string, never>;
590
+ export type components = {
591
+ schemas: {
592
+ readonly Error: {
593
+ readonly error?: Record<string, never>;
594
+ };
595
+ readonly ExecutionTaskSummary: {
596
+ readonly nonce?: string;
597
+ readonly taskId?: string;
598
+ readonly taskType?: string;
599
+ readonly status?: string;
600
+ /** Format: date-time */
601
+ readonly createdAt?: string;
602
+ /** Format: date-time */
603
+ readonly updatedAt?: string;
604
+ };
605
+ readonly ExecutionTaskFull: {
606
+ readonly nonce?: string;
607
+ readonly taskId?: string;
608
+ readonly taskType?: string;
609
+ readonly status?: string;
610
+ readonly errors?: readonly Record<string, never>[];
611
+ readonly warnings?: readonly Record<string, never>[];
612
+ /** Format: date-time */
613
+ readonly createdAt?: string;
614
+ /** Format: date-time */
615
+ readonly updatedAt?: string;
616
+ readonly currentValue?: Record<string, never>;
617
+ };
618
+ };
619
+ responses: never;
620
+ parameters: never;
621
+ requestBodies: never;
622
+ headers: never;
623
+ pathItems: never;
624
+ };
625
+ export type $defs = Record<string, never>;
626
+ export type operations = Record<string, never>;