@botpress/runtime 1.15.4 → 1.16.1
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/definition.js +1 -11
- package/dist/definition.js.map +3 -3
- package/dist/internal.js +19 -11
- package/dist/internal.js.map +3 -3
- package/dist/library.js +1 -11
- package/dist/library.js.map +3 -3
- 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.js +1 -82
- package/dist/runtime.js.map +3 -3
- 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.1", 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
|
});
|
|
@@ -49750,6 +49740,20 @@ var WorkerPool = class {
|
|
|
49750
49740
|
}
|
|
49751
49741
|
};
|
|
49752
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
|
+
|
|
49753
49757
|
// src/workers/parent_worker.ts
|
|
49754
49758
|
var DEBUG_ENABLED2 = process.env.BP_DEBUG === "true" || process.env.BP_DEBUG === "1";
|
|
49755
49759
|
function debugLog2(...args) {
|
|
@@ -49764,6 +49768,10 @@ function initializeParentWorker(bot2) {
|
|
|
49764
49768
|
globalWorkerPool = pool;
|
|
49765
49769
|
bot2.handler = async (event) => {
|
|
49766
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
|
+
}
|
|
49767
49775
|
const workerStats = pool.getWorkerStats();
|
|
49768
49776
|
debugLog2(`[Main] Pool stats - Total: ${workerStats.total}, Idle: ${workerStats.idle}, Busy: ${workerStats.busy}`);
|
|
49769
49777
|
try {
|