talo-hub 0.1.0 → 0.1.3

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 (3) hide show
  1. package/README.md +104 -103
  2. package/dist/cli.js +52 -39
  3. package/package.json +62 -57
package/README.md CHANGED
@@ -1,103 +1,104 @@
1
- # talo-hub
2
-
3
- **Cobrá con transferencias bancarias en Argentina, con acreditación y conciliación automáticas.** Desde la terminal, tu código o tu agente de IA, con [Talo Pay](https://talo.com.ar).
4
-
5
- Cada cobro tiene su propio **CVU y alias**. Tu cliente transfiere desde cualquier banco o billetera, Talo lo acredita y vos sabés al instante qué pedido se pagó: sin comprobantes, sin revisar el home banking y sin conciliar a mano.
6
-
7
- ```bash
8
- npx talo-hub login # conectá tu cuenta Talo (sandbox, sin plata real)
9
- npx talo-hub payments create --amount 15000 # → CVU y alias para que te transfieran
10
- npx talo-hub sandbox pay <payment_id> # simulá la transferencia del cliente
11
- npx talo-hub events listen # → payment.paid (muestra los últimos y espera los nuevos)
12
- ```
13
-
14
- Sin instalar nada: alcanza con Node 20 o más nuevo. Documentación: **https://talopartnerhub.vercel.app/docs**
15
-
16
- ## Por qué talo-hub
17
-
18
- - **Un CVU por cobro:** cada pago se identifica solo. Se acabó el "mandame el comprobante".
19
- - **Confirmación automática:** te enterás cuando la plata entra, por terminal, webhook firmado o tu agente.
20
- - **Sandbox real:** simulás transferencias exactas, de menos (UNDERPAID) o de más (OVERPAID) y probás todo el flujo sin mover plata.
21
- - **Hecho para agentes de IA:** servidor MCP con OAuth, skills listas y docs en Markdown. Tu agente integra, prueba y lleva a producción.
22
- - **Seguro:** keys separadas para sandbox y producción, con permisos `read`, `charge` (cobra, no reembolsa) o `full`.
23
-
24
- ## Para agentes de IA
25
-
26
- Conectá Claude Code, Cursor o Claude Desktop a tu cuenta Talo. Con OAuth, la key nunca pasa por el chat:
27
-
28
- ```bash
29
- claude mcp add --transport http talo https://talopartnerhub.vercel.app/api/mcp
30
- # después, en Claude Code: /mcp → talo → Authenticate
31
- ```
32
-
33
- ```bash
34
- npx talo-hub mcp --client cursor # o --client desktop; --with-key para usar tu key
35
- npx talo-hub skills install # skills de Talo en .claude/skills
36
- ```
37
-
38
- El agente puede crear cobros, simular transferencias, registrar y probar su webhook, correr el checklist de producción (`check_go_live`) y leer la documentación (`read_docs`).
39
-
40
- ### Instructions for AI agents
41
-
42
- - Purpose: accept ARS bank-transfer payments in Argentina on the user's Talo Pay account. Each payment returns a `cvu` and `alias`; status goes `PENDING` → `SUCCESS` (or `UNDERPAID` / `OVERPAID` / `EXPIRED`).
43
- - Connect: MCP at `https://talopartnerhub.vercel.app/api/mcp` (OAuth), or this CLI after the user runs `npx talo-hub login`. A person must authorize Talo once per environment; everything else you can do.
44
- - Keys: `tph_test_…` sandbox (test money: test freely), `tph_live_…` production (real money: confirm refunds and amount changes with the user). Scopes `read` < `charge` < `full`; give servers `charge`. Store project keys in the server's env (`TALO_HUB_API_KEY`), never in code or chat; exporting it in your own shell replaces the login key. `login --production` does not make production the default: pass `--production` or run `use production`.
45
- - Machine-readable: every command takes `--json` (JSON on stdout, human messages on stderr) and exits non-zero on failure, `doctor` and `webhooks test` included. Errors with `--json`: `{"error":{"code","message","status"}}`, with stable codes such as `not_logged_in`, `invalid_amount`, `invalid_hub`, `env_key_mismatch`, `insufficient_scope` (plus `key_scope` and `required_scope`), `talo_reconnect_required`, `network_error`, `invalid_response`. `status` is the hub's HTTP status, or null when the CLI found the error itself or couldn't reach the hub. `events listen --json` prints one event per line; the last few existing events come first with `"replayed": true`. Docs as Markdown: https://talopartnerhub.vercel.app/llms.txt, `/docs/<page>.md`, OpenAPI at `/openapi.json`.
46
- - Amounts: pass `--amount 15000` or `15000.50`. Don't use thousands separators unquoted: PowerShell turns `15.000,50` into `15,50`.
47
- - Test plan: `payments create --amount 15000` → `sandbox pay <id> --amount 14999` (UNDERPAID, don't fulfil) → `sandbox pay <id> --amount 1` (SUCCESS) → `webhooks add <https url>` → `webhooks test <id>` → `doctor` until it exits 0.
48
-
49
- ## Comandos
50
-
51
- | Comando | |
52
- |---|---|
53
- | `login [--production]` | Conecta tu cuenta Talo desde el navegador |
54
- | `status` | Cuenta, estado en Talo y permisos de la key |
55
- | `doctor` | Checklist para pasar a producción, con lo que falta |
56
- | `payments create --amount <ARS> [--external-id <id>] [--motive <texto>]` | Crea un cobro y muestra CVU y alias |
57
- | `payments get <id>` | Estado de un cobro |
58
- | `payments list [--from AAAA-MM-DD] [--to AAAA-MM-DD]` | Cobros de un período (30 días por defecto) |
59
- | `payments refund <id> [--amount <ARS>]` | Reembolso total o parcial |
60
- | `sandbox pay <id> [--amount <ARS>]` | Simula la transferencia del cliente |
61
- | `balance`, `transactions [--from] [--to] [--limit <n>] [--cursor]` | Saldo y movimientos |
62
- | `events list [--after <id>] [--limit <n>]` | Eventos recientes |
63
- | `events listen [--forward-to <url\|puerto>]` | Recibe eventos en vivo y los reenvía a localhost sin túneles (sin firma, con `talo-hub-forwarded: 1`: solo para desarrollo) |
64
- | `webhooks list \| add <url> \| remove <id> \| test <id>` | Webhooks firmados con HMAC-SHA256 |
65
- | `keys list \| create [--name] [--scope read\|charge\|full] \| revoke <id>` | Keys para tus proyectos |
66
- | `mcp [--client claude\|cursor\|desktop] [--with-key]` | Configuración del MCP para tu agente |
67
- | `skills install [--global]` | Instala las skills de Talo |
68
- | `use <sandbox\|production>` | Entorno activo de los próximos comandos |
69
- | `logout [--production \| --all]` | Revoca la key en el hub y la borra de esta máquina |
70
-
71
- Opciones: `--sandbox`, `--production`, `--json`, `--version`, `--hub <url>`.
72
-
73
- Montos: `15000` o `15000.50`. También entiende `15000,50` y `15.000,50`, pero en PowerShell escribilos entre comillas (`"15.000,50"`): sin comillas, PowerShell los convierte en otro número antes de que lleguen al CLI. Fechas: `AAAA-MM-DD` o ISO 8601, en hora de Argentina.
74
-
75
- ## De sandbox a producción
76
-
77
- ```bash
78
- npx talo-hub doctor # sandbox listo
79
- npx talo-hub login --production
80
- npx talo-hub keys create --production --name mi-tienda --scope charge
81
- npx talo-hub webhooks add https://tu-sitio.com/api/webhooks/talo --production
82
- npx talo-hub webhooks test <id> --production
83
- npx talo-hub doctor --production
84
- ```
85
-
86
- ## Seguridad
87
-
88
- - `login` muestra un código para confirmar en el navegador. La key queda en `~/.config/talo-hub/config.json` (en Windows, `%APPDATA%\talo-hub`), legible solo por tu usuario.
89
- - `TALO_HUB_API_KEY` usa una key sin login, para CI y agentes. Si no coincide con `--sandbox` o `--production`, el CLI frena en vez de operar en el entorno equivocado.
90
- - Cada key guardada recuerda el hub que la emitió y no se manda a ningún otro.
91
- - `mcp` usa OAuth por defecto: tu key no queda en el historial de la terminal ni en archivos del proyecto.
92
- - Tus keys solo viajan por https (o a un hub en tu propia máquina, para desarrollo).
93
-
94
- ## Links
95
-
96
- - Docs: https://talopartnerhub.vercel.app/docs
97
- - Para agentes: https://talopartnerhub.vercel.app/docs/agents · https://talopartnerhub.vercel.app/llms.txt
98
- - API: https://talopartnerhub.vercel.app/docs/api · OpenAPI: https://talopartnerhub.vercel.app/openapi.json
99
- - Dashboard: https://talopartnerhub.vercel.app/dashboard
100
-
101
- ---
102
-
103
- talo-hub es parte de Talo Partner Hub, una integración de un partner de Talo Pay; no es un producto oficial de Talo. Los cobros los procesa Talo en tu cuenta.
1
+ # talo-hub
2
+
3
+ **Cobrá con transferencias bancarias en Argentina, con acreditación y conciliación automáticas.** Desde la terminal, tu código o tu agente de IA, con [Talo Pay](https://talo.com.ar).
4
+
5
+ Cada cobro tiene su propio **CVU y alias**. Tu cliente transfiere desde cualquier banco o billetera, Talo lo acredita y vos sabés al instante qué pedido se pagó: sin comprobantes, sin revisar el home banking y sin conciliar a mano.
6
+
7
+ ```bash
8
+ npx talo-hub login # conectá tu cuenta Talo (sandbox, sin plata real)
9
+ npx talo-hub payments create --amount 15000 # → CVU y alias para que te transfieran
10
+ npx talo-hub sandbox pay <payment_id> # simulá la transferencia del cliente
11
+ npx talo-hub events listen # → payment.paid (muestra los últimos y espera los nuevos)
12
+ ```
13
+
14
+ Sin instalar nada: alcanza con Node 20 o más nuevo. Documentación: **https://talopartnerhub.vercel.app/docs**
15
+
16
+ ## Por qué talo-hub
17
+
18
+ - **Un CVU por cobro:** cada pago se identifica solo. Se acabó el "mandame el comprobante".
19
+ - **Confirmación automática:** te enterás cuando la plata entra, por terminal, webhook firmado o tu agente.
20
+ - **Sandbox real:** simulás transferencias exactas, de menos (UNDERPAID) o de más (OVERPAID) y probás todo el flujo sin mover plata.
21
+ - **Hecho para agentes de IA:** servidor MCP con OAuth, skills listas y docs en Markdown. Tu agente integra, prueba y lleva a producción.
22
+ - **Seguro:** keys separadas para sandbox y producción, con permisos `read`, `charge` (cobra, no reembolsa) o `full`.
23
+
24
+ ## Para agentes de IA
25
+
26
+ Conectá Claude Code, Cursor o Claude Desktop a tu cuenta Talo. Con OAuth, la key nunca pasa por el chat:
27
+
28
+ ```bash
29
+ claude mcp add --transport http talo https://talopartnerhub.vercel.app/api/mcp
30
+ # después, en Claude Code: /mcp → talo → Authenticate
31
+ ```
32
+
33
+ ```bash
34
+ npx talo-hub mcp --client cursor # o --client desktop; --with-key para usar tu key
35
+ npx talo-hub skills install # skills de Talo en .claude/skills
36
+ ```
37
+
38
+ El agente puede crear cobros, simular transferencias, registrar y probar su webhook, correr el checklist de producción (`check_go_live`) y leer la documentación (`read_docs`).
39
+
40
+ ### Instructions for AI agents
41
+
42
+ - Purpose: accept ARS bank-transfer payments in Argentina on the user's Talo Pay account. Each payment returns a `cvu` and `alias`; status goes `PENDING` → `SUCCESS` (or `UNDERPAID` / `OVERPAID` / `EXPIRED`).
43
+ - Connect: MCP at `https://talopartnerhub.vercel.app/api/mcp` (OAuth), or this CLI after the user runs `npx talo-hub login`. A person must authorize Talo once per environment; everything else you can do.
44
+ - Keys: `tph_test_…` sandbox (test money: test freely), `tph_live_…` production (real money: confirm refunds and amount changes with the user). Scopes `read` < `charge` < `full`; give servers `charge`. Store project keys in the server's env (`TALO_HUB_API_KEY`), never in code or chat; exporting it in your own shell replaces the login key. `login --production` does not make production the default: pass `--production` or run `use production`.
45
+ - Machine-readable: every command takes `--json` (JSON on stdout, human messages on stderr) and exits non-zero on failure, `doctor` and `webhooks test` included. Errors with `--json`: `{"error":{"code","message","status"}}`, with stable codes such as `not_logged_in`, `invalid_amount`, `invalid_hub`, `env_key_mismatch`, `insufficient_scope` (plus `key_scope` and `required_scope`), `talo_reconnect_required`, `network_error`, `invalid_response`. `status` is the hub's HTTP status, or null when the CLI found the error itself or couldn't reach the hub. `events listen --json` prints one event per line; the last few existing events come first with `"replayed": true`. Docs as Markdown: https://talopartnerhub.vercel.app/llms.txt, `/docs/<page>.md`, OpenAPI at `/openapi.json`.
46
+ - Amounts: pass `--amount 15000` or `15000.50`. Don't use thousands separators unquoted: PowerShell turns `15.000,50` into `15,50`.
47
+ - Payments always include `paid` and `refunded` as numbers (0 when none) and `refunds: [{ id, status, type, amount, currency, created_at }]`. Filter events with `events list --payment <id>`.
48
+ - Test plan: `payments create --amount 15000` → `sandbox pay <id> --amount 14999` (UNDERPAID, don't fulfil) → `sandbox pay <id> --amount 1` (SUCCESS) → `webhooks add <https url>` → `webhooks test <id>` → `doctor` until it exits 0.
49
+
50
+ ## Comandos
51
+
52
+ | Comando | |
53
+ |---|---|
54
+ | `login [--production]` | Conecta tu cuenta Talo desde el navegador |
55
+ | `status` | Cuenta, estado en Talo y permisos de la key |
56
+ | `doctor` | Checklist para pasar a producción, con lo que falta |
57
+ | `payments create --amount <ARS> [--external-id <id>] [--motive <texto>]` | Crea un cobro y muestra CVU y alias |
58
+ | `payments get <id>` | Estado de un cobro |
59
+ | `payments list [--from AAAA-MM-DD] [--to AAAA-MM-DD]` | Cobros de un período (30 días por defecto) |
60
+ | `payments refund <id> [--amount <ARS>]` | Reembolso total o parcial |
61
+ | `sandbox pay <id> [--amount <ARS>]` | Simula la transferencia del cliente |
62
+ | `balance`, `transactions [--from] [--to] [--limit <n>] [--cursor]` | Saldo y movimientos |
63
+ | `events list [--payment <id>] [--type <tipo>] [--after <id>] [--limit <n>]` | Eventos recientes, filtrables por cobro o tipo |
64
+ | `events listen [--forward-to <url\|puerto>]` | Recibe eventos en vivo y los reenvía a localhost sin túneles (sin firma, con `talo-hub-forwarded: 1`: solo para desarrollo) |
65
+ | `webhooks list \| add <url> \| remove <id> \| test <id>` | Webhooks firmados con HMAC-SHA256 |
66
+ | `keys list \| create [--name] [--scope read\|charge\|full] \| revoke <id>` | Keys para tus proyectos (`charge` por defecto) |
67
+ | `mcp [--client claude\|cursor\|desktop] [--with-key]` | Configuración del MCP para tu agente |
68
+ | `skills install [--global]` | Instala las skills de Talo |
69
+ | `use <sandbox\|production>` | Entorno activo de los próximos comandos |
70
+ | `logout [--production \| --all]` | Revoca la key en el hub y la borra de esta máquina |
71
+
72
+ Opciones: `--sandbox`, `--production`, `--json`, `--version`, `--hub <url>`.
73
+
74
+ Montos: `15000` o `15000.50`. También entiende `15000,50` y `15.000,50`, pero en PowerShell escribilos entre comillas (`"15.000,50"`): sin comillas, PowerShell los convierte en otro número antes de que lleguen al CLI. Fechas: `AAAA-MM-DD` o ISO 8601, en hora de Argentina.
75
+
76
+ ## De sandbox a producción
77
+
78
+ ```bash
79
+ npx talo-hub doctor # sandbox listo
80
+ npx talo-hub login --production
81
+ npx talo-hub keys create --production --name mi-tienda --scope charge
82
+ npx talo-hub webhooks add https://tu-sitio.com/api/webhooks/talo --production
83
+ npx talo-hub webhooks test <id> --production
84
+ npx talo-hub doctor --production
85
+ ```
86
+
87
+ ## Seguridad
88
+
89
+ - `login` muestra un código para confirmar en el navegador. La key queda en `~/.config/talo-hub/config.json` (en Windows, `%APPDATA%\talo-hub`), legible solo por tu usuario.
90
+ - `TALO_HUB_API_KEY` usa una key sin login, para CI y agentes. Si no coincide con `--sandbox` o `--production`, el CLI frena en vez de operar en el entorno equivocado.
91
+ - Cada key guardada recuerda el hub que la emitió y no se manda a ningún otro.
92
+ - `mcp` usa OAuth por defecto: tu key no queda en el historial de la terminal ni en archivos del proyecto.
93
+ - Tus keys solo viajan por https (o a un hub en tu propia máquina, para desarrollo).
94
+
95
+ ## Links
96
+
97
+ - Docs: https://talopartnerhub.vercel.app/docs
98
+ - Para agentes: https://talopartnerhub.vercel.app/docs/agents · https://talopartnerhub.vercel.app/llms.txt
99
+ - API: https://talopartnerhub.vercel.app/docs/api · OpenAPI: https://talopartnerhub.vercel.app/openapi.json
100
+ - Dashboard: https://talopartnerhub.vercel.app/dashboard
101
+
102
+ ---
103
+
104
+ talo-hub es parte de Talo Partner Hub, una integración de un partner de Talo Pay; no es un producto oficial de Talo. Los cobros los procesa Talo en tu cuenta.
package/dist/cli.js CHANGED
@@ -16,38 +16,39 @@ const VERSION = createRequire(import.meta.url)("../package.json").version;
16
16
  /** How to tell people to run us again: through npx when that's how they ran us. */
17
17
  const CMD = process.env.npm_command === "exec" ? "npx talo-hub" : "talo-hub";
18
18
  const jsonMode = process.argv.some((arg) => /^--json(=|$)/.test(arg));
19
- const HELP = `talo-hub ${VERSION}: transferencias bancarias automáticas en Argentina con Talo Pay.
20
-
21
- Cuenta
22
- login [--production] Conecta tu cuenta Talo (sandbox por defecto)
23
- logout [--production | --all] Revoca y borra la key guardada
24
- use <sandbox|production> Elige el entorno de los próximos comandos
25
- status Cuenta conectada, estado en Talo y permisos de la key
26
- doctor Checklist para pasar a producción
27
-
28
- Cobros
29
- payments create --amount <ARS> [--external-id <id>] [--motive <texto>]
30
- payments get <payment_id>
31
- payments list [--from AAAA-MM-DD] [--to AAAA-MM-DD]
32
- payments refund <payment_id> [--amount <ARS>] Sin --amount, reembolso total
33
- sandbox pay <payment_id> [--amount <ARS>] Simula la transferencia (sandbox)
34
- balance
35
- transactions [--from …] [--to …] [--limit <1-200>] [--cursor <next_cursor>]
36
-
37
- Eventos y webhooks
38
- events list [--after <id>] [--limit <1-200>] Sin --after, los más recientes
39
- events listen [--forward-to <url|puerto>] Muestra los últimos y escucha los nuevos
40
- (los reenviados no van firmados: solo para desarrollo)
41
- webhooks list | add <url> | remove <id> | test <id>
42
-
43
- Keys y agentes
44
- keys list | create [--name <nombre>] [--scope read|charge|full] | revoke <id>
45
- mcp [--client claude|cursor|desktop] [--with-key] Configuración del MCP para tu agente
46
- skills install [--global] Instala las skills de Talo en .claude/skills
47
-
48
- Montos: 15000 o 15000.50 (en PowerShell, con separador de miles, entre comillas: "15.000,50").
49
- Fechas: AAAA-MM-DD o ISO 8601; sin zona horaria, hora de Argentina.
50
- Opciones: --sandbox, --production, --json, --hub <url>, --version
19
+ const HELP = `talo-hub ${VERSION}: transferencias bancarias automáticas en Argentina con Talo Pay.
20
+
21
+ Cuenta
22
+ login [--production] Conecta tu cuenta Talo (sandbox por defecto)
23
+ logout [--production | --all] Revoca y borra la key guardada
24
+ use <sandbox|production> Elige el entorno de los próximos comandos
25
+ status Cuenta conectada, estado en Talo y permisos de la key
26
+ doctor Checklist para pasar a producción
27
+
28
+ Cobros
29
+ payments create --amount <ARS> [--external-id <id>] [--motive <texto>]
30
+ payments get <payment_id>
31
+ payments list [--from AAAA-MM-DD] [--to AAAA-MM-DD]
32
+ payments refund <payment_id> [--amount <ARS>] Sin --amount, reembolso total
33
+ sandbox pay <payment_id> [--amount <ARS>] Simula la transferencia (sandbox)
34
+ balance
35
+ transactions [--from …] [--to …] [--limit <1-200>] [--cursor <next_cursor>]
36
+
37
+ Eventos y webhooks
38
+ events list [--payment <id>] [--type <tipo>] [--after <id>] [--limit <1-200>]
39
+ Sin --after, los más recientes
40
+ events listen [--forward-to <url|puerto>] Muestra los últimos y escucha los nuevos
41
+ (los reenviados no van firmados: solo para desarrollo)
42
+ webhooks list | add <url> | remove <id> | test <id>
43
+
44
+ Keys y agentes
45
+ keys list | create [--name <nombre>] [--scope read|charge|full] | revoke <id> (charge por defecto)
46
+ mcp [--client claude|cursor|desktop] [--with-key] Configuración del MCP para tu agente
47
+ skills install [--global] Instala las skills de Talo en .claude/skills
48
+
49
+ Montos: 15000 o 15000.50 (en PowerShell, con separador de miles, entre comillas: "15.000,50").
50
+ Fechas: AAAA-MM-DD o ISO 8601; sin zona horaria, hora de Argentina.
51
+ Opciones: --sandbox, --production, --json, --hub <url>, --version
51
52
  Variables: TALO_HUB_API_KEY (usa esa key en vez de la guardada), TALO_HUB_URL`;
52
53
  /** Prints the error (as JSON with --json, with a stable code) and exits 1. */
53
54
  function fail(message, code = "usage", extra = {}) {
@@ -90,6 +91,8 @@ function parseCommandLine() {
90
91
  after: { type: "string" },
91
92
  limit: { type: "string" },
92
93
  cursor: { type: "string" },
94
+ payment: { type: "string" },
95
+ type: { type: "string" },
93
96
  name: { type: "string" },
94
97
  scope: { type: "string" },
95
98
  "forward-to": { type: "string" },
@@ -129,7 +132,7 @@ const COMMAND_OPTIONS = {
129
132
  "sandbox pay": ["amount"],
130
133
  balance: [],
131
134
  transactions: ["from", "to", "limit", "cursor"],
132
- "events list": ["after", "limit"],
135
+ "events list": ["after", "limit", "payment", "type"],
133
136
  "events listen": ["forward-to"],
134
137
  webhooks: [],
135
138
  keys: ["name", "scope"],
@@ -225,14 +228,17 @@ const HUB_MESSAGES = {
225
228
  invalid_amount: "El monto no es válido.",
226
229
  invalid_url: "La URL del webhook no es válida: tiene que ser https.",
227
230
  environment_disabled: "El hub todavía no está conectado a ese entorno de Talo.",
231
+ talo_partner_unsupported: "Talo todavía no habilita el saldo y los movimientos para integraciones de partner: consultalos en el panel de Talo.",
228
232
  };
229
233
  /** A hub error in words for this CLI: transient failures read the same whatever the hub said. */
230
234
  function hubMessage(error) {
235
+ if (error.code && HUB_MESSAGES[error.code])
236
+ return HUB_MESSAGES[error.code];
231
237
  if (error.status === 0)
232
238
  return error.message;
233
239
  if (error.status >= 500)
234
240
  return `El hub tuvo un error (HTTP ${error.status}).`;
235
- return (error.code && HUB_MESSAGES[error.code]) ?? error.message;
241
+ return error.message;
236
242
  }
237
243
  function showPayment(payment) {
238
244
  console.log(`${payment.id} ${payment.status}`);
@@ -716,13 +722,20 @@ async function run(hub, ctx) {
716
722
  return listen(hub);
717
723
  if (sub !== undefined && sub !== "list")
718
724
  fail(`Usá: ${CMD} events list [--after <id>] | listen [--forward-to <url>]`);
719
- const limit = limitFlag(20);
720
- if (flags.after === undefined)
721
- return emit(await hub.get(`/api/v1/events?recent=${limit}`));
725
+ const query = new URLSearchParams({ limit: String(limitFlag(20)) });
726
+ if (flags.payment)
727
+ query.set("payment_id", flags.payment);
728
+ if (flags.type)
729
+ query.set("type", flags.type);
730
+ if (flags.after === undefined) {
731
+ query.set("recent", query.get("limit"));
732
+ return emit(await hub.get(`/api/v1/events?${query}`));
733
+ }
722
734
  if (!/^\d+$/.test(flags.after) || !Number.isSafeInteger(Number(flags.after))) {
723
735
  fail(`--after tiene que ser el número de un evento (recibimos "${flags.after}").`, "invalid_option");
724
736
  }
725
- return emit(await hub.get(`/api/v1/events?after=${flags.after}&limit=${limit}`));
737
+ query.set("after", flags.after);
738
+ return emit(await hub.get(`/api/v1/events?${query}`));
726
739
  }
727
740
  case "webhooks": {
728
741
  if (sub === undefined || sub === "list")
@@ -752,7 +765,7 @@ async function run(hub, ctx) {
752
765
  fail("--scope tiene que ser read, charge o full.", "invalid_option");
753
766
  const created = await hub.post("/api/v1/api-keys", {
754
767
  name: flags.name ?? "CLI",
755
- scope: flags.scope ?? "full",
768
+ scope: flags.scope ?? "charge",
756
769
  });
757
770
  return emit(created, () => console.log(`✓ ${created.api_key}\n ${created.environment} · scope ${created.scope}. Guardala ahora en el .env o los secretos de tu servidor (TALO_HUB_API_KEY): no se vuelve a mostrar.\n En esta terminal, exportarla reemplaza a la key de tu login.`));
758
771
  }
package/package.json CHANGED
@@ -1,57 +1,62 @@
1
- {
2
- "name": "talo-hub",
3
- "version": "0.1.0",
4
- "description": "Transferencias bancarias automáticas en Argentina con Talo Pay: un CVU por cobro, acreditación y conciliación automáticas, webhooks firmados, sandbox y MCP para agentes de IA (Claude, Cursor).",
5
- "keywords": [
6
- "talo",
7
- "talo-pay",
8
- "transferencias",
9
- "transferencia-bancaria",
10
- "cobros",
11
- "pagos",
12
- "argentina",
13
- "cvu",
14
- "cbu",
15
- "alias",
16
- "ars",
17
- "payments",
18
- "bank-transfer",
19
- "payments-argentina",
20
- "webhooks",
21
- "sandbox",
22
- "mcp",
23
- "model-context-protocol",
24
- "ai-agents",
25
- "claude",
26
- "cursor",
27
- "cli"
28
- ],
29
- "homepage": "https://talopartnerhub.vercel.app/docs/cli",
30
- "license": "MIT",
31
- "author": "Talo Partner Hub",
32
- "type": "module",
33
- "bin": {
34
- "talo-hub": "dist/cli.js"
35
- },
36
- "files": [
37
- "dist",
38
- "README.md",
39
- "LICENSE"
40
- ],
41
- "engines": {
42
- "node": ">=20"
43
- },
44
- "scripts": {
45
- "build": "tsc -p tsconfig.json",
46
- "typecheck": "tsc -p tsconfig.json --noEmit",
47
- "prepublishOnly": "npm test",
48
- "test": "npm run build && node --test \"test/**/*.test.mjs\""
49
- },
50
- "publishConfig": {
51
- "access": "public"
52
- },
53
- "devDependencies": {
54
- "@types/node": "^26.6.5",
55
- "typescript": "5.9.3"
56
- }
57
- }
1
+ {
2
+ "name": "talo-hub",
3
+ "version": "0.1.3",
4
+ "description": "Transferencias bancarias automáticas en Argentina con Talo Pay: un CVU por cobro, acreditación y conciliación automáticas, webhooks firmados, sandbox y MCP para agentes de IA (Claude, Cursor).",
5
+ "keywords": [
6
+ "talo",
7
+ "talo-pay",
8
+ "transferencias",
9
+ "transferencia-bancaria",
10
+ "cobros",
11
+ "pagos",
12
+ "argentina",
13
+ "cvu",
14
+ "cbu",
15
+ "alias",
16
+ "ars",
17
+ "payments",
18
+ "bank-transfer",
19
+ "payments-argentina",
20
+ "webhooks",
21
+ "sandbox",
22
+ "mcp",
23
+ "model-context-protocol",
24
+ "ai-agents",
25
+ "claude",
26
+ "cursor",
27
+ "cli"
28
+ ],
29
+ "homepage": "https://talopartnerhub.vercel.app/docs/cli",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/matiasbarrigadev/talo-partner-hub.git",
33
+ "directory": "packages/cli"
34
+ },
35
+ "license": "MIT",
36
+ "author": "Talo Partner Hub",
37
+ "type": "module",
38
+ "bin": {
39
+ "talo-hub": "dist/cli.js"
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "README.md",
44
+ "LICENSE"
45
+ ],
46
+ "engines": {
47
+ "node": ">=20"
48
+ },
49
+ "scripts": {
50
+ "build": "tsc -p tsconfig.json",
51
+ "typecheck": "tsc -p tsconfig.json --noEmit",
52
+ "prepublishOnly": "npm test",
53
+ "test": "npm run build && node --test \"test/**/*.test.mjs\""
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "devDependencies": {
59
+ "@types/node": "^26.6.5",
60
+ "typescript": "5.9.3"
61
+ }
62
+ }