@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/runtime/context/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAA;AAgBpC,OAAO,EAAE,4BAA4B,EAAqB,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAMzD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/runtime/context/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAA;AAgBpC,OAAO,EAAE,4BAA4B,EAAqB,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAMzD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAOxE,YAAY,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAS5C,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,qBAAqB,EAAE,CAAA;IACrC,UAAU,EAAE,mBAAmB,EAAE,CAAA;IACjC,iBAAiB,EAAE,4BAA4B,CAAA;CAChD;AAED,KAAK,WAAW,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAGjH,eAAO,MAAM,mBAAmB,GAAI,MAAM,WAAW,SAEpD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAG,GAkQtD,CAAA"}
|
|
@@ -1,42 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Inspector Handler
|
|
3
3
|
*
|
|
4
|
-
* Provides
|
|
5
|
-
* When a POST request is made to /__debug/inspector, this handler:
|
|
6
|
-
* 1. Opens the Node.js inspector on a random port
|
|
7
|
-
* 2. Fetches inspector metadata from http://127.0.0.1:[PORT]/json/list
|
|
8
|
-
* 3. Returns the DevTools frontend URL, inspector port, and process PID
|
|
4
|
+
* Provides the debug endpoint for returning the bot process PID.
|
|
9
5
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* - POST /__debug/inspector — Returns the process PID so VS Code can attach by PID.
|
|
7
|
+
* The inspector is NOT started here — VS Code starts it automatically when attaching.
|
|
8
|
+
*
|
|
9
|
+
* Debugging is one-way: press [d] in `adk dev` to enable, then disconnect from
|
|
10
|
+
* VS Code when done (or let the process restart on file changes).
|
|
12
11
|
*/
|
|
13
12
|
export interface InspectorResponse {
|
|
14
|
-
inspectorUrl: string | null;
|
|
15
|
-
inspectorPort: number | null;
|
|
16
|
-
webSocketDebuggerUrl: string | null;
|
|
17
|
-
devtoolsFrontendUrl: string | null;
|
|
18
13
|
pid: number;
|
|
19
14
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Checks if the inspector is currently active.
|
|
22
|
-
*
|
|
23
|
-
* @returns True if inspector is open, false otherwise
|
|
24
|
-
*/
|
|
25
|
-
export declare function isInspectorActive(): Promise<boolean>;
|
|
26
|
-
/**
|
|
27
|
-
* Closes the Node.js inspector if it's currently open.
|
|
28
|
-
*
|
|
29
|
-
* @returns HTTP response indicating success or failure
|
|
30
|
-
*/
|
|
31
|
-
export declare function handleInspectorDisable(): Promise<{
|
|
32
|
-
statusCode: number;
|
|
33
|
-
headers: Record<string, string>;
|
|
34
|
-
body: string;
|
|
35
|
-
}>;
|
|
36
15
|
/**
|
|
37
16
|
* Handles the inspector debug request.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
17
|
+
* Returns the PID without starting the inspector — VS Code will start it
|
|
18
|
+
* automatically when attaching to the process by PID.
|
|
40
19
|
*
|
|
41
20
|
* @returns HTTP response with PID information
|
|
42
21
|
*/
|
|
@@ -45,15 +24,4 @@ export declare function handleInspectorRequest(): Promise<{
|
|
|
45
24
|
headers: Record<string, string>;
|
|
46
25
|
body: string;
|
|
47
26
|
}>;
|
|
48
|
-
/**
|
|
49
|
-
* Handles Chrome DevTools open request.
|
|
50
|
-
* Starts the inspector if not already started and returns the DevTools URL.
|
|
51
|
-
*
|
|
52
|
-
* @returns HTTP response with inspector connection information
|
|
53
|
-
*/
|
|
54
|
-
export declare function handleInspectorChrome(): Promise<{
|
|
55
|
-
statusCode: number;
|
|
56
|
-
headers: Record<string, string>;
|
|
57
|
-
body: string;
|
|
58
|
-
}>;
|
|
59
27
|
//# sourceMappingURL=inspector-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspector-handler.d.ts","sourceRoot":"","sources":["../../../src/runtime/context/inspector-handler.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"inspector-handler.d.ts","sourceRoot":"","sources":["../../../src/runtime/context/inspector-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC;IACtD,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAUD"}
|
|
@@ -3,11 +3,13 @@ import * as trigger from './trigger';
|
|
|
3
3
|
import * as workflow from './workflow';
|
|
4
4
|
import * as event from './event';
|
|
5
5
|
import * as actions from './actions';
|
|
6
|
+
import * as plugins from '../plugins';
|
|
6
7
|
export declare const handlers: {
|
|
7
8
|
conversation: typeof conversation;
|
|
8
9
|
trigger: typeof trigger;
|
|
9
10
|
workflow: typeof workflow;
|
|
10
11
|
event: typeof event;
|
|
11
12
|
actions: typeof actions;
|
|
13
|
+
plugins: typeof plugins;
|
|
12
14
|
};
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AAErC,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PluginActions } from '../_types/plugin-actions';
|
|
2
|
+
/**
|
|
3
|
+
* Runtime proxy for calling plugin actions.
|
|
4
|
+
*
|
|
5
|
+
* Uses the same pattern as integration actions in actions.ts:
|
|
6
|
+
* - Gets client from AsyncLocalStorage context (shared across bundles)
|
|
7
|
+
* - Calls client.callAction() which routes through the SDK server
|
|
8
|
+
* - SDK server dispatches to bot.actionHandlers which routes to plugin handler via # prefix
|
|
9
|
+
*
|
|
10
|
+
* Plugin actions use the format: pluginAlias#actionName (vs integrationAlias:actionName for integrations)
|
|
11
|
+
*/
|
|
12
|
+
export declare function setup(_bot: any): void;
|
|
13
|
+
export declare const plugins: PluginActions;
|
|
14
|
+
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/runtime/plugins.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD;;;;;;;;;GASG;AAEH,wBAAgB,KAAK,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,CAIrC;AAED,eAAO,MAAM,OAAO,EAAE,aA8BpB,CAAA"}
|
package/dist/runtime.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
|
|
|
@@ -27437,7 +27437,7 @@ var require_common = __commonJS({
|
|
|
27437
27437
|
"../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/common.js"(exports2, module) {
|
|
27438
27438
|
init_define_BUILD();
|
|
27439
27439
|
init_define_PACKAGE_VERSIONS();
|
|
27440
|
-
function
|
|
27440
|
+
function setup7(env2) {
|
|
27441
27441
|
createDebug.debug = createDebug;
|
|
27442
27442
|
createDebug.default = createDebug;
|
|
27443
27443
|
createDebug.coerce = coerce;
|
|
@@ -27607,7 +27607,7 @@ var require_common = __commonJS({
|
|
|
27607
27607
|
createDebug.enable(createDebug.load());
|
|
27608
27608
|
return createDebug;
|
|
27609
27609
|
}
|
|
27610
|
-
module.exports =
|
|
27610
|
+
module.exports = setup7;
|
|
27611
27611
|
}
|
|
27612
27612
|
});
|
|
27613
27613
|
|
|
@@ -46658,6 +46658,50 @@ var init_types2 = __esm({
|
|
|
46658
46658
|
}
|
|
46659
46659
|
});
|
|
46660
46660
|
|
|
46661
|
+
// src/runtime/plugins.ts
|
|
46662
|
+
var plugins_exports = {};
|
|
46663
|
+
__export(plugins_exports, {
|
|
46664
|
+
plugins: () => plugins,
|
|
46665
|
+
setup: () => setup
|
|
46666
|
+
});
|
|
46667
|
+
function setup(_bot) {
|
|
46668
|
+
}
|
|
46669
|
+
var plugins;
|
|
46670
|
+
var init_plugins = __esm({
|
|
46671
|
+
"src/runtime/plugins.ts"() {
|
|
46672
|
+
"use strict";
|
|
46673
|
+
init_define_BUILD();
|
|
46674
|
+
init_define_PACKAGE_VERSIONS();
|
|
46675
|
+
init_context3();
|
|
46676
|
+
plugins = new Proxy({}, {
|
|
46677
|
+
get(_2, pluginAlias) {
|
|
46678
|
+
if (typeof pluginAlias !== "string") {
|
|
46679
|
+
return void 0;
|
|
46680
|
+
}
|
|
46681
|
+
return {
|
|
46682
|
+
actions: new Proxy(
|
|
46683
|
+
{},
|
|
46684
|
+
{
|
|
46685
|
+
get(_3, actionName) {
|
|
46686
|
+
if (typeof actionName !== "string") {
|
|
46687
|
+
return void 0;
|
|
46688
|
+
}
|
|
46689
|
+
return async (input) => {
|
|
46690
|
+
const client2 = context2.get("client");
|
|
46691
|
+
return client2.callAction({
|
|
46692
|
+
type: `${pluginAlias}#${actionName}`,
|
|
46693
|
+
input
|
|
46694
|
+
}).then((res) => res.output);
|
|
46695
|
+
};
|
|
46696
|
+
}
|
|
46697
|
+
}
|
|
46698
|
+
)
|
|
46699
|
+
};
|
|
46700
|
+
}
|
|
46701
|
+
});
|
|
46702
|
+
}
|
|
46703
|
+
});
|
|
46704
|
+
|
|
46661
46705
|
// src/runtime/state.ts
|
|
46662
46706
|
var bot, user;
|
|
46663
46707
|
var init_state = __esm({
|
|
@@ -47046,6 +47090,7 @@ var init_library = __esm({
|
|
|
47046
47090
|
init_types2();
|
|
47047
47091
|
init_errors();
|
|
47048
47092
|
init_actions();
|
|
47093
|
+
init_plugins();
|
|
47049
47094
|
init_state();
|
|
47050
47095
|
init_configuration();
|
|
47051
47096
|
init_define_config();
|
|
@@ -48167,75 +48212,6 @@ var init_tracked_state = __esm({
|
|
|
48167
48212
|
}
|
|
48168
48213
|
});
|
|
48169
48214
|
|
|
48170
|
-
// src/runtime/context/inspector-handler.ts
|
|
48171
|
-
async function handleInspectorDisable() {
|
|
48172
|
-
const inspector = await import("inspector");
|
|
48173
|
-
if (inspector.url()) {
|
|
48174
|
-
inspector.close();
|
|
48175
|
-
}
|
|
48176
|
-
return {
|
|
48177
|
-
statusCode: 200,
|
|
48178
|
-
headers: { "Content-Type": "application/json" },
|
|
48179
|
-
body: JSON.stringify({ success: true, message: "Debug mode disabled" })
|
|
48180
|
-
};
|
|
48181
|
-
}
|
|
48182
|
-
async function handleInspectorRequest() {
|
|
48183
|
-
const responseData = {
|
|
48184
|
-
inspectorUrl: null,
|
|
48185
|
-
inspectorPort: null,
|
|
48186
|
-
webSocketDebuggerUrl: null,
|
|
48187
|
-
devtoolsFrontendUrl: null,
|
|
48188
|
-
pid: process.pid
|
|
48189
|
-
};
|
|
48190
|
-
return {
|
|
48191
|
-
statusCode: 200,
|
|
48192
|
-
headers: { "Content-Type": "application/json" },
|
|
48193
|
-
body: JSON.stringify(responseData)
|
|
48194
|
-
};
|
|
48195
|
-
}
|
|
48196
|
-
async function handleInspectorChrome() {
|
|
48197
|
-
const inspector = await import("inspector");
|
|
48198
|
-
if (!inspector.url()) {
|
|
48199
|
-
inspector.open(0);
|
|
48200
|
-
}
|
|
48201
|
-
const inspectorUrl = inspector.url();
|
|
48202
|
-
const portMatch = inspectorUrl?.match(/:(\d+)\//);
|
|
48203
|
-
const inspectorPort = portMatch?.[1] ? parseInt(portMatch[1], 10) : null;
|
|
48204
|
-
let webSocketDebuggerUrl = null;
|
|
48205
|
-
let devtoolsFrontendUrl = null;
|
|
48206
|
-
if (inspectorPort && inspectorUrl) {
|
|
48207
|
-
try {
|
|
48208
|
-
const response = await fetch(`http://127.0.0.1:${inspectorPort}/json/list`);
|
|
48209
|
-
const data = await response.json();
|
|
48210
|
-
if (data && data.length > 0 && data[0]) {
|
|
48211
|
-
webSocketDebuggerUrl = data[0].webSocketDebuggerUrl || null;
|
|
48212
|
-
devtoolsFrontendUrl = data[0].devtoolsFrontendUrl || null;
|
|
48213
|
-
}
|
|
48214
|
-
} catch (err) {
|
|
48215
|
-
console.error("Failed to fetch inspector details:", err);
|
|
48216
|
-
}
|
|
48217
|
-
}
|
|
48218
|
-
const responseData = {
|
|
48219
|
-
inspectorUrl: inspectorUrl || null,
|
|
48220
|
-
inspectorPort,
|
|
48221
|
-
webSocketDebuggerUrl,
|
|
48222
|
-
devtoolsFrontendUrl,
|
|
48223
|
-
pid: process.pid
|
|
48224
|
-
};
|
|
48225
|
-
return {
|
|
48226
|
-
statusCode: 200,
|
|
48227
|
-
headers: { "Content-Type": "application/json" },
|
|
48228
|
-
body: JSON.stringify(responseData)
|
|
48229
|
-
};
|
|
48230
|
-
}
|
|
48231
|
-
var init_inspector_handler = __esm({
|
|
48232
|
-
"src/runtime/context/inspector-handler.ts"() {
|
|
48233
|
-
"use strict";
|
|
48234
|
-
init_define_BUILD();
|
|
48235
|
-
init_define_PACKAGE_VERSIONS();
|
|
48236
|
-
}
|
|
48237
|
-
});
|
|
48238
|
-
|
|
48239
48215
|
// src/runtime/events.ts
|
|
48240
48216
|
import { z as z27 } from "@botpress/sdk";
|
|
48241
48217
|
var WorkflowCallbackEvent, WorkflowScheduleEvent, WorkflowContinueEvent, SubworkflowFinished, WorkflowDataRequestEvent2;
|
|
@@ -48313,7 +48289,6 @@ var init_handlers = __esm({
|
|
|
48313
48289
|
init_tracing();
|
|
48314
48290
|
init_heavy_imports();
|
|
48315
48291
|
init_environment();
|
|
48316
|
-
init_inspector_handler();
|
|
48317
48292
|
init_events2();
|
|
48318
48293
|
requestHooks = [];
|
|
48319
48294
|
registerRequestHook = (hook) => {
|
|
@@ -48400,17 +48375,6 @@ var init_handlers = __esm({
|
|
|
48400
48375
|
scheduleHeavyImport("sdk");
|
|
48401
48376
|
scheduleHeavyImport("llmz");
|
|
48402
48377
|
try {
|
|
48403
|
-
if (Environment.isDevelopment()) {
|
|
48404
|
-
if (parsed.path === "/__debug/inspector" && parsed.method === "POST") {
|
|
48405
|
-
return await handleInspectorRequest();
|
|
48406
|
-
}
|
|
48407
|
-
if (parsed.path === "/__debug/inspector" && parsed.method === "DELETE") {
|
|
48408
|
-
return await handleInspectorDisable();
|
|
48409
|
-
}
|
|
48410
|
-
if (parsed.path === "/__debug/inspector/chrome" && parsed.method === "POST") {
|
|
48411
|
-
return await handleInspectorChrome();
|
|
48412
|
-
}
|
|
48413
|
-
}
|
|
48414
48378
|
for (const hook of requestHooks) {
|
|
48415
48379
|
try {
|
|
48416
48380
|
await hook(request, parsed);
|
|
@@ -48572,9 +48536,9 @@ var init_conversation_matching = __esm({
|
|
|
48572
48536
|
// src/runtime/handlers/conversation.ts
|
|
48573
48537
|
var conversation_exports = {};
|
|
48574
48538
|
__export(conversation_exports, {
|
|
48575
|
-
setup: () =>
|
|
48539
|
+
setup: () => setup2
|
|
48576
48540
|
});
|
|
48577
|
-
var
|
|
48541
|
+
var setup2;
|
|
48578
48542
|
var init_conversation2 = __esm({
|
|
48579
48543
|
"src/runtime/handlers/conversation.ts"() {
|
|
48580
48544
|
"use strict";
|
|
@@ -48585,7 +48549,7 @@ var init_conversation2 = __esm({
|
|
|
48585
48549
|
init_tracing();
|
|
48586
48550
|
init_adk();
|
|
48587
48551
|
init_conversation_matching();
|
|
48588
|
-
|
|
48552
|
+
setup2 = (bot2) => {
|
|
48589
48553
|
bot2.on.message("*", async ({ conversation, message, logger, ctx, event, user: user2, client: client2 }) => {
|
|
48590
48554
|
await span(
|
|
48591
48555
|
"handler.conversation",
|
|
@@ -48630,10 +48594,10 @@ var init_conversation2 = __esm({
|
|
|
48630
48594
|
// src/runtime/handlers/trigger.ts
|
|
48631
48595
|
var trigger_exports = {};
|
|
48632
48596
|
__export(trigger_exports, {
|
|
48633
|
-
setup: () =>
|
|
48597
|
+
setup: () => setup3,
|
|
48634
48598
|
triggerRegisterEvent: () => triggerRegisterEvent
|
|
48635
48599
|
});
|
|
48636
|
-
var triggerRegisterEvent,
|
|
48600
|
+
var triggerRegisterEvent, setup3;
|
|
48637
48601
|
var init_trigger2 = __esm({
|
|
48638
48602
|
"src/runtime/handlers/trigger.ts"() {
|
|
48639
48603
|
"use strict";
|
|
@@ -48671,7 +48635,7 @@ var init_trigger2 = __esm({
|
|
|
48671
48635
|
}
|
|
48672
48636
|
);
|
|
48673
48637
|
};
|
|
48674
|
-
|
|
48638
|
+
setup3 = (bot2) => {
|
|
48675
48639
|
const events = /* @__PURE__ */ new Set();
|
|
48676
48640
|
for (const trigger of Object.values(adk.project.triggers)) {
|
|
48677
48641
|
for (const name of trigger.events) {
|
|
@@ -48727,9 +48691,9 @@ var init_trigger2 = __esm({
|
|
|
48727
48691
|
// src/runtime/handlers/workflow.ts
|
|
48728
48692
|
var workflow_exports = {};
|
|
48729
48693
|
__export(workflow_exports, {
|
|
48730
|
-
setup: () =>
|
|
48694
|
+
setup: () => setup4
|
|
48731
48695
|
});
|
|
48732
|
-
var import_ms3,
|
|
48696
|
+
var import_ms3, setup4;
|
|
48733
48697
|
var init_workflow2 = __esm({
|
|
48734
48698
|
"src/runtime/handlers/workflow.ts"() {
|
|
48735
48699
|
"use strict";
|
|
@@ -48744,7 +48708,7 @@ var init_workflow2 = __esm({
|
|
|
48744
48708
|
init_workflow_utils();
|
|
48745
48709
|
init_errors();
|
|
48746
48710
|
import_ms3 = __toESM(require_ms(), 1);
|
|
48747
|
-
|
|
48711
|
+
setup4 = (bot2) => {
|
|
48748
48712
|
const handler = async function({ workflow, event, client: client2, ctx, conversation }) {
|
|
48749
48713
|
await span(
|
|
48750
48714
|
"handler.workflow",
|
|
@@ -48929,9 +48893,9 @@ var init_workflow2 = __esm({
|
|
|
48929
48893
|
// src/runtime/handlers/event.ts
|
|
48930
48894
|
var event_exports = {};
|
|
48931
48895
|
__export(event_exports, {
|
|
48932
|
-
setup: () =>
|
|
48896
|
+
setup: () => setup5
|
|
48933
48897
|
});
|
|
48934
|
-
var
|
|
48898
|
+
var setup5;
|
|
48935
48899
|
var init_event = __esm({
|
|
48936
48900
|
"src/runtime/handlers/event.ts"() {
|
|
48937
48901
|
"use strict";
|
|
@@ -48942,7 +48906,7 @@ var init_event = __esm({
|
|
|
48942
48906
|
init_tracing();
|
|
48943
48907
|
init_adk();
|
|
48944
48908
|
init_conversation_matching();
|
|
48945
|
-
|
|
48909
|
+
setup5 = (bot2) => {
|
|
48946
48910
|
const registeredEvents = /* @__PURE__ */ new Set();
|
|
48947
48911
|
for (const conversation of adk.project.conversations) {
|
|
48948
48912
|
for (const eventName of conversation.events) {
|
|
@@ -49035,9 +48999,9 @@ var init_event = __esm({
|
|
|
49035
48999
|
// src/runtime/handlers/actions.ts
|
|
49036
49000
|
var actions_exports = {};
|
|
49037
49001
|
__export(actions_exports, {
|
|
49038
|
-
setup: () =>
|
|
49002
|
+
setup: () => setup6
|
|
49039
49003
|
});
|
|
49040
|
-
var
|
|
49004
|
+
var setup6;
|
|
49041
49005
|
var init_actions3 = __esm({
|
|
49042
49006
|
"src/runtime/handlers/actions.ts"() {
|
|
49043
49007
|
"use strict";
|
|
@@ -49046,7 +49010,7 @@ var init_actions3 = __esm({
|
|
|
49046
49010
|
init_runtime();
|
|
49047
49011
|
init_tracing();
|
|
49048
49012
|
init_adk();
|
|
49049
|
-
|
|
49013
|
+
setup6 = (bot2) => {
|
|
49050
49014
|
const handlers2 = bot2._actionHandlers;
|
|
49051
49015
|
for (const action of adk.project.actions) {
|
|
49052
49016
|
handlers2[action.name] = async (props) => {
|
|
@@ -49084,12 +49048,14 @@ var init_handlers2 = __esm({
|
|
|
49084
49048
|
init_workflow2();
|
|
49085
49049
|
init_event();
|
|
49086
49050
|
init_actions3();
|
|
49051
|
+
init_plugins();
|
|
49087
49052
|
handlers = {
|
|
49088
49053
|
conversation: conversation_exports,
|
|
49089
49054
|
trigger: trigger_exports,
|
|
49090
49055
|
workflow: workflow_exports,
|
|
49091
49056
|
event: event_exports,
|
|
49092
|
-
actions: actions_exports
|
|
49057
|
+
actions: actions_exports,
|
|
49058
|
+
plugins: plugins_exports
|
|
49093
49059
|
};
|
|
49094
49060
|
}
|
|
49095
49061
|
});
|