@botpress/runtime 1.15.3 → 1.16.0
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/dist/_types/dependencies.d.ts +9 -0
- package/dist/_types/dependencies.d.ts.map +1 -1
- package/dist/_types/plugin-actions.d.ts +3 -0
- package/dist/_types/plugin-actions.d.ts.map +1 -0
- package/dist/_types/plugins.d.ts +13 -0
- package/dist/_types/plugins.d.ts.map +1 -0
- package/dist/definition.js +40 -11
- package/dist/definition.js.map +4 -4
- package/dist/internal.js +58 -11
- package/dist/internal.js.map +4 -4
- package/dist/library.d.ts +2 -0
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +41 -11
- package/dist/library.js.map +4 -4
- package/dist/runtime/context/handlers.d.ts.map +1 -1
- package/dist/runtime/context/inspector-handler.d.ts +8 -40
- package/dist/runtime/context/inspector-handler.d.ts.map +1 -1
- package/dist/runtime/handlers/index.d.ts +2 -0
- package/dist/runtime/handlers/index.d.ts.map +1 -1
- package/dist/runtime/plugins.d.ts +14 -0
- package/dist/runtime/plugins.d.ts.map +1 -0
- package/dist/runtime.js +66 -100
- package/dist/runtime.js.map +4 -4
- package/dist/workers/parent_worker.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/debugging/node-inspector.d.ts +0 -5
- package/dist/debugging/node-inspector.d.ts.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -48,7 +48,7 @@ var init_define_BUILD = __esm({
|
|
|
48
48
|
var define_PACKAGE_VERSIONS_default;
|
|
49
49
|
var init_define_PACKAGE_VERSIONS = __esm({
|
|
50
50
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
51
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.
|
|
51
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.16.0", adk: "not-installed", sdk: "5.4.3", llmz: "0.0.54", zai: "2.6.0", cognitive: "0.3.14" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -36848,15 +36848,6 @@ var init_tracked_tags = __esm({
|
|
|
36848
36848
|
}
|
|
36849
36849
|
});
|
|
36850
36850
|
|
|
36851
|
-
// src/runtime/context/inspector-handler.ts
|
|
36852
|
-
var init_inspector_handler = __esm({
|
|
36853
|
-
"src/runtime/context/inspector-handler.ts"() {
|
|
36854
|
-
"use strict";
|
|
36855
|
-
init_define_BUILD();
|
|
36856
|
-
init_define_PACKAGE_VERSIONS();
|
|
36857
|
-
}
|
|
36858
|
-
});
|
|
36859
|
-
|
|
36860
36851
|
// src/runtime/events.ts
|
|
36861
36852
|
import { z as z12 } from "@botpress/sdk";
|
|
36862
36853
|
var WorkflowCallbackEvent, WorkflowScheduleEvent, WorkflowContinueEvent, SubworkflowFinished, WorkflowDataRequestEvent2;
|
|
@@ -36933,7 +36924,6 @@ var init_handlers = __esm({
|
|
|
36933
36924
|
init_tracing();
|
|
36934
36925
|
init_heavy_imports();
|
|
36935
36926
|
init_environment();
|
|
36936
|
-
init_inspector_handler();
|
|
36937
36927
|
init_events();
|
|
36938
36928
|
}
|
|
36939
36929
|
});
|
|
@@ -38671,6 +38661,43 @@ var init_actions3 = __esm({
|
|
|
38671
38661
|
}
|
|
38672
38662
|
});
|
|
38673
38663
|
|
|
38664
|
+
// src/runtime/plugins.ts
|
|
38665
|
+
var plugins;
|
|
38666
|
+
var init_plugins = __esm({
|
|
38667
|
+
"src/runtime/plugins.ts"() {
|
|
38668
|
+
"use strict";
|
|
38669
|
+
init_define_BUILD();
|
|
38670
|
+
init_define_PACKAGE_VERSIONS();
|
|
38671
|
+
init_context();
|
|
38672
|
+
plugins = new Proxy({}, {
|
|
38673
|
+
get(_2, pluginAlias) {
|
|
38674
|
+
if (typeof pluginAlias !== "string") {
|
|
38675
|
+
return void 0;
|
|
38676
|
+
}
|
|
38677
|
+
return {
|
|
38678
|
+
actions: new Proxy(
|
|
38679
|
+
{},
|
|
38680
|
+
{
|
|
38681
|
+
get(_3, actionName) {
|
|
38682
|
+
if (typeof actionName !== "string") {
|
|
38683
|
+
return void 0;
|
|
38684
|
+
}
|
|
38685
|
+
return async (input) => {
|
|
38686
|
+
const client2 = context.get("client");
|
|
38687
|
+
return client2.callAction({
|
|
38688
|
+
type: `${pluginAlias}#${actionName}`,
|
|
38689
|
+
input
|
|
38690
|
+
}).then((res) => res.output);
|
|
38691
|
+
};
|
|
38692
|
+
}
|
|
38693
|
+
}
|
|
38694
|
+
)
|
|
38695
|
+
};
|
|
38696
|
+
}
|
|
38697
|
+
});
|
|
38698
|
+
}
|
|
38699
|
+
});
|
|
38700
|
+
|
|
38674
38701
|
// src/runtime/handlers/index.ts
|
|
38675
38702
|
var init_handlers2 = __esm({
|
|
38676
38703
|
"src/runtime/handlers/index.ts"() {
|
|
@@ -38682,6 +38709,7 @@ var init_handlers2 = __esm({
|
|
|
38682
38709
|
init_workflow2();
|
|
38683
38710
|
init_event();
|
|
38684
38711
|
init_actions3();
|
|
38712
|
+
init_plugins();
|
|
38685
38713
|
}
|
|
38686
38714
|
});
|
|
38687
38715
|
|
|
@@ -39465,6 +39493,7 @@ var init_library = __esm({
|
|
|
39465
39493
|
init_types2();
|
|
39466
39494
|
init_errors();
|
|
39467
39495
|
init_actions();
|
|
39496
|
+
init_plugins();
|
|
39468
39497
|
init_state();
|
|
39469
39498
|
init_configuration();
|
|
39470
39499
|
init_define_config();
|
|
@@ -49711,6 +49740,20 @@ var WorkerPool = class {
|
|
|
49711
49740
|
}
|
|
49712
49741
|
};
|
|
49713
49742
|
|
|
49743
|
+
// src/runtime/context/inspector-handler.ts
|
|
49744
|
+
init_define_BUILD();
|
|
49745
|
+
init_define_PACKAGE_VERSIONS();
|
|
49746
|
+
async function handleInspectorRequest() {
|
|
49747
|
+
const responseData = {
|
|
49748
|
+
pid: process.pid
|
|
49749
|
+
};
|
|
49750
|
+
return {
|
|
49751
|
+
statusCode: 200,
|
|
49752
|
+
headers: { "Content-Type": "application/json" },
|
|
49753
|
+
body: JSON.stringify(responseData)
|
|
49754
|
+
};
|
|
49755
|
+
}
|
|
49756
|
+
|
|
49714
49757
|
// src/workers/parent_worker.ts
|
|
49715
49758
|
var DEBUG_ENABLED2 = process.env.BP_DEBUG === "true" || process.env.BP_DEBUG === "1";
|
|
49716
49759
|
function debugLog2(...args) {
|
|
@@ -49725,6 +49768,10 @@ function initializeParentWorker(bot2) {
|
|
|
49725
49768
|
globalWorkerPool = pool;
|
|
49726
49769
|
bot2.handler = async (event) => {
|
|
49727
49770
|
debugLog2("[Main] Received event, delegating to worker pool:", event.type || "unknown");
|
|
49771
|
+
if (process.env.NODE_ENV === "development" && event.path === "/__debug/inspector" && event.method === "POST") {
|
|
49772
|
+
debugLog2("[Main] Handling inspector enable on main thread");
|
|
49773
|
+
return await handleInspectorRequest();
|
|
49774
|
+
}
|
|
49728
49775
|
const workerStats = pool.getWorkerStats();
|
|
49729
49776
|
debugLog2(`[Main] Pool stats - Total: ${workerStats.total}, Idle: ${workerStats.idle}, Busy: ${workerStats.busy}`);
|
|
49730
49777
|
try {
|