@botpress/runtime 1.15.2 → 1.15.4
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 -1
- package/dist/definition.js.map +4 -4
- package/dist/internal.js +47 -1
- 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 +48 -1
- package/dist/library.js.map +4 -4
- package/dist/primitives/table.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 -19
- package/dist/runtime.js.map +4 -4
- package/dist/telemetry/structured-logging.d.ts +0 -5
- package/dist/telemetry/structured-logging.d.ts.map +1 -1
- package/package.json +1 -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.15.
|
|
51
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.15.4", 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
|
|
|
@@ -38671,6 +38671,43 @@ var init_actions3 = __esm({
|
|
|
38671
38671
|
}
|
|
38672
38672
|
});
|
|
38673
38673
|
|
|
38674
|
+
// src/runtime/plugins.ts
|
|
38675
|
+
var plugins;
|
|
38676
|
+
var init_plugins = __esm({
|
|
38677
|
+
"src/runtime/plugins.ts"() {
|
|
38678
|
+
"use strict";
|
|
38679
|
+
init_define_BUILD();
|
|
38680
|
+
init_define_PACKAGE_VERSIONS();
|
|
38681
|
+
init_context();
|
|
38682
|
+
plugins = new Proxy({}, {
|
|
38683
|
+
get(_2, pluginAlias) {
|
|
38684
|
+
if (typeof pluginAlias !== "string") {
|
|
38685
|
+
return void 0;
|
|
38686
|
+
}
|
|
38687
|
+
return {
|
|
38688
|
+
actions: new Proxy(
|
|
38689
|
+
{},
|
|
38690
|
+
{
|
|
38691
|
+
get(_3, actionName) {
|
|
38692
|
+
if (typeof actionName !== "string") {
|
|
38693
|
+
return void 0;
|
|
38694
|
+
}
|
|
38695
|
+
return async (input) => {
|
|
38696
|
+
const client2 = context.get("client");
|
|
38697
|
+
return client2.callAction({
|
|
38698
|
+
type: `${pluginAlias}#${actionName}`,
|
|
38699
|
+
input
|
|
38700
|
+
}).then((res) => res.output);
|
|
38701
|
+
};
|
|
38702
|
+
}
|
|
38703
|
+
}
|
|
38704
|
+
)
|
|
38705
|
+
};
|
|
38706
|
+
}
|
|
38707
|
+
});
|
|
38708
|
+
}
|
|
38709
|
+
});
|
|
38710
|
+
|
|
38674
38711
|
// src/runtime/handlers/index.ts
|
|
38675
38712
|
var init_handlers2 = __esm({
|
|
38676
38713
|
"src/runtime/handlers/index.ts"() {
|
|
@@ -38682,6 +38719,7 @@ var init_handlers2 = __esm({
|
|
|
38682
38719
|
init_workflow2();
|
|
38683
38720
|
init_event();
|
|
38684
38721
|
init_actions3();
|
|
38722
|
+
init_plugins();
|
|
38685
38723
|
}
|
|
38686
38724
|
});
|
|
38687
38725
|
|
|
@@ -39465,6 +39503,7 @@ var init_library = __esm({
|
|
|
39465
39503
|
init_types2();
|
|
39466
39504
|
init_errors();
|
|
39467
39505
|
init_actions();
|
|
39506
|
+
init_plugins();
|
|
39468
39507
|
init_state();
|
|
39469
39508
|
init_configuration();
|
|
39470
39509
|
init_define_config();
|
|
@@ -48927,6 +48966,13 @@ var init_table = __esm({
|
|
|
48927
48966
|
};
|
|
48928
48967
|
}
|
|
48929
48968
|
}
|
|
48969
|
+
const reservedColumns = ["id", "createdAt", "updatedAt"];
|
|
48970
|
+
const conflicting = Object.keys(this.columns).filter((col) => reservedColumns.includes(col));
|
|
48971
|
+
if (conflicting.length > 0) {
|
|
48972
|
+
throw new Errors.InvalidPrimitiveError(
|
|
48973
|
+
`Table '${props.name}' uses reserved column name(s): ${conflicting.join(", ")}. These columns are automatically managed by the system. Reserved names: ${reservedColumns.join(", ")}`
|
|
48974
|
+
);
|
|
48975
|
+
}
|
|
48930
48976
|
if (props.keyColumn) {
|
|
48931
48977
|
if (typeof props.keyColumn !== "string" || !(props.keyColumn in this.columns)) {
|
|
48932
48978
|
throw new Errors.InvalidPrimitiveError(
|