@botpress/adk 1.13.13 → 1.13.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AA6BA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAA;CACpD;AAkBD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,UAAU,CAAQ;gBAEd,OAAO,EAAE,mBAAmB;YAK1B,kBAAkB;YAuBlB,sBAAsB;IAsB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YA+BjB,yBAAyB;YAkEzB,kBAAkB;YAKlB,oBAAoB;YAKpB,gBAAgB;YAKhB,kBAAkB;YAKlB,0BAA0B;YAK1B,kBAAkB;YAKlB,qBAAqB;YAKrB,yBAAyB;YAKzB,mBAAmB;YAMnB,8BAA8B;YAM9B,oBAAoB;YAyEpB,uBAAuB;YAkGvB,8BAA8B;YAiC9B,4BAA4B;YA2B5B,qBAAqB;YAwZrB,gBAAgB;YAoChB,mBAAmB;YAgBnB,gBAAgB;YAiChB,mBAAmB;YAyBnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IA6ZnC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAOzC;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8CpF"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AA6BA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAA;CACpD;AAkBD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,UAAU,CAAQ;gBAEd,OAAO,EAAE,mBAAmB;YAK1B,kBAAkB;YAuBlB,sBAAsB;IAsB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YA+BjB,yBAAyB;YAkEzB,kBAAkB;YAKlB,oBAAoB;YAKpB,gBAAgB;YAKhB,kBAAkB;YAKlB,0BAA0B;YAK1B,kBAAkB;YAKlB,qBAAqB;YAKrB,yBAAyB;YAKzB,mBAAmB;YAMnB,8BAA8B;YAM9B,oBAAoB;YAyEpB,uBAAuB;YAkGvB,8BAA8B;YAiC9B,4BAA4B;YA2B5B,qBAAqB;YAyZrB,gBAAgB;YAyChB,mBAAmB;YAgBnB,gBAAgB;YAiChB,mBAAmB;YAyBnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IA6ZnC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAOzC;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8CpF"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-types.d.ts","sourceRoot":"","sources":["../../src/generators/event-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAWhE,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgE7E"}
1
+ {"version":3,"file":"event-types.d.ts","sourceRoot":"","sources":["../../src/generators/event-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAWhE,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAiE7E"}
package/dist/index.js CHANGED
@@ -666,7 +666,7 @@ var PRETTIER_CONFIG, formatCode = async (code, filepath) => {
666
666
  `));
667
667
  return code;
668
668
  }
669
- }, ADK_VERSION = "1.13.13", relative2 = (from, to) => {
669
+ }, ADK_VERSION = "1.13.15", relative2 = (from, to) => {
670
670
  const fromDir = path10.dirname(from);
671
671
  const relative3 = path10.relative(fromDir, to);
672
672
  return relative3.startsWith(".") ? relative3 : `./${relative3}`;
@@ -809,7 +809,7 @@ var init_integration_action_types = __esm(() => {
809
809
  var require_package = __commonJS((exports, module) => {
810
810
  module.exports = {
811
811
  name: "@botpress/adk",
812
- version: "1.13.13",
812
+ version: "1.13.15",
813
813
  description: "Core ADK library for building AI agents on Botpress",
814
814
  type: "module",
815
815
  main: "dist/index.js",
@@ -853,11 +853,11 @@ var require_package = __commonJS((exports, module) => {
853
853
  url: "https://github.com/botpress/adk"
854
854
  },
855
855
  dependencies: {
856
- "@botpress/cli": "^5.1.1",
856
+ "@botpress/cli": "^5.2.0",
857
857
  "@botpress/client": "^1.28.0",
858
858
  "@botpress/cognitive": "^0.3.3",
859
- "@botpress/runtime": "^1.13.13",
860
- "@botpress/sdk": "^5.0.2",
859
+ "@botpress/runtime": "^1.13.15",
860
+ "@botpress/sdk": "^5.1.0",
861
861
  "@bpinternal/jex": "^1.2.4",
862
862
  "@bpinternal/yargs-extra": "^0.0.21",
863
863
  "@parcel/watcher": "^2.5.1",
@@ -1097,7 +1097,7 @@ import os3 from "os";
1097
1097
  import path4 from "path";
1098
1098
  import createDebug from "debug";
1099
1099
  var debug = createDebug("adk:bp-cli");
1100
- var BP_CLI_VERSION = "5.1.1";
1100
+ var BP_CLI_VERSION = "5.2.0";
1101
1101
  var BP_CLI_INSTALL_ALL = path4.join(os3.homedir(), ".adk", `bp-cli`);
1102
1102
  var BP_CLI_INSTALL_DIR = path4.join(BP_CLI_INSTALL_ALL, BP_CLI_VERSION);
1103
1103
  var BP_CLI_BIN_PATH = path4.join(BP_CLI_INSTALL_DIR, "node_modules", "@botpress", "cli", "bin.js");
@@ -6347,7 +6347,7 @@ class AgentProjectGenerator {
6347
6347
  deploy: "adk deploy"
6348
6348
  },
6349
6349
  dependencies: {
6350
- "@botpress/runtime": `^${"1.13.13"}`
6350
+ "@botpress/runtime": `^${"1.13.15"}`
6351
6351
  },
6352
6352
  devDependencies: {
6353
6353
  typescript: "^5.9.3"
@@ -6793,7 +6793,7 @@ Description: ${action.description || "No description"}`)}
6793
6793
  const comment = toMultilineComment(`Title: ${tag?.title}
6794
6794
  Description: ${tag.description}`);
6795
6795
  acc += `${comment}
6796
- ["${integration.ref.fullName}:${t}"]?: string,
6796
+ ["${integration.alias}:${t}"]?: string,
6797
6797
  `;
6798
6798
  return acc;
6799
6799
  }, "") + "}";
@@ -6802,7 +6802,7 @@ Description: ${tag.description}`);
6802
6802
  const comment = toMultilineComment(`Title: ${tag?.title}
6803
6803
  Description: ${tag.description}`);
6804
6804
  acc += `${comment}
6805
- ["${integration.ref.fullName}:${t}"]?: string,
6805
+ ["${integration.alias}:${t}"]?: string,
6806
6806
  `;
6807
6807
  return acc;
6808
6808
  }, "") + "}";
@@ -6877,7 +6877,7 @@ Description: ${event.description || "No description"}${attributesComment}`)}
6877
6877
  const comment = toMultilineComment(`Title: ${tag?.title}
6878
6878
  Description: ${tag?.description}`);
6879
6879
  return `${comment}
6880
- "${integration.ref.fullName}:${t}"
6880
+ "${integration.alias}:${t}"
6881
6881
  `;
6882
6882
  }).join(" | ") : "never";
6883
6883
  tUsers += `
@@ -7656,10 +7656,11 @@ init_utils();
7656
7656
  init_fs();
7657
7657
  import path26 from "path";
7658
7658
  async function generateEventTypes(project) {
7659
+ const defaultEvents = ["register: {}"];
7659
7660
  const integrationEvents = [];
7660
7661
  for (const int of project.integrations) {
7661
7662
  for (const event in int.definition?.events || []) {
7662
- integrationEvents.push(` "${int.alias}:${event}": Integrations["${int.alias}"]["events"]["${event}"];`);
7663
+ integrationEvents.push(`"${int.alias}:${event}": Integrations["${int.alias}"]["events"]["${event}"];`);
7663
7664
  }
7664
7665
  }
7665
7666
  const customEvents = [];
@@ -7671,9 +7672,9 @@ async function generateEventTypes(project) {
7671
7672
  if (schema && typeof schema.toTypescriptType === "function") {
7672
7673
  payloadType = schema.toTypescriptType();
7673
7674
  }
7674
- customEvents.push(` "${eventName}": ${payloadType};`);
7675
+ customEvents.push(`"${eventName}": ${payloadType};`);
7675
7676
  }
7676
- const allEvents = [...integrationEvents, ...customEvents];
7677
+ const allEvents = [...integrationEvents, ...customEvents, ...defaultEvents];
7677
7678
  const content = `
7678
7679
  ////////////////////////////////////////////////////////
7679
7680
  // DO NOT EDIT THIS FILE DIRECTLY
@@ -7694,7 +7695,7 @@ declare module "@botpress/runtime/_types/events" {
7694
7695
  * - Custom events: "<eventName>" (e.g., "orderPlaced", "userRegistered")
7695
7696
  */
7696
7697
  export type Events = {
7697
- ${allEvents.join(`
7698
+ ${allEvents.map((e) => ` ${e}`).join(`
7698
7699
  `)}
7699
7700
  };
7700
7701
 
@@ -8776,11 +8777,16 @@ export default bot;`;
8776
8777
  import { setupAdkRuntime } from './adk-runtime'
8777
8778
  import { Actions } from './actions'
8778
8779
  import {isMainThread, isWorkerMode, initializeParentWorker, runWorker, BuiltInActions} from '@botpress/runtime/internal'
8780
+ import { handlers } from "@botpress/runtime/runtime";
8779
8781
 
8780
8782
  const bot = new bp.Bot({
8781
- actions: {}
8783
+ actions: {},
8784
+ register: async (props) => {
8785
+ handlers.trigger.triggerRegisterEvent(props)
8786
+ }
8782
8787
  })
8783
8788
 
8789
+
8784
8790
  // ============================================================================
8785
8791
  // WORKER INITIALIZATION
8786
8792
  // ============================================================================
@@ -11428,4 +11434,4 @@ export {
11428
11434
  AgentProject
11429
11435
  };
11430
11436
 
11431
- //# debugId=FB33DBF95935637B64756E2164756E21
11437
+ //# debugId=F6AAC2FD77CADC0664756E2164756E21