@asteby/metacore-tools 0.1.1 → 1.0.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/README.md +4 -4
- package/dist/client.d.ts +2 -2
- package/dist/types.d.ts +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Cliente TypeScript para el runtime de Tools del kernel metacore.
|
|
4
4
|
|
|
5
|
-
Define un contrato común para que
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Define un contrato común para que cualquier host application ejecute tools
|
|
6
|
+
publicadas en el hub marketplace, con validación client-side de params
|
|
7
|
+
consistente con la que hace `kernel/tool.Validate` en Go.
|
|
8
8
|
|
|
9
9
|
## Instalación
|
|
10
10
|
|
|
@@ -56,4 +56,4 @@ const result = await client.execute({
|
|
|
56
56
|
|
|
57
57
|
## Relación con el kernel
|
|
58
58
|
|
|
59
|
-
Este paquete es el lado frontend del contrato que define [`kernel/tool`](https://github.com/asteby/metacore-kernel/tree/main/tool) en Go. El host backend
|
|
59
|
+
Este paquete es el lado frontend del contrato que define [`kernel/tool`](https://github.com/asteby/metacore-kernel/tree/main/tool) en Go. El host backend expone las rutas HTTP y delega al `tool.Registry` + `tool.HTTPDispatcher` interno, que firma con HMAC y llama al endpoint del addon.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ToolDef, ToolExecutionRequest, ToolExecutionResponse } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Transport-agnostic contract que un host
|
|
4
|
-
*
|
|
3
|
+
* Transport-agnostic contract que un host implementa para que el frontend
|
|
4
|
+
* ejecute tools a través de su propio backend. El host se encarga del
|
|
5
5
|
* HMAC + dispatch al endpoint del addon usando kernel/tool.HTTPDispatcher.
|
|
6
6
|
*/
|
|
7
7
|
export interface ToolClient {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ToolDef, ToolInputParam } from '@asteby/metacore-sdk';
|
|
2
2
|
export type { ToolDef, ToolInputParam };
|
|
3
3
|
/**
|
|
4
|
-
* Request enviada al host backend
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Request enviada al host backend para ejecutar una tool instalada. El host
|
|
5
|
+
* se encarga del dispatch HMAC-firmado al endpoint del addon (lo hace
|
|
6
|
+
* kernel/tool.HTTPDispatcher en Go).
|
|
7
7
|
*/
|
|
8
8
|
export interface ToolExecutionRequest {
|
|
9
9
|
/** manifest.Manifest.Key del addon hospedador */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asteby/metacore-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Cliente TypeScript para el runtime de Tools del kernel metacore — ejecución, registro y validación client-side de addons instalados",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@asteby/metacore-sdk": "^2.
|
|
25
|
+
"@asteby/metacore-sdk": "^2.3.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "^5.6.0",
|
|
29
|
-
"@asteby/metacore-sdk": "2.
|
|
29
|
+
"@asteby/metacore-sdk": "2.3.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|