@primitivedotdev/sdk 0.19.0 → 0.20.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.
@@ -344,6 +344,136 @@
344
344
  "summary": "Show the most recent inbound emails as a compact table",
345
345
  "enableJsonFlag": false
346
346
  },
347
+ "functions:deploy": {
348
+ "aliases": [],
349
+ "args": {},
350
+ "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.).",
351
+ "examples": [
352
+ "<%= config.bin %> functions:deploy --name forwarder --file ./bundle.js",
353
+ "<%= config.bin %> functions:deploy --name forwarder --file ./bundle.js --source-map-file ./bundle.js.map"
354
+ ],
355
+ "flags": {
356
+ "api-key": {
357
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
358
+ "env": "PRIMITIVE_API_KEY",
359
+ "name": "api-key",
360
+ "hasDynamicHelp": false,
361
+ "multiple": false,
362
+ "type": "option"
363
+ },
364
+ "base-url": {
365
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
366
+ "env": "PRIMITIVE_API_URL",
367
+ "name": "base-url",
368
+ "hasDynamicHelp": false,
369
+ "multiple": false,
370
+ "type": "option"
371
+ },
372
+ "name": {
373
+ "description": "Slug-style name. Lowercase letters, digits, hyphens, underscores. 1-64 chars. Must be unique within the org.",
374
+ "name": "name",
375
+ "required": true,
376
+ "hasDynamicHelp": false,
377
+ "multiple": false,
378
+ "type": "option"
379
+ },
380
+ "file": {
381
+ "description": "Path to the bundled ESM handler file (single self-contained module). Loaded as the `code` body field.",
382
+ "name": "file",
383
+ "required": true,
384
+ "hasDynamicHelp": false,
385
+ "multiple": false,
386
+ "type": "option"
387
+ },
388
+ "source-map-file": {
389
+ "description": "Optional path to a source map for the bundle. Stored only on the runtime side and used to symbolicate stack traces.",
390
+ "name": "source-map-file",
391
+ "hasDynamicHelp": false,
392
+ "multiple": false,
393
+ "type": "option"
394
+ },
395
+ "time": {
396
+ "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.",
397
+ "name": "time",
398
+ "allowNo": false,
399
+ "type": "boolean"
400
+ }
401
+ },
402
+ "hasDynamicHelp": false,
403
+ "hiddenAliases": [],
404
+ "id": "functions:deploy",
405
+ "pluginAlias": "@primitivedotdev/sdk",
406
+ "pluginName": "@primitivedotdev/sdk",
407
+ "pluginType": "core",
408
+ "strict": true,
409
+ "summary": "Deploy a new function from a bundled handler file",
410
+ "enableJsonFlag": false
411
+ },
412
+ "functions:redeploy": {
413
+ "aliases": [],
414
+ "args": {},
415
+ "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.",
416
+ "examples": [
417
+ "<%= config.bin %> functions:redeploy --id <fn-id> --file ./bundle.js",
418
+ "<%= config.bin %> functions:redeploy --id <fn-id> --file ./bundle.js --source-map-file ./bundle.js.map"
419
+ ],
420
+ "flags": {
421
+ "api-key": {
422
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
423
+ "env": "PRIMITIVE_API_KEY",
424
+ "name": "api-key",
425
+ "hasDynamicHelp": false,
426
+ "multiple": false,
427
+ "type": "option"
428
+ },
429
+ "base-url": {
430
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
431
+ "env": "PRIMITIVE_API_URL",
432
+ "name": "base-url",
433
+ "hasDynamicHelp": false,
434
+ "multiple": false,
435
+ "type": "option"
436
+ },
437
+ "id": {
438
+ "description": "Function id (UUID). The function must already exist.",
439
+ "name": "id",
440
+ "required": true,
441
+ "hasDynamicHelp": false,
442
+ "multiple": false,
443
+ "type": "option"
444
+ },
445
+ "file": {
446
+ "description": "Path to the bundled ESM handler file. Loaded as the `code` body field.",
447
+ "name": "file",
448
+ "required": true,
449
+ "hasDynamicHelp": false,
450
+ "multiple": false,
451
+ "type": "option"
452
+ },
453
+ "source-map-file": {
454
+ "description": "Optional path to a source map for the bundle. Used to symbolicate stack traces in the function's logs.",
455
+ "name": "source-map-file",
456
+ "hasDynamicHelp": false,
457
+ "multiple": false,
458
+ "type": "option"
459
+ },
460
+ "time": {
461
+ "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.",
462
+ "name": "time",
463
+ "allowNo": false,
464
+ "type": "boolean"
465
+ }
466
+ },
467
+ "hasDynamicHelp": false,
468
+ "hiddenAliases": [],
469
+ "id": "functions:redeploy",
470
+ "pluginAlias": "@primitivedotdev/sdk",
471
+ "pluginName": "@primitivedotdev/sdk",
472
+ "pluginType": "core",
473
+ "strict": true,
474
+ "summary": "Redeploy a function from a bundled handler file",
475
+ "enableJsonFlag": false
476
+ },
347
477
  "account:get-account": {
348
478
  "aliases": [],
349
479
  "args": {},
@@ -1909,6 +2039,578 @@
1909
2039
  "summary": "Update a filter rule",
1910
2040
  "enableJsonFlag": false
1911
2041
  },
2042
+ "functions:create-function": {
2043
+ "aliases": [],
2044
+ "args": {},
2045
+ "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",
2046
+ "flags": {
2047
+ "api-key": {
2048
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2049
+ "env": "PRIMITIVE_API_KEY",
2050
+ "name": "api-key",
2051
+ "hasDynamicHelp": false,
2052
+ "multiple": false,
2053
+ "type": "option"
2054
+ },
2055
+ "base-url": {
2056
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2057
+ "env": "PRIMITIVE_API_URL",
2058
+ "name": "base-url",
2059
+ "hasDynamicHelp": false,
2060
+ "multiple": false,
2061
+ "type": "option"
2062
+ },
2063
+ "time": {
2064
+ "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.",
2065
+ "name": "time",
2066
+ "allowNo": false,
2067
+ "type": "boolean"
2068
+ },
2069
+ "raw-body": {
2070
+ "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.",
2071
+ "name": "raw-body",
2072
+ "hasDynamicHelp": false,
2073
+ "multiple": false,
2074
+ "type": "option"
2075
+ },
2076
+ "body-file": {
2077
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2078
+ "name": "body-file",
2079
+ "hasDynamicHelp": false,
2080
+ "multiple": false,
2081
+ "type": "option"
2082
+ },
2083
+ "code": {
2084
+ "description": "Bundled handler as a single ESM module. Up to 1 MiB UTF-8. Must export a default `{ async fetch(req, env, ctx) { ... } }` object.",
2085
+ "name": "code",
2086
+ "hasDynamicHelp": false,
2087
+ "multiple": false,
2088
+ "type": "option"
2089
+ },
2090
+ "name": {
2091
+ "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.",
2092
+ "name": "name",
2093
+ "hasDynamicHelp": false,
2094
+ "multiple": false,
2095
+ "type": "option"
2096
+ },
2097
+ "sourceMap": {
2098
+ "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.",
2099
+ "name": "sourceMap",
2100
+ "hasDynamicHelp": false,
2101
+ "multiple": false,
2102
+ "type": "option"
2103
+ }
2104
+ },
2105
+ "hasDynamicHelp": false,
2106
+ "hiddenAliases": [],
2107
+ "id": "functions:create-function",
2108
+ "pluginAlias": "@primitivedotdev/sdk",
2109
+ "pluginName": "@primitivedotdev/sdk",
2110
+ "pluginType": "core",
2111
+ "strict": true,
2112
+ "summary": "Deploy a function",
2113
+ "enableJsonFlag": false
2114
+ },
2115
+ "functions:create-function-secret": {
2116
+ "aliases": [],
2117
+ "args": {},
2118
+ "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",
2119
+ "flags": {
2120
+ "api-key": {
2121
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2122
+ "env": "PRIMITIVE_API_KEY",
2123
+ "name": "api-key",
2124
+ "hasDynamicHelp": false,
2125
+ "multiple": false,
2126
+ "type": "option"
2127
+ },
2128
+ "base-url": {
2129
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2130
+ "env": "PRIMITIVE_API_URL",
2131
+ "name": "base-url",
2132
+ "hasDynamicHelp": false,
2133
+ "multiple": false,
2134
+ "type": "option"
2135
+ },
2136
+ "time": {
2137
+ "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.",
2138
+ "name": "time",
2139
+ "allowNo": false,
2140
+ "type": "boolean"
2141
+ },
2142
+ "id": {
2143
+ "description": "Resource UUID",
2144
+ "name": "id",
2145
+ "required": true,
2146
+ "hasDynamicHelp": false,
2147
+ "multiple": false,
2148
+ "type": "option"
2149
+ },
2150
+ "raw-body": {
2151
+ "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.",
2152
+ "name": "raw-body",
2153
+ "hasDynamicHelp": false,
2154
+ "multiple": false,
2155
+ "type": "option"
2156
+ },
2157
+ "body-file": {
2158
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2159
+ "name": "body-file",
2160
+ "hasDynamicHelp": false,
2161
+ "multiple": false,
2162
+ "type": "option"
2163
+ },
2164
+ "key": {
2165
+ "description": "Uppercase letters, digits, and underscores. Must start with a letter or underscore. System-managed keys (e.g. PRIMITIVE_WEBHOOK_SECRET) are reserved.",
2166
+ "name": "key",
2167
+ "hasDynamicHelp": false,
2168
+ "multiple": false,
2169
+ "type": "option"
2170
+ },
2171
+ "value": {
2172
+ "description": "Secret value, up to 4096 UTF-8 bytes. Encrypted at rest. Never returned by any read endpoint.",
2173
+ "name": "value",
2174
+ "hasDynamicHelp": false,
2175
+ "multiple": false,
2176
+ "type": "option"
2177
+ }
2178
+ },
2179
+ "hasDynamicHelp": false,
2180
+ "hiddenAliases": [],
2181
+ "id": "functions:create-function-secret",
2182
+ "pluginAlias": "@primitivedotdev/sdk",
2183
+ "pluginName": "@primitivedotdev/sdk",
2184
+ "pluginType": "core",
2185
+ "strict": true,
2186
+ "summary": "Create or update a secret",
2187
+ "enableJsonFlag": false
2188
+ },
2189
+ "functions:delete-function": {
2190
+ "aliases": [],
2191
+ "args": {},
2192
+ "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",
2193
+ "flags": {
2194
+ "api-key": {
2195
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2196
+ "env": "PRIMITIVE_API_KEY",
2197
+ "name": "api-key",
2198
+ "hasDynamicHelp": false,
2199
+ "multiple": false,
2200
+ "type": "option"
2201
+ },
2202
+ "base-url": {
2203
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2204
+ "env": "PRIMITIVE_API_URL",
2205
+ "name": "base-url",
2206
+ "hasDynamicHelp": false,
2207
+ "multiple": false,
2208
+ "type": "option"
2209
+ },
2210
+ "time": {
2211
+ "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.",
2212
+ "name": "time",
2213
+ "allowNo": false,
2214
+ "type": "boolean"
2215
+ },
2216
+ "id": {
2217
+ "description": "Resource UUID",
2218
+ "name": "id",
2219
+ "required": true,
2220
+ "hasDynamicHelp": false,
2221
+ "multiple": false,
2222
+ "type": "option"
2223
+ }
2224
+ },
2225
+ "hasDynamicHelp": false,
2226
+ "hiddenAliases": [],
2227
+ "id": "functions:delete-function",
2228
+ "pluginAlias": "@primitivedotdev/sdk",
2229
+ "pluginName": "@primitivedotdev/sdk",
2230
+ "pluginType": "core",
2231
+ "strict": true,
2232
+ "summary": "Delete a function",
2233
+ "enableJsonFlag": false
2234
+ },
2235
+ "functions:delete-function-secret": {
2236
+ "aliases": [],
2237
+ "args": {},
2238
+ "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",
2239
+ "flags": {
2240
+ "api-key": {
2241
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2242
+ "env": "PRIMITIVE_API_KEY",
2243
+ "name": "api-key",
2244
+ "hasDynamicHelp": false,
2245
+ "multiple": false,
2246
+ "type": "option"
2247
+ },
2248
+ "base-url": {
2249
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2250
+ "env": "PRIMITIVE_API_URL",
2251
+ "name": "base-url",
2252
+ "hasDynamicHelp": false,
2253
+ "multiple": false,
2254
+ "type": "option"
2255
+ },
2256
+ "time": {
2257
+ "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.",
2258
+ "name": "time",
2259
+ "allowNo": false,
2260
+ "type": "boolean"
2261
+ },
2262
+ "id": {
2263
+ "description": "Resource UUID",
2264
+ "name": "id",
2265
+ "required": true,
2266
+ "hasDynamicHelp": false,
2267
+ "multiple": false,
2268
+ "type": "option"
2269
+ },
2270
+ "key": {
2271
+ "description": "Secret key. Must match `^[A-Z_][A-Z0-9_]*$`.",
2272
+ "name": "key",
2273
+ "required": true,
2274
+ "hasDynamicHelp": false,
2275
+ "multiple": false,
2276
+ "type": "option"
2277
+ }
2278
+ },
2279
+ "hasDynamicHelp": false,
2280
+ "hiddenAliases": [],
2281
+ "id": "functions:delete-function-secret",
2282
+ "pluginAlias": "@primitivedotdev/sdk",
2283
+ "pluginName": "@primitivedotdev/sdk",
2284
+ "pluginType": "core",
2285
+ "strict": true,
2286
+ "summary": "Delete a secret",
2287
+ "enableJsonFlag": false
2288
+ },
2289
+ "functions:get-function": {
2290
+ "aliases": [],
2291
+ "args": {},
2292
+ "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",
2293
+ "flags": {
2294
+ "api-key": {
2295
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2296
+ "env": "PRIMITIVE_API_KEY",
2297
+ "name": "api-key",
2298
+ "hasDynamicHelp": false,
2299
+ "multiple": false,
2300
+ "type": "option"
2301
+ },
2302
+ "base-url": {
2303
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2304
+ "env": "PRIMITIVE_API_URL",
2305
+ "name": "base-url",
2306
+ "hasDynamicHelp": false,
2307
+ "multiple": false,
2308
+ "type": "option"
2309
+ },
2310
+ "time": {
2311
+ "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.",
2312
+ "name": "time",
2313
+ "allowNo": false,
2314
+ "type": "boolean"
2315
+ },
2316
+ "id": {
2317
+ "description": "Resource UUID",
2318
+ "name": "id",
2319
+ "required": true,
2320
+ "hasDynamicHelp": false,
2321
+ "multiple": false,
2322
+ "type": "option"
2323
+ }
2324
+ },
2325
+ "hasDynamicHelp": false,
2326
+ "hiddenAliases": [],
2327
+ "id": "functions:get-function",
2328
+ "pluginAlias": "@primitivedotdev/sdk",
2329
+ "pluginName": "@primitivedotdev/sdk",
2330
+ "pluginType": "core",
2331
+ "strict": true,
2332
+ "summary": "Get a function",
2333
+ "enableJsonFlag": false
2334
+ },
2335
+ "functions:list-function-secrets": {
2336
+ "aliases": [],
2337
+ "args": {},
2338
+ "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",
2339
+ "flags": {
2340
+ "api-key": {
2341
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2342
+ "env": "PRIMITIVE_API_KEY",
2343
+ "name": "api-key",
2344
+ "hasDynamicHelp": false,
2345
+ "multiple": false,
2346
+ "type": "option"
2347
+ },
2348
+ "base-url": {
2349
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2350
+ "env": "PRIMITIVE_API_URL",
2351
+ "name": "base-url",
2352
+ "hasDynamicHelp": false,
2353
+ "multiple": false,
2354
+ "type": "option"
2355
+ },
2356
+ "time": {
2357
+ "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.",
2358
+ "name": "time",
2359
+ "allowNo": false,
2360
+ "type": "boolean"
2361
+ },
2362
+ "id": {
2363
+ "description": "Resource UUID",
2364
+ "name": "id",
2365
+ "required": true,
2366
+ "hasDynamicHelp": false,
2367
+ "multiple": false,
2368
+ "type": "option"
2369
+ }
2370
+ },
2371
+ "hasDynamicHelp": false,
2372
+ "hiddenAliases": [],
2373
+ "id": "functions:list-function-secrets",
2374
+ "pluginAlias": "@primitivedotdev/sdk",
2375
+ "pluginName": "@primitivedotdev/sdk",
2376
+ "pluginType": "core",
2377
+ "strict": true,
2378
+ "summary": "List a function's secrets",
2379
+ "enableJsonFlag": false
2380
+ },
2381
+ "functions:list-functions": {
2382
+ "aliases": [],
2383
+ "args": {},
2384
+ "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",
2385
+ "flags": {
2386
+ "api-key": {
2387
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2388
+ "env": "PRIMITIVE_API_KEY",
2389
+ "name": "api-key",
2390
+ "hasDynamicHelp": false,
2391
+ "multiple": false,
2392
+ "type": "option"
2393
+ },
2394
+ "base-url": {
2395
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2396
+ "env": "PRIMITIVE_API_URL",
2397
+ "name": "base-url",
2398
+ "hasDynamicHelp": false,
2399
+ "multiple": false,
2400
+ "type": "option"
2401
+ },
2402
+ "time": {
2403
+ "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.",
2404
+ "name": "time",
2405
+ "allowNo": false,
2406
+ "type": "boolean"
2407
+ }
2408
+ },
2409
+ "hasDynamicHelp": false,
2410
+ "hiddenAliases": [],
2411
+ "id": "functions:list-functions",
2412
+ "pluginAlias": "@primitivedotdev/sdk",
2413
+ "pluginName": "@primitivedotdev/sdk",
2414
+ "pluginType": "core",
2415
+ "strict": true,
2416
+ "summary": "List functions",
2417
+ "enableJsonFlag": false
2418
+ },
2419
+ "functions:set-function-secret": {
2420
+ "aliases": [],
2421
+ "args": {},
2422
+ "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",
2423
+ "flags": {
2424
+ "api-key": {
2425
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2426
+ "env": "PRIMITIVE_API_KEY",
2427
+ "name": "api-key",
2428
+ "hasDynamicHelp": false,
2429
+ "multiple": false,
2430
+ "type": "option"
2431
+ },
2432
+ "base-url": {
2433
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2434
+ "env": "PRIMITIVE_API_URL",
2435
+ "name": "base-url",
2436
+ "hasDynamicHelp": false,
2437
+ "multiple": false,
2438
+ "type": "option"
2439
+ },
2440
+ "time": {
2441
+ "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.",
2442
+ "name": "time",
2443
+ "allowNo": false,
2444
+ "type": "boolean"
2445
+ },
2446
+ "id": {
2447
+ "description": "Resource UUID",
2448
+ "name": "id",
2449
+ "required": true,
2450
+ "hasDynamicHelp": false,
2451
+ "multiple": false,
2452
+ "type": "option"
2453
+ },
2454
+ "key": {
2455
+ "description": "Secret key. Must match `^[A-Z_][A-Z0-9_]*$`.",
2456
+ "name": "key",
2457
+ "required": true,
2458
+ "hasDynamicHelp": false,
2459
+ "multiple": false,
2460
+ "type": "option"
2461
+ },
2462
+ "raw-body": {
2463
+ "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.",
2464
+ "name": "raw-body",
2465
+ "hasDynamicHelp": false,
2466
+ "multiple": false,
2467
+ "type": "option"
2468
+ },
2469
+ "body-file": {
2470
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2471
+ "name": "body-file",
2472
+ "hasDynamicHelp": false,
2473
+ "multiple": false,
2474
+ "type": "option"
2475
+ },
2476
+ "value": {
2477
+ "description": "value",
2478
+ "name": "value",
2479
+ "hasDynamicHelp": false,
2480
+ "multiple": false,
2481
+ "type": "option"
2482
+ }
2483
+ },
2484
+ "hasDynamicHelp": false,
2485
+ "hiddenAliases": [],
2486
+ "id": "functions:set-function-secret",
2487
+ "pluginAlias": "@primitivedotdev/sdk",
2488
+ "pluginName": "@primitivedotdev/sdk",
2489
+ "pluginType": "core",
2490
+ "strict": true,
2491
+ "summary": "Set a secret by key",
2492
+ "enableJsonFlag": false
2493
+ },
2494
+ "functions:test-function": {
2495
+ "aliases": [],
2496
+ "args": {},
2497
+ "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",
2498
+ "flags": {
2499
+ "api-key": {
2500
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2501
+ "env": "PRIMITIVE_API_KEY",
2502
+ "name": "api-key",
2503
+ "hasDynamicHelp": false,
2504
+ "multiple": false,
2505
+ "type": "option"
2506
+ },
2507
+ "base-url": {
2508
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2509
+ "env": "PRIMITIVE_API_URL",
2510
+ "name": "base-url",
2511
+ "hasDynamicHelp": false,
2512
+ "multiple": false,
2513
+ "type": "option"
2514
+ },
2515
+ "time": {
2516
+ "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.",
2517
+ "name": "time",
2518
+ "allowNo": false,
2519
+ "type": "boolean"
2520
+ },
2521
+ "id": {
2522
+ "description": "Resource UUID",
2523
+ "name": "id",
2524
+ "required": true,
2525
+ "hasDynamicHelp": false,
2526
+ "multiple": false,
2527
+ "type": "option"
2528
+ }
2529
+ },
2530
+ "hasDynamicHelp": false,
2531
+ "hiddenAliases": [],
2532
+ "id": "functions:test-function",
2533
+ "pluginAlias": "@primitivedotdev/sdk",
2534
+ "pluginName": "@primitivedotdev/sdk",
2535
+ "pluginType": "core",
2536
+ "strict": true,
2537
+ "summary": "Send a test invocation",
2538
+ "enableJsonFlag": false
2539
+ },
2540
+ "functions:update-function": {
2541
+ "aliases": [],
2542
+ "args": {},
2543
+ "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",
2544
+ "flags": {
2545
+ "api-key": {
2546
+ "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
2547
+ "env": "PRIMITIVE_API_KEY",
2548
+ "name": "api-key",
2549
+ "hasDynamicHelp": false,
2550
+ "multiple": false,
2551
+ "type": "option"
2552
+ },
2553
+ "base-url": {
2554
+ "description": "API base URL (defaults to PRIMITIVE_API_URL or production)",
2555
+ "env": "PRIMITIVE_API_URL",
2556
+ "name": "base-url",
2557
+ "hasDynamicHelp": false,
2558
+ "multiple": false,
2559
+ "type": "option"
2560
+ },
2561
+ "time": {
2562
+ "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.",
2563
+ "name": "time",
2564
+ "allowNo": false,
2565
+ "type": "boolean"
2566
+ },
2567
+ "id": {
2568
+ "description": "Resource UUID",
2569
+ "name": "id",
2570
+ "required": true,
2571
+ "hasDynamicHelp": false,
2572
+ "multiple": false,
2573
+ "type": "option"
2574
+ },
2575
+ "raw-body": {
2576
+ "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.",
2577
+ "name": "raw-body",
2578
+ "hasDynamicHelp": false,
2579
+ "multiple": false,
2580
+ "type": "option"
2581
+ },
2582
+ "body-file": {
2583
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
2584
+ "name": "body-file",
2585
+ "hasDynamicHelp": false,
2586
+ "multiple": false,
2587
+ "type": "option"
2588
+ },
2589
+ "code": {
2590
+ "description": "New bundled handler. Same rules as CreateFunctionInput.code.",
2591
+ "name": "code",
2592
+ "hasDynamicHelp": false,
2593
+ "multiple": false,
2594
+ "type": "option"
2595
+ },
2596
+ "sourceMap": {
2597
+ "description": "sourceMap",
2598
+ "name": "sourceMap",
2599
+ "hasDynamicHelp": false,
2600
+ "multiple": false,
2601
+ "type": "option"
2602
+ }
2603
+ },
2604
+ "hasDynamicHelp": false,
2605
+ "hiddenAliases": [],
2606
+ "id": "functions:update-function",
2607
+ "pluginAlias": "@primitivedotdev/sdk",
2608
+ "pluginName": "@primitivedotdev/sdk",
2609
+ "pluginType": "core",
2610
+ "strict": true,
2611
+ "summary": "Update and redeploy a function",
2612
+ "enableJsonFlag": false
2613
+ },
1912
2614
  "sending:get-send-permissions": {
1913
2615
  "aliases": [],
1914
2616
  "args": {},
@@ -2420,5 +3122,5 @@
2420
3122
  "enableJsonFlag": false
2421
3123
  }
2422
3124
  },
2423
- "version": "0.19.0"
3125
+ "version": "0.20.0"
2424
3126
  }