@getsupervisor/agents-studio-sdk 1.35.0 → 1.36.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.
Files changed (2) hide show
  1. package/README.md +20 -0
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -337,6 +337,26 @@ Cuando la tool es `voice.calls`, el servicio de backend rellena `descriptionUsag
337
337
  Consulta `docs/mcp/tools_execution.md#9-guías-de-uso-estándar` si necesitas replicar esta guía en otros canales (por ejemplo, recursos MCP).
338
338
  Puedes usar estos campos para mostrar recomendaciones al usuario final o complementar el prompt del agente.
339
339
 
340
+ ### Ejemplo: conectar un webhook HTTP personalizado
341
+
342
+ El script `examples/custom-tool-connection.ts` muestra cómo registrar una tool que invoca un webhook externo mediante API Key. Define las variables necesarias y ejecuta el ejemplo:
343
+
344
+ ```bash
345
+ export API_BASE_URL="https://sandbox.agents.studio.getsupervisor.ai"
346
+ export WORKSPACE_ID="ws-123"
347
+ export API_TOKEN="eyJ..."
348
+ export AGENT_ID="0d55f1bc-2b38-4c20-98b2-2b0f12345678"
349
+ # Opcionales (ya incluyen valores por defecto):
350
+ export CUSTOM_TOOL_IDENTIFIER="custom.http.workflow"
351
+ export CUSTOM_TOOL_URL="https://api.workflows.getsupervisor.ai/webhook/8820eb01-c309-46db-8f8c-ffb1c3ad659d"
352
+ export CUSTOM_TOOL_API_KEY="127362"
353
+ export CUSTOMER_NAME="Ada Lovelace"
354
+
355
+ npx tsx examples/custom-tool-connection.ts
356
+ ```
357
+
358
+ El script envía la metadata de conexión (URL, método, headers) y, sobre todo, almacena un `configSchema` específico del workspace dentro de `tool_agent_connections.metadata`. Ese esquema describe los campos que el agente debe solicitar (en el ejemplo `agentId` y `customerName`) y coincide con la acción `triggerWorkflow` que expone el seed `custom.http.workflow`. Después de conectar la tool ejecuta `client.tools.execute('custom.http.workflow', { action: 'triggerWorkflow', args: { ... } })` respetando el schema definido en tu metadata.
359
+
340
360
  ## Configuración
341
361
 
342
362
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getsupervisor/agents-studio-sdk",
3
- "version": "1.35.0",
3
+ "version": "1.36.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -42,6 +42,8 @@
42
42
  "semantic-release": "^24.2.9",
43
43
  "tsup": "^8.0.1",
44
44
  "tsx": "^4.7.0",
45
+ "typedoc": "^0.28.14",
46
+ "typedoc-plugin-markdown": "^4.9.0",
45
47
  "typescript": "^5.6.3",
46
48
  "vitest": "^2.1.1"
47
49
  },