@getsupervisor/agents-studio-sdk 1.23.0 → 1.25.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.
- package/CHANGELOG.md +25 -0
- package/README.md +44 -0
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -46
- package/dist/index.d.ts +41 -46
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## v1.24.0
|
|
2
|
+
|
|
3
|
+
## [1.24.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.23.0...v1.24.0) (2025-11-05)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add optional avatarUrl and debounceDelayMs to agent schema ([b909f45](https://github.com/julio-supervisor/agents-studio-be/commit/b909f457ef82df455e77ae8ec772a4ff1de3b763))
|
|
8
|
+
*
|
|
9
|
+
## v1.23.0
|
|
10
|
+
|
|
11
|
+
## [1.23.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.22.2...v1.23.0) (2025-11-05)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* implement Agent Stages and Triggers API ([c0b997f](https://github.com/julio-supervisor/agents-studio-be/commit/c0b997fd233f8cb1fb4fc2f43b36344e46675191))
|
|
16
|
+
|
|
17
|
+
## v1.22.2
|
|
18
|
+
|
|
19
|
+
## [1.22.2](https://github.com/julio-supervisor/agents-studio-be/compare/v1.22.1...v1.22.2) (2025-11-03)
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* update API base URL to production endpoint across multiple files ([7491ce7](https://github.com/julio-supervisor/agents-studio-be/commit/7491ce700f348682d6559a5f3e9cf93f4aa9bc70))
|
|
24
|
+
|
|
25
|
+
|
|
1
26
|
## v1.22.1
|
|
2
27
|
|
|
3
28
|
## [1.22.1](https://github.com/julio-supervisor/agents-studio-be/compare/v1.22.0...v1.22.1) (2025-11-03)
|
package/README.md
CHANGED
|
@@ -164,6 +164,49 @@ const v2 = await client.agentVersions.clone(agent.agentId, active.id);
|
|
|
164
164
|
|
|
165
165
|
Estados soportados: `draft`, `active`, `archived`.
|
|
166
166
|
|
|
167
|
+
## Stages del blueprint
|
|
168
|
+
|
|
169
|
+
Modela el flujo conversacional de cada agente con los helpers `client.agents.stages(agentId)`.
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
const stages = client.agents.stages(agent.agentId);
|
|
173
|
+
|
|
174
|
+
// Paginar stages existentes
|
|
175
|
+
const page = await stages.list({ limit: 10, search: 'greeting' });
|
|
176
|
+
console.log(page.meta.total);
|
|
177
|
+
|
|
178
|
+
// Crear un stage
|
|
179
|
+
const created = await stages.create({
|
|
180
|
+
name: 'proposal',
|
|
181
|
+
title: 'Propuesta y cierre',
|
|
182
|
+
prompt: 'Explica la solución recomendada y ofrece una llamada con humano.',
|
|
183
|
+
order: 2,
|
|
184
|
+
metadata: { requiresSupervisor: false },
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// Actualizar y reordenar
|
|
188
|
+
await stages.update(created.id, {
|
|
189
|
+
prompt: 'Resume beneficios en < 3 bullets y ofrece agendar demo.',
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
await stages.reorder({
|
|
193
|
+
stageIds: [page.data[0].id, created.id],
|
|
194
|
+
startingStageName: 'greeting',
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// Triggers por stage
|
|
198
|
+
const triggers = stages.triggers(created.id);
|
|
199
|
+
await triggers.create({
|
|
200
|
+
condition: { type: 'intent', value: 'schedule_call' },
|
|
201
|
+
nextStageName: 'handoff',
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
const listing = await triggers.list();
|
|
205
|
+
console.log(listing.data[0].condition);
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Los métodos de triggers permiten `list`, `get`, `create`, `update` y `delete`. Recuerda habilitar los scopes `stages:*` y `stage-triggers:*` en la credencial utilizada.
|
|
209
|
+
|
|
167
210
|
## Horarios del agente (Agent Schedules)
|
|
168
211
|
|
|
169
212
|
Namespaces: `client.agentSchedule` y `client.agentScheduleExceptions`
|
|
@@ -427,6 +470,7 @@ Consulta el OpenAPI (`docs/api-spec/openapi.yaml`) para validar scopes adicional
|
|
|
427
470
|
- **Guías de uso para voice.calls**: las conexiones creadas con `client.tools.connect('voice.calls', ...)` ahora devuelven valores predeterminados en `descriptionUsage` y `usageExample` (ver `docs/mcp/tools_execution.md`).
|
|
428
471
|
- **Gestión de API Keys desde el SDK**: `client.apiKeys` expone helpers tipados para listar, crear y revocar credenciales con el mismo manejo de cabeceras, timeouts y reintentos del resto del cliente.
|
|
429
472
|
- **Scopes documentados**: tabla de scopes disponibles y recomendaciones para definir permisos mínimos por workspace.
|
|
473
|
+
- **Blueprint stages y triggers**: nuevos helpers `client.agents.stages(agentId)` y `stages.triggers(stageId)` para CRUD completo y reordenamiento del flujo conversacional.
|
|
430
474
|
- **Mejoras de gobernanza**: se incorporaron pautas de rotación, almacenamiento seguro y segmentación por entorno directamente en la guía del SDK.
|
|
431
475
|
- **Catálogos**: nuevo namespace `client.catalogs` con CRUD y paginación para `language`, `message_style`, `tone_style`, `tag` y `voice`.
|
|
432
476
|
- **Versiones de agente**: namespace `client.agentVersions` con operaciones para crear, clonar, publicar y gestionar instrucciones por versión.
|
package/dist/index.cjs
CHANGED
|
@@ -1531,7 +1531,7 @@ function ensureCatalogTypeFilter(filter, type) {
|
|
|
1531
1531
|
if (isQueryBuilderLike(filter)) {
|
|
1532
1532
|
return ensureTypeForBuilder(filter, requiredQuery, requiredExpression);
|
|
1533
1533
|
}
|
|
1534
|
-
if (
|
|
1534
|
+
if (isFilterRecord(filter)) {
|
|
1535
1535
|
return ensureTypeForObject(filter, type);
|
|
1536
1536
|
}
|
|
1537
1537
|
return filter;
|
|
@@ -1561,7 +1561,7 @@ function ensureTypeForObject(candidate, type) {
|
|
|
1561
1561
|
return candidate;
|
|
1562
1562
|
}
|
|
1563
1563
|
const typeConfig = candidate.type;
|
|
1564
|
-
const normalizedType =
|
|
1564
|
+
const normalizedType = isFilterOperators(typeConfig) ? { ...typeConfig, eq: type } : { eq: type };
|
|
1565
1565
|
return {
|
|
1566
1566
|
...candidate,
|
|
1567
1567
|
type: normalizedType
|
|
@@ -1572,10 +1572,11 @@ function hasTypeEquality(candidate, type) {
|
|
|
1572
1572
|
if (typeof typeConfig === "string") {
|
|
1573
1573
|
return typeConfig === type;
|
|
1574
1574
|
}
|
|
1575
|
-
if (!
|
|
1575
|
+
if (!isFilterOperators(typeConfig)) {
|
|
1576
1576
|
return false;
|
|
1577
1577
|
}
|
|
1578
|
-
|
|
1578
|
+
const equality = typeConfig.eq;
|
|
1579
|
+
return typeof equality === "string" ? equality === type : false;
|
|
1579
1580
|
}
|
|
1580
1581
|
function containsTypePredicate(expression, required) {
|
|
1581
1582
|
const normalizedExpression = expression.replace(/\s+/g, "").toLowerCase();
|
|
@@ -1592,6 +1593,12 @@ function isPlainObject2(value) {
|
|
|
1592
1593
|
const proto = Object.getPrototypeOf(value);
|
|
1593
1594
|
return proto === Object.prototype || proto === null;
|
|
1594
1595
|
}
|
|
1596
|
+
function isFilterRecord(value) {
|
|
1597
|
+
return isPlainObject2(value);
|
|
1598
|
+
}
|
|
1599
|
+
function isFilterOperators(value) {
|
|
1600
|
+
return isPlainObject2(value);
|
|
1601
|
+
}
|
|
1595
1602
|
|
|
1596
1603
|
// src/api/voices.ts
|
|
1597
1604
|
function mapCatalogResponseToVoiceList(response) {
|