@cadraos/sdk 0.1.4 → 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/chat/index.cjs +23 -0
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.d.cts +60 -6
- package/dist/chat/index.d.ts +60 -6
- package/dist/chat/index.js +23 -0
- package/dist/chat/index.js.map +1 -1
- package/dist/index.cjs +23 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/chat/index.cjs
CHANGED
|
@@ -1530,6 +1530,29 @@ var ToolsAPI = class extends BaseResourceAPI {
|
|
|
1530
1530
|
const idempotencyKey = generateIdempotencyKey();
|
|
1531
1531
|
return this.httpPost(`/${uuid}/execute`, { input }, { idempotencyKey });
|
|
1532
1532
|
}
|
|
1533
|
+
/**
|
|
1534
|
+
* Execute a tool directly, bypassing the agent runtime.
|
|
1535
|
+
*
|
|
1536
|
+
* Enqueues the tool for async processing via BullMQ (no LLM, no ReAct loop).
|
|
1537
|
+
* Use SSE or polling with the returned executionId to get the result.
|
|
1538
|
+
*
|
|
1539
|
+
* @param request - Direct execution request
|
|
1540
|
+
* @returns Queued execution response with executionId for tracking
|
|
1541
|
+
*
|
|
1542
|
+
* @example
|
|
1543
|
+
* ```typescript
|
|
1544
|
+
* const result = await client.tools.executeDirect({
|
|
1545
|
+
* toolUuid: 'tool-uuid',
|
|
1546
|
+
* parameters: { prompt: 'Generate an image of a sunset' },
|
|
1547
|
+
* });
|
|
1548
|
+
* console.log(result.executionId); // Use for polling/SSE
|
|
1549
|
+
* console.log(result.status); // 'queued'
|
|
1550
|
+
* ```
|
|
1551
|
+
*/
|
|
1552
|
+
async executeDirect(request) {
|
|
1553
|
+
const idempotencyKey = generateIdempotencyKey();
|
|
1554
|
+
return this.httpPost("/execute-direct", request, { idempotencyKey });
|
|
1555
|
+
}
|
|
1533
1556
|
/**
|
|
1534
1557
|
* Validate input against tool schema
|
|
1535
1558
|
*
|