@promptbook/node 0.112.0-59 → 0.112.0-60
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 +9 -5
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-components/BookEditor/useBookEditorMonacoInteractions.d.ts +40 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +34 -0
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +2 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +9 -5
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-components/BookEditor/useBookEditorMonacoInteractions.d.ts +40 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +34 -0
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +2 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -35,7 +35,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
35
35
|
* @generated
|
|
36
36
|
* @see https://github.com/webgptorg/promptbook
|
|
37
37
|
*/
|
|
38
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
38
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-60';
|
|
39
39
|
/**
|
|
40
40
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
41
41
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -37355,8 +37355,8 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
37355
37355
|
* Prepares an AgentKit agent with optional knowledge sources and tool definitions.
|
|
37356
37356
|
*/
|
|
37357
37357
|
async prepareAgentKitAgent(options) {
|
|
37358
|
-
var _a, _b;
|
|
37359
|
-
const { name, instructions, knowledgeSources, tools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
37358
|
+
var _a, _b, _c;
|
|
37359
|
+
const { name, instructions, knowledgeSources, tools, nativeAgentKitTools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
37360
37360
|
await this.ensureAgentKitDefaults();
|
|
37361
37361
|
if (this.options.isVerbose) {
|
|
37362
37362
|
console.info('[🤰]', 'Preparing OpenAI AgentKit agent', {
|
|
@@ -37364,6 +37364,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
37364
37364
|
instructionsLength: instructions.length,
|
|
37365
37365
|
knowledgeSourcesCount: (_a = knowledgeSources === null || knowledgeSources === void 0 ? void 0 : knowledgeSources.length) !== null && _a !== void 0 ? _a : 0,
|
|
37366
37366
|
toolsCount: (_b = tools === null || tools === void 0 ? void 0 : tools.length) !== null && _b !== void 0 ? _b : 0,
|
|
37367
|
+
nativeAgentKitToolsCount: (_c = nativeAgentKitTools === null || nativeAgentKitTools === void 0 ? void 0 : nativeAgentKitTools.length) !== null && _c !== void 0 ? _c : 0,
|
|
37367
37368
|
});
|
|
37368
37369
|
}
|
|
37369
37370
|
let vectorStoreId = cachedVectorStoreId;
|
|
@@ -37382,7 +37383,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
37382
37383
|
vectorStoreId,
|
|
37383
37384
|
});
|
|
37384
37385
|
}
|
|
37385
|
-
const agentKitTools = this.buildAgentKitTools({ tools, vectorStoreId });
|
|
37386
|
+
const agentKitTools = this.buildAgentKitTools({ tools, nativeAgentKitTools, vectorStoreId });
|
|
37386
37387
|
const openAiAgentKitAgent = new Agent$1({
|
|
37387
37388
|
name,
|
|
37388
37389
|
model: this.agentKitModelName,
|
|
@@ -37421,11 +37422,14 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
37421
37422
|
* Builds the tool list for AgentKit, including hosted file search when applicable.
|
|
37422
37423
|
*/
|
|
37423
37424
|
buildAgentKitTools(options) {
|
|
37424
|
-
const { tools, vectorStoreId } = options;
|
|
37425
|
+
const { tools, nativeAgentKitTools, vectorStoreId } = options;
|
|
37425
37426
|
const agentKitTools = [];
|
|
37426
37427
|
if (vectorStoreId) {
|
|
37427
37428
|
agentKitTools.push(fileSearchTool(vectorStoreId));
|
|
37428
37429
|
}
|
|
37430
|
+
if (nativeAgentKitTools && nativeAgentKitTools.length > 0) {
|
|
37431
|
+
agentKitTools.push(...nativeAgentKitTools);
|
|
37432
|
+
}
|
|
37429
37433
|
if (tools && tools.length > 0) {
|
|
37430
37434
|
let scriptTools = null;
|
|
37431
37435
|
for (const toolDefinition of tools) {
|