@botpress/adk-cli 1.5.15 → 1.5.16

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.
Files changed (2) hide show
  1. package/dist/cli.js +27 -10
  2. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -311829,6 +311829,9 @@ async function _step(name2, run, { maxAttempts = DEFAULT_MAX_ATTEMPTS } = {}, {
311829
311829
  startedAt: (/* @__PURE__ */ new Date()).toISOString()
311830
311830
  };
311831
311831
  if (steps[name2].finishedAt) {
311832
+ if (steps[name2].error) {
311833
+ throw new Error(steps[name2].error.message);
311834
+ }
311832
311835
  return steps[name2].output;
311833
311836
  }
311834
311837
  while (true) {
@@ -311854,15 +311857,24 @@ async function _step(name2, run, { maxAttempts = DEFAULT_MAX_ATTEMPTS } = {}, {
311854
311857
  return;
311855
311858
  }
311856
311859
  if (steps[name2].attempts >= maxAttempts - 1) {
311860
+ const errorMessage = e6 instanceof Error ? e6.message : String(e6);
311861
+ steps[name2].error = {
311862
+ message: errorMessage,
311863
+ failedAt: (/* @__PURE__ */ new Date()).toISOString(),
311864
+ maxAttemptsReached: true
311865
+ };
311866
+ steps[name2].finishedAt = (/* @__PURE__ */ new Date()).toISOString();
311857
311867
  stepSpan.setAttributes({
311858
- "workflow.step.error": e6 instanceof Error ? e6.message : String(e6)
311868
+ "workflow.step.error": errorMessage,
311869
+ "workflow.step.max_attempts": maxAttempts
311859
311870
  });
311860
311871
  stepSpan.setStatus({
311861
311872
  code: 2,
311862
311873
  message: `Step "${name2}" failed after max attempts (${maxAttempts})`
311863
311874
  });
311864
- workflowControlContext.fail(`Step "${name2}" failed after max attempts (${maxAttempts})`);
311865
- return;
311875
+ state.value.revision++;
311876
+ await workflowControlContext.ack();
311877
+ throw e6;
311866
311878
  } else {
311867
311879
  steps[name2].attempts++;
311868
311880
  stepSpan.setAttributes({
@@ -316017,7 +316029,7 @@ var init_internal = __esm(() => {
316017
316029
  });
316018
316030
  init_define_PACKAGE_VERSIONS = __esm2({
316019
316031
  "<define:__PACKAGE_VERSIONS__>"() {
316020
- define_PACKAGE_VERSIONS_default = { runtime: "1.3.15", adk: "not-installed", sdk: "4.17.3", llmz: "0.0.27", zai: "2.1.20", cognitive: "0.1.50" };
316032
+ define_PACKAGE_VERSIONS_default = { runtime: "1.3.16", adk: "not-installed", sdk: "4.17.3", llmz: "0.0.27", zai: "2.1.20", cognitive: "0.1.50" };
316021
316033
  }
316022
316034
  });
316023
316035
  init_globalThis = __esm2({
@@ -351674,7 +351686,12 @@ ${iteration.status.execution_error.stack}`;
351674
351686
  i: X.number().optional(),
351675
351687
  startedAt: X.string(),
351676
351688
  finishedAt: X.string().optional(),
351677
- steps: X.record(X.string(), workflowStepContextSchema).optional()
351689
+ steps: X.record(X.string(), workflowStepContextSchema).optional(),
351690
+ error: X.object({
351691
+ message: X.string(),
351692
+ failedAt: X.string(),
351693
+ maxAttemptsReached: X.boolean()
351694
+ }).optional()
351678
351695
  }));
351679
351696
  workflowExecutionContextSchema = X.object({
351680
351697
  executionCount: X.number().default(0),
@@ -368169,7 +368186,7 @@ class AgentProjectGenerator {
368169
368186
  deploy: "adk deploy"
368170
368187
  },
368171
368188
  dependencies: {
368172
- "@botpress/runtime": "^1.3.15"
368189
+ "@botpress/runtime": "^1.3.16"
368173
368190
  },
368174
368191
  devDependencies: {
368175
368192
  typescript: "^5.0.0"
@@ -377431,7 +377448,7 @@ var init_Separator = __esm(async () => {
377431
377448
  var require_package3 = __commonJS((exports, module) => {
377432
377449
  module.exports = {
377433
377450
  name: "@botpress/adk",
377434
- version: "1.3.15",
377451
+ version: "1.3.16",
377435
377452
  description: "Core ADK library for building AI agents on Botpress",
377436
377453
  type: "module",
377437
377454
  main: "dist/index.js",
@@ -377478,7 +377495,7 @@ var require_package3 = __commonJS((exports, module) => {
377478
377495
  "@botpress/cli": "^4.20",
377479
377496
  "@botpress/client": "^1.27.0",
377480
377497
  "@botpress/cognitive": "^0.1.50",
377481
- "@botpress/runtime": "^1.3.15",
377498
+ "@botpress/runtime": "^1.3.16",
377482
377499
  "@botpress/sdk": "^4.17.3",
377483
377500
  "@bpinternal/yargs-extra": "^0.0.21",
377484
377501
  "@parcel/watcher": "^2.5.1",
@@ -380656,7 +380673,7 @@ function checkRuntimeVersion(agentRoot) {
380656
380673
  `));
380657
380674
  }
380658
380675
  }
380659
- var semver, EXPECTED_RUNTIME_VERSION = "1.3.15";
380676
+ var semver, EXPECTED_RUNTIME_VERSION = "1.3.16";
380660
380677
  var init_runtime_version_check = __esm(() => {
380661
380678
  init_source();
380662
380679
  semver = __toESM(require_semver3(), 1);
@@ -396197,7 +396214,7 @@ function formatHelp(cmd, version) {
396197
396214
  // src/cli.ts
396198
396215
  var __filename2 = fileURLToPath9(import.meta.url);
396199
396216
  var __dirname5 = dirname3(__filename2);
396200
- var CLI_VERSION = "1.5.15";
396217
+ var CLI_VERSION = "1.5.16";
396201
396218
  program.name("adk").description("Botpress Agent Development Kit (ADK) - CLI for building AI agents").version(CLI_VERSION).option("--no-cache", "Disable caching for integration lookups").configureHelp({
396202
396219
  formatHelp: () => formatHelp(program, CLI_VERSION)
396203
396220
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/adk-cli",
3
- "version": "1.5.15",
3
+ "version": "1.5.16",
4
4
  "description": "Command-line interface for the Botpress Agent Development Kit (ADK)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,9 +40,9 @@
40
40
  "url": "https://github.com/botpress/adk"
41
41
  },
42
42
  "dependencies": {
43
- "@botpress/adk": "^1.3.15",
43
+ "@botpress/adk": "^1.3.16",
44
44
  "@botpress/cli": "^4.20",
45
- "@botpress/runtime": "^1.3.15",
45
+ "@botpress/runtime": "^1.3.16",
46
46
  "adm-zip": "^0.5.16",
47
47
  "chalk": "^5.4.1",
48
48
  "clipboardy": "^4.0.0",