@getsupervisor/agents-studio-sdk 1.3.0 → 1.5.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,54 @@
1
+ ## v1.4.0
2
+
3
+ ## [1.4.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.3.0...v1.4.0) (2025-10-12)
4
+
5
+ ### Features
6
+
7
+ * Add new SVG icons, images, and documentation updates for Agents Studio API ([3687495](https://github.com/julio-supervisor/agents-studio-be/commit/3687495640477794754b731e912d3f15b9e6db4e))
8
+ * enhance API documentation for agent management and workspace onboarding processes ([819c26c](https://github.com/julio-supervisor/agents-studio-be/commit/819c26cb662401b60004828ac7364aebd7eca039))
9
+
10
+ ## v1.3.0
11
+
12
+ ## [1.3.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.2.0...v1.3.0) (2025-10-11)
13
+
14
+ ### Features
15
+
16
+ * actualizar la configuración de autenticación de npm para usar NODE_AUTH_TOKEN en los flujos de trabajo de despliegue y pruebas ([1817bde](https://github.com/julio-supervisor/agents-studio-be/commit/1817bdef6894d52d8be9b6c9649894446ae8dbf4))
17
+ * actualizar la versión de @getsupervisor/api-query-builder a 1.3.0 y agregar script de ejemplos ([dfc83c5](https://github.com/julio-supervisor/agents-studio-be/commit/dfc83c5c7ffccac704a4212c20f054b37bf4c620))
18
+ * **agents:** mejorar la API de agentes para incluir entidades y respuestas con datos adicionales ([7f0103a](https://github.com/julio-supervisor/agents-studio-be/commit/7f0103a4fd881f74cacaa7057562998ad6cd12a5))
19
+ * agregar autenticación npm en flujos de trabajo y mejorar ejemplos de agente ([7ef9dd5](https://github.com/julio-supervisor/agents-studio-be/commit/7ef9dd54f548d017609e143f1a06200b8e7da121))
20
+ * agregar configuración de autenticación npm para el alcance [@getsupervisor](https://github.com/getsupervisor) en flujos de trabajo ([7cd5890](https://github.com/julio-supervisor/agents-studio-be/commit/7cd5890936e96318f52852898a9d740b87b1eb2f))
21
+ * agregar exclusión de ejemplos de SDK en tsconfig.build.json ([5fe700c](https://github.com/julio-supervisor/agents-studio-be/commit/5fe700c48a04f0419729bdb854f18ad7580d5850))
22
+ * ajustar el directorio de trabajo y mejorar la depuración de autenticación npm en el flujo de trabajo de lanzamiento ([acef050](https://github.com/julio-supervisor/agents-studio-be/commit/acef0502b58d9edd15abf1d252c4c33052536661))
23
+ * ajustar el directorio de trabajo y simplificar la instalación de dependencias en el flujo de trabajo de lanzamiento ([dd2b009](https://github.com/julio-supervisor/agents-studio-be/commit/dd2b0090f3e781472fb1401290ba7e971c4c7b17))
24
+ * **api:** add query builder utilities and enhance OpenAPI spec ([1a6744a](https://github.com/julio-supervisor/agents-studio-be/commit/1a6744ac73c0eb4b5e35a7aadfb8093012c18b29))
25
+ * especificar la ruta del Dockerfile en el proceso de construcción de la imagen ([1a7ac54](https://github.com/julio-supervisor/agents-studio-be/commit/1a7ac5406072a81b316e41014ad9bf482b9733fb))
26
+ * habilitar la ejecución manual del flujo de trabajo de lanzamiento del SDK ([25c3654](https://github.com/julio-supervisor/agents-studio-be/commit/25c365481c81a9d7408e8846aee77af193c271e6))
27
+ * reemplazar npm por yarn para la instalación de dependencias y construcción del paquete ([7f09844](https://github.com/julio-supervisor/agents-studio-be/commit/7f09844a26c311e6762570338063ff1a37002ee7))
28
+ * simplificar la configuración de autenticación npm en el flujo de trabajo de lanzamiento ([94fce18](https://github.com/julio-supervisor/agents-studio-be/commit/94fce181286649a276e5556eb256ac6b62ac178e))
29
+
30
+ ## v1.2.0
31
+
32
+ ## [1.2.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.1.0...v1.2.0) (2025-10-10)
33
+
34
+ ### Features
35
+
36
+ * **authorization:** mejorar la configuración y pruebas del sistema de autorización ([d963e9d](https://github.com/julio-supervisor/agents-studio-be/commit/d963e9da8d0f97547c7fb93b9b2fb5689e164cbb))
37
+ * **authz:** add casbin authorization module and tests ([2340f5f](https://github.com/julio-supervisor/agents-studio-be/commit/2340f5f0dc6e3a439b78e8147053c30762cd9dad))
38
+ * **authz:** ajustar rutas de mapeo y mejorar pruebas de autorización ([d8e10ef](https://github.com/julio-supervisor/agents-studio-be/commit/d8e10efcbcf41e07b929fa9578ec65d947d83c66))
39
+ * **authz:** implementar configuración de características de la aplicación y adaptador Casbin sin operaciones ([74599a7](https://github.com/julio-supervisor/agents-studio-be/commit/74599a722452c19599e13be3318a096400a9b8e0))
40
+ * **authz:** refactor NullAuthorizationCache methods and improve policy management logic ([93beddf](https://github.com/julio-supervisor/agents-studio-be/commit/93beddfdb832ab7d3d0562c42e99fdae6eb9fb8b))
41
+ * **docker:** agregar copiado de modelos de Casbin y políticas en el Dockerfile ([8122479](https://github.com/julio-supervisor/agents-studio-be/commit/81224793ed1d6756734f884a1e01950713885ec8))
42
+ * **docker:** ajustar Dockerfile para construir desde el directorio correcto y mejorar la gestión de dependencias ([b382edf](https://github.com/julio-supervisor/agents-studio-be/commit/b382edfd7aaac87b2f8c88cc8f9b270abeaff3a9))
43
+ * enhance agent management with new API endpoints and entity bindings ([ff7fd49](https://github.com/julio-supervisor/agents-studio-be/commit/ff7fd49c572828b394cbc3724568cc1ac3a81664))
44
+ * **issue-templates:** agregar plantillas para reportes de bugs, solicitudes de características y problemas de documentación ([eae8404](https://github.com/julio-supervisor/agents-studio-be/commit/eae840448e403afa783dd5301ff2ebe0e811a724))
45
+
46
+ ### Bug Fixes
47
+
48
+ * **docker:** corregir rutas en el entrypoint y el comando de inicio para la aplicación ([a8e0c0b](https://github.com/julio-supervisor/agents-studio-be/commit/a8e0c0b7adcb1de5b6a409e99dfc4c4f6c4247ef))
49
+ * **migrations:** corregir rutas de migraciones para asegurar la correcta ejecución ([b2a7ed1](https://github.com/julio-supervisor/agents-studio-be/commit/b2a7ed1eaa153a77646220e7d57d61653bb07919))
50
+
51
+
1
52
  ## v1.1.0
2
53
 
3
54
  ## [1.1.0](https://github.com/julio-supervisor/agents-studio-be/compare/v1.0.0...v1.1.0) (2025-10-09)
package/README.md CHANGED
@@ -1,34 +1,39 @@
1
- # @getsupervisor/conversation-sdk
1
+ # @getsupervisor/agents-studio-sdk
2
2
 
3
- SDK JS/TS para conectar con Conversational API.
3
+ SDK JS/TS oficial para interactuar con la Public API de Agents Studio.
4
4
 
5
5
  ## Instalación
6
6
 
7
7
  ```bash
8
- npm i @getsupervisor/conversation-sdk
8
+ npm i @getsupervisor/agents-studio-sdk
9
9
  ```
10
10
 
11
11
  ## Uso básico
12
12
 
13
13
  ```ts
14
- import { createClient } from '@getsupervisor/conversation-sdk';
14
+ import { createClient } from '@getsupervisor/agents-studio-sdk';
15
15
 
16
- const client = createClient({ baseUrl: 'http://localhost:3000/v1' });
17
- const id = 'a3b2c1...';
16
+ const client = createClient({
17
+ baseUrl: 'https://public-api.getsupervisor.ai',
18
+ headers: { Authorization: 'Bearer <token>' },
19
+ workspaceId: 'ws-123',
20
+ });
18
21
 
19
- // iniciar auth y obtener QR
20
- const qr = await client.connections.auth(id);
21
- console.log(qr.qr);
22
+ const { data: agents } = await client.agents.list({ limit: 10 });
23
+ const agent = await client.agents.get('agent-123');
22
24
 
23
- // escuchar eventos SSE
24
- const off = client.connections.onEvents(id, (e) => console.log('evt', e.data));
25
+ // administrar versiones e instrucciones
26
+ await client.agents
27
+ .versions(agent.agentId)
28
+ .instructions('version-1')
29
+ .create({ order: 1, content: 'Saluda con empatía' });
25
30
 
26
- // obtener estado
27
- const state = await client.connections.getState(id);
31
+ // catálogo y recursos de tools
32
+ const tools = await client.tools.list({ agentType: 'chat' });
33
+ await client.tools.uploadResource(tools.data[0].identifier, formData);
28
34
 
29
- // cerrar sesión
30
- await client.connections.disconnect(id);
31
- off();
35
+ // eliminar un agente
36
+ await client.agents.delete(agent.agentId);
32
37
  ```
33
38
 
34
39
  ## Configuración
@@ -69,16 +74,19 @@ const scoped = client.workspace.scoped('ws-789');
69
74
  await scoped.agents.get('agentId');
70
75
  ```
71
76
 
77
+ ## Novedades (septiembre 2024)
78
+
79
+ - **Sincronización completa con el OpenAPI más reciente**: se regeneraron los tipos `openapi-types.ts` y se actualizó la superficie pública para reflejar nuevos contratos.
80
+ - **Instrucciones por versión**: ahora puedes gestionar instrucciones directamente sobre versiones (`client.agents.versions(...).instructions(...)`) incluyendo operaciones de listar, crear, actualizar y eliminar.
81
+ - **Catálogo y recursos de tools**: soporte para listar tools filtrando por `agentType`, subir/eliminar/recargar recursos y establecer conexiones (`connect`) de manera tipada.
82
+ - **Deprecación de knowledge en agentes**: las rutas de knowledge fueron removidas del API. El helper anterior arroja un error explícito y los tipos asociados ya no se exportan.
83
+ - **Pruebas actualizadas**: la suite de Vitest se ajustó para cubrir helpers de versiones e instrucciones; `npm test` reporta 11 pruebas exitosas.
84
+
72
85
  ## Errores tipados y reintentos
73
86
 
74
- - HttpError(status, statusText, body)
75
- - TimeoutError(ms)
76
- - NetworkError(cause)
77
- - Política de reintentos con backoff exponencial y jitter.
87
+ Los errores siguen modelados como `HttpError`, `TimeoutError` y `NetworkError`. Puedes configurar la política de reintentos con `retry: { maxRetries, baseDelayMs }` en el `createClient`.
78
88
 
79
89
  ## Compatibilidad
80
90
 
81
91
  - Soporta ESM y CJS.
82
- - Navegador y Node (requiere EventSource global o polyfill para SSE).
83
-
84
- ..
92
+ - Compatible con navegadores y Node.js (requiere `fetch` y `FormData` disponibles en el entorno).