@promptbook/core 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 +1 -1
- 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
|
@@ -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-
|
|
31
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-60';
|
|
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
|
|
@@ -36812,8 +36812,8 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
36812
36812
|
* Prepares an AgentKit agent with optional knowledge sources and tool definitions.
|
|
36813
36813
|
*/
|
|
36814
36814
|
async prepareAgentKitAgent(options) {
|
|
36815
|
-
var _a, _b;
|
|
36816
|
-
const { name, instructions, knowledgeSources, tools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
36815
|
+
var _a, _b, _c;
|
|
36816
|
+
const { name, instructions, knowledgeSources, tools, nativeAgentKitTools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
36817
36817
|
await this.ensureAgentKitDefaults();
|
|
36818
36818
|
if (this.options.isVerbose) {
|
|
36819
36819
|
console.info('[🤰]', 'Preparing OpenAI AgentKit agent', {
|
|
@@ -36821,6 +36821,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
36821
36821
|
instructionsLength: instructions.length,
|
|
36822
36822
|
knowledgeSourcesCount: (_a = knowledgeSources === null || knowledgeSources === void 0 ? void 0 : knowledgeSources.length) !== null && _a !== void 0 ? _a : 0,
|
|
36823
36823
|
toolsCount: (_b = tools === null || tools === void 0 ? void 0 : tools.length) !== null && _b !== void 0 ? _b : 0,
|
|
36824
|
+
nativeAgentKitToolsCount: (_c = nativeAgentKitTools === null || nativeAgentKitTools === void 0 ? void 0 : nativeAgentKitTools.length) !== null && _c !== void 0 ? _c : 0,
|
|
36824
36825
|
});
|
|
36825
36826
|
}
|
|
36826
36827
|
let vectorStoreId = cachedVectorStoreId;
|
|
@@ -36839,7 +36840,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
36839
36840
|
vectorStoreId,
|
|
36840
36841
|
});
|
|
36841
36842
|
}
|
|
36842
|
-
const agentKitTools = this.buildAgentKitTools({ tools, vectorStoreId });
|
|
36843
|
+
const agentKitTools = this.buildAgentKitTools({ tools, nativeAgentKitTools, vectorStoreId });
|
|
36843
36844
|
const openAiAgentKitAgent = new Agent$1({
|
|
36844
36845
|
name,
|
|
36845
36846
|
model: this.agentKitModelName,
|
|
@@ -36878,11 +36879,14 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
36878
36879
|
* Builds the tool list for AgentKit, including hosted file search when applicable.
|
|
36879
36880
|
*/
|
|
36880
36881
|
buildAgentKitTools(options) {
|
|
36881
|
-
const { tools, vectorStoreId } = options;
|
|
36882
|
+
const { tools, nativeAgentKitTools, vectorStoreId } = options;
|
|
36882
36883
|
const agentKitTools = [];
|
|
36883
36884
|
if (vectorStoreId) {
|
|
36884
36885
|
agentKitTools.push(fileSearchTool(vectorStoreId));
|
|
36885
36886
|
}
|
|
36887
|
+
if (nativeAgentKitTools && nativeAgentKitTools.length > 0) {
|
|
36888
|
+
agentKitTools.push(...nativeAgentKitTools);
|
|
36889
|
+
}
|
|
36886
36890
|
if (tools && tools.length > 0) {
|
|
36887
36891
|
let scriptTools = null;
|
|
36888
36892
|
for (const toolDefinition of tools) {
|