@promptbook/node 0.92.0-6 → 0.92.0-7

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.
@@ -28,7 +28,9 @@ export type paths = {
28
28
  headers: {
29
29
  readonly [name: string]: unknown;
30
30
  };
31
- content?: never;
31
+ content: {
32
+ readonly "text/markdown": string;
33
+ };
32
34
  };
33
35
  };
34
36
  };
@@ -71,16 +73,44 @@ export type paths = {
71
73
  };
72
74
  readonly responses: {
73
75
  /** @description Successful login */
74
- readonly 200: {
76
+ readonly 201: {
75
77
  headers: {
76
78
  readonly [name: string]: unknown;
77
79
  };
78
80
  content: {
79
81
  readonly "application/json": {
82
+ readonly isSuccess?: boolean;
83
+ readonly message?: string;
84
+ readonly error?: Record<string, never>;
80
85
  readonly identification?: Record<string, never>;
81
86
  };
82
87
  };
83
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
+ };
84
114
  };
85
115
  };
86
116
  readonly delete?: never;
@@ -118,6 +148,15 @@ export type paths = {
118
148
  readonly "application/json": readonly string[];
119
149
  };
120
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
+ };
121
160
  };
122
161
  };
123
162
  readonly put?: never;
@@ -128,7 +167,7 @@ export type paths = {
128
167
  readonly patch?: never;
129
168
  readonly trace?: never;
130
169
  };
131
- readonly [path: `/books/${string}`]: {
170
+ readonly "/books/{bookId}": {
132
171
  readonly parameters: {
133
172
  readonly query?: never;
134
173
  readonly header?: never;
@@ -165,7 +204,20 @@ export type paths = {
165
204
  headers: {
166
205
  readonly [name: string]: unknown;
167
206
  };
168
- content?: never;
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
+ };
169
221
  };
170
222
  };
171
223
  };
@@ -203,7 +255,139 @@ export type paths = {
203
255
  readonly [name: string]: unknown;
204
256
  };
205
257
  content: {
206
- readonly "application/json": readonly Record<string, never>[];
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;
207
391
  };
208
392
  };
209
393
  };
@@ -239,8 +423,13 @@ export type paths = {
239
423
  readonly requestBody: {
240
424
  readonly content: {
241
425
  readonly "application/json": {
426
+ /** @description URL of the pipeline to execute */
242
427
  readonly pipelineUrl?: string;
428
+ /** @description Alternative field for pipelineUrl */
429
+ readonly book?: string;
430
+ /** @description Parameters for pipeline execution */
243
431
  readonly inputParameters?: Record<string, never>;
432
+ /** @description User identification data */
244
433
  readonly identification?: Record<string, never>;
245
434
  };
246
435
  };
@@ -257,6 +446,91 @@ export type paths = {
257
446
  };
258
447
  /** @description Invalid input. */
259
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: {
260
534
  headers: {
261
535
  readonly [name: string]: unknown;
262
536
  };
@@ -264,6 +538,47 @@ export type paths = {
264
538
  };
265
539
  };
266
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;
267
582
  readonly delete?: never;
268
583
  readonly options?: never;
269
584
  readonly head?: never;
@@ -273,7 +588,34 @@ export type paths = {
273
588
  };
274
589
  export type webhooks = Record<string, never>;
275
590
  export type components = {
276
- schemas: never;
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
+ };
277
619
  responses: never;
278
620
  parameters: never;
279
621
  requestBodies: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.92.0-6",
3
+ "version": "0.92.0-7",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -51,7 +51,7 @@
51
51
  "module": "./esm/index.es.js",
52
52
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
53
53
  "peerDependencies": {
54
- "@promptbook/core": "0.92.0-6"
54
+ "@promptbook/core": "0.92.0-7"
55
55
  },
56
56
  "dependencies": {
57
57
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -46,7 +46,7 @@
46
46
  * @generated
47
47
  * @see https://github.com/webgptorg/promptbook
48
48
  */
49
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-6';
49
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-7';
50
50
  /**
51
51
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
52
52
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -4847,18 +4847,26 @@
4847
4847
  }).asPromise();
4848
4848
  const { outputParameters } = result;
4849
4849
  const { modelsRequirements: modelsRequirementsJson } = outputParameters;
4850
- const modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
4850
+ let modelsRequirementsUnchecked = jsonParse(modelsRequirementsJson);
4851
4851
  if (isVerbose) {
4852
4852
  console.info(`PERSONA ${personaDescription}`, modelsRequirementsUnchecked);
4853
4853
  }
4854
4854
  if (!Array.isArray(modelsRequirementsUnchecked)) {
4855
- throw new UnexpectedError(spaceTrim__default["default"]((block) => `
4856
- Invalid \`modelsRequirements\`:
4855
+ // <- TODO: Book should have syntax and system to enforce shape of JSON
4856
+ modelsRequirementsUnchecked = [modelsRequirementsUnchecked];
4857
+ /*
4858
+ throw new UnexpectedError(
4859
+ spaceTrim(
4860
+ (block) => `
4861
+ Invalid \`modelsRequirements\`:
4857
4862
 
4858
- \`\`\`json
4859
- ${block(JSON.stringify(modelsRequirementsUnchecked, null, 4))}
4860
- \`\`\`
4861
- `));
4863
+ \`\`\`json
4864
+ ${block(JSON.stringify(modelsRequirementsUnchecked, null, 4))}
4865
+ \`\`\`
4866
+ `,
4867
+ ),
4868
+ );
4869
+ */
4862
4870
  }
4863
4871
  const modelsRequirements = modelsRequirementsUnchecked.map((modelRequirements) => ({
4864
4872
  modelVariant: 'CHAT',