@getsupervisor/agents-studio-sdk 1.24.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 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.d.cts CHANGED
@@ -882,10 +882,25 @@ type UpdateAgentBlueprintRequest = {
882
882
  topicsAllowed?: string[];
883
883
  topicsForbidden?: string[];
884
884
  };
885
- type BlueprintStage = components['schemas']['BlueprintStage'];
886
- type BlueprintStageListResponse = components['schemas']['BlueprintStageListResponse'];
887
- type CreateBlueprintStageRequest = components['schemas']['CreateBlueprintStageRequest'];
888
- type UpdateBlueprintStageRequest = components['schemas']['UpdateBlueprintStageRequest'];
885
+ type BlueprintStageSchema = components['schemas']['BlueprintStage'];
886
+ type BlueprintStage = Omit<BlueprintStageSchema, 'prompt' | 'promptInstructions'> & {
887
+ goalPrompt: string;
888
+ promptInstructions: string[];
889
+ };
890
+ type BlueprintStageListResponseSchema = components['schemas']['BlueprintStageListResponse'];
891
+ type BlueprintStageListResponse = Omit<BlueprintStageListResponseSchema, 'data'> & {
892
+ data: BlueprintStage[];
893
+ };
894
+ type CreateBlueprintStageRequestSchema = components['schemas']['CreateBlueprintStageRequest'];
895
+ type CreateBlueprintStageRequest = Omit<CreateBlueprintStageRequestSchema, 'prompt'> & {
896
+ goalPrompt: string;
897
+ promptInstructions?: string[];
898
+ };
899
+ type UpdateBlueprintStageRequestSchema = components['schemas']['UpdateBlueprintStageRequest'];
900
+ type UpdateBlueprintStageRequest = Omit<UpdateBlueprintStageRequestSchema, 'prompt'> & {
901
+ goalPrompt?: string;
902
+ promptInstructions?: string[];
903
+ };
889
904
  type BlueprintStageReorderRequest = components['schemas']['BlueprintStageReorderRequest'];
890
905
  type BlueprintStageTrigger = components['schemas']['BlueprintStageTrigger'];
891
906
  type BlueprintStageTriggerListResponse = components['schemas']['BlueprintStageTriggerListResponse'];
@@ -1139,10 +1154,7 @@ declare const bindAgentStageTriggers: (api: AgentStageTriggersApi, agentId: stri
1139
1154
  delete(triggerId: string): Promise<void>;
1140
1155
  };
1141
1156
  declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentStageTriggersApi, agentId: string) => {
1142
- list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<{
1143
- data: components["schemas"]["BlueprintStage"][];
1144
- meta: components["schemas"]["PaginationMeta"];
1145
- }, Partial<{
1157
+ list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<BlueprintStageListResponse, Partial<{
1146
1158
  page: number;
1147
1159
  limit: number;
1148
1160
  sort: string | string[];
@@ -1153,41 +1165,10 @@ declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentSta
1153
1165
  or: QueryOrGroups | QueryBuilderInput;
1154
1166
  }>>>;
1155
1167
  get(stageId: string): Promise<BlueprintStage>;
1156
- create(payload: CreateBlueprintStageRequest): Promise<{
1157
- id: string;
1158
- agentId: string;
1159
- blueprintId: string;
1160
- name: string;
1161
- title?: string | null;
1162
- prompt: string;
1163
- order: number;
1164
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1165
- metadata?: {
1166
- [key: string]: unknown;
1167
- } | null;
1168
- createdAt: string;
1169
- updatedAt: string;
1170
- }>;
1171
- update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<{
1172
- id: string;
1173
- agentId: string;
1174
- blueprintId: string;
1175
- name: string;
1176
- title?: string | null;
1177
- prompt: string;
1178
- order: number;
1179
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1180
- metadata?: {
1181
- [key: string]: unknown;
1182
- } | null;
1183
- createdAt: string;
1184
- updatedAt: string;
1185
- }>;
1168
+ create(payload: CreateBlueprintStageRequest): Promise<BlueprintStage>;
1169
+ update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<BlueprintStage>;
1186
1170
  delete(stageId: string): Promise<void>;
1187
- reorder(payload: BlueprintStageReorderRequest): Promise<{
1188
- data: components["schemas"]["BlueprintStage"][];
1189
- meta: components["schemas"]["PaginationMeta"];
1190
- }>;
1171
+ reorder(payload: BlueprintStageReorderRequest): Promise<BlueprintStageListResponse>;
1191
1172
  triggers(stageId: string): AgentStageTriggersHelper;
1192
1173
  };
1193
1174
  declare const bindAgentTags: (api: AgentTagsApi, agentId: string) => {
package/dist/index.d.ts CHANGED
@@ -882,10 +882,25 @@ type UpdateAgentBlueprintRequest = {
882
882
  topicsAllowed?: string[];
883
883
  topicsForbidden?: string[];
884
884
  };
885
- type BlueprintStage = components['schemas']['BlueprintStage'];
886
- type BlueprintStageListResponse = components['schemas']['BlueprintStageListResponse'];
887
- type CreateBlueprintStageRequest = components['schemas']['CreateBlueprintStageRequest'];
888
- type UpdateBlueprintStageRequest = components['schemas']['UpdateBlueprintStageRequest'];
885
+ type BlueprintStageSchema = components['schemas']['BlueprintStage'];
886
+ type BlueprintStage = Omit<BlueprintStageSchema, 'prompt' | 'promptInstructions'> & {
887
+ goalPrompt: string;
888
+ promptInstructions: string[];
889
+ };
890
+ type BlueprintStageListResponseSchema = components['schemas']['BlueprintStageListResponse'];
891
+ type BlueprintStageListResponse = Omit<BlueprintStageListResponseSchema, 'data'> & {
892
+ data: BlueprintStage[];
893
+ };
894
+ type CreateBlueprintStageRequestSchema = components['schemas']['CreateBlueprintStageRequest'];
895
+ type CreateBlueprintStageRequest = Omit<CreateBlueprintStageRequestSchema, 'prompt'> & {
896
+ goalPrompt: string;
897
+ promptInstructions?: string[];
898
+ };
899
+ type UpdateBlueprintStageRequestSchema = components['schemas']['UpdateBlueprintStageRequest'];
900
+ type UpdateBlueprintStageRequest = Omit<UpdateBlueprintStageRequestSchema, 'prompt'> & {
901
+ goalPrompt?: string;
902
+ promptInstructions?: string[];
903
+ };
889
904
  type BlueprintStageReorderRequest = components['schemas']['BlueprintStageReorderRequest'];
890
905
  type BlueprintStageTrigger = components['schemas']['BlueprintStageTrigger'];
891
906
  type BlueprintStageTriggerListResponse = components['schemas']['BlueprintStageTriggerListResponse'];
@@ -1139,10 +1154,7 @@ declare const bindAgentStageTriggers: (api: AgentStageTriggersApi, agentId: stri
1139
1154
  delete(triggerId: string): Promise<void>;
1140
1155
  };
1141
1156
  declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentStageTriggersApi, agentId: string) => {
1142
- list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<{
1143
- data: components["schemas"]["BlueprintStage"][];
1144
- meta: components["schemas"]["PaginationMeta"];
1145
- }, Partial<{
1157
+ list(opts?: ListAgentStagesOptions): Promise<PaginatedResult<BlueprintStageListResponse, Partial<{
1146
1158
  page: number;
1147
1159
  limit: number;
1148
1160
  sort: string | string[];
@@ -1153,41 +1165,10 @@ declare const bindAgentStages: (stagesApi: AgentStagesApi, triggersApi: AgentSta
1153
1165
  or: QueryOrGroups | QueryBuilderInput;
1154
1166
  }>>>;
1155
1167
  get(stageId: string): Promise<BlueprintStage>;
1156
- create(payload: CreateBlueprintStageRequest): Promise<{
1157
- id: string;
1158
- agentId: string;
1159
- blueprintId: string;
1160
- name: string;
1161
- title?: string | null;
1162
- prompt: string;
1163
- order: number;
1164
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1165
- metadata?: {
1166
- [key: string]: unknown;
1167
- } | null;
1168
- createdAt: string;
1169
- updatedAt: string;
1170
- }>;
1171
- update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<{
1172
- id: string;
1173
- agentId: string;
1174
- blueprintId: string;
1175
- name: string;
1176
- title?: string | null;
1177
- prompt: string;
1178
- order: number;
1179
- triggers: components["schemas"]["BlueprintStageTrigger"][];
1180
- metadata?: {
1181
- [key: string]: unknown;
1182
- } | null;
1183
- createdAt: string;
1184
- updatedAt: string;
1185
- }>;
1168
+ create(payload: CreateBlueprintStageRequest): Promise<BlueprintStage>;
1169
+ update(stageId: string, payload: UpdateBlueprintStageRequest): Promise<BlueprintStage>;
1186
1170
  delete(stageId: string): Promise<void>;
1187
- reorder(payload: BlueprintStageReorderRequest): Promise<{
1188
- data: components["schemas"]["BlueprintStage"][];
1189
- meta: components["schemas"]["PaginationMeta"];
1190
- }>;
1171
+ reorder(payload: BlueprintStageReorderRequest): Promise<BlueprintStageListResponse>;
1191
1172
  triggers(stageId: string): AgentStageTriggersHelper;
1192
1173
  };
1193
1174
  declare const bindAgentTags: (api: AgentTagsApi, agentId: string) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getsupervisor/agents-studio-sdk",
3
- "version": "1.24.0",
3
+ "version": "1.25.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",