@promptbook/remote-server 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 +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
|
@@ -40,7 +40,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
40
40
|
* @generated
|
|
41
41
|
* @see https://github.com/webgptorg/promptbook
|
|
42
42
|
*/
|
|
43
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
43
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-61';
|
|
44
44
|
/**
|
|
45
45
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
46
46
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -34337,8 +34337,8 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
34337
34337
|
* Prepares an AgentKit agent with optional knowledge sources and tool definitions.
|
|
34338
34338
|
*/
|
|
34339
34339
|
async prepareAgentKitAgent(options) {
|
|
34340
|
-
var _a, _b;
|
|
34341
|
-
const { name, instructions, knowledgeSources, tools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
34340
|
+
var _a, _b, _c;
|
|
34341
|
+
const { name, instructions, knowledgeSources, tools, nativeAgentKitTools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
34342
34342
|
await this.ensureAgentKitDefaults();
|
|
34343
34343
|
if (this.options.isVerbose) {
|
|
34344
34344
|
console.info('[🤰]', 'Preparing OpenAI AgentKit agent', {
|
|
@@ -34346,6 +34346,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
34346
34346
|
instructionsLength: instructions.length,
|
|
34347
34347
|
knowledgeSourcesCount: (_a = knowledgeSources === null || knowledgeSources === void 0 ? void 0 : knowledgeSources.length) !== null && _a !== void 0 ? _a : 0,
|
|
34348
34348
|
toolsCount: (_b = tools === null || tools === void 0 ? void 0 : tools.length) !== null && _b !== void 0 ? _b : 0,
|
|
34349
|
+
nativeAgentKitToolsCount: (_c = nativeAgentKitTools === null || nativeAgentKitTools === void 0 ? void 0 : nativeAgentKitTools.length) !== null && _c !== void 0 ? _c : 0,
|
|
34349
34350
|
});
|
|
34350
34351
|
}
|
|
34351
34352
|
let vectorStoreId = cachedVectorStoreId;
|
|
@@ -34364,7 +34365,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
34364
34365
|
vectorStoreId,
|
|
34365
34366
|
});
|
|
34366
34367
|
}
|
|
34367
|
-
const agentKitTools = this.buildAgentKitTools({ tools, vectorStoreId });
|
|
34368
|
+
const agentKitTools = this.buildAgentKitTools({ tools, nativeAgentKitTools, vectorStoreId });
|
|
34368
34369
|
const openAiAgentKitAgent = new Agent$1({
|
|
34369
34370
|
name,
|
|
34370
34371
|
model: this.agentKitModelName,
|
|
@@ -34403,11 +34404,14 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
34403
34404
|
* Builds the tool list for AgentKit, including hosted file search when applicable.
|
|
34404
34405
|
*/
|
|
34405
34406
|
buildAgentKitTools(options) {
|
|
34406
|
-
const { tools, vectorStoreId } = options;
|
|
34407
|
+
const { tools, nativeAgentKitTools, vectorStoreId } = options;
|
|
34407
34408
|
const agentKitTools = [];
|
|
34408
34409
|
if (vectorStoreId) {
|
|
34409
34410
|
agentKitTools.push(fileSearchTool(vectorStoreId));
|
|
34410
34411
|
}
|
|
34412
|
+
if (nativeAgentKitTools && nativeAgentKitTools.length > 0) {
|
|
34413
|
+
agentKitTools.push(...nativeAgentKitTools);
|
|
34414
|
+
}
|
|
34411
34415
|
if (tools && tools.length > 0) {
|
|
34412
34416
|
let scriptTools = null;
|
|
34413
34417
|
for (const toolDefinition of tools) {
|