@modelriver/cli 1.0.0 → 1.1.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 CHANGED
@@ -54,6 +54,7 @@ For convenience, the CLI supports short aliases:
54
54
  | `forward` | `f` | Forward using saved config |
55
55
  | `trigger` | `t` | Send async request |
56
56
  | `websocket` | `ws` | Test WebSocket connection |
57
+ | `test-webhook` | - | Test webhook delivery end-to-end |
57
58
 
58
59
  Example:
59
60
  ```bash
@@ -257,6 +258,33 @@ Channel Details
257
258
  > Or use "modelriver websocket" to connect and receive responses
258
259
  ```
259
260
 
261
+ ### `modelriver test-webhook` - Test Webhook Delivery End-to-End
262
+
263
+ Test the complete webhook flow - creates a webhook, makes an async request, and waits for the webhook response:
264
+
265
+ ```bash
266
+ # Start local server and test webhook delivery
267
+ modelriver test-webhook --workflow my-workflow --message "Test"
268
+
269
+ # Use custom webhook URL (e.g., your local server or webhook.site)
270
+ modelriver test-webhook --workflow my-workflow --message "Test" --webhook-url http://localhost:4000/webhook/modelriver
271
+
272
+ # With custom secret and port
273
+ modelriver test-webhook --workflow my-workflow --message "Test" --port 3002 --secret my-secret
274
+
275
+ # Verbose output
276
+ modelriver test-webhook --workflow my-workflow --message "Test" --verbose
277
+ ```
278
+
279
+ **Options:**
280
+ - `-w, --workflow <name>` - Workflow name (required)
281
+ - `-m, --message <text>` - Test message
282
+ - `-P, --payload <json>` - Custom JSON payload
283
+ - `-u, --webhook-url <url>` - Webhook URL (starts local server on --port if not provided)
284
+ - `-s, --secret <secret>` - Webhook secret (auto-generated if not provided)
285
+ - `-p, --port <port>` - Local server port (default: 3001)
286
+ - `-v, --verbose` - Verbose output
287
+
260
288
  ### `modelriver webhook list` - List Webhooks
261
289
 
262
290
  List all webhooks for your project.
@@ -375,12 +403,16 @@ Set the API key via:
375
403
 
376
404
  The CLI uses these ModelRiver API endpoints:
377
405
 
378
- - `POST /v1/ai/async` - Create async request (production)
379
- - `POST /api/v1/ai/async` - Create async request (dev/test)
380
- - `POST /v1/ai/reconnect` - Get reconnect token (production)
381
- - `POST /api/v1/ai/reconnect` - Get reconnect token (dev/test)
382
- - `GET /v1/webhooks` - List webhooks (production)
383
- - `GET /api/v1/webhooks` - List webhooks (dev/test)
406
+ **Production** (`https://api.modelriver.com`):
407
+ - `POST /v1/ai/async` - Create async AI request
408
+ - `POST /v1/ai/reconnect` - Get reconnect token for existing channel
409
+ - `GET /v1/webhooks` - List all webhooks
410
+ - `POST /v1/webhooks` - Create a new webhook
411
+ - `DELETE /v1/webhooks/:id` - Delete a webhook
412
+ - `POST /v1/cli/connect` - Connect CLI and get WebSocket token
413
+
414
+ **Development** (localhost or custom API URL):
415
+ - Same endpoints but with `/api/v1` prefix instead of `/v1`
384
416
 
385
417
  ## Development
386
418
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelriver/cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "ModelRiver CLI for testing webhooks and WebSockets from production",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -15,7 +15,7 @@ const program = new Command();
15
15
  program
16
16
  .name('modelriver')
17
17
  .description('ModelRiver CLI for testing webhooks and WebSockets from production')
18
- .version('1.0.0');
18
+ .version('1.1.0');
19
19
 
20
20
  // Global options
21
21
  program