@promptbook/remote-server 0.84.0-18 → 0.84.0-21

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.
@@ -2,9 +2,11 @@ import type { Command as Program } from 'commander';
2
2
  /**
3
3
  * Initializes `about` command for Promptbook CLI utilities
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
5
7
  * @private internal function of `promptbookCli`
6
8
  */
7
- export declare function initializeAboutCommand(program: Program): void;
9
+ export declare function $initializeAboutCommand(program: Program): void;
8
10
  /**
9
11
  * TODO: [🗽] Unite branding and make single place for it
10
12
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2,9 +2,11 @@ import type { Command as Program } from 'commander';
2
2
  /**
3
3
  * Initializes testing `hello` command for Promptbook CLI utilities
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
5
7
  * @private internal function of `promptbookCli`
6
8
  */
7
- export declare function initializeHelloCommand(program: Program): void;
9
+ export declare function $initializeHelloCommand(program: Program): void;
8
10
  /**
9
11
  * TODO: [🧠][🐣] Make here some easter egg with generated hello greeting via LLM models
10
12
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2,9 +2,11 @@ import type { Command as Program } from 'commander';
2
2
  /**
3
3
  * Initializes `list-models` command for Promptbook CLI utilities
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
5
7
  * @private internal function of `promptbookCli`
6
8
  */
7
- export declare function initializeListModelsCommand(program: Program): void;
9
+ export declare function $initializeListModelsCommand(program: Program): void;
8
10
  /**
9
11
  * Note: [💞] Ignore a discrepancy between file name and entity name
10
12
  * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
@@ -0,0 +1,13 @@
1
+ import type { Command as Program } from 'commander';
2
+ /**
3
+ * Initializes `list-scrapers` command for Promptbook CLI utilities
4
+ *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
7
+ * @private internal function of `promptbookCli`
8
+ */
9
+ export declare function $initializeListScrapersCommand(program: Program): void;
10
+ /**
11
+ * Note: [💞] Ignore a discrepancy between file name and entity name
12
+ * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
13
+ */
@@ -2,9 +2,11 @@ import type { Command as Program } from 'commander';
2
2
  /**
3
3
  * Initializes `make` command for Promptbook CLI utilities
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
5
7
  * @private internal function of `promptbookCli`
6
8
  */
7
- export declare function initializeMakeCommand(program: Program): void;
9
+ export declare function $initializeMakeCommand(program: Program): void;
8
10
  /**
9
11
  * TODO: [🥃][main] !!3 Allow `ptbk make` without configuring any llm tools
10
12
  * TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types
@@ -2,9 +2,11 @@ import type { Command as Program } from 'commander';
2
2
  /**
3
3
  * Initializes `prettify` command for Promptbook CLI utilities
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
5
7
  * @private internal function of `promptbookCli`
6
8
  */
7
- export declare function initializePrettifyCommand(program: Program): void;
9
+ export declare function $initializePrettifyCommand(program: Program): void;
8
10
  /**
9
11
  * TODO: [😶] Unite floder listing
10
12
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2,9 +2,11 @@ import type { Command as Program } from 'commander';
2
2
  /**
3
3
  * Initializes `run` command for Promptbook CLI utilities
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
5
7
  * @private internal function of `promptbookCli`
6
8
  */
7
- export declare function initializeRunCommand(program: Program): void;
9
+ export declare function $initializeRunCommand(program: Program): void;
8
10
  /**
9
11
  * TODO: !!5 Catch and wrap all errors from CLI
10
12
  * TODO: [🧠] Pass `maxExecutionAttempts`, `csvSettings`
@@ -1,5 +1,5 @@
1
- import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
2
1
  import type { PipelineExecutor } from '../../execution/PipelineExecutor';
2
+ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
3
3
  /**
4
4
  * Options for running the interactive chatbot
5
5
  */
@@ -2,9 +2,11 @@ import type { Command as Program } from 'commander';
2
2
  /**
3
3
  * Initializes `test` command for Promptbook CLI utilities
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
6
+ *
5
7
  * @private internal function of `promptbookCli`
6
8
  */
7
- export declare function initializeTestCommand(program: Program): void;
9
+ export declare function $initializeTestCommand(program: Program): void;
8
10
  /**
9
11
  * TODO: [😶] Unite floder listing
10
12
  * Note: [💞] Ignore a discrepancy between file name and entity name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-server",
3
- "version": "0.84.0-18",
3
+ "version": "0.84.0-21",
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,
@@ -47,7 +47,7 @@
47
47
  "module": "./esm/index.es.js",
48
48
  "typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
49
49
  "peerDependencies": {
50
- "@promptbook/core": "0.84.0-18"
50
+ "@promptbook/core": "0.84.0-21"
51
51
  },
52
52
  "dependencies": {
53
53
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -27,7 +27,7 @@
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- var PROMPTBOOK_ENGINE_VERSION = '0.84.0-17';
30
+ var PROMPTBOOK_ENGINE_VERSION = '0.84.0-20';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1334,7 +1334,7 @@
1334
1334
  if (!(error_1 instanceof Error) || error_1 instanceof UnexpectedError) {
1335
1335
  throw error_1;
1336
1336
  }
1337
- errors.push(error_1);
1337
+ errors.push({ llmExecutionTools: llmExecutionTools, error: error_1 });
1338
1338
  return [3 /*break*/, 13];
1339
1339
  case 13:
1340
1340
  _b = _a.next();
@@ -1361,7 +1361,10 @@
1361
1361
  // 2) AnthropicClaude throw PipelineExecutionError: Parameter `{knowledge}` is not defined
1362
1362
  // 3) ...
1363
1363
  spaceTrim__default["default"](function (block) { return "\n All execution tools failed:\n\n ".concat(block(errors
1364
- .map(function (error, i) { return "".concat(i + 1, ") **").concat(error.name || 'Error', ":** ").concat(error.message); })
1364
+ .map(function (_a, i) {
1365
+ var error = _a.error, llmExecutionTools = _a.llmExecutionTools;
1366
+ return "".concat(i + 1, ") **").concat(llmExecutionTools.title, "** thrown **").concat(error.name || 'Error', ":** ").concat(error.message);
1367
+ })
1365
1368
  .join('\n')), "\n\n "); }));
1366
1369
  }
1367
1370
  else if (this.llmExecutionTools.length === 0) {
@@ -6747,6 +6750,10 @@
6747
6750
  return [4 /*yield*/, scraperFactory(tools, options || {})];
6748
6751
  case 3:
6749
6752
  scraper = _g.sent();
6753
+ if (scraper.metadata.packageName === '@promptbook/boilerplate' ||
6754
+ scraper.metadata.mimeTypes.some(function (mimeType) { return mimeType.includes('DISABLED'); })) {
6755
+ return [3 /*break*/, 4];
6756
+ }
6750
6757
  scrapers.push(scraper);
6751
6758
  _g.label = 4;
6752
6759
  case 4: