@promptbook/browser 0.112.0-59 → 0.112.0-61

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
@@ -29,7 +29,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
29
29
  * @generated
30
30
  * @see https://github.com/webgptorg/promptbook
31
31
  */
32
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-59';
32
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-61';
33
33
  /**
34
34
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
35
35
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -31576,8 +31576,8 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
31576
31576
  * Prepares an AgentKit agent with optional knowledge sources and tool definitions.
31577
31577
  */
31578
31578
  async prepareAgentKitAgent(options) {
31579
- var _a, _b;
31580
- const { name, instructions, knowledgeSources, tools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
31579
+ var _a, _b, _c;
31580
+ const { name, instructions, knowledgeSources, tools, nativeAgentKitTools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
31581
31581
  await this.ensureAgentKitDefaults();
31582
31582
  if (this.options.isVerbose) {
31583
31583
  console.info('[🤰]', 'Preparing OpenAI AgentKit agent', {
@@ -31585,6 +31585,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
31585
31585
  instructionsLength: instructions.length,
31586
31586
  knowledgeSourcesCount: (_a = knowledgeSources === null || knowledgeSources === void 0 ? void 0 : knowledgeSources.length) !== null && _a !== void 0 ? _a : 0,
31587
31587
  toolsCount: (_b = tools === null || tools === void 0 ? void 0 : tools.length) !== null && _b !== void 0 ? _b : 0,
31588
+ nativeAgentKitToolsCount: (_c = nativeAgentKitTools === null || nativeAgentKitTools === void 0 ? void 0 : nativeAgentKitTools.length) !== null && _c !== void 0 ? _c : 0,
31588
31589
  });
31589
31590
  }
31590
31591
  let vectorStoreId = cachedVectorStoreId;
@@ -31603,7 +31604,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
31603
31604
  vectorStoreId,
31604
31605
  });
31605
31606
  }
31606
- const agentKitTools = this.buildAgentKitTools({ tools, vectorStoreId });
31607
+ const agentKitTools = this.buildAgentKitTools({ tools, nativeAgentKitTools, vectorStoreId });
31607
31608
  const openAiAgentKitAgent = new Agent$1({
31608
31609
  name,
31609
31610
  model: this.agentKitModelName,
@@ -31642,11 +31643,14 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
31642
31643
  * Builds the tool list for AgentKit, including hosted file search when applicable.
31643
31644
  */
31644
31645
  buildAgentKitTools(options) {
31645
- const { tools, vectorStoreId } = options;
31646
+ const { tools, nativeAgentKitTools, vectorStoreId } = options;
31646
31647
  const agentKitTools = [];
31647
31648
  if (vectorStoreId) {
31648
31649
  agentKitTools.push(fileSearchTool(vectorStoreId));
31649
31650
  }
31651
+ if (nativeAgentKitTools && nativeAgentKitTools.length > 0) {
31652
+ agentKitTools.push(...nativeAgentKitTools);
31653
+ }
31650
31654
  if (tools && tools.length > 0) {
31651
31655
  let scriptTools = null;
31652
31656
  for (const toolDefinition of tools) {