@promptbook/wizard 0.100.0-2 → 0.100.0-3

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.
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.100.0-1`).
18
+ * It follows semantic versioning (e.g., `0.100.0-2`).
19
19
  *
20
20
  * @generated
21
21
  */
@@ -6,6 +6,15 @@ import type { InputParameters } from '../types/typeAliases';
6
6
  import type { string_filename } from '../types/typeAliases';
7
7
  import type { string_parameter_value } from '../types/typeAliases';
8
8
  import type { string_pipeline_url } from '../types/typeAliases';
9
+ /**
10
+ * Options for wizard methods
11
+ */
12
+ interface WizardOptions {
13
+ /**
14
+ * Whether to enable verbose logging
15
+ */
16
+ isVerbose?: boolean;
17
+ }
9
18
  /**
10
19
  * Wizard for simple usage of the Promptbook
11
20
  * Look at `wizard` for more details
@@ -26,7 +35,7 @@ declare class Wizard {
26
35
  *
27
36
  * Note: This works similar to the `ptbk run` command
28
37
  */
29
- execute(book: string_pipeline_url | string_filename | PipelineString, inputParameters: InputParameters): Promise<{
38
+ execute(book: string_pipeline_url | string_filename | PipelineString, inputParameters: InputParameters, options?: WizardOptions): Promise<{
30
39
  /**
31
40
  * Simple result of the execution
32
41
  */
@@ -36,9 +45,9 @@ declare class Wizard {
36
45
  /**
37
46
  * Provides the tools automatically for the Node.js environment
38
47
  *
39
- * @param pipelineSource
48
+ * @param options
40
49
  */
41
- getExecutionTools(): Promise<Required<Pick<ExecutionTools, 'fs' | 'fetch'>>>;
50
+ getExecutionTools(options?: WizardOptions): Promise<Required<Pick<ExecutionTools, 'fs' | 'fetch'>>>;
42
51
  /**
43
52
  * Load book from the source
44
53
  *
@@ -49,8 +58,9 @@ declare class Wizard {
49
58
  * 3) As a string
50
59
  *
51
60
  * @param pipelineSource
61
+ * @param options
52
62
  */
53
- getCompiledBook(pipelineSource: string_filename | string_pipeline_url | PipelineString): Promise<PipelineJson>;
63
+ getCompiledBook(pipelineSource: string_filename | string_pipeline_url | PipelineString, options?: WizardOptions): Promise<PipelineJson>;
54
64
  }
55
65
  /**
56
66
  * Wizard for simple usage of the Promptbook
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/wizard",
3
- "version": "0.100.0-2",
3
+ "version": "0.100.0-3",
4
4
  "description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -95,7 +95,7 @@
95
95
  "module": "./esm/index.es.js",
96
96
  "typings": "./esm/typings/src/_packages/wizard.index.d.ts",
97
97
  "peerDependencies": {
98
- "@promptbook/core": "0.100.0-2"
98
+ "@promptbook/core": "0.100.0-3"
99
99
  },
100
100
  "dependencies": {
101
101
  "@ai-sdk/deepseek": "0.1.6",
package/umd/index.umd.js CHANGED
@@ -49,7 +49,7 @@
49
49
  * @generated
50
50
  * @see https://github.com/webgptorg/promptbook
51
51
  */
52
- const PROMPTBOOK_ENGINE_VERSION = '0.100.0-2';
52
+ const PROMPTBOOK_ENGINE_VERSION = '0.100.0-3';
53
53
  /**
54
54
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
55
55
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -16917,14 +16917,14 @@
16917
16917
  *
16918
16918
  * Note: This works similar to the `ptbk run` command
16919
16919
  */
16920
- async execute(book, inputParameters) {
16920
+ async execute(book, inputParameters, options = {}) {
16921
16921
  if (!$isRunningInNode()) {
16922
16922
  throw new EnvironmentMismatchError('Wizard works only in Node.js environment');
16923
16923
  }
16924
16924
  // ▶ Get the tools
16925
- const tools = await this.getExecutionTools();
16925
+ const tools = await this.getExecutionTools(options);
16926
16926
  // ▶ Get the Pipeline
16927
- const pipeline = await this.getCompiledBook(book);
16927
+ const pipeline = await this.getCompiledBook(book, options);
16928
16928
  // ▶ Create executor - the function that will execute the Pipeline
16929
16929
  const pipelineExecutor = createPipelineExecutor({ pipeline, tools });
16930
16930
  // 🚀▶ Execute the Pipeline
@@ -16947,15 +16947,16 @@
16947
16947
  /**
16948
16948
  * Provides the tools automatically for the Node.js environment
16949
16949
  *
16950
- * @param pipelineSource
16950
+ * @param options
16951
16951
  */
16952
- async getExecutionTools() {
16952
+ async getExecutionTools(options = {}) {
16953
+ var _a;
16953
16954
  if (this.executionTools !== null) {
16954
16955
  return this.executionTools;
16955
16956
  }
16956
16957
  // TODO: DRY [◽]
16957
16958
  const prepareAndScrapeOptions = {
16958
- isVerbose: false,
16959
+ isVerbose: (_a = options.isVerbose) !== null && _a !== void 0 ? _a : false,
16959
16960
  isCacheReloaded: false, // <- TODO: Allow to pass
16960
16961
  }; /* <- TODO: ` satisfies PrepareAndScrapeOptions` */
16961
16962
  const fs = $provideFilesystemForNode();
@@ -16985,9 +16986,10 @@
16985
16986
  * 3) As a string
16986
16987
  *
16987
16988
  * @param pipelineSource
16989
+ * @param options
16988
16990
  */
16989
- async getCompiledBook(pipelineSource) {
16990
- const tools = await this.getExecutionTools();
16991
+ async getCompiledBook(pipelineSource, options = {}) {
16992
+ const tools = await this.getExecutionTools(options);
16991
16993
  return /* not await */ $getCompiledBook(tools, pipelineSource);
16992
16994
  }
16993
16995
  }