@primitivedotdev/sdk 0.19.0 → 0.21.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.
@@ -87,10 +87,20 @@
87
87
  "multiple": false,
88
88
  "type": "option"
89
89
  },
90
- "base-url": {
91
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
92
- "env": "PRIMITIVE_API_URL",
93
- "name": "base-url",
90
+ "api-base-url-1": {
91
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
92
+ "env": "PRIMITIVE_API_BASE_URL_1",
93
+ "hidden": true,
94
+ "name": "api-base-url-1",
95
+ "hasDynamicHelp": false,
96
+ "multiple": false,
97
+ "type": "option"
98
+ },
99
+ "api-base-url-2": {
100
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
101
+ "env": "PRIMITIVE_API_BASE_URL_2",
102
+ "hidden": true,
103
+ "name": "api-base-url-2",
94
104
  "hasDynamicHelp": false,
95
105
  "multiple": false,
96
106
  "type": "option"
@@ -178,10 +188,11 @@
178
188
  "<%= config.bin %> login --force"
179
189
  ],
180
190
  "flags": {
181
- "base-url": {
182
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
183
- "env": "PRIMITIVE_API_URL",
184
- "name": "base-url",
191
+ "api-base-url-1": {
192
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
193
+ "env": "PRIMITIVE_API_BASE_URL_1",
194
+ "hidden": true,
195
+ "name": "api-base-url-1",
185
196
  "hasDynamicHelp": false,
186
197
  "multiple": false,
187
198
  "type": "option"
@@ -225,10 +236,11 @@
225
236
  "<%= config.bin %> logout"
226
237
  ],
227
238
  "flags": {
228
- "base-url": {
229
- "description": "Override the API base URL used for key revocation",
230
- "env": "PRIMITIVE_API_URL",
231
- "name": "base-url",
239
+ "api-base-url-1": {
240
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
241
+ "env": "PRIMITIVE_API_BASE_URL_1",
242
+ "hidden": true,
243
+ "name": "api-base-url-1",
232
244
  "hasDynamicHelp": false,
233
245
  "multiple": false,
234
246
  "type": "option"
@@ -261,10 +273,20 @@
261
273
  "multiple": false,
262
274
  "type": "option"
263
275
  },
264
- "base-url": {
265
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
266
- "env": "PRIMITIVE_API_URL",
267
- "name": "base-url",
276
+ "api-base-url-1": {
277
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
278
+ "env": "PRIMITIVE_API_BASE_URL_1",
279
+ "hidden": true,
280
+ "name": "api-base-url-1",
281
+ "hasDynamicHelp": false,
282
+ "multiple": false,
283
+ "type": "option"
284
+ },
285
+ "api-base-url-2": {
286
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
287
+ "env": "PRIMITIVE_API_BASE_URL_2",
288
+ "hidden": true,
289
+ "name": "api-base-url-2",
268
290
  "hasDynamicHelp": false,
269
291
  "multiple": false,
270
292
  "type": "option"
@@ -291,10 +313,10 @@
291
313
  "args": {},
292
314
  "description": "Print the N most recent inbound emails as a one-line-per-row text table. Designed for quick triage and visual scanning. For programmatic access, use `primitive emails:list-emails` (full JSON envelope, cursor pagination, filters) or pass `--json` here for the same raw shape without pagination/filters.\n\n ID display is TTY-aware. When STDOUT is a terminal, the table truncates each row's id to the first 8 characters for readability. When STDOUT is piped or redirected (the row stream is being consumed by another command), the full UUID is printed so the id can be fed straight back into `emails:get-email`, `emails:delete-email`, etc. without a separate `--json` round-trip.\n\n Output streams: the column header line is written to STDERR so the row data on STDOUT stays grep/awk-friendly. `--json` writes everything (including the envelope) to STDOUT and is equivalent to running `emails:list-emails --limit N` for the same N.",
293
315
  "examples": [
294
- "<%= config.bin %> emails:latest",
295
- "<%= config.bin %> emails:latest --limit 25",
296
- "<%= config.bin %> emails:latest | head -1 | awk '{print $1}' # full UUID since piped",
297
- "<%= config.bin %> emails:latest --json | jq '.data[0].id'"
316
+ "<%= config.bin %> emails latest",
317
+ "<%= config.bin %> emails latest --limit 25",
318
+ "<%= config.bin %> emails latest | head -1 | awk '{print $1}' # full UUID since piped",
319
+ "<%= config.bin %> emails latest --json | jq '.data[0].id'"
298
320
  ],
299
321
  "flags": {
300
322
  "api-key": {
@@ -305,10 +327,20 @@
305
327
  "multiple": false,
306
328
  "type": "option"
307
329
  },
308
- "base-url": {
309
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
310
- "env": "PRIMITIVE_API_URL",
311
- "name": "base-url",
330
+ "api-base-url-1": {
331
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
332
+ "env": "PRIMITIVE_API_BASE_URL_1",
333
+ "hidden": true,
334
+ "name": "api-base-url-1",
335
+ "hasDynamicHelp": false,
336
+ "multiple": false,
337
+ "type": "option"
338
+ },
339
+ "api-base-url-2": {
340
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
341
+ "env": "PRIMITIVE_API_BASE_URL_2",
342
+ "hidden": true,
343
+ "name": "api-base-url-2",
312
344
  "hasDynamicHelp": false,
313
345
  "multiple": false,
314
346
  "type": "option"
@@ -344,10 +376,15 @@
344
376
  "summary": "Show the most recent inbound emails as a compact table",
345
377
  "enableJsonFlag": false
346
378
  },
347
- "account:get-account": {
379
+ "emails:watch": {
348
380
  "aliases": [],
349
381
  "args": {},
350
- "description": "GET /account",
382
+ "description": "Poll for new inbound emails and print matching messages as they arrive.",
383
+ "examples": [
384
+ "<%= config.bin %> emails watch --to support@example.com",
385
+ "<%= config.bin %> emails watch --subject verify --seconds 300",
386
+ "<%= config.bin %> emails watch --number 20 --jsonl"
387
+ ],
351
388
  "flags": {
352
389
  "api-key": {
353
390
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -357,35 +394,162 @@
357
394
  "multiple": false,
358
395
  "type": "option"
359
396
  },
360
- "base-url": {
361
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
362
- "env": "PRIMITIVE_API_URL",
363
- "name": "base-url",
397
+ "api-base-url-1": {
398
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
399
+ "env": "PRIMITIVE_API_BASE_URL_1",
400
+ "hidden": true,
401
+ "name": "api-base-url-1",
364
402
  "hasDynamicHelp": false,
365
403
  "multiple": false,
366
404
  "type": "option"
367
405
  },
368
- "time": {
369
- "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
370
- "name": "time",
406
+ "api-base-url-2": {
407
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
408
+ "env": "PRIMITIVE_API_BASE_URL_2",
409
+ "hidden": true,
410
+ "name": "api-base-url-2",
411
+ "hasDynamicHelp": false,
412
+ "multiple": false,
413
+ "type": "option"
414
+ },
415
+ "body": {
416
+ "description": "Full-text body filter",
417
+ "name": "body",
418
+ "hasDynamicHelp": false,
419
+ "multiple": false,
420
+ "type": "option"
421
+ },
422
+ "domain": {
423
+ "description": "Filter by inbound email domain",
424
+ "name": "domain",
425
+ "hasDynamicHelp": false,
426
+ "multiple": false,
427
+ "type": "option"
428
+ },
429
+ "domain-id": {
430
+ "description": "Filter by domain UUID",
431
+ "name": "domain-id",
432
+ "hasDynamicHelp": false,
433
+ "multiple": false,
434
+ "type": "option"
435
+ },
436
+ "from": {
437
+ "description": "Filter by sender address or domain",
438
+ "name": "from",
439
+ "hasDynamicHelp": false,
440
+ "multiple": false,
441
+ "type": "option"
442
+ },
443
+ "has-attachment": {
444
+ "description": "Only show emails with one or more attachments",
445
+ "name": "has-attachment",
446
+ "allowNo": false,
447
+ "type": "boolean"
448
+ },
449
+ "include-existing": {
450
+ "description": "Start from existing matching emails instead of only new arrivals",
451
+ "name": "include-existing",
452
+ "allowNo": false,
453
+ "type": "boolean"
454
+ },
455
+ "interval": {
456
+ "description": "Seconds to wait between empty polls",
457
+ "name": "interval",
458
+ "default": 2,
459
+ "hasDynamicHelp": false,
460
+ "multiple": false,
461
+ "type": "option"
462
+ },
463
+ "jsonl": {
464
+ "description": "Print each email as one JSON object per line",
465
+ "name": "jsonl",
371
466
  "allowNo": false,
372
467
  "type": "boolean"
468
+ },
469
+ "number": {
470
+ "description": "Exit after printing this many matching emails",
471
+ "name": "number",
472
+ "hasDynamicHelp": false,
473
+ "multiple": false,
474
+ "type": "option"
475
+ },
476
+ "page-size": {
477
+ "description": "Emails to fetch per poll (1-100)",
478
+ "name": "page-size",
479
+ "default": 50,
480
+ "hasDynamicHelp": false,
481
+ "multiple": false,
482
+ "type": "option"
483
+ },
484
+ "q": {
485
+ "description": "Full-text search DSL query",
486
+ "name": "q",
487
+ "hasDynamicHelp": false,
488
+ "multiple": false,
489
+ "type": "option"
490
+ },
491
+ "seconds": {
492
+ "description": "Exit after this many seconds",
493
+ "name": "seconds",
494
+ "hasDynamicHelp": false,
495
+ "multiple": false,
496
+ "type": "option"
497
+ },
498
+ "since": {
499
+ "description": "Only show emails received on or after this date/time",
500
+ "name": "since",
501
+ "hasDynamicHelp": false,
502
+ "multiple": false,
503
+ "type": "option"
504
+ },
505
+ "spam-score-gte": {
506
+ "description": "Only show emails with spam score greater than or equal to this value",
507
+ "name": "spam-score-gte",
508
+ "hasDynamicHelp": false,
509
+ "multiple": false,
510
+ "type": "option"
511
+ },
512
+ "spam-score-lt": {
513
+ "description": "Only show emails with spam score below this value",
514
+ "name": "spam-score-lt",
515
+ "hasDynamicHelp": false,
516
+ "multiple": false,
517
+ "type": "option"
518
+ },
519
+ "subject": {
520
+ "description": "Full-text subject filter",
521
+ "name": "subject",
522
+ "hasDynamicHelp": false,
523
+ "multiple": false,
524
+ "type": "option"
525
+ },
526
+ "to": {
527
+ "description": "Filter by recipient address or domain",
528
+ "name": "to",
529
+ "hasDynamicHelp": false,
530
+ "multiple": false,
531
+ "type": "option"
373
532
  }
374
533
  },
375
534
  "hasDynamicHelp": false,
376
535
  "hiddenAliases": [],
377
- "id": "account:get-account",
536
+ "id": "emails:watch",
378
537
  "pluginAlias": "@primitivedotdev/sdk",
379
538
  "pluginName": "@primitivedotdev/sdk",
380
539
  "pluginType": "core",
381
540
  "strict": true,
382
- "summary": "Get account info",
541
+ "summary": "Watch inbound emails with filters",
383
542
  "enableJsonFlag": false
384
543
  },
385
- "account:get-storage-stats": {
544
+ "emails:wait": {
386
545
  "aliases": [],
387
546
  "args": {},
388
- "description": "GET /account/storage",
547
+ "description": "Poll until matching inbound emails arrive, printing each match as it is found.",
548
+ "examples": [
549
+ "<%= config.bin %> emails wait --to test@example.com",
550
+ "<%= config.bin %> emails wait --subject verify --number 5 --timeout 120",
551
+ "<%= config.bin %> emails wait --q 'domain:example.com' --table"
552
+ ],
389
553
  "flags": {
390
554
  "api-key": {
391
555
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -395,35 +559,164 @@
395
559
  "multiple": false,
396
560
  "type": "option"
397
561
  },
398
- "base-url": {
399
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
400
- "env": "PRIMITIVE_API_URL",
401
- "name": "base-url",
562
+ "api-base-url-1": {
563
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
564
+ "env": "PRIMITIVE_API_BASE_URL_1",
565
+ "hidden": true,
566
+ "name": "api-base-url-1",
402
567
  "hasDynamicHelp": false,
403
568
  "multiple": false,
404
569
  "type": "option"
405
570
  },
406
- "time": {
407
- "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
408
- "name": "time",
571
+ "api-base-url-2": {
572
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
573
+ "env": "PRIMITIVE_API_BASE_URL_2",
574
+ "hidden": true,
575
+ "name": "api-base-url-2",
576
+ "hasDynamicHelp": false,
577
+ "multiple": false,
578
+ "type": "option"
579
+ },
580
+ "body": {
581
+ "description": "Full-text body filter",
582
+ "name": "body",
583
+ "hasDynamicHelp": false,
584
+ "multiple": false,
585
+ "type": "option"
586
+ },
587
+ "domain": {
588
+ "description": "Filter by inbound email domain",
589
+ "name": "domain",
590
+ "hasDynamicHelp": false,
591
+ "multiple": false,
592
+ "type": "option"
593
+ },
594
+ "domain-id": {
595
+ "description": "Filter by domain UUID",
596
+ "name": "domain-id",
597
+ "hasDynamicHelp": false,
598
+ "multiple": false,
599
+ "type": "option"
600
+ },
601
+ "from": {
602
+ "description": "Filter by sender address or domain",
603
+ "name": "from",
604
+ "hasDynamicHelp": false,
605
+ "multiple": false,
606
+ "type": "option"
607
+ },
608
+ "has-attachment": {
609
+ "description": "Only match emails with one or more attachments",
610
+ "name": "has-attachment",
611
+ "allowNo": false,
612
+ "type": "boolean"
613
+ },
614
+ "include-existing": {
615
+ "description": "Start from existing matching emails instead of only new arrivals",
616
+ "name": "include-existing",
617
+ "allowNo": false,
618
+ "type": "boolean"
619
+ },
620
+ "interval": {
621
+ "description": "Seconds to wait between empty polls",
622
+ "name": "interval",
623
+ "default": 2,
624
+ "hasDynamicHelp": false,
625
+ "multiple": false,
626
+ "type": "option"
627
+ },
628
+ "number": {
629
+ "char": "n",
630
+ "description": "Exit successfully after this many matching emails",
631
+ "name": "number",
632
+ "default": 1,
633
+ "hasDynamicHelp": false,
634
+ "multiple": false,
635
+ "type": "option"
636
+ },
637
+ "page-size": {
638
+ "description": "Emails to fetch per poll (1-100)",
639
+ "name": "page-size",
640
+ "default": 50,
641
+ "hasDynamicHelp": false,
642
+ "multiple": false,
643
+ "type": "option"
644
+ },
645
+ "q": {
646
+ "description": "Full-text search DSL query",
647
+ "name": "q",
648
+ "hasDynamicHelp": false,
649
+ "multiple": false,
650
+ "type": "option"
651
+ },
652
+ "since": {
653
+ "description": "Only match emails received on or after this date/time",
654
+ "name": "since",
655
+ "hasDynamicHelp": false,
656
+ "multiple": false,
657
+ "type": "option"
658
+ },
659
+ "spam-score-gte": {
660
+ "description": "Only match emails with spam score greater than or equal to this value",
661
+ "name": "spam-score-gte",
662
+ "hasDynamicHelp": false,
663
+ "multiple": false,
664
+ "type": "option"
665
+ },
666
+ "spam-score-lt": {
667
+ "description": "Only match emails with spam score below this value",
668
+ "name": "spam-score-lt",
669
+ "hasDynamicHelp": false,
670
+ "multiple": false,
671
+ "type": "option"
672
+ },
673
+ "subject": {
674
+ "description": "Full-text subject filter",
675
+ "name": "subject",
676
+ "hasDynamicHelp": false,
677
+ "multiple": false,
678
+ "type": "option"
679
+ },
680
+ "table": {
681
+ "description": "Print a human-readable table instead of JSONL",
682
+ "name": "table",
409
683
  "allowNo": false,
410
684
  "type": "boolean"
685
+ },
686
+ "timeout": {
687
+ "description": "Seconds to wait before exiting nonzero; 0 waits forever",
688
+ "name": "timeout",
689
+ "default": 300,
690
+ "hasDynamicHelp": false,
691
+ "multiple": false,
692
+ "type": "option"
693
+ },
694
+ "to": {
695
+ "description": "Filter by recipient address or domain",
696
+ "name": "to",
697
+ "hasDynamicHelp": false,
698
+ "multiple": false,
699
+ "type": "option"
411
700
  }
412
701
  },
413
702
  "hasDynamicHelp": false,
414
703
  "hiddenAliases": [],
415
- "id": "account:get-storage-stats",
704
+ "id": "emails:wait",
416
705
  "pluginAlias": "@primitivedotdev/sdk",
417
706
  "pluginName": "@primitivedotdev/sdk",
418
707
  "pluginType": "core",
419
708
  "strict": true,
420
- "summary": "Get storage usage",
709
+ "summary": "Wait for matching inbound emails",
421
710
  "enableJsonFlag": false
422
711
  },
423
- "account:get-webhook-secret": {
712
+ "functions:deploy": {
424
713
  "aliases": [],
425
714
  "args": {},
426
- "description": "Returns the webhook signing secret for your account. If no\nsecret exists yet, one is generated automatically on first\naccess.\n\nSigning is account-scoped, not per-endpoint. Every webhook\ndelivery from any of your registered endpoints is signed\nwith this single secret. Rotate via\n`POST /account/webhook-secret/rotate`.\n\n**Secret format**: the returned string looks base64-shaped\n(e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.\nUse it AS-IS as a UTF-8 string when computing HMAC over a\ndelivery body. Base64-decoding before HMAC will silently\nproduce mismatched signatures.\n\nSee the API-level \"Webhook signing\" section for the full\nwire format (header name, signed string shape, hash algo,\ntolerance) including a language-agnostic verification\nrecipe.\n",
715
+ "description": "Deploy a new function from a bundled handler file. Agent-grade shortcut for functions:create-function.\n\n Reads the bundle off disk (--file) instead of forcing the caller to\n serialize the source into a JSON body. Use the underlying operation\n `functions:create-function` if you need the full flag surface\n (raw-body JSON, etc.).",
716
+ "examples": [
717
+ "<%= config.bin %> functions:deploy --name forwarder --file ./bundle.js",
718
+ "<%= config.bin %> functions:deploy --name forwarder --file ./bundle.js --source-map-file ./bundle.js.map"
719
+ ],
427
720
  "flags": {
428
721
  "api-key": {
429
722
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -433,10 +726,43 @@
433
726
  "multiple": false,
434
727
  "type": "option"
435
728
  },
436
- "base-url": {
437
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
438
- "env": "PRIMITIVE_API_URL",
439
- "name": "base-url",
729
+ "api-base-url-1": {
730
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
731
+ "env": "PRIMITIVE_API_BASE_URL_1",
732
+ "hidden": true,
733
+ "name": "api-base-url-1",
734
+ "hasDynamicHelp": false,
735
+ "multiple": false,
736
+ "type": "option"
737
+ },
738
+ "api-base-url-2": {
739
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
740
+ "env": "PRIMITIVE_API_BASE_URL_2",
741
+ "hidden": true,
742
+ "name": "api-base-url-2",
743
+ "hasDynamicHelp": false,
744
+ "multiple": false,
745
+ "type": "option"
746
+ },
747
+ "name": {
748
+ "description": "Slug-style name. Lowercase letters, digits, hyphens, underscores. 1-64 chars. Must be unique within the org.",
749
+ "name": "name",
750
+ "required": true,
751
+ "hasDynamicHelp": false,
752
+ "multiple": false,
753
+ "type": "option"
754
+ },
755
+ "file": {
756
+ "description": "Path to the bundled ESM handler file (single self-contained module). Loaded as the `code` body field.",
757
+ "name": "file",
758
+ "required": true,
759
+ "hasDynamicHelp": false,
760
+ "multiple": false,
761
+ "type": "option"
762
+ },
763
+ "source-map-file": {
764
+ "description": "Optional path to a source map for the bundle. Stored only on the runtime side and used to symbolicate stack traces.",
765
+ "name": "source-map-file",
440
766
  "hasDynamicHelp": false,
441
767
  "multiple": false,
442
768
  "type": "option"
@@ -450,18 +776,22 @@
450
776
  },
451
777
  "hasDynamicHelp": false,
452
778
  "hiddenAliases": [],
453
- "id": "account:get-webhook-secret",
779
+ "id": "functions:deploy",
454
780
  "pluginAlias": "@primitivedotdev/sdk",
455
781
  "pluginName": "@primitivedotdev/sdk",
456
782
  "pluginType": "core",
457
783
  "strict": true,
458
- "summary": "Get webhook signing secret",
784
+ "summary": "Deploy a new function from a bundled handler file",
459
785
  "enableJsonFlag": false
460
786
  },
461
- "account:rotate-webhook-secret": {
787
+ "functions:redeploy": {
462
788
  "aliases": [],
463
789
  "args": {},
464
- "description": "Generates a new webhook signing secret, replacing the current one.\nRate limited to once per 60 minutes.\n",
790
+ "description": "Update or redeploy a function from a bundled handler file. Agent-grade shortcut for functions:update-function.\n\n Use to push a new bundle OR to refresh secret bindings into the\n running handler. The same file is fine for both: the deploy reads\n the bindings table fresh on every call, so passing the existing\n bundle picks up any secret writes since the last deploy.",
791
+ "examples": [
792
+ "<%= config.bin %> functions:redeploy --id <fn-id> --file ./bundle.js",
793
+ "<%= config.bin %> functions:redeploy --id <fn-id> --file ./bundle.js --source-map-file ./bundle.js.map"
794
+ ],
465
795
  "flags": {
466
796
  "api-key": {
467
797
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -471,10 +801,43 @@
471
801
  "multiple": false,
472
802
  "type": "option"
473
803
  },
474
- "base-url": {
475
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
476
- "env": "PRIMITIVE_API_URL",
477
- "name": "base-url",
804
+ "api-base-url-1": {
805
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
806
+ "env": "PRIMITIVE_API_BASE_URL_1",
807
+ "hidden": true,
808
+ "name": "api-base-url-1",
809
+ "hasDynamicHelp": false,
810
+ "multiple": false,
811
+ "type": "option"
812
+ },
813
+ "api-base-url-2": {
814
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
815
+ "env": "PRIMITIVE_API_BASE_URL_2",
816
+ "hidden": true,
817
+ "name": "api-base-url-2",
818
+ "hasDynamicHelp": false,
819
+ "multiple": false,
820
+ "type": "option"
821
+ },
822
+ "id": {
823
+ "description": "Function id (UUID). The function must already exist.",
824
+ "name": "id",
825
+ "required": true,
826
+ "hasDynamicHelp": false,
827
+ "multiple": false,
828
+ "type": "option"
829
+ },
830
+ "file": {
831
+ "description": "Path to the bundled ESM handler file. Loaded as the `code` body field.",
832
+ "name": "file",
833
+ "required": true,
834
+ "hasDynamicHelp": false,
835
+ "multiple": false,
836
+ "type": "option"
837
+ },
838
+ "source-map-file": {
839
+ "description": "Optional path to a source map for the bundle. Used to symbolicate stack traces in the function's logs.",
840
+ "name": "source-map-file",
478
841
  "hasDynamicHelp": false,
479
842
  "multiple": false,
480
843
  "type": "option"
@@ -488,18 +851,18 @@
488
851
  },
489
852
  "hasDynamicHelp": false,
490
853
  "hiddenAliases": [],
491
- "id": "account:rotate-webhook-secret",
854
+ "id": "functions:redeploy",
492
855
  "pluginAlias": "@primitivedotdev/sdk",
493
856
  "pluginName": "@primitivedotdev/sdk",
494
857
  "pluginType": "core",
495
858
  "strict": true,
496
- "summary": "Rotate webhook signing secret",
859
+ "summary": "Redeploy a function from a bundled handler file",
497
860
  "enableJsonFlag": false
498
861
  },
499
- "account:update-account": {
862
+ "account:get-account": {
500
863
  "aliases": [],
501
864
  "args": {},
502
- "description": "PATCH /account",
865
+ "description": "GET /account",
503
866
  "flags": {
504
867
  "api-key": {
505
868
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -509,10 +872,20 @@
509
872
  "multiple": false,
510
873
  "type": "option"
511
874
  },
512
- "base-url": {
513
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
514
- "env": "PRIMITIVE_API_URL",
515
- "name": "base-url",
875
+ "api-base-url-1": {
876
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
877
+ "env": "PRIMITIVE_API_BASE_URL_1",
878
+ "hidden": true,
879
+ "name": "api-base-url-1",
880
+ "hasDynamicHelp": false,
881
+ "multiple": false,
882
+ "type": "option"
883
+ },
884
+ "api-base-url-2": {
885
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
886
+ "env": "PRIMITIVE_API_BASE_URL_2",
887
+ "hidden": true,
888
+ "name": "api-base-url-2",
516
889
  "hasDynamicHelp": false,
517
890
  "multiple": false,
518
891
  "type": "option"
@@ -522,18 +895,210 @@
522
895
  "name": "time",
523
896
  "allowNo": false,
524
897
  "type": "boolean"
525
- },
526
- "raw-body": {
527
- "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
528
- "name": "raw-body",
529
- "hasDynamicHelp": false,
530
- "multiple": false,
531
- "type": "option"
532
- },
533
- "body-file": {
534
- "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
535
- "name": "body-file",
536
- "hasDynamicHelp": false,
898
+ }
899
+ },
900
+ "hasDynamicHelp": false,
901
+ "hiddenAliases": [],
902
+ "id": "account:get-account",
903
+ "pluginAlias": "@primitivedotdev/sdk",
904
+ "pluginName": "@primitivedotdev/sdk",
905
+ "pluginType": "core",
906
+ "strict": true,
907
+ "summary": "Get account info",
908
+ "enableJsonFlag": false
909
+ },
910
+ "account:get-storage-stats": {
911
+ "aliases": [],
912
+ "args": {},
913
+ "description": "GET /account/storage",
914
+ "flags": {
915
+ "api-key": {
916
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
917
+ "env": "PRIMITIVE_API_KEY",
918
+ "name": "api-key",
919
+ "hasDynamicHelp": false,
920
+ "multiple": false,
921
+ "type": "option"
922
+ },
923
+ "api-base-url-1": {
924
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
925
+ "env": "PRIMITIVE_API_BASE_URL_1",
926
+ "hidden": true,
927
+ "name": "api-base-url-1",
928
+ "hasDynamicHelp": false,
929
+ "multiple": false,
930
+ "type": "option"
931
+ },
932
+ "api-base-url-2": {
933
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
934
+ "env": "PRIMITIVE_API_BASE_URL_2",
935
+ "hidden": true,
936
+ "name": "api-base-url-2",
937
+ "hasDynamicHelp": false,
938
+ "multiple": false,
939
+ "type": "option"
940
+ },
941
+ "time": {
942
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
943
+ "name": "time",
944
+ "allowNo": false,
945
+ "type": "boolean"
946
+ }
947
+ },
948
+ "hasDynamicHelp": false,
949
+ "hiddenAliases": [],
950
+ "id": "account:get-storage-stats",
951
+ "pluginAlias": "@primitivedotdev/sdk",
952
+ "pluginName": "@primitivedotdev/sdk",
953
+ "pluginType": "core",
954
+ "strict": true,
955
+ "summary": "Get storage usage",
956
+ "enableJsonFlag": false
957
+ },
958
+ "account:get-webhook-secret": {
959
+ "aliases": [],
960
+ "args": {},
961
+ "description": "Returns the webhook signing secret for your account. If no\nsecret exists yet, one is generated automatically on first\naccess.\n\nSigning is account-scoped, not per-endpoint. Every webhook\ndelivery from any of your registered endpoints is signed\nwith this single secret. Rotate via\n`POST /account/webhook-secret/rotate`.\n\n**Secret format**: the returned string looks base64-shaped\n(e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but is NOT base64.\nUse it AS-IS as a UTF-8 string when computing HMAC over a\ndelivery body. Base64-decoding before HMAC will silently\nproduce mismatched signatures.\n\nSee the API-level \"Webhook signing\" section for the full\nwire format (header name, signed string shape, hash algo,\ntolerance) including a language-agnostic verification\nrecipe.\n",
962
+ "flags": {
963
+ "api-key": {
964
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
965
+ "env": "PRIMITIVE_API_KEY",
966
+ "name": "api-key",
967
+ "hasDynamicHelp": false,
968
+ "multiple": false,
969
+ "type": "option"
970
+ },
971
+ "api-base-url-1": {
972
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
973
+ "env": "PRIMITIVE_API_BASE_URL_1",
974
+ "hidden": true,
975
+ "name": "api-base-url-1",
976
+ "hasDynamicHelp": false,
977
+ "multiple": false,
978
+ "type": "option"
979
+ },
980
+ "api-base-url-2": {
981
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
982
+ "env": "PRIMITIVE_API_BASE_URL_2",
983
+ "hidden": true,
984
+ "name": "api-base-url-2",
985
+ "hasDynamicHelp": false,
986
+ "multiple": false,
987
+ "type": "option"
988
+ },
989
+ "time": {
990
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
991
+ "name": "time",
992
+ "allowNo": false,
993
+ "type": "boolean"
994
+ }
995
+ },
996
+ "hasDynamicHelp": false,
997
+ "hiddenAliases": [],
998
+ "id": "account:get-webhook-secret",
999
+ "pluginAlias": "@primitivedotdev/sdk",
1000
+ "pluginName": "@primitivedotdev/sdk",
1001
+ "pluginType": "core",
1002
+ "strict": true,
1003
+ "summary": "Get webhook signing secret",
1004
+ "enableJsonFlag": false
1005
+ },
1006
+ "account:rotate-webhook-secret": {
1007
+ "aliases": [],
1008
+ "args": {},
1009
+ "description": "Generates a new webhook signing secret, replacing the current one.\nRate limited to once per 60 minutes.\n",
1010
+ "flags": {
1011
+ "api-key": {
1012
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
1013
+ "env": "PRIMITIVE_API_KEY",
1014
+ "name": "api-key",
1015
+ "hasDynamicHelp": false,
1016
+ "multiple": false,
1017
+ "type": "option"
1018
+ },
1019
+ "api-base-url-1": {
1020
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1021
+ "env": "PRIMITIVE_API_BASE_URL_1",
1022
+ "hidden": true,
1023
+ "name": "api-base-url-1",
1024
+ "hasDynamicHelp": false,
1025
+ "multiple": false,
1026
+ "type": "option"
1027
+ },
1028
+ "api-base-url-2": {
1029
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1030
+ "env": "PRIMITIVE_API_BASE_URL_2",
1031
+ "hidden": true,
1032
+ "name": "api-base-url-2",
1033
+ "hasDynamicHelp": false,
1034
+ "multiple": false,
1035
+ "type": "option"
1036
+ },
1037
+ "time": {
1038
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
1039
+ "name": "time",
1040
+ "allowNo": false,
1041
+ "type": "boolean"
1042
+ }
1043
+ },
1044
+ "hasDynamicHelp": false,
1045
+ "hiddenAliases": [],
1046
+ "id": "account:rotate-webhook-secret",
1047
+ "pluginAlias": "@primitivedotdev/sdk",
1048
+ "pluginName": "@primitivedotdev/sdk",
1049
+ "pluginType": "core",
1050
+ "strict": true,
1051
+ "summary": "Rotate webhook signing secret",
1052
+ "enableJsonFlag": false
1053
+ },
1054
+ "account:update-account": {
1055
+ "aliases": [],
1056
+ "args": {},
1057
+ "description": "PATCH /account",
1058
+ "flags": {
1059
+ "api-key": {
1060
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
1061
+ "env": "PRIMITIVE_API_KEY",
1062
+ "name": "api-key",
1063
+ "hasDynamicHelp": false,
1064
+ "multiple": false,
1065
+ "type": "option"
1066
+ },
1067
+ "api-base-url-1": {
1068
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1069
+ "env": "PRIMITIVE_API_BASE_URL_1",
1070
+ "hidden": true,
1071
+ "name": "api-base-url-1",
1072
+ "hasDynamicHelp": false,
1073
+ "multiple": false,
1074
+ "type": "option"
1075
+ },
1076
+ "api-base-url-2": {
1077
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1078
+ "env": "PRIMITIVE_API_BASE_URL_2",
1079
+ "hidden": true,
1080
+ "name": "api-base-url-2",
1081
+ "hasDynamicHelp": false,
1082
+ "multiple": false,
1083
+ "type": "option"
1084
+ },
1085
+ "time": {
1086
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
1087
+ "name": "time",
1088
+ "allowNo": false,
1089
+ "type": "boolean"
1090
+ },
1091
+ "raw-body": {
1092
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
1093
+ "name": "raw-body",
1094
+ "hasDynamicHelp": false,
1095
+ "multiple": false,
1096
+ "type": "option"
1097
+ },
1098
+ "body-file": {
1099
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
1100
+ "name": "body-file",
1101
+ "hasDynamicHelp": false,
537
1102
  "multiple": false,
538
1103
  "type": "option"
539
1104
  },
@@ -574,10 +1139,20 @@
574
1139
  "multiple": false,
575
1140
  "type": "option"
576
1141
  },
577
- "base-url": {
578
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
579
- "env": "PRIMITIVE_API_URL",
580
- "name": "base-url",
1142
+ "api-base-url-1": {
1143
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1144
+ "env": "PRIMITIVE_API_BASE_URL_1",
1145
+ "hidden": true,
1146
+ "name": "api-base-url-1",
1147
+ "hasDynamicHelp": false,
1148
+ "multiple": false,
1149
+ "type": "option"
1150
+ },
1151
+ "api-base-url-2": {
1152
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1153
+ "env": "PRIMITIVE_API_BASE_URL_2",
1154
+ "hidden": true,
1155
+ "name": "api-base-url-2",
581
1156
  "hasDynamicHelp": false,
582
1157
  "multiple": false,
583
1158
  "type": "option"
@@ -633,10 +1208,20 @@
633
1208
  "multiple": false,
634
1209
  "type": "option"
635
1210
  },
636
- "base-url": {
637
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
638
- "env": "PRIMITIVE_API_URL",
639
- "name": "base-url",
1211
+ "api-base-url-1": {
1212
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1213
+ "env": "PRIMITIVE_API_BASE_URL_1",
1214
+ "hidden": true,
1215
+ "name": "api-base-url-1",
1216
+ "hasDynamicHelp": false,
1217
+ "multiple": false,
1218
+ "type": "option"
1219
+ },
1220
+ "api-base-url-2": {
1221
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1222
+ "env": "PRIMITIVE_API_BASE_URL_2",
1223
+ "hidden": true,
1224
+ "name": "api-base-url-2",
640
1225
  "hasDynamicHelp": false,
641
1226
  "multiple": false,
642
1227
  "type": "option"
@@ -692,10 +1277,20 @@
692
1277
  "multiple": false,
693
1278
  "type": "option"
694
1279
  },
695
- "base-url": {
696
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
697
- "env": "PRIMITIVE_API_URL",
698
- "name": "base-url",
1280
+ "api-base-url-1": {
1281
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1282
+ "env": "PRIMITIVE_API_BASE_URL_1",
1283
+ "hidden": true,
1284
+ "name": "api-base-url-1",
1285
+ "hasDynamicHelp": false,
1286
+ "multiple": false,
1287
+ "type": "option"
1288
+ },
1289
+ "api-base-url-2": {
1290
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1291
+ "env": "PRIMITIVE_API_BASE_URL_2",
1292
+ "hidden": true,
1293
+ "name": "api-base-url-2",
699
1294
  "hasDynamicHelp": false,
700
1295
  "multiple": false,
701
1296
  "type": "option"
@@ -751,10 +1346,20 @@
751
1346
  "multiple": false,
752
1347
  "type": "option"
753
1348
  },
754
- "base-url": {
755
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
756
- "env": "PRIMITIVE_API_URL",
757
- "name": "base-url",
1349
+ "api-base-url-1": {
1350
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1351
+ "env": "PRIMITIVE_API_BASE_URL_1",
1352
+ "hidden": true,
1353
+ "name": "api-base-url-1",
1354
+ "hasDynamicHelp": false,
1355
+ "multiple": false,
1356
+ "type": "option"
1357
+ },
1358
+ "api-base-url-2": {
1359
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1360
+ "env": "PRIMITIVE_API_BASE_URL_2",
1361
+ "hidden": true,
1362
+ "name": "api-base-url-2",
758
1363
  "hasDynamicHelp": false,
759
1364
  "multiple": false,
760
1365
  "type": "option"
@@ -810,10 +1415,20 @@
810
1415
  "multiple": false,
811
1416
  "type": "option"
812
1417
  },
813
- "base-url": {
814
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
815
- "env": "PRIMITIVE_API_URL",
816
- "name": "base-url",
1418
+ "api-base-url-1": {
1419
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1420
+ "env": "PRIMITIVE_API_BASE_URL_1",
1421
+ "hidden": true,
1422
+ "name": "api-base-url-1",
1423
+ "hasDynamicHelp": false,
1424
+ "multiple": false,
1425
+ "type": "option"
1426
+ },
1427
+ "api-base-url-2": {
1428
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1429
+ "env": "PRIMITIVE_API_BASE_URL_2",
1430
+ "hidden": true,
1431
+ "name": "api-base-url-2",
817
1432
  "hasDynamicHelp": false,
818
1433
  "multiple": false,
819
1434
  "type": "option"
@@ -856,10 +1471,20 @@
856
1471
  "multiple": false,
857
1472
  "type": "option"
858
1473
  },
859
- "base-url": {
860
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
861
- "env": "PRIMITIVE_API_URL",
862
- "name": "base-url",
1474
+ "api-base-url-1": {
1475
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1476
+ "env": "PRIMITIVE_API_BASE_URL_1",
1477
+ "hidden": true,
1478
+ "name": "api-base-url-1",
1479
+ "hasDynamicHelp": false,
1480
+ "multiple": false,
1481
+ "type": "option"
1482
+ },
1483
+ "api-base-url-2": {
1484
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1485
+ "env": "PRIMITIVE_API_BASE_URL_2",
1486
+ "hidden": true,
1487
+ "name": "api-base-url-2",
863
1488
  "hasDynamicHelp": false,
864
1489
  "multiple": false,
865
1490
  "type": "option"
@@ -894,10 +1519,20 @@
894
1519
  "multiple": false,
895
1520
  "type": "option"
896
1521
  },
897
- "base-url": {
898
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
899
- "env": "PRIMITIVE_API_URL",
900
- "name": "base-url",
1522
+ "api-base-url-1": {
1523
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1524
+ "env": "PRIMITIVE_API_BASE_URL_1",
1525
+ "hidden": true,
1526
+ "name": "api-base-url-1",
1527
+ "hasDynamicHelp": false,
1528
+ "multiple": false,
1529
+ "type": "option"
1530
+ },
1531
+ "api-base-url-2": {
1532
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1533
+ "env": "PRIMITIVE_API_BASE_URL_2",
1534
+ "hidden": true,
1535
+ "name": "api-base-url-2",
901
1536
  "hasDynamicHelp": false,
902
1537
  "multiple": false,
903
1538
  "type": "option"
@@ -967,10 +1602,20 @@
967
1602
  "multiple": false,
968
1603
  "type": "option"
969
1604
  },
970
- "base-url": {
971
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
972
- "env": "PRIMITIVE_API_URL",
973
- "name": "base-url",
1605
+ "api-base-url-1": {
1606
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1607
+ "env": "PRIMITIVE_API_BASE_URL_1",
1608
+ "hidden": true,
1609
+ "name": "api-base-url-1",
1610
+ "hasDynamicHelp": false,
1611
+ "multiple": false,
1612
+ "type": "option"
1613
+ },
1614
+ "api-base-url-2": {
1615
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1616
+ "env": "PRIMITIVE_API_BASE_URL_2",
1617
+ "hidden": true,
1618
+ "name": "api-base-url-2",
974
1619
  "hasDynamicHelp": false,
975
1620
  "multiple": false,
976
1621
  "type": "option"
@@ -1013,10 +1658,20 @@
1013
1658
  "multiple": false,
1014
1659
  "type": "option"
1015
1660
  },
1016
- "base-url": {
1017
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1018
- "env": "PRIMITIVE_API_URL",
1019
- "name": "base-url",
1661
+ "api-base-url-1": {
1662
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1663
+ "env": "PRIMITIVE_API_BASE_URL_1",
1664
+ "hidden": true,
1665
+ "name": "api-base-url-1",
1666
+ "hasDynamicHelp": false,
1667
+ "multiple": false,
1668
+ "type": "option"
1669
+ },
1670
+ "api-base-url-2": {
1671
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1672
+ "env": "PRIMITIVE_API_BASE_URL_2",
1673
+ "hidden": true,
1674
+ "name": "api-base-url-2",
1020
1675
  "hasDynamicHelp": false,
1021
1676
  "multiple": false,
1022
1677
  "type": "option"
@@ -1059,10 +1714,20 @@
1059
1714
  "multiple": false,
1060
1715
  "type": "option"
1061
1716
  },
1062
- "base-url": {
1063
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1064
- "env": "PRIMITIVE_API_URL",
1065
- "name": "base-url",
1717
+ "api-base-url-1": {
1718
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1719
+ "env": "PRIMITIVE_API_BASE_URL_1",
1720
+ "hidden": true,
1721
+ "name": "api-base-url-1",
1722
+ "hasDynamicHelp": false,
1723
+ "multiple": false,
1724
+ "type": "option"
1725
+ },
1726
+ "api-base-url-2": {
1727
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1728
+ "env": "PRIMITIVE_API_BASE_URL_2",
1729
+ "hidden": true,
1730
+ "name": "api-base-url-2",
1066
1731
  "hasDynamicHelp": false,
1067
1732
  "multiple": false,
1068
1733
  "type": "option"
@@ -1105,10 +1770,20 @@
1105
1770
  "multiple": false,
1106
1771
  "type": "option"
1107
1772
  },
1108
- "base-url": {
1109
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1110
- "env": "PRIMITIVE_API_URL",
1111
- "name": "base-url",
1773
+ "api-base-url-1": {
1774
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1775
+ "env": "PRIMITIVE_API_BASE_URL_1",
1776
+ "hidden": true,
1777
+ "name": "api-base-url-1",
1778
+ "hasDynamicHelp": false,
1779
+ "multiple": false,
1780
+ "type": "option"
1781
+ },
1782
+ "api-base-url-2": {
1783
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1784
+ "env": "PRIMITIVE_API_BASE_URL_2",
1785
+ "hidden": true,
1786
+ "name": "api-base-url-2",
1112
1787
  "hasDynamicHelp": false,
1113
1788
  "multiple": false,
1114
1789
  "type": "option"
@@ -1166,10 +1841,20 @@
1166
1841
  "multiple": false,
1167
1842
  "type": "option"
1168
1843
  },
1169
- "base-url": {
1170
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1171
- "env": "PRIMITIVE_API_URL",
1172
- "name": "base-url",
1844
+ "api-base-url-1": {
1845
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1846
+ "env": "PRIMITIVE_API_BASE_URL_1",
1847
+ "hidden": true,
1848
+ "name": "api-base-url-1",
1849
+ "hasDynamicHelp": false,
1850
+ "multiple": false,
1851
+ "type": "option"
1852
+ },
1853
+ "api-base-url-2": {
1854
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1855
+ "env": "PRIMITIVE_API_BASE_URL_2",
1856
+ "hidden": true,
1857
+ "name": "api-base-url-2",
1173
1858
  "hasDynamicHelp": false,
1174
1859
  "multiple": false,
1175
1860
  "type": "option"
@@ -1227,10 +1912,20 @@
1227
1912
  "multiple": false,
1228
1913
  "type": "option"
1229
1914
  },
1230
- "base-url": {
1231
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1232
- "env": "PRIMITIVE_API_URL",
1233
- "name": "base-url",
1915
+ "api-base-url-1": {
1916
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1917
+ "env": "PRIMITIVE_API_BASE_URL_1",
1918
+ "hidden": true,
1919
+ "name": "api-base-url-1",
1920
+ "hasDynamicHelp": false,
1921
+ "multiple": false,
1922
+ "type": "option"
1923
+ },
1924
+ "api-base-url-2": {
1925
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1926
+ "env": "PRIMITIVE_API_BASE_URL_2",
1927
+ "hidden": true,
1928
+ "name": "api-base-url-2",
1234
1929
  "hasDynamicHelp": false,
1235
1930
  "multiple": false,
1236
1931
  "type": "option"
@@ -1273,10 +1968,20 @@
1273
1968
  "multiple": false,
1274
1969
  "type": "option"
1275
1970
  },
1276
- "base-url": {
1277
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1278
- "env": "PRIMITIVE_API_URL",
1279
- "name": "base-url",
1971
+ "api-base-url-1": {
1972
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
1973
+ "env": "PRIMITIVE_API_BASE_URL_1",
1974
+ "hidden": true,
1975
+ "name": "api-base-url-1",
1976
+ "hasDynamicHelp": false,
1977
+ "multiple": false,
1978
+ "type": "option"
1979
+ },
1980
+ "api-base-url-2": {
1981
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
1982
+ "env": "PRIMITIVE_API_BASE_URL_2",
1983
+ "hidden": true,
1984
+ "name": "api-base-url-2",
1280
1985
  "hasDynamicHelp": false,
1281
1986
  "multiple": false,
1282
1987
  "type": "option"
@@ -1367,24 +2072,917 @@
1367
2072
  "multiple": false,
1368
2073
  "type": "option"
1369
2074
  },
1370
- "base-url": {
1371
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1372
- "env": "PRIMITIVE_API_URL",
1373
- "name": "base-url",
2075
+ "api-base-url-1": {
2076
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2077
+ "env": "PRIMITIVE_API_BASE_URL_1",
2078
+ "hidden": true,
2079
+ "name": "api-base-url-1",
2080
+ "hasDynamicHelp": false,
2081
+ "multiple": false,
2082
+ "type": "option"
2083
+ },
2084
+ "api-base-url-2": {
2085
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2086
+ "env": "PRIMITIVE_API_BASE_URL_2",
2087
+ "hidden": true,
2088
+ "name": "api-base-url-2",
2089
+ "hasDynamicHelp": false,
2090
+ "multiple": false,
2091
+ "type": "option"
2092
+ },
2093
+ "time": {
2094
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2095
+ "name": "time",
2096
+ "allowNo": false,
2097
+ "type": "boolean"
2098
+ },
2099
+ "id": {
2100
+ "description": "Resource UUID",
2101
+ "name": "id",
2102
+ "required": true,
2103
+ "hasDynamicHelp": false,
2104
+ "multiple": false,
2105
+ "type": "option"
2106
+ }
2107
+ },
2108
+ "hasDynamicHelp": false,
2109
+ "hiddenAliases": [],
2110
+ "id": "emails:replay-email-webhooks",
2111
+ "pluginAlias": "@primitivedotdev/sdk",
2112
+ "pluginName": "@primitivedotdev/sdk",
2113
+ "pluginType": "core",
2114
+ "strict": true,
2115
+ "summary": "Replay email webhooks",
2116
+ "enableJsonFlag": false
2117
+ },
2118
+ "emails:search-emails": {
2119
+ "aliases": [],
2120
+ "args": {},
2121
+ "description": "Searches inbound emails with structured filters and optional\nfull-text matching across parsed email fields. This endpoint is\noptimized for filtered inbox views and CLI polling workflows:\ncallers that only need new accepted mail can pass\n`sort=received_at_asc`, `snippet=false`, `include_facets=false`,\nand a `date_from` timestamp.\n\n`q`, `subject`, and `body` use the same English full-text index\nas the web inbox search. Structured filters such as `from`, `to`,\n`domain_id`, status, attachment presence, and spam score bounds\nare combined with the text query.\n",
2122
+ "flags": {
2123
+ "api-key": {
2124
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2125
+ "env": "PRIMITIVE_API_KEY",
2126
+ "name": "api-key",
2127
+ "hasDynamicHelp": false,
2128
+ "multiple": false,
2129
+ "type": "option"
2130
+ },
2131
+ "api-base-url-1": {
2132
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2133
+ "env": "PRIMITIVE_API_BASE_URL_1",
2134
+ "hidden": true,
2135
+ "name": "api-base-url-1",
2136
+ "hasDynamicHelp": false,
2137
+ "multiple": false,
2138
+ "type": "option"
2139
+ },
2140
+ "api-base-url-2": {
2141
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2142
+ "env": "PRIMITIVE_API_BASE_URL_2",
2143
+ "hidden": true,
2144
+ "name": "api-base-url-2",
2145
+ "hasDynamicHelp": false,
2146
+ "multiple": false,
2147
+ "type": "option"
2148
+ },
2149
+ "time": {
2150
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2151
+ "name": "time",
2152
+ "allowNo": false,
2153
+ "type": "boolean"
2154
+ },
2155
+ "q": {
2156
+ "description": "Full-text search DSL query.",
2157
+ "name": "q",
2158
+ "required": false,
2159
+ "hasDynamicHelp": false,
2160
+ "multiple": false,
2161
+ "type": "option"
2162
+ },
2163
+ "from": {
2164
+ "description": "Filter by sender address or sender domain.",
2165
+ "name": "from",
2166
+ "required": false,
2167
+ "hasDynamicHelp": false,
2168
+ "multiple": false,
2169
+ "type": "option"
2170
+ },
2171
+ "to": {
2172
+ "description": "Filter by recipient address or recipient domain.",
2173
+ "name": "to",
2174
+ "required": false,
2175
+ "hasDynamicHelp": false,
2176
+ "multiple": false,
2177
+ "type": "option"
2178
+ },
2179
+ "subject": {
2180
+ "description": "Full-text search restricted to the subject field.",
2181
+ "name": "subject",
2182
+ "required": false,
2183
+ "hasDynamicHelp": false,
2184
+ "multiple": false,
2185
+ "type": "option"
2186
+ },
2187
+ "body": {
2188
+ "description": "Full-text search restricted to the parsed text body.",
2189
+ "name": "body",
2190
+ "required": false,
2191
+ "hasDynamicHelp": false,
2192
+ "multiple": false,
2193
+ "type": "option"
2194
+ },
2195
+ "domain-id": {
2196
+ "description": "Filter by domain ID.",
2197
+ "name": "domain-id",
2198
+ "required": false,
2199
+ "hasDynamicHelp": false,
2200
+ "multiple": false,
2201
+ "type": "option"
2202
+ },
2203
+ "status": {
2204
+ "description": "Filter by inbound email lifecycle status.",
2205
+ "name": "status",
2206
+ "required": false,
2207
+ "hasDynamicHelp": false,
2208
+ "multiple": false,
2209
+ "type": "option"
2210
+ },
2211
+ "date-from": {
2212
+ "description": "Filter emails received on or after this timestamp.",
2213
+ "name": "date-from",
2214
+ "required": false,
2215
+ "hasDynamicHelp": false,
2216
+ "multiple": false,
2217
+ "type": "option"
2218
+ },
2219
+ "date-to": {
2220
+ "description": "Filter emails received on or before this timestamp.",
2221
+ "name": "date-to",
2222
+ "required": false,
2223
+ "hasDynamicHelp": false,
2224
+ "multiple": false,
2225
+ "type": "option"
2226
+ },
2227
+ "has-attachment": {
2228
+ "description": "Filter by whether the email has one or more attachments.",
2229
+ "name": "has-attachment",
2230
+ "required": false,
2231
+ "hasDynamicHelp": false,
2232
+ "multiple": false,
2233
+ "options": [
2234
+ "true",
2235
+ "false"
2236
+ ],
2237
+ "type": "option"
2238
+ },
2239
+ "spam-score-lt": {
2240
+ "description": "Filter to emails with spam score below this value.",
2241
+ "name": "spam-score-lt",
2242
+ "required": false,
2243
+ "hasDynamicHelp": false,
2244
+ "multiple": false,
2245
+ "type": "option"
2246
+ },
2247
+ "spam-score-gte": {
2248
+ "description": "Filter to emails with spam score greater than or equal to this value.",
2249
+ "name": "spam-score-gte",
2250
+ "required": false,
2251
+ "hasDynamicHelp": false,
2252
+ "multiple": false,
2253
+ "type": "option"
2254
+ },
2255
+ "sort": {
2256
+ "description": "Sort mode. Defaults to relevance when a text query is present,\notherwise `received_at_desc`.\n",
2257
+ "name": "sort",
2258
+ "required": false,
2259
+ "hasDynamicHelp": false,
2260
+ "multiple": false,
2261
+ "options": [
2262
+ "relevance",
2263
+ "received_at_desc",
2264
+ "received_at_asc"
2265
+ ],
2266
+ "type": "option"
2267
+ },
2268
+ "cursor": {
2269
+ "description": "Opaque pagination cursor from a previous search response.",
2270
+ "name": "cursor",
2271
+ "required": false,
2272
+ "hasDynamicHelp": false,
2273
+ "multiple": false,
2274
+ "type": "option"
2275
+ },
2276
+ "limit": {
2277
+ "description": "Number of results per page",
2278
+ "name": "limit",
2279
+ "required": false,
2280
+ "hasDynamicHelp": false,
2281
+ "multiple": false,
2282
+ "type": "option"
2283
+ },
2284
+ "snippet": {
2285
+ "description": "Include subject/body highlight snippets when text search is active.",
2286
+ "name": "snippet",
2287
+ "required": false,
2288
+ "hasDynamicHelp": false,
2289
+ "multiple": false,
2290
+ "options": [
2291
+ "true",
2292
+ "false"
2293
+ ],
2294
+ "type": "option"
2295
+ },
2296
+ "include-facets": {
2297
+ "description": "Include facet counts for sender, domain, status, and attachment presence.",
2298
+ "name": "include-facets",
2299
+ "required": false,
2300
+ "hasDynamicHelp": false,
2301
+ "multiple": false,
2302
+ "options": [
2303
+ "true",
2304
+ "false"
2305
+ ],
2306
+ "type": "option"
2307
+ }
2308
+ },
2309
+ "hasDynamicHelp": false,
2310
+ "hiddenAliases": [],
2311
+ "id": "emails:search-emails",
2312
+ "pluginAlias": "@primitivedotdev/sdk",
2313
+ "pluginName": "@primitivedotdev/sdk",
2314
+ "pluginType": "core",
2315
+ "strict": true,
2316
+ "summary": "Search inbound emails",
2317
+ "enableJsonFlag": false
2318
+ },
2319
+ "endpoints:create-endpoint": {
2320
+ "aliases": [],
2321
+ "args": {},
2322
+ "description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n\n\nBody fields requiring --raw-body JSON (these are not exposed as flags):\n rules object Endpoint-specific filtering rules\n(* = required. Scalar body fields are exposed as individual --flag-name flags; see FLAGS above.)",
2323
+ "flags": {
2324
+ "api-key": {
2325
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2326
+ "env": "PRIMITIVE_API_KEY",
2327
+ "name": "api-key",
2328
+ "hasDynamicHelp": false,
2329
+ "multiple": false,
2330
+ "type": "option"
2331
+ },
2332
+ "api-base-url-1": {
2333
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2334
+ "env": "PRIMITIVE_API_BASE_URL_1",
2335
+ "hidden": true,
2336
+ "name": "api-base-url-1",
2337
+ "hasDynamicHelp": false,
2338
+ "multiple": false,
2339
+ "type": "option"
2340
+ },
2341
+ "api-base-url-2": {
2342
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2343
+ "env": "PRIMITIVE_API_BASE_URL_2",
2344
+ "hidden": true,
2345
+ "name": "api-base-url-2",
2346
+ "hasDynamicHelp": false,
2347
+ "multiple": false,
2348
+ "type": "option"
2349
+ },
2350
+ "time": {
2351
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2352
+ "name": "time",
2353
+ "allowNo": false,
2354
+ "type": "boolean"
2355
+ },
2356
+ "raw-body": {
2357
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
2358
+ "name": "raw-body",
2359
+ "hasDynamicHelp": false,
2360
+ "multiple": false,
2361
+ "type": "option"
2362
+ },
2363
+ "body-file": {
2364
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2365
+ "name": "body-file",
2366
+ "hasDynamicHelp": false,
2367
+ "multiple": false,
2368
+ "type": "option"
2369
+ },
2370
+ "url": {
2371
+ "description": "The webhook URL to deliver events to",
2372
+ "name": "url",
2373
+ "hasDynamicHelp": false,
2374
+ "multiple": false,
2375
+ "type": "option"
2376
+ },
2377
+ "domain-id": {
2378
+ "description": "Restrict to emails from a specific domain",
2379
+ "name": "domain-id",
2380
+ "hasDynamicHelp": false,
2381
+ "multiple": false,
2382
+ "type": "option"
2383
+ },
2384
+ "enabled": {
2385
+ "description": "Whether the endpoint is active",
2386
+ "name": "enabled",
2387
+ "allowNo": false,
2388
+ "type": "boolean"
2389
+ }
2390
+ },
2391
+ "hasDynamicHelp": false,
2392
+ "hiddenAliases": [],
2393
+ "id": "endpoints:create-endpoint",
2394
+ "pluginAlias": "@primitivedotdev/sdk",
2395
+ "pluginName": "@primitivedotdev/sdk",
2396
+ "pluginType": "core",
2397
+ "strict": true,
2398
+ "summary": "Create a webhook endpoint",
2399
+ "enableJsonFlag": false
2400
+ },
2401
+ "endpoints:delete-endpoint": {
2402
+ "aliases": [],
2403
+ "args": {},
2404
+ "description": "Soft-deletes a webhook endpoint. The endpoint will no longer\nreceive webhook deliveries.\n",
2405
+ "flags": {
2406
+ "api-key": {
2407
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2408
+ "env": "PRIMITIVE_API_KEY",
2409
+ "name": "api-key",
2410
+ "hasDynamicHelp": false,
2411
+ "multiple": false,
2412
+ "type": "option"
2413
+ },
2414
+ "api-base-url-1": {
2415
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2416
+ "env": "PRIMITIVE_API_BASE_URL_1",
2417
+ "hidden": true,
2418
+ "name": "api-base-url-1",
2419
+ "hasDynamicHelp": false,
2420
+ "multiple": false,
2421
+ "type": "option"
2422
+ },
2423
+ "api-base-url-2": {
2424
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2425
+ "env": "PRIMITIVE_API_BASE_URL_2",
2426
+ "hidden": true,
2427
+ "name": "api-base-url-2",
2428
+ "hasDynamicHelp": false,
2429
+ "multiple": false,
2430
+ "type": "option"
2431
+ },
2432
+ "time": {
2433
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2434
+ "name": "time",
2435
+ "allowNo": false,
2436
+ "type": "boolean"
2437
+ },
2438
+ "id": {
2439
+ "description": "Resource UUID",
2440
+ "name": "id",
2441
+ "required": true,
2442
+ "hasDynamicHelp": false,
2443
+ "multiple": false,
2444
+ "type": "option"
2445
+ }
2446
+ },
2447
+ "hasDynamicHelp": false,
2448
+ "hiddenAliases": [],
2449
+ "id": "endpoints:delete-endpoint",
2450
+ "pluginAlias": "@primitivedotdev/sdk",
2451
+ "pluginName": "@primitivedotdev/sdk",
2452
+ "pluginType": "core",
2453
+ "strict": true,
2454
+ "summary": "Delete a webhook endpoint",
2455
+ "enableJsonFlag": false
2456
+ },
2457
+ "endpoints:list-endpoints": {
2458
+ "aliases": [],
2459
+ "args": {},
2460
+ "description": "Returns all active (non-deleted) webhook endpoints.",
2461
+ "flags": {
2462
+ "api-key": {
2463
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2464
+ "env": "PRIMITIVE_API_KEY",
2465
+ "name": "api-key",
2466
+ "hasDynamicHelp": false,
2467
+ "multiple": false,
2468
+ "type": "option"
2469
+ },
2470
+ "api-base-url-1": {
2471
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2472
+ "env": "PRIMITIVE_API_BASE_URL_1",
2473
+ "hidden": true,
2474
+ "name": "api-base-url-1",
2475
+ "hasDynamicHelp": false,
2476
+ "multiple": false,
2477
+ "type": "option"
2478
+ },
2479
+ "api-base-url-2": {
2480
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2481
+ "env": "PRIMITIVE_API_BASE_URL_2",
2482
+ "hidden": true,
2483
+ "name": "api-base-url-2",
2484
+ "hasDynamicHelp": false,
2485
+ "multiple": false,
2486
+ "type": "option"
2487
+ },
2488
+ "time": {
2489
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2490
+ "name": "time",
2491
+ "allowNo": false,
2492
+ "type": "boolean"
2493
+ }
2494
+ },
2495
+ "hasDynamicHelp": false,
2496
+ "hiddenAliases": [],
2497
+ "id": "endpoints:list-endpoints",
2498
+ "pluginAlias": "@primitivedotdev/sdk",
2499
+ "pluginName": "@primitivedotdev/sdk",
2500
+ "pluginType": "core",
2501
+ "strict": true,
2502
+ "summary": "List webhook endpoints",
2503
+ "enableJsonFlag": false
2504
+ },
2505
+ "endpoints:test-endpoint": {
2506
+ "aliases": [],
2507
+ "args": {},
2508
+ "description": "Sends a sample `email.received` event to the endpoint. The request\nincludes SSRF protection (private IP rejection and DNS pinning).\nRate limited to 4 per minute and 30 per hour (non-exempt).\nSuccessful deliveries and verified-domain endpoints are exempt\nfrom the rate limit.\n",
2509
+ "flags": {
2510
+ "api-key": {
2511
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2512
+ "env": "PRIMITIVE_API_KEY",
2513
+ "name": "api-key",
2514
+ "hasDynamicHelp": false,
2515
+ "multiple": false,
2516
+ "type": "option"
2517
+ },
2518
+ "api-base-url-1": {
2519
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2520
+ "env": "PRIMITIVE_API_BASE_URL_1",
2521
+ "hidden": true,
2522
+ "name": "api-base-url-1",
2523
+ "hasDynamicHelp": false,
2524
+ "multiple": false,
2525
+ "type": "option"
2526
+ },
2527
+ "api-base-url-2": {
2528
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2529
+ "env": "PRIMITIVE_API_BASE_URL_2",
2530
+ "hidden": true,
2531
+ "name": "api-base-url-2",
2532
+ "hasDynamicHelp": false,
2533
+ "multiple": false,
2534
+ "type": "option"
2535
+ },
2536
+ "time": {
2537
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2538
+ "name": "time",
2539
+ "allowNo": false,
2540
+ "type": "boolean"
2541
+ },
2542
+ "id": {
2543
+ "description": "Resource UUID",
2544
+ "name": "id",
2545
+ "required": true,
2546
+ "hasDynamicHelp": false,
2547
+ "multiple": false,
2548
+ "type": "option"
2549
+ }
2550
+ },
2551
+ "hasDynamicHelp": false,
2552
+ "hiddenAliases": [],
2553
+ "id": "endpoints:test-endpoint",
2554
+ "pluginAlias": "@primitivedotdev/sdk",
2555
+ "pluginName": "@primitivedotdev/sdk",
2556
+ "pluginType": "core",
2557
+ "strict": true,
2558
+ "summary": "Send a test webhook",
2559
+ "enableJsonFlag": false
2560
+ },
2561
+ "endpoints:update-endpoint": {
2562
+ "aliases": [],
2563
+ "args": {},
2564
+ "description": "Updates an active webhook endpoint. If the URL is changed, the old\nendpoint is deactivated and a new one is created (or an existing\ndeactivated endpoint with the new URL is reactivated).\n\n\nBody fields requiring --raw-body JSON (these are not exposed as flags):\n rules object\n(* = required. Scalar body fields are exposed as individual --flag-name flags; see FLAGS above.)",
2565
+ "flags": {
2566
+ "api-key": {
2567
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2568
+ "env": "PRIMITIVE_API_KEY",
2569
+ "name": "api-key",
2570
+ "hasDynamicHelp": false,
2571
+ "multiple": false,
2572
+ "type": "option"
2573
+ },
2574
+ "api-base-url-1": {
2575
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2576
+ "env": "PRIMITIVE_API_BASE_URL_1",
2577
+ "hidden": true,
2578
+ "name": "api-base-url-1",
2579
+ "hasDynamicHelp": false,
2580
+ "multiple": false,
2581
+ "type": "option"
2582
+ },
2583
+ "api-base-url-2": {
2584
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2585
+ "env": "PRIMITIVE_API_BASE_URL_2",
2586
+ "hidden": true,
2587
+ "name": "api-base-url-2",
2588
+ "hasDynamicHelp": false,
2589
+ "multiple": false,
2590
+ "type": "option"
2591
+ },
2592
+ "time": {
2593
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2594
+ "name": "time",
2595
+ "allowNo": false,
2596
+ "type": "boolean"
2597
+ },
2598
+ "id": {
2599
+ "description": "Resource UUID",
2600
+ "name": "id",
2601
+ "required": true,
2602
+ "hasDynamicHelp": false,
2603
+ "multiple": false,
2604
+ "type": "option"
2605
+ },
2606
+ "raw-body": {
2607
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
2608
+ "name": "raw-body",
2609
+ "hasDynamicHelp": false,
2610
+ "multiple": false,
2611
+ "type": "option"
2612
+ },
2613
+ "body-file": {
2614
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2615
+ "name": "body-file",
2616
+ "hasDynamicHelp": false,
2617
+ "multiple": false,
2618
+ "type": "option"
2619
+ },
2620
+ "domain-id": {
2621
+ "description": "domain_id",
2622
+ "name": "domain-id",
2623
+ "hasDynamicHelp": false,
2624
+ "multiple": false,
2625
+ "type": "option"
2626
+ },
2627
+ "enabled": {
2628
+ "description": "enabled",
2629
+ "name": "enabled",
2630
+ "allowNo": false,
2631
+ "type": "boolean"
2632
+ },
2633
+ "url": {
2634
+ "description": "New webhook URL (triggers endpoint rotation)",
2635
+ "name": "url",
2636
+ "hasDynamicHelp": false,
2637
+ "multiple": false,
2638
+ "type": "option"
2639
+ }
2640
+ },
2641
+ "hasDynamicHelp": false,
2642
+ "hiddenAliases": [],
2643
+ "id": "endpoints:update-endpoint",
2644
+ "pluginAlias": "@primitivedotdev/sdk",
2645
+ "pluginName": "@primitivedotdev/sdk",
2646
+ "pluginType": "core",
2647
+ "strict": true,
2648
+ "summary": "Update a webhook endpoint",
2649
+ "enableJsonFlag": false
2650
+ },
2651
+ "filters:create-filter": {
2652
+ "aliases": [],
2653
+ "args": {},
2654
+ "description": "Creates a new whitelist or blocklist filter. Per-domain filters\nrequire a Pro plan. Patterns are stored as lowercase.\n",
2655
+ "flags": {
2656
+ "api-key": {
2657
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2658
+ "env": "PRIMITIVE_API_KEY",
2659
+ "name": "api-key",
2660
+ "hasDynamicHelp": false,
2661
+ "multiple": false,
2662
+ "type": "option"
2663
+ },
2664
+ "api-base-url-1": {
2665
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2666
+ "env": "PRIMITIVE_API_BASE_URL_1",
2667
+ "hidden": true,
2668
+ "name": "api-base-url-1",
2669
+ "hasDynamicHelp": false,
2670
+ "multiple": false,
2671
+ "type": "option"
2672
+ },
2673
+ "api-base-url-2": {
2674
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2675
+ "env": "PRIMITIVE_API_BASE_URL_2",
2676
+ "hidden": true,
2677
+ "name": "api-base-url-2",
2678
+ "hasDynamicHelp": false,
2679
+ "multiple": false,
2680
+ "type": "option"
2681
+ },
2682
+ "time": {
2683
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2684
+ "name": "time",
2685
+ "allowNo": false,
2686
+ "type": "boolean"
2687
+ },
2688
+ "raw-body": {
2689
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
2690
+ "name": "raw-body",
2691
+ "hasDynamicHelp": false,
2692
+ "multiple": false,
2693
+ "type": "option"
2694
+ },
2695
+ "body-file": {
2696
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2697
+ "name": "body-file",
2698
+ "hasDynamicHelp": false,
2699
+ "multiple": false,
2700
+ "type": "option"
2701
+ },
2702
+ "pattern": {
2703
+ "description": "Email address or pattern to filter",
2704
+ "name": "pattern",
2705
+ "hasDynamicHelp": false,
2706
+ "multiple": false,
2707
+ "type": "option"
2708
+ },
2709
+ "type": {
2710
+ "description": "type",
2711
+ "name": "type",
2712
+ "hasDynamicHelp": false,
2713
+ "multiple": false,
2714
+ "options": [
2715
+ "whitelist",
2716
+ "blocklist"
2717
+ ],
2718
+ "type": "option"
2719
+ },
2720
+ "domain-id": {
2721
+ "description": "Restrict filter to a specific domain (Pro plan required)",
2722
+ "name": "domain-id",
2723
+ "hasDynamicHelp": false,
2724
+ "multiple": false,
2725
+ "type": "option"
2726
+ }
2727
+ },
2728
+ "hasDynamicHelp": false,
2729
+ "hiddenAliases": [],
2730
+ "id": "filters:create-filter",
2731
+ "pluginAlias": "@primitivedotdev/sdk",
2732
+ "pluginName": "@primitivedotdev/sdk",
2733
+ "pluginType": "core",
2734
+ "strict": true,
2735
+ "summary": "Create a filter rule",
2736
+ "enableJsonFlag": false
2737
+ },
2738
+ "filters:delete-filter": {
2739
+ "aliases": [],
2740
+ "args": {},
2741
+ "description": "DELETE /filters/{id}",
2742
+ "flags": {
2743
+ "api-key": {
2744
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2745
+ "env": "PRIMITIVE_API_KEY",
2746
+ "name": "api-key",
2747
+ "hasDynamicHelp": false,
2748
+ "multiple": false,
2749
+ "type": "option"
2750
+ },
2751
+ "api-base-url-1": {
2752
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2753
+ "env": "PRIMITIVE_API_BASE_URL_1",
2754
+ "hidden": true,
2755
+ "name": "api-base-url-1",
2756
+ "hasDynamicHelp": false,
2757
+ "multiple": false,
2758
+ "type": "option"
2759
+ },
2760
+ "api-base-url-2": {
2761
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2762
+ "env": "PRIMITIVE_API_BASE_URL_2",
2763
+ "hidden": true,
2764
+ "name": "api-base-url-2",
2765
+ "hasDynamicHelp": false,
2766
+ "multiple": false,
2767
+ "type": "option"
2768
+ },
2769
+ "time": {
2770
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2771
+ "name": "time",
2772
+ "allowNo": false,
2773
+ "type": "boolean"
2774
+ },
2775
+ "id": {
2776
+ "description": "Resource UUID",
2777
+ "name": "id",
2778
+ "required": true,
2779
+ "hasDynamicHelp": false,
2780
+ "multiple": false,
2781
+ "type": "option"
2782
+ }
2783
+ },
2784
+ "hasDynamicHelp": false,
2785
+ "hiddenAliases": [],
2786
+ "id": "filters:delete-filter",
2787
+ "pluginAlias": "@primitivedotdev/sdk",
2788
+ "pluginName": "@primitivedotdev/sdk",
2789
+ "pluginType": "core",
2790
+ "strict": true,
2791
+ "summary": "Delete a filter rule",
2792
+ "enableJsonFlag": false
2793
+ },
2794
+ "filters:list-filters": {
2795
+ "aliases": [],
2796
+ "args": {},
2797
+ "description": "Returns all whitelist and blocklist filter rules.",
2798
+ "flags": {
2799
+ "api-key": {
2800
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2801
+ "env": "PRIMITIVE_API_KEY",
2802
+ "name": "api-key",
2803
+ "hasDynamicHelp": false,
2804
+ "multiple": false,
2805
+ "type": "option"
2806
+ },
2807
+ "api-base-url-1": {
2808
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2809
+ "env": "PRIMITIVE_API_BASE_URL_1",
2810
+ "hidden": true,
2811
+ "name": "api-base-url-1",
2812
+ "hasDynamicHelp": false,
2813
+ "multiple": false,
2814
+ "type": "option"
2815
+ },
2816
+ "api-base-url-2": {
2817
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2818
+ "env": "PRIMITIVE_API_BASE_URL_2",
2819
+ "hidden": true,
2820
+ "name": "api-base-url-2",
2821
+ "hasDynamicHelp": false,
2822
+ "multiple": false,
2823
+ "type": "option"
2824
+ },
2825
+ "time": {
2826
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2827
+ "name": "time",
2828
+ "allowNo": false,
2829
+ "type": "boolean"
2830
+ }
2831
+ },
2832
+ "hasDynamicHelp": false,
2833
+ "hiddenAliases": [],
2834
+ "id": "filters:list-filters",
2835
+ "pluginAlias": "@primitivedotdev/sdk",
2836
+ "pluginName": "@primitivedotdev/sdk",
2837
+ "pluginType": "core",
2838
+ "strict": true,
2839
+ "summary": "List filter rules",
2840
+ "enableJsonFlag": false
2841
+ },
2842
+ "filters:update-filter": {
2843
+ "aliases": [],
2844
+ "args": {},
2845
+ "description": "Toggle a filter's enabled state.",
2846
+ "flags": {
2847
+ "api-key": {
2848
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2849
+ "env": "PRIMITIVE_API_KEY",
2850
+ "name": "api-key",
2851
+ "hasDynamicHelp": false,
2852
+ "multiple": false,
2853
+ "type": "option"
2854
+ },
2855
+ "api-base-url-1": {
2856
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2857
+ "env": "PRIMITIVE_API_BASE_URL_1",
2858
+ "hidden": true,
2859
+ "name": "api-base-url-1",
2860
+ "hasDynamicHelp": false,
2861
+ "multiple": false,
2862
+ "type": "option"
2863
+ },
2864
+ "api-base-url-2": {
2865
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2866
+ "env": "PRIMITIVE_API_BASE_URL_2",
2867
+ "hidden": true,
2868
+ "name": "api-base-url-2",
2869
+ "hasDynamicHelp": false,
2870
+ "multiple": false,
2871
+ "type": "option"
2872
+ },
2873
+ "time": {
2874
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2875
+ "name": "time",
2876
+ "allowNo": false,
2877
+ "type": "boolean"
2878
+ },
2879
+ "id": {
2880
+ "description": "Resource UUID",
2881
+ "name": "id",
2882
+ "required": true,
2883
+ "hasDynamicHelp": false,
2884
+ "multiple": false,
2885
+ "type": "option"
2886
+ },
2887
+ "raw-body": {
2888
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
2889
+ "name": "raw-body",
2890
+ "hasDynamicHelp": false,
2891
+ "multiple": false,
2892
+ "type": "option"
2893
+ },
2894
+ "body-file": {
2895
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2896
+ "name": "body-file",
2897
+ "hasDynamicHelp": false,
2898
+ "multiple": false,
2899
+ "type": "option"
2900
+ },
2901
+ "enabled": {
2902
+ "description": "enabled",
2903
+ "name": "enabled",
2904
+ "allowNo": false,
2905
+ "type": "boolean"
2906
+ }
2907
+ },
2908
+ "hasDynamicHelp": false,
2909
+ "hiddenAliases": [],
2910
+ "id": "filters:update-filter",
2911
+ "pluginAlias": "@primitivedotdev/sdk",
2912
+ "pluginName": "@primitivedotdev/sdk",
2913
+ "pluginType": "core",
2914
+ "strict": true,
2915
+ "summary": "Update a filter rule",
2916
+ "enableJsonFlag": false
2917
+ },
2918
+ "functions:create-function": {
2919
+ "aliases": [],
2920
+ "args": {},
2921
+ "description": "Creates and deploys a new function. The handler must be a single\nESM module that exports a default async function receiving the\n`email.received` event (see the Webhook payload section for the\nfull schema). Code is bundled before being uploaded; ship a\nsingle self-contained file rather than relying on external\nimports.\n\n**Code limits.** `code` is capped at 1 MiB UTF-8. `sourceMap`\n(optional) is capped at 5 MiB UTF-8 and is stored only on the\nedge runtime side; it is not persisted in Primitive's database.\n\n**Auto-wiring.** On successful deploy, Primitive automatically\ncreates a webhook endpoint that delivers inbound mail to the\nfunction. There is nothing to configure on the Endpoints API\nfor this to work; the gateway URL returned here is for\nreference only and is not directly callable from outside.\n\n**Secrets.** New functions ship with the managed secrets\n(`PRIMITIVE_WEBHOOK_SECRET`, `PRIMITIVE_API_KEY`) already\nbound. Add user-set secrets via\n`POST /functions/{id}/secrets`; secret writes only land in the\nrunning handler on the next redeploy.\n",
2922
+ "flags": {
2923
+ "api-key": {
2924
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2925
+ "env": "PRIMITIVE_API_KEY",
2926
+ "name": "api-key",
2927
+ "hasDynamicHelp": false,
2928
+ "multiple": false,
2929
+ "type": "option"
2930
+ },
2931
+ "api-base-url-1": {
2932
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
2933
+ "env": "PRIMITIVE_API_BASE_URL_1",
2934
+ "hidden": true,
2935
+ "name": "api-base-url-1",
2936
+ "hasDynamicHelp": false,
2937
+ "multiple": false,
2938
+ "type": "option"
2939
+ },
2940
+ "api-base-url-2": {
2941
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
2942
+ "env": "PRIMITIVE_API_BASE_URL_2",
2943
+ "hidden": true,
2944
+ "name": "api-base-url-2",
2945
+ "hasDynamicHelp": false,
2946
+ "multiple": false,
2947
+ "type": "option"
2948
+ },
2949
+ "time": {
2950
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
2951
+ "name": "time",
2952
+ "allowNo": false,
2953
+ "type": "boolean"
2954
+ },
2955
+ "raw-body": {
2956
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
2957
+ "name": "raw-body",
2958
+ "hasDynamicHelp": false,
2959
+ "multiple": false,
2960
+ "type": "option"
2961
+ },
2962
+ "body-file": {
2963
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2964
+ "name": "body-file",
1374
2965
  "hasDynamicHelp": false,
1375
2966
  "multiple": false,
1376
2967
  "type": "option"
1377
2968
  },
1378
- "time": {
1379
- "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
1380
- "name": "time",
1381
- "allowNo": false,
1382
- "type": "boolean"
2969
+ "code": {
2970
+ "description": "Bundled handler as a single ESM module. Up to 1 MiB UTF-8. Must export a default `{ async fetch(req, env, ctx) { ... } }` object.",
2971
+ "name": "code",
2972
+ "hasDynamicHelp": false,
2973
+ "multiple": false,
2974
+ "type": "option"
1383
2975
  },
1384
- "id": {
1385
- "description": "Resource UUID",
1386
- "name": "id",
1387
- "required": true,
2976
+ "name": {
2977
+ "description": "Slug-style name. Lowercase letters, digits, hyphens, and underscores. 1 to 64 characters. Must be unique within the org; a 409 is returned on collision.",
2978
+ "name": "name",
2979
+ "hasDynamicHelp": false,
2980
+ "multiple": false,
2981
+ "type": "option"
2982
+ },
2983
+ "sourceMap": {
2984
+ "description": "Optional source map for the bundle. Up to 5 MiB UTF-8. Stored only on the runtime side (not in Primitive's database) and used to symbolicate stack traces in the function's logs.",
2985
+ "name": "sourceMap",
1388
2986
  "hasDynamicHelp": false,
1389
2987
  "multiple": false,
1390
2988
  "type": "option"
@@ -1392,18 +2990,18 @@
1392
2990
  },
1393
2991
  "hasDynamicHelp": false,
1394
2992
  "hiddenAliases": [],
1395
- "id": "emails:replay-email-webhooks",
2993
+ "id": "functions:create-function",
1396
2994
  "pluginAlias": "@primitivedotdev/sdk",
1397
2995
  "pluginName": "@primitivedotdev/sdk",
1398
2996
  "pluginType": "core",
1399
2997
  "strict": true,
1400
- "summary": "Replay email webhooks",
2998
+ "summary": "Deploy a function",
1401
2999
  "enableJsonFlag": false
1402
3000
  },
1403
- "endpoints:create-endpoint": {
3001
+ "functions:create-function-secret": {
1404
3002
  "aliases": [],
1405
3003
  "args": {},
1406
- "description": "Creates a new webhook endpoint. If a deactivated endpoint\nwith the same URL and domain exists, it is reactivated\ninstead. Subject to plan limits on the number of active\nendpoints.\n\n**Signing is account-scoped, not per-endpoint.** This call\ndoes not return any signing material; every endpoint on the\naccount uses the same webhook secret, fetched via\n`GET /account/webhook-secret`. See the API-level \"Webhook\nsigning\" section for the full wire format (header name,\nsigned string, hash algo, secret format, tolerance) and a\nlanguage-agnostic verification recipe.\n\nAfter creating the endpoint, fire a test delivery against\nit via `POST /endpoints/{id}/test` to confirm your verifier\naccepts the signature.\n\n\nBody fields requiring --raw-body JSON (these are not exposed as flags):\n rules object Endpoint-specific filtering rules\n(* = required. Scalar body fields are exposed as individual --flag-name flags; see FLAGS above.)",
3004
+ "description": "Idempotent insert-or-update keyed on `(function_id, key)`.\nReturns 201 the first time the key is set, 200 on subsequent\nupdates. Values are encrypted at rest and only become visible\nto the running handler on the next deploy (`PUT /functions/{id}`\nwith the existing code is sufficient to refresh bindings).\n\nKeys must match `^[A-Z_][A-Z0-9_]*$` (uppercase letters,\ndigits, underscores; first character is a letter or\nunderscore). Values are at most 4096 UTF-8 bytes. System-\nmanaged keys are reserved and rejected.\n",
1407
3005
  "flags": {
1408
3006
  "api-key": {
1409
3007
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1413,10 +3011,20 @@
1413
3011
  "multiple": false,
1414
3012
  "type": "option"
1415
3013
  },
1416
- "base-url": {
1417
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1418
- "env": "PRIMITIVE_API_URL",
1419
- "name": "base-url",
3014
+ "api-base-url-1": {
3015
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3016
+ "env": "PRIMITIVE_API_BASE_URL_1",
3017
+ "hidden": true,
3018
+ "name": "api-base-url-1",
3019
+ "hasDynamicHelp": false,
3020
+ "multiple": false,
3021
+ "type": "option"
3022
+ },
3023
+ "api-base-url-2": {
3024
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3025
+ "env": "PRIMITIVE_API_BASE_URL_2",
3026
+ "hidden": true,
3027
+ "name": "api-base-url-2",
1420
3028
  "hasDynamicHelp": false,
1421
3029
  "multiple": false,
1422
3030
  "type": "option"
@@ -1427,6 +3035,14 @@
1427
3035
  "allowNo": false,
1428
3036
  "type": "boolean"
1429
3037
  },
3038
+ "id": {
3039
+ "description": "Resource UUID",
3040
+ "name": "id",
3041
+ "required": true,
3042
+ "hasDynamicHelp": false,
3043
+ "multiple": false,
3044
+ "type": "option"
3045
+ },
1430
3046
  "raw-body": {
1431
3047
  "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
1432
3048
  "name": "raw-body",
@@ -1441,41 +3057,35 @@
1441
3057
  "multiple": false,
1442
3058
  "type": "option"
1443
3059
  },
1444
- "url": {
1445
- "description": "The webhook URL to deliver events to",
1446
- "name": "url",
3060
+ "key": {
3061
+ "description": "Uppercase letters, digits, and underscores. Must start with a letter or underscore. System-managed keys (e.g. PRIMITIVE_WEBHOOK_SECRET) are reserved.",
3062
+ "name": "key",
1447
3063
  "hasDynamicHelp": false,
1448
3064
  "multiple": false,
1449
3065
  "type": "option"
1450
3066
  },
1451
- "domain-id": {
1452
- "description": "Restrict to emails from a specific domain",
1453
- "name": "domain-id",
3067
+ "value": {
3068
+ "description": "Secret value, up to 4096 UTF-8 bytes. Encrypted at rest. Never returned by any read endpoint.",
3069
+ "name": "value",
1454
3070
  "hasDynamicHelp": false,
1455
3071
  "multiple": false,
1456
3072
  "type": "option"
1457
- },
1458
- "enabled": {
1459
- "description": "Whether the endpoint is active",
1460
- "name": "enabled",
1461
- "allowNo": false,
1462
- "type": "boolean"
1463
3073
  }
1464
3074
  },
1465
3075
  "hasDynamicHelp": false,
1466
3076
  "hiddenAliases": [],
1467
- "id": "endpoints:create-endpoint",
3077
+ "id": "functions:create-function-secret",
1468
3078
  "pluginAlias": "@primitivedotdev/sdk",
1469
3079
  "pluginName": "@primitivedotdev/sdk",
1470
3080
  "pluginType": "core",
1471
3081
  "strict": true,
1472
- "summary": "Create a webhook endpoint",
3082
+ "summary": "Create or update a secret",
1473
3083
  "enableJsonFlag": false
1474
3084
  },
1475
- "endpoints:delete-endpoint": {
3085
+ "functions:delete-function": {
1476
3086
  "aliases": [],
1477
3087
  "args": {},
1478
- "description": "Soft-deletes a webhook endpoint. The endpoint will no longer\nreceive webhook deliveries.\n",
3088
+ "description": "Soft-deletes the function row, removes the script from the edge\nruntime, and deactivates the auto-wired webhook endpoint so no\nfurther inbound mail is delivered. Past deploy history,\ninvocations, and logs are retained.\n\nReturns 502 if the runtime delete fails partway; the function\nrow stays in place and the call is safe to retry until it\nsucceeds.\n",
1479
3089
  "flags": {
1480
3090
  "api-key": {
1481
3091
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1485,10 +3095,20 @@
1485
3095
  "multiple": false,
1486
3096
  "type": "option"
1487
3097
  },
1488
- "base-url": {
1489
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1490
- "env": "PRIMITIVE_API_URL",
1491
- "name": "base-url",
3098
+ "api-base-url-1": {
3099
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3100
+ "env": "PRIMITIVE_API_BASE_URL_1",
3101
+ "hidden": true,
3102
+ "name": "api-base-url-1",
3103
+ "hasDynamicHelp": false,
3104
+ "multiple": false,
3105
+ "type": "option"
3106
+ },
3107
+ "api-base-url-2": {
3108
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3109
+ "env": "PRIMITIVE_API_BASE_URL_2",
3110
+ "hidden": true,
3111
+ "name": "api-base-url-2",
1492
3112
  "hasDynamicHelp": false,
1493
3113
  "multiple": false,
1494
3114
  "type": "option"
@@ -1510,18 +3130,18 @@
1510
3130
  },
1511
3131
  "hasDynamicHelp": false,
1512
3132
  "hiddenAliases": [],
1513
- "id": "endpoints:delete-endpoint",
3133
+ "id": "functions:delete-function",
1514
3134
  "pluginAlias": "@primitivedotdev/sdk",
1515
3135
  "pluginName": "@primitivedotdev/sdk",
1516
3136
  "pluginType": "core",
1517
3137
  "strict": true,
1518
- "summary": "Delete a webhook endpoint",
3138
+ "summary": "Delete a function",
1519
3139
  "enableJsonFlag": false
1520
3140
  },
1521
- "endpoints:list-endpoints": {
3141
+ "functions:delete-function-secret": {
1522
3142
  "aliases": [],
1523
3143
  "args": {},
1524
- "description": "Returns all active (non-deleted) webhook endpoints.",
3144
+ "description": "Removes the secret. The binding stays live in the running\nhandler until the next deploy refreshes the binding set\n(`PUT /functions/{id}` with the existing code is sufficient).\nReturns 404 if the key did not exist. Managed system keys\ncannot be deleted.\n",
1525
3145
  "flags": {
1526
3146
  "api-key": {
1527
3147
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1531,10 +3151,20 @@
1531
3151
  "multiple": false,
1532
3152
  "type": "option"
1533
3153
  },
1534
- "base-url": {
1535
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1536
- "env": "PRIMITIVE_API_URL",
1537
- "name": "base-url",
3154
+ "api-base-url-1": {
3155
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3156
+ "env": "PRIMITIVE_API_BASE_URL_1",
3157
+ "hidden": true,
3158
+ "name": "api-base-url-1",
3159
+ "hasDynamicHelp": false,
3160
+ "multiple": false,
3161
+ "type": "option"
3162
+ },
3163
+ "api-base-url-2": {
3164
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3165
+ "env": "PRIMITIVE_API_BASE_URL_2",
3166
+ "hidden": true,
3167
+ "name": "api-base-url-2",
1538
3168
  "hasDynamicHelp": false,
1539
3169
  "multiple": false,
1540
3170
  "type": "option"
@@ -1544,22 +3174,38 @@
1544
3174
  "name": "time",
1545
3175
  "allowNo": false,
1546
3176
  "type": "boolean"
3177
+ },
3178
+ "id": {
3179
+ "description": "Resource UUID",
3180
+ "name": "id",
3181
+ "required": true,
3182
+ "hasDynamicHelp": false,
3183
+ "multiple": false,
3184
+ "type": "option"
3185
+ },
3186
+ "key": {
3187
+ "description": "Secret key. Must match `^[A-Z_][A-Z0-9_]*$`.",
3188
+ "name": "key",
3189
+ "required": true,
3190
+ "hasDynamicHelp": false,
3191
+ "multiple": false,
3192
+ "type": "option"
1547
3193
  }
1548
3194
  },
1549
3195
  "hasDynamicHelp": false,
1550
3196
  "hiddenAliases": [],
1551
- "id": "endpoints:list-endpoints",
3197
+ "id": "functions:delete-function-secret",
1552
3198
  "pluginAlias": "@primitivedotdev/sdk",
1553
3199
  "pluginName": "@primitivedotdev/sdk",
1554
3200
  "pluginType": "core",
1555
3201
  "strict": true,
1556
- "summary": "List webhook endpoints",
3202
+ "summary": "Delete a secret",
1557
3203
  "enableJsonFlag": false
1558
3204
  },
1559
- "endpoints:test-endpoint": {
3205
+ "functions:get-function": {
1560
3206
  "aliases": [],
1561
3207
  "args": {},
1562
- "description": "Sends a sample `email.received` event to the endpoint. The request\nincludes SSRF protection (private IP rejection and DNS pinning).\nRate limited to 4 per minute and 30 per hour (non-exempt).\nSuccessful deliveries and verified-domain endpoints are exempt\nfrom the rate limit.\n",
3208
+ "description": "Returns the full record for a function, including its current\nsource code and the deploy status / error from the most recent\ndeploy attempt.\n",
1563
3209
  "flags": {
1564
3210
  "api-key": {
1565
3211
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1569,10 +3215,20 @@
1569
3215
  "multiple": false,
1570
3216
  "type": "option"
1571
3217
  },
1572
- "base-url": {
1573
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1574
- "env": "PRIMITIVE_API_URL",
1575
- "name": "base-url",
3218
+ "api-base-url-1": {
3219
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3220
+ "env": "PRIMITIVE_API_BASE_URL_1",
3221
+ "hidden": true,
3222
+ "name": "api-base-url-1",
3223
+ "hasDynamicHelp": false,
3224
+ "multiple": false,
3225
+ "type": "option"
3226
+ },
3227
+ "api-base-url-2": {
3228
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3229
+ "env": "PRIMITIVE_API_BASE_URL_2",
3230
+ "hidden": true,
3231
+ "name": "api-base-url-2",
1576
3232
  "hasDynamicHelp": false,
1577
3233
  "multiple": false,
1578
3234
  "type": "option"
@@ -1594,18 +3250,18 @@
1594
3250
  },
1595
3251
  "hasDynamicHelp": false,
1596
3252
  "hiddenAliases": [],
1597
- "id": "endpoints:test-endpoint",
3253
+ "id": "functions:get-function",
1598
3254
  "pluginAlias": "@primitivedotdev/sdk",
1599
3255
  "pluginName": "@primitivedotdev/sdk",
1600
3256
  "pluginType": "core",
1601
3257
  "strict": true,
1602
- "summary": "Send a test webhook",
3258
+ "summary": "Get a function",
1603
3259
  "enableJsonFlag": false
1604
3260
  },
1605
- "endpoints:update-endpoint": {
3261
+ "functions:list-function-secrets": {
1606
3262
  "aliases": [],
1607
3263
  "args": {},
1608
- "description": "Updates an active webhook endpoint. If the URL is changed, the old\nendpoint is deactivated and a new one is created (or an existing\ndeactivated endpoint with the new URL is reactivated).\n\n\nBody fields requiring --raw-body JSON (these are not exposed as flags):\n rules object\n(* = required. Scalar body fields are exposed as individual --flag-name flags; see FLAGS above.)",
3264
+ "description": "Returns metadata for every secret bound to the function, with\nmanaged entries (provisioned by Primitive) listed first and\nuser-set entries listed alphabetically after. **Values are\nnever returned.** Secret writes are write-only.\n\nManaged entries (e.g. `PRIMITIVE_WEBHOOK_SECRET`,\n`PRIMITIVE_API_KEY`) carry a `description` instead of\n`created_at` / `updated_at`. They cannot be created, updated,\nor deleted via this API.\n",
1609
3265
  "flags": {
1610
3266
  "api-key": {
1611
3267
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1615,10 +3271,20 @@
1615
3271
  "multiple": false,
1616
3272
  "type": "option"
1617
3273
  },
1618
- "base-url": {
1619
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1620
- "env": "PRIMITIVE_API_URL",
1621
- "name": "base-url",
3274
+ "api-base-url-1": {
3275
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3276
+ "env": "PRIMITIVE_API_BASE_URL_1",
3277
+ "hidden": true,
3278
+ "name": "api-base-url-1",
3279
+ "hasDynamicHelp": false,
3280
+ "multiple": false,
3281
+ "type": "option"
3282
+ },
3283
+ "api-base-url-2": {
3284
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3285
+ "env": "PRIMITIVE_API_BASE_URL_2",
3286
+ "hidden": true,
3287
+ "name": "api-base-url-2",
1622
3288
  "hasDynamicHelp": false,
1623
3289
  "multiple": false,
1624
3290
  "type": "option"
@@ -1636,56 +3302,70 @@
1636
3302
  "hasDynamicHelp": false,
1637
3303
  "multiple": false,
1638
3304
  "type": "option"
1639
- },
1640
- "raw-body": {
1641
- "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
1642
- "name": "raw-body",
3305
+ }
3306
+ },
3307
+ "hasDynamicHelp": false,
3308
+ "hiddenAliases": [],
3309
+ "id": "functions:list-function-secrets",
3310
+ "pluginAlias": "@primitivedotdev/sdk",
3311
+ "pluginName": "@primitivedotdev/sdk",
3312
+ "pluginType": "core",
3313
+ "strict": true,
3314
+ "summary": "List a function's secrets",
3315
+ "enableJsonFlag": false
3316
+ },
3317
+ "functions:list-functions": {
3318
+ "aliases": [],
3319
+ "args": {},
3320
+ "description": "Returns every active (non-deleted) function in the org, newest\nfirst. Each entry carries the deploy status and the gateway URL\nthat the platform's webhook delivery loop posts to. To inspect\nthe source code or deploy errors, use `GET /functions/{id}`.\n",
3321
+ "flags": {
3322
+ "api-key": {
3323
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
3324
+ "env": "PRIMITIVE_API_KEY",
3325
+ "name": "api-key",
1643
3326
  "hasDynamicHelp": false,
1644
3327
  "multiple": false,
1645
3328
  "type": "option"
1646
3329
  },
1647
- "body-file": {
1648
- "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
1649
- "name": "body-file",
3330
+ "api-base-url-1": {
3331
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3332
+ "env": "PRIMITIVE_API_BASE_URL_1",
3333
+ "hidden": true,
3334
+ "name": "api-base-url-1",
1650
3335
  "hasDynamicHelp": false,
1651
3336
  "multiple": false,
1652
3337
  "type": "option"
1653
3338
  },
1654
- "domain-id": {
1655
- "description": "domain_id",
1656
- "name": "domain-id",
3339
+ "api-base-url-2": {
3340
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3341
+ "env": "PRIMITIVE_API_BASE_URL_2",
3342
+ "hidden": true,
3343
+ "name": "api-base-url-2",
1657
3344
  "hasDynamicHelp": false,
1658
3345
  "multiple": false,
1659
3346
  "type": "option"
1660
3347
  },
1661
- "enabled": {
1662
- "description": "enabled",
1663
- "name": "enabled",
3348
+ "time": {
3349
+ "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
3350
+ "name": "time",
1664
3351
  "allowNo": false,
1665
3352
  "type": "boolean"
1666
- },
1667
- "url": {
1668
- "description": "New webhook URL (triggers endpoint rotation)",
1669
- "name": "url",
1670
- "hasDynamicHelp": false,
1671
- "multiple": false,
1672
- "type": "option"
1673
3353
  }
1674
3354
  },
1675
3355
  "hasDynamicHelp": false,
1676
3356
  "hiddenAliases": [],
1677
- "id": "endpoints:update-endpoint",
3357
+ "id": "functions:list-functions",
1678
3358
  "pluginAlias": "@primitivedotdev/sdk",
1679
3359
  "pluginName": "@primitivedotdev/sdk",
1680
3360
  "pluginType": "core",
1681
3361
  "strict": true,
1682
- "summary": "Update a webhook endpoint",
3362
+ "summary": "List functions",
1683
3363
  "enableJsonFlag": false
1684
3364
  },
1685
- "filters:create-filter": {
3365
+ "functions:set-function-secret": {
1686
3366
  "aliases": [],
1687
3367
  "args": {},
1688
- "description": "Creates a new whitelist or blocklist filter. Per-domain filters\nrequire a Pro plan. Patterns are stored as lowercase.\n",
3368
+ "description": "Path-keyed companion to `POST /functions/{id}/secrets`.\nIdempotent: returns 201 the first time the key is set, 200 on\nsubsequent updates. Same validation rules and same write-only\nguarantees as the POST verb; the new value lands in the running\nhandler on the next deploy.\n",
1689
3369
  "flags": {
1690
3370
  "api-key": {
1691
3371
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1695,10 +3375,20 @@
1695
3375
  "multiple": false,
1696
3376
  "type": "option"
1697
3377
  },
1698
- "base-url": {
1699
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1700
- "env": "PRIMITIVE_API_URL",
1701
- "name": "base-url",
3378
+ "api-base-url-1": {
3379
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3380
+ "env": "PRIMITIVE_API_BASE_URL_1",
3381
+ "hidden": true,
3382
+ "name": "api-base-url-1",
3383
+ "hasDynamicHelp": false,
3384
+ "multiple": false,
3385
+ "type": "option"
3386
+ },
3387
+ "api-base-url-2": {
3388
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3389
+ "env": "PRIMITIVE_API_BASE_URL_2",
3390
+ "hidden": true,
3391
+ "name": "api-base-url-2",
1702
3392
  "hasDynamicHelp": false,
1703
3393
  "multiple": false,
1704
3394
  "type": "option"
@@ -1709,41 +3399,39 @@
1709
3399
  "allowNo": false,
1710
3400
  "type": "boolean"
1711
3401
  },
1712
- "raw-body": {
1713
- "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
1714
- "name": "raw-body",
3402
+ "id": {
3403
+ "description": "Resource UUID",
3404
+ "name": "id",
3405
+ "required": true,
1715
3406
  "hasDynamicHelp": false,
1716
3407
  "multiple": false,
1717
3408
  "type": "option"
1718
3409
  },
1719
- "body-file": {
1720
- "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
1721
- "name": "body-file",
3410
+ "key": {
3411
+ "description": "Secret key. Must match `^[A-Z_][A-Z0-9_]*$`.",
3412
+ "name": "key",
3413
+ "required": true,
1722
3414
  "hasDynamicHelp": false,
1723
3415
  "multiple": false,
1724
3416
  "type": "option"
1725
3417
  },
1726
- "pattern": {
1727
- "description": "Email address or pattern to filter",
1728
- "name": "pattern",
3418
+ "raw-body": {
3419
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
3420
+ "name": "raw-body",
1729
3421
  "hasDynamicHelp": false,
1730
3422
  "multiple": false,
1731
3423
  "type": "option"
1732
3424
  },
1733
- "type": {
1734
- "description": "type",
1735
- "name": "type",
3425
+ "body-file": {
3426
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
3427
+ "name": "body-file",
1736
3428
  "hasDynamicHelp": false,
1737
3429
  "multiple": false,
1738
- "options": [
1739
- "whitelist",
1740
- "blocklist"
1741
- ],
1742
3430
  "type": "option"
1743
3431
  },
1744
- "domain-id": {
1745
- "description": "Restrict filter to a specific domain (Pro plan required)",
1746
- "name": "domain-id",
3432
+ "value": {
3433
+ "description": "value",
3434
+ "name": "value",
1747
3435
  "hasDynamicHelp": false,
1748
3436
  "multiple": false,
1749
3437
  "type": "option"
@@ -1751,18 +3439,18 @@
1751
3439
  },
1752
3440
  "hasDynamicHelp": false,
1753
3441
  "hiddenAliases": [],
1754
- "id": "filters:create-filter",
3442
+ "id": "functions:set-function-secret",
1755
3443
  "pluginAlias": "@primitivedotdev/sdk",
1756
3444
  "pluginName": "@primitivedotdev/sdk",
1757
3445
  "pluginType": "core",
1758
3446
  "strict": true,
1759
- "summary": "Create a filter rule",
3447
+ "summary": "Set a secret by key",
1760
3448
  "enableJsonFlag": false
1761
3449
  },
1762
- "filters:delete-filter": {
3450
+ "functions:test-function": {
1763
3451
  "aliases": [],
1764
3452
  "args": {},
1765
- "description": "DELETE /filters/{id}",
3453
+ "description": "Sends a real test email from a Primitive-controlled sender to a\nsynthetic local-part on one of the org's verified inbound\ndomains. The function fires through the normal MX delivery\npath, so reply / send-mail calls from inside the handler\nagainst the inbound's `email.id` work the same as in\nproduction. Returns immediately after the send is queued; the\ninvocation appears on the function's invocations list within a\nfew seconds.\n\nRequires that the function is currently `deployed`. Returns 422\nif the function is in `pending` or `failed` state, or if the\norg has no verified inbound domain to receive the test mail.\n",
1766
3454
  "flags": {
1767
3455
  "api-key": {
1768
3456
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1772,10 +3460,20 @@
1772
3460
  "multiple": false,
1773
3461
  "type": "option"
1774
3462
  },
1775
- "base-url": {
1776
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1777
- "env": "PRIMITIVE_API_URL",
1778
- "name": "base-url",
3463
+ "api-base-url-1": {
3464
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3465
+ "env": "PRIMITIVE_API_BASE_URL_1",
3466
+ "hidden": true,
3467
+ "name": "api-base-url-1",
3468
+ "hasDynamicHelp": false,
3469
+ "multiple": false,
3470
+ "type": "option"
3471
+ },
3472
+ "api-base-url-2": {
3473
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3474
+ "env": "PRIMITIVE_API_BASE_URL_2",
3475
+ "hidden": true,
3476
+ "name": "api-base-url-2",
1779
3477
  "hasDynamicHelp": false,
1780
3478
  "multiple": false,
1781
3479
  "type": "option"
@@ -1797,18 +3495,18 @@
1797
3495
  },
1798
3496
  "hasDynamicHelp": false,
1799
3497
  "hiddenAliases": [],
1800
- "id": "filters:delete-filter",
3498
+ "id": "functions:test-function",
1801
3499
  "pluginAlias": "@primitivedotdev/sdk",
1802
3500
  "pluginName": "@primitivedotdev/sdk",
1803
3501
  "pluginType": "core",
1804
3502
  "strict": true,
1805
- "summary": "Delete a filter rule",
3503
+ "summary": "Send a test invocation",
1806
3504
  "enableJsonFlag": false
1807
3505
  },
1808
- "filters:list-filters": {
3506
+ "functions:update-function": {
1809
3507
  "aliases": [],
1810
3508
  "args": {},
1811
- "description": "Returns all whitelist and blocklist filter rules.",
3509
+ "description": "Replaces the function's source code with the body's `code` and\ntriggers a redeploy. Same size limits as `POST /functions`.\nUse this verb to push secret writes into the running handler:\npassing the same `code` re-runs the deploy and refreshes the\nbinding set with the latest values from the secrets table.\n\nOn a 502 deploy failure, the previously-deployed code stays\nlive; the runtime never serves a half-built bundle. The\n`deploy_error` field on the returned record carries the error\nthat came back from the runtime so you can surface it to users\nwithout polling.\n",
1812
3510
  "flags": {
1813
3511
  "api-key": {
1814
3512
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -1818,48 +3516,20 @@
1818
3516
  "multiple": false,
1819
3517
  "type": "option"
1820
3518
  },
1821
- "base-url": {
1822
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1823
- "env": "PRIMITIVE_API_URL",
1824
- "name": "base-url",
1825
- "hasDynamicHelp": false,
1826
- "multiple": false,
1827
- "type": "option"
1828
- },
1829
- "time": {
1830
- "description": "Print the wall-clock duration of this command to stderr after it completes (e.g. `[time: 1.34s]`). Useful for measuring `--wait` send latency, comparing CLI overhead, or capturing timing in scripts.",
1831
- "name": "time",
1832
- "allowNo": false,
1833
- "type": "boolean"
1834
- }
1835
- },
1836
- "hasDynamicHelp": false,
1837
- "hiddenAliases": [],
1838
- "id": "filters:list-filters",
1839
- "pluginAlias": "@primitivedotdev/sdk",
1840
- "pluginName": "@primitivedotdev/sdk",
1841
- "pluginType": "core",
1842
- "strict": true,
1843
- "summary": "List filter rules",
1844
- "enableJsonFlag": false
1845
- },
1846
- "filters:update-filter": {
1847
- "aliases": [],
1848
- "args": {},
1849
- "description": "Toggle a filter's enabled state.",
1850
- "flags": {
1851
- "api-key": {
1852
- "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
1853
- "env": "PRIMITIVE_API_KEY",
1854
- "name": "api-key",
3519
+ "api-base-url-1": {
3520
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3521
+ "env": "PRIMITIVE_API_BASE_URL_1",
3522
+ "hidden": true,
3523
+ "name": "api-base-url-1",
1855
3524
  "hasDynamicHelp": false,
1856
3525
  "multiple": false,
1857
3526
  "type": "option"
1858
3527
  },
1859
- "base-url": {
1860
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1861
- "env": "PRIMITIVE_API_URL",
1862
- "name": "base-url",
3528
+ "api-base-url-2": {
3529
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3530
+ "env": "PRIMITIVE_API_BASE_URL_2",
3531
+ "hidden": true,
3532
+ "name": "api-base-url-2",
1863
3533
  "hasDynamicHelp": false,
1864
3534
  "multiple": false,
1865
3535
  "type": "option"
@@ -1892,21 +3562,29 @@
1892
3562
  "multiple": false,
1893
3563
  "type": "option"
1894
3564
  },
1895
- "enabled": {
1896
- "description": "enabled",
1897
- "name": "enabled",
1898
- "allowNo": false,
1899
- "type": "boolean"
3565
+ "code": {
3566
+ "description": "New bundled handler. Same rules as CreateFunctionInput.code.",
3567
+ "name": "code",
3568
+ "hasDynamicHelp": false,
3569
+ "multiple": false,
3570
+ "type": "option"
3571
+ },
3572
+ "sourceMap": {
3573
+ "description": "sourceMap",
3574
+ "name": "sourceMap",
3575
+ "hasDynamicHelp": false,
3576
+ "multiple": false,
3577
+ "type": "option"
1900
3578
  }
1901
3579
  },
1902
3580
  "hasDynamicHelp": false,
1903
3581
  "hiddenAliases": [],
1904
- "id": "filters:update-filter",
3582
+ "id": "functions:update-function",
1905
3583
  "pluginAlias": "@primitivedotdev/sdk",
1906
3584
  "pluginName": "@primitivedotdev/sdk",
1907
3585
  "pluginType": "core",
1908
3586
  "strict": true,
1909
- "summary": "Update a filter rule",
3587
+ "summary": "Update and redeploy a function",
1910
3588
  "enableJsonFlag": false
1911
3589
  },
1912
3590
  "sending:get-send-permissions": {
@@ -1922,10 +3600,20 @@
1922
3600
  "multiple": false,
1923
3601
  "type": "option"
1924
3602
  },
1925
- "base-url": {
1926
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1927
- "env": "PRIMITIVE_API_URL",
1928
- "name": "base-url",
3603
+ "api-base-url-1": {
3604
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3605
+ "env": "PRIMITIVE_API_BASE_URL_1",
3606
+ "hidden": true,
3607
+ "name": "api-base-url-1",
3608
+ "hasDynamicHelp": false,
3609
+ "multiple": false,
3610
+ "type": "option"
3611
+ },
3612
+ "api-base-url-2": {
3613
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3614
+ "env": "PRIMITIVE_API_BASE_URL_2",
3615
+ "hidden": true,
3616
+ "name": "api-base-url-2",
1929
3617
  "hasDynamicHelp": false,
1930
3618
  "multiple": false,
1931
3619
  "type": "option"
@@ -1960,10 +3648,20 @@
1960
3648
  "multiple": false,
1961
3649
  "type": "option"
1962
3650
  },
1963
- "base-url": {
1964
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
1965
- "env": "PRIMITIVE_API_URL",
1966
- "name": "base-url",
3651
+ "api-base-url-1": {
3652
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3653
+ "env": "PRIMITIVE_API_BASE_URL_1",
3654
+ "hidden": true,
3655
+ "name": "api-base-url-1",
3656
+ "hasDynamicHelp": false,
3657
+ "multiple": false,
3658
+ "type": "option"
3659
+ },
3660
+ "api-base-url-2": {
3661
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3662
+ "env": "PRIMITIVE_API_BASE_URL_2",
3663
+ "hidden": true,
3664
+ "name": "api-base-url-2",
1967
3665
  "hasDynamicHelp": false,
1968
3666
  "multiple": false,
1969
3667
  "type": "option"
@@ -2006,10 +3704,20 @@
2006
3704
  "multiple": false,
2007
3705
  "type": "option"
2008
3706
  },
2009
- "base-url": {
2010
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2011
- "env": "PRIMITIVE_API_URL",
2012
- "name": "base-url",
3707
+ "api-base-url-1": {
3708
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3709
+ "env": "PRIMITIVE_API_BASE_URL_1",
3710
+ "hidden": true,
3711
+ "name": "api-base-url-1",
3712
+ "hasDynamicHelp": false,
3713
+ "multiple": false,
3714
+ "type": "option"
3715
+ },
3716
+ "api-base-url-2": {
3717
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3718
+ "env": "PRIMITIVE_API_BASE_URL_2",
3719
+ "hidden": true,
3720
+ "name": "api-base-url-2",
2013
3721
  "hasDynamicHelp": false,
2014
3722
  "multiple": false,
2015
3723
  "type": "option"
@@ -2100,10 +3808,20 @@
2100
3808
  "multiple": false,
2101
3809
  "type": "option"
2102
3810
  },
2103
- "base-url": {
2104
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2105
- "env": "PRIMITIVE_API_URL",
2106
- "name": "base-url",
3811
+ "api-base-url-1": {
3812
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3813
+ "env": "PRIMITIVE_API_BASE_URL_1",
3814
+ "hidden": true,
3815
+ "name": "api-base-url-1",
3816
+ "hasDynamicHelp": false,
3817
+ "multiple": false,
3818
+ "type": "option"
3819
+ },
3820
+ "api-base-url-2": {
3821
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3822
+ "env": "PRIMITIVE_API_BASE_URL_2",
3823
+ "hidden": true,
3824
+ "name": "api-base-url-2",
2107
3825
  "hasDynamicHelp": false,
2108
3826
  "multiple": false,
2109
3827
  "type": "option"
@@ -2177,7 +3895,7 @@
2177
3895
  "sending:send-email": {
2178
3896
  "aliases": [],
2179
3897
  "args": {},
2180
- "description": "Sends an outbound email through Primitive's outbound relay. By default\nthe request returns once the relay accepts the message for delivery.\nSet `wait: true` to wait for the first downstream SMTP delivery outcome.\n\n\nBody fields requiring --raw-body JSON (these are not exposed as flags):\n references array<string> Full ordered message-id chain for the thread.\n(* = required. Scalar body fields are exposed as individual --flag-name flags; see FLAGS above.)",
3898
+ "description": "Sends an outbound email through Primitive's outbound relay. By default\nthe request returns once the relay accepts the message for delivery.\nSet `wait: true` to wait for the first downstream SMTP delivery outcome.\n\n**Host routing.** /send-mail is served by the attachments-\nsupporting host (`https://api.primitive.dev/v1`) so the\nrequest body can carry inline attachments up to ~30 MiB raw.\nThe primary host (`https://www.primitive.dev/api/v1`) also\naccepts /send-mail for attachment-free sends; sends WITH\nattachments to the primary host return 413\n`attachments_unsupported_on_this_endpoint`. The typed SDKs\nroute /send-mail to the attachments host automatically.\n\n\nBody fields requiring --raw-body JSON (these are not exposed as flags):\n references array<string> Full ordered message-id chain for the thread.\n(* = required. Scalar body fields are exposed as individual --flag-name flags; see FLAGS above.)",
2181
3899
  "flags": {
2182
3900
  "api-key": {
2183
3901
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -2187,10 +3905,20 @@
2187
3905
  "multiple": false,
2188
3906
  "type": "option"
2189
3907
  },
2190
- "base-url": {
2191
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2192
- "env": "PRIMITIVE_API_URL",
2193
- "name": "base-url",
3908
+ "api-base-url-1": {
3909
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
3910
+ "env": "PRIMITIVE_API_BASE_URL_1",
3911
+ "hidden": true,
3912
+ "name": "api-base-url-1",
3913
+ "hasDynamicHelp": false,
3914
+ "multiple": false,
3915
+ "type": "option"
3916
+ },
3917
+ "api-base-url-2": {
3918
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
3919
+ "env": "PRIMITIVE_API_BASE_URL_2",
3920
+ "hidden": true,
3921
+ "name": "api-base-url-2",
2194
3922
  "hasDynamicHelp": false,
2195
3923
  "multiple": false,
2196
3924
  "type": "option"
@@ -2294,10 +4022,20 @@
2294
4022
  "multiple": false,
2295
4023
  "type": "option"
2296
4024
  },
2297
- "base-url": {
2298
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2299
- "env": "PRIMITIVE_API_URL",
2300
- "name": "base-url",
4025
+ "api-base-url-1": {
4026
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
4027
+ "env": "PRIMITIVE_API_BASE_URL_1",
4028
+ "hidden": true,
4029
+ "name": "api-base-url-1",
4030
+ "hasDynamicHelp": false,
4031
+ "multiple": false,
4032
+ "type": "option"
4033
+ },
4034
+ "api-base-url-2": {
4035
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
4036
+ "env": "PRIMITIVE_API_BASE_URL_2",
4037
+ "hidden": true,
4038
+ "name": "api-base-url-2",
2301
4039
  "hasDynamicHelp": false,
2302
4040
  "multiple": false,
2303
4041
  "type": "option"
@@ -2386,10 +4124,20 @@
2386
4124
  "multiple": false,
2387
4125
  "type": "option"
2388
4126
  },
2389
- "base-url": {
2390
- "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2391
- "env": "PRIMITIVE_API_URL",
2392
- "name": "base-url",
4127
+ "api-base-url-1": {
4128
+ "description": "Override the primary API base URL. Internal testing only; not documented to customers.",
4129
+ "env": "PRIMITIVE_API_BASE_URL_1",
4130
+ "hidden": true,
4131
+ "name": "api-base-url-1",
4132
+ "hasDynamicHelp": false,
4133
+ "multiple": false,
4134
+ "type": "option"
4135
+ },
4136
+ "api-base-url-2": {
4137
+ "description": "Override the attachments-supporting send host base URL. Internal testing only; not documented to customers.",
4138
+ "env": "PRIMITIVE_API_BASE_URL_2",
4139
+ "hidden": true,
4140
+ "name": "api-base-url-2",
2393
4141
  "hasDynamicHelp": false,
2394
4142
  "multiple": false,
2395
4143
  "type": "option"
@@ -2420,5 +4168,5 @@
2420
4168
  "enableJsonFlag": false
2421
4169
  }
2422
4170
  },
2423
- "version": "0.19.0"
4171
+ "version": "0.21.0"
2424
4172
  }