@cadraos/sdk 0.3.14-p102.2 → 0.3.14-p139.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.
@@ -2078,6 +2078,8 @@ var AgentsAPI = class extends BaseResourceAPI {
2078
2078
  * Cancel a running execution
2079
2079
  *
2080
2080
  * @param executionId - Execution UUID
2081
+ * @param options - Optional. `scope: 'run_and_work'` stops the run AND the
2082
+ * background work it started in this conversation (p139); omitted = the run only.
2081
2083
  * @returns Updated execution with cancelled status
2082
2084
  *
2083
2085
  * @example
@@ -2086,10 +2088,10 @@ var AgentsAPI = class extends BaseResourceAPI {
2086
2088
  * console.log(execution.status); // 'cancelled'
2087
2089
  * ```
2088
2090
  */
2089
- async cancelExecution(executionId) {
2091
+ async cancelExecution(executionId, options) {
2090
2092
  return this.http.post(
2091
2093
  executionCancelPath(executionId),
2092
- void 0,
2094
+ options && Object.keys(options).length > 0 ? options : void 0,
2093
2095
  { skipRetry: true }
2094
2096
  );
2095
2097
  }
@@ -3634,7 +3636,7 @@ function createDefaultAdapter(config) {
3634
3636
  };
3635
3637
  },
3636
3638
  async cancelExecution(uuid) {
3637
- await client.agents.cancelExecution(uuid);
3639
+ await client.agents.cancelExecution(uuid, { scope: "run_and_work" });
3638
3640
  },
3639
3641
  async getExecution(uuid) {
3640
3642
  const exec = await client.agents.getExecution(uuid);