@promptbook/core 0.112.0-119 → 0.112.0-121

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.
package/esm/index.es.js CHANGED
@@ -28,7 +28,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
28
28
  * @generated
29
29
  * @see https://github.com/webgptorg/promptbook
30
30
  */
31
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-119';
31
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-121';
32
32
  /**
33
33
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
34
34
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -36448,7 +36448,9 @@ class OpenAiAgentKitExecutionToolsToolBuilder {
36448
36448
  if (!executionTools || !executionTools.script) {
36449
36449
  throw new PipelineExecutionError(`Model requested tools but no executionTools.script were provided in OpenAiAgentKitExecutionTools options`);
36450
36450
  }
36451
- return Array.isArray(executionTools.script) ? executionTools.script : [executionTools.script];
36451
+ return Array.isArray(executionTools.script)
36452
+ ? executionTools.script
36453
+ : [executionTools.script];
36452
36454
  }
36453
36455
  /**
36454
36456
  * Resolves the assistant-visible AgentKit tool response while preserving structured tool result data.
@@ -45998,7 +46000,7 @@ const _AnthropicClaudeMetadataRegistration = $llmToolsMetadataRegister.register(
45998
46000
  title: 'Anthropic Claude',
45999
46001
  packageName: '@promptbook/anthropic-claude',
46000
46002
  className: 'AnthropicClaudeExecutionTools',
46001
- envVariables: ['ANTHROPIC_CLAUDE_API_KEY'],
46003
+ envVariables: ['ANTHROPIC_API_KEY', 'ANTHROPIC_CLAUDE_API_KEY'],
46002
46004
  trustLevel: 'CLOSED',
46003
46005
  order: MODEL_ORDERS.TOP_TIER,
46004
46006
  getBoilerplateConfiguration() {
@@ -46015,14 +46017,17 @@ const _AnthropicClaudeMetadataRegistration = $llmToolsMetadataRegister.register(
46015
46017
  };
46016
46018
  },
46017
46019
  createConfigurationFromEnv(env) {
46020
+ var _a;
46018
46021
  // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
46019
- if (typeof env.ANTHROPIC_CLAUDE_API_KEY === 'string') {
46022
+ // Note: `ANTHROPIC_API_KEY` takes precedence over the deprecated `ANTHROPIC_CLAUDE_API_KEY`
46023
+ const apiKey = (_a = env.ANTHROPIC_API_KEY) !== null && _a !== void 0 ? _a : env.ANTHROPIC_CLAUDE_API_KEY;
46024
+ if (typeof apiKey === 'string') {
46020
46025
  return {
46021
46026
  title: 'Claude (from env)',
46022
46027
  packageName: '@promptbook/anthropic-claude',
46023
46028
  className: 'AnthropicClaudeExecutionTools',
46024
46029
  options: {
46025
- apiKey: env.ANTHROPIC_CLAUDE_API_KEY,
46030
+ apiKey,
46026
46031
  },
46027
46032
  };
46028
46033
  }