@cadraos/sdk 0.1.5 → 0.1.6

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/index.cjs CHANGED
@@ -1520,6 +1520,29 @@ var ToolsAPI = class extends BaseResourceAPI {
1520
1520
  const idempotencyKey = generateIdempotencyKey();
1521
1521
  return this.httpPost(`/${uuid}/execute`, { input }, { idempotencyKey });
1522
1522
  }
1523
+ /**
1524
+ * Execute a tool directly, bypassing the agent runtime.
1525
+ *
1526
+ * Enqueues the tool for async processing via BullMQ (no LLM, no ReAct loop).
1527
+ * Use SSE or polling with the returned executionId to get the result.
1528
+ *
1529
+ * @param request - Direct execution request
1530
+ * @returns Queued execution response with executionId for tracking
1531
+ *
1532
+ * @example
1533
+ * ```typescript
1534
+ * const result = await client.tools.executeDirect({
1535
+ * toolUuid: 'tool-uuid',
1536
+ * parameters: { prompt: 'Generate an image of a sunset' },
1537
+ * });
1538
+ * console.log(result.executionId); // Use for polling/SSE
1539
+ * console.log(result.status); // 'queued'
1540
+ * ```
1541
+ */
1542
+ async executeDirect(request) {
1543
+ const idempotencyKey = generateIdempotencyKey();
1544
+ return this.httpPost("/execute-direct", request, { idempotencyKey });
1545
+ }
1523
1546
  /**
1524
1547
  * Validate input against tool schema
1525
1548
  *