wawesome 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -316,8 +316,8 @@ A credential carries `deploy`, reaches every App in the workspace, and expires i
316
316
  you say otherwise:
317
317
 
318
318
  ```bash
319
- # reads logs and cannot deploy, restricted to one App, never expires
320
- npx wawesome credentials mint agent -c logs:read -a prod --expires never
319
+ # reads and runs what somebody else shipped, restricted to one App, never expires
320
+ npx wawesome credentials mint agent -c read,logs:read,invoke -a prod --expires never
321
321
 
322
322
  # ships code and attaches the domain the project declares
323
323
  npx wawesome credentials mint ci -c deploy,domains:attach -a prod
@@ -325,14 +325,18 @@ npx wawesome credentials mint ci -c deploy,domains:attach -a prod
325
325
 
326
326
  | Flag | Meaning |
327
327
  |:---------------------|:------------------------------------------------------------------------------|
328
- | `-c, --capability` | `deploy`, `logs:read`, `domains:attach`, or any mix. Repeatable or comma-separated. Default `deploy` |
328
+ | `-c, --capability` | `deploy`, `read`, `logs:read`, `invoke`, `domains:attach`, or any mix. Repeatable or comma-separated. Default `deploy` |
329
329
  | `-a, --app` | Restrict to these Apps, by slug. Repeatable. Default: every App in the workspace |
330
330
  | `--expires` | Days, or `never`. Default: 90 |
331
331
 
332
+ `deploy` reaches the reads of what it writes, so a credential minted with it carries `read` as well:
333
+ it lists the workspace, the Apps in it, the Functions in an App and their versions. The command
334
+ prints the words the credential ended up with.
335
+
332
336
  An App named in a restriction does not have to exist yet. A pipeline whose first deploy creates the
333
- App it was minted for is the ordinary case. A restriction bounds what a credential can disturb, not
334
- what it can read. A Function deployed into one App still reads the whole workspace's environment at
335
- runtime.
337
+ App it was minted for is the ordinary case. A restriction bounds what a credential reads as well as
338
+ what it disturbs, and `deploy` is the hole in it: a Function deployed into an App the credential does
339
+ reach still reads the whole workspace's environment at runtime.
336
340
 
337
341
  ### List them
338
342
 
@@ -395,6 +399,159 @@ looking in their CI settings instead of your dashboard.
395
399
 
396
400
  ---
397
401
 
402
+ ## Your agent, over MCP
403
+
404
+ The same deploy credential connects a coding agent to your workspace, over MCP. Nothing to install and
405
+ no local process to keep running: it is an endpoint on the gateway, `https://api.wawesome.io/v1/mcp`,
406
+ and the credential is the whole of the authentication.
407
+
408
+ ### Install it
409
+
410
+ In Claude Code, one command:
411
+
412
+ ```bash
413
+ claude mcp add --transport http wawesome https://api.wawesome.io/v1/mcp \
414
+ --header "Authorization: Bearer wawe_..."
415
+ ```
416
+
417
+ In Cursor, `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` for every project:
418
+
419
+ ```json
420
+ {
421
+ "mcpServers": {
422
+ "wawesome": {
423
+ "url": "https://api.wawesome.io/v1/mcp",
424
+ "headers": { "Authorization": "Bearer wawe_..." }
425
+ }
426
+ }
427
+ }
428
+ ```
429
+
430
+ In VS Code, `.vscode/mcp.json` in the workspace, or the file **MCP: Open User Configuration** opens.
431
+ The shape is the same address and header map, under the key `servers` rather than `mcpServers`:
432
+
433
+ ```json
434
+ {
435
+ "servers": {
436
+ "wawesome": {
437
+ "type": "http",
438
+ "url": "https://api.wawesome.io/v1/mcp",
439
+ "headers": { "Authorization": "Bearer wawe_..." }
440
+ }
441
+ }
442
+ }
443
+ ```
444
+
445
+ A file inside the project is a file your repository carries, and the secret with it. VS Code takes an
446
+ `inputs` entry and a `${input:...}` placeholder in the header, so it asks once and holds the value
447
+ itself. In Cursor, put the credential in `~/.cursor/mcp.json`, which is outside every repository.
448
+
449
+ ### Where a bearer credential reaches
450
+
451
+ It works in Claude Code, the Claude Agent SDK, Cursor, VS Code, Windsurf, Zed and the Gemini CLI. It
452
+ works in every agent framework that takes a URL and a header map, among them the OpenAI Agents SDK,
453
+ LangChain, the Vercel AI SDK and Pydantic AI. Anything that speaks streamable HTTP MCP and lets you
454
+ set a header can connect.
455
+
456
+ Whichever protocol revision your client speaks, the endpoint answers it. It holds both eras at one
457
+ address: the current revision, `2026-07-28`, and the three handshake-based ones the installed base is
458
+ still on. A client ahead of your editor's next release connects, and so does one behind it.
459
+
460
+ It does **not** work in the connector dialog in claude.ai or Claude Desktop, or in ChatGPT
461
+ connectors. Those three accept "no authentication" or OAuth and have no field for a token, so there
462
+ is nowhere to put `wawe_...`. Reaching them needs an OAuth authorization server, which the platform
463
+ does not run today, and nothing you can configure works around that.
464
+
465
+ ### What your agent gets
466
+
467
+ Every tool is listed for every credential, and each one names the capability it needs. A credential
468
+ that does not carry that word is refused by name, so your agent tells you what to mint rather than
469
+ concluding the platform cannot do it.
470
+
471
+ | Tool | What it does | Needs |
472
+ |:---------------------------|:------------------------------------------------------------------------|:--------------|
473
+ | `list_templates` | The template catalogue, with what each one is for | nothing |
474
+ | `get_template` | One template's files, environment contract and outbound providers | nothing |
475
+ | `list_apps` | The Apps the credential reaches, with the slug each is addressed by | `read` |
476
+ | `list_functions` | The Functions in one App, and what their live version carries | `read` |
477
+ | `list_versions` | A Function's Versions, and which one is live | `read` |
478
+ | `get_usage` | The Tenant's usage and headroom | `read` |
479
+ | `list_invocations` | Recent Invocations of a Function, failures included | `logs:read` |
480
+ | `get_invocation` | One Invocation by id | `logs:read` |
481
+ | `read_invocation_logs` | An Invocation's log body, a page at a time | `logs:read` |
482
+ | `diagnose_latest_failure` | The latest failure, its logs and the Version that ran it, in one call | `logs:read`, `read` |
483
+ | `deploy_function` | Deploys code and the static files it carries | `deploy` |
484
+ | `deploy_status` | How a deploy went, by the handle it answered with | `deploy` |
485
+ | `rollback_function` | Puts a Version the Function already has back on its public address | `deploy` |
486
+ | `set_env_var` | Sets an App's environment variable, read at the next invocation | `deploy` |
487
+ | `invoke_function` | Runs a deployed Function once and answers with the Invocation id | `invoke` |
488
+
489
+ A deploy is two calls. The first says which of your files the platform does not already hold, by
490
+ content hash; your agent uploads those bytes to `PUT /v1/assets/{content_hash}` with the same
491
+ credential and asks again, so a redeploy that changed only its code uploads nothing. The second
492
+ answers with a handle rather than waiting for the build, because a dropped connection would otherwise
493
+ cancel a deploy that was going fine. `deploy_status` reads the handle whenever your agent asks.
494
+
495
+ When the deploy is out and something is wrong, `diagnose_latest_failure` answers the latest failed
496
+ run of a Function, that run's log output, and the version that ran it, in one call. Mirroring the
497
+ routes there costs four round trips and four chances to carry the wrong identifier between them.
498
+
499
+ Log output comes back a page at a time, with a cursor for the next one, and nothing is held open.
500
+ Your own `wawesome logs --follow` keeps running while your agent reads. One live tail per credential
501
+ is all the platform permits, and an agent taking it would end yours.
502
+
503
+ ### Which credential for which job
504
+
505
+ A credential carries the words its job needs and stops there. They are the same words
506
+ [Deploy credentials](#mint-one) mints with.
507
+
508
+ **Read and investigate, without the ability to ship.** The agent enumerates your Apps, reads
509
+ Functions, Versions, Invocations and log bodies, diagnoses a failure, checks usage, and browses
510
+ templates. Every tool that ships code or runs it refuses:
511
+
512
+ ```bash
513
+ npx wawesome credentials mint investigator -c read,logs:read -a prod
514
+ ```
515
+
516
+ **Read, investigate and run.** The same, plus `invoke_function`, so the agent can exercise a Function
517
+ and read what it did. It still cannot deploy, roll back, or set a variable:
518
+
519
+ ```bash
520
+ npx wawesome credentials mint runner -c read,logs:read,invoke -a prod
521
+ ```
522
+
523
+ **The whole loop.** Deploy, run, diagnose, roll back, set a key. Every tool in the table:
524
+
525
+ ```bash
526
+ npx wawesome credentials mint agent -c deploy,read,logs:read,invoke -a prod
527
+ ```
528
+
529
+ Add `domains:attach` where the project declares a custom domain the deploy should claim. Nothing
530
+ gives an agent billing, plan changes, credential management or your workspace's slug: those are
531
+ closed to every credential, whatever it carries.
532
+
533
+ Keep `-a` on all three. A credential restricted to one App is refused on every tool that names
534
+ another, which is what stops an agent working on one client's project from touching another's.
535
+ `get_invocation` and `read_invocation_logs` take an Invocation id rather than an App, and an id
536
+ belonging to an App the credential cannot reach is answered as an id naming nothing. `list_apps`
537
+ answers a set rather than one App, so it is narrowed instead of refused: the credential is listed the
538
+ Apps it reaches and told nothing about the rest.
539
+
540
+ ### When a tool refuses
541
+
542
+ A refusal is the tool's answer, not a protocol error, and it carries the same `reason` code the CLI
543
+ prints:
544
+
545
+ - `credential-missing-capability`. The credential does not carry a word this tool needs. The refusal
546
+ names it in `missing_capability`, which is the word to mint a credential with.
547
+ - `app-outside-credential-scope`. The credential is restricted to named Apps and this is not one of
548
+ them. A wider capability changes nothing here.
549
+
550
+ A quota refusal carries its numbers under `allowance` beside the prose, so your agent reports
551
+ "3 of 3 App slots" rather than handing you a sentence to read.
552
+
553
+ ---
554
+
398
555
  ## Configuration and a custom gateway
399
556
 
400
557
  ### `wawesome-function.json`
package/dist/index.mjs CHANGED
@@ -883,7 +883,7 @@ async function buildJs(entryInput, options) {
883
883
  * that has to name this version — `--version`, the dependency a scaffolded
884
884
  * project pins — reads it here, so a release bumps one file.
885
885
  */
886
- const CLI_VERSION = "0.14.0";
886
+ const CLI_VERSION = "0.14.2";
887
887
  //#endregion
888
888
  //#region src/prompt.ts
889
889
  /**
@@ -5519,7 +5519,7 @@ cli.command("credentials [action] [target]", "Mint, list, regenerate, revoke and
5519
5519
  Examples:
5520
5520
  wawesome credentials
5521
5521
  wawesome credentials mint ci-pipeline
5522
- wawesome credentials mint agent -c logs:read --expires never
5522
+ wawesome credentials mint agent -c read,logs:read,invoke --expires never
5523
5523
  wawesome credentials mint prod-deploy -c deploy -a prod --expires 30
5524
5524
  wawesome credentials mint ci -c deploy,domains:attach -a prod
5525
5525
  wawesome credentials mint ci-pipeline > /tmp/secret
@@ -5527,8 +5527,8 @@ cli.command("credentials [action] [target]", "Mint, list, regenerate, revoke and
5527
5527
  wawesome credentials regenerate ci --expires never --yes
5528
5528
  wawesome credentials revoke ci-pipeline
5529
5529
  wawesome credentials revoke wawe_ab3k9x --yes
5530
- wawesome credentials delete ci-pipeline`).option("-c, --capability <capability>", "Capability to grant: deploy, logs:read, domains:attach (repeatable or comma-separated, default: deploy)").option("-a, --app <app>", "Restrict the credential to this App (repeatable or comma-separated, default: every App)").option("--expires <days|never>", "Days until the credential expires, or 'never' (default: 90)").option("-y, --yes", "Skip the confirmation a regenerate, revoke or delete asks for").option("-v, --verbose", "Enable verbose debug output").action((action, target, options) => credentialsCommand(action, target, options));
5531
- cli.command("credentials mint <name>", "Mint a deploy credential, printing its secret exactly once").option("-c, --capability <capability>", "Capability to grant: deploy, logs:read, domains:attach (repeatable or comma-separated)").option("-a, --app <app>", "Restrict the credential to this App (repeatable or comma-separated)").option("--expires <days|never>", "Days until the credential expires, or 'never' (default: 90)").option("-v, --verbose", "Enable verbose debug output").action((name, options) => mintCredentialCommand(name, options));
5530
+ wawesome credentials delete ci-pipeline`).option("-c, --capability <capability>", "Capability to grant: deploy, read, logs:read, invoke, domains:attach (repeatable or comma-separated, default: deploy, which carries read)").option("-a, --app <app>", "Restrict the credential to this App (repeatable or comma-separated, default: every App)").option("--expires <days|never>", "Days until the credential expires, or 'never' (default: 90)").option("-y, --yes", "Skip the confirmation a regenerate, revoke or delete asks for").option("-v, --verbose", "Enable verbose debug output").action((action, target, options) => credentialsCommand(action, target, options));
5531
+ cli.command("credentials mint <name>", "Mint a deploy credential, printing its secret exactly once").option("-c, --capability <capability>", "Capability to grant: deploy, read, logs:read, invoke, domains:attach (repeatable or comma-separated; deploy carries read)").option("-a, --app <app>", "Restrict the credential to this App (repeatable or comma-separated)").option("--expires <days|never>", "Days until the credential expires, or 'never' (default: 90)").option("-v, --verbose", "Enable verbose debug output").action((name, options) => mintCredentialCommand(name, options));
5532
5532
  cli.command("credentials list", "List deploy credentials, never their secrets").alias("credentials ls").option("-v, --verbose", "Enable verbose debug output").action((options) => listCredentialsCommand(options));
5533
5533
  cli.command("credentials regenerate <name-or-prefix>", "Replace a deploy credential's secret, keeping its name, capabilities and Apps").option("--expires <days|never>", "Days until the regenerated credential expires, or 'never' (default: 90)").option("-y, --yes", "Regenerate without being asked to confirm").option("-v, --verbose", "Enable verbose debug output").action((target, options) => regenerateCredentialCommand(target, options));
5534
5534
  cli.command("credentials revoke <name-or-prefix>", "Revoke a deploy credential, immediately and for good").option("-y, --yes", "Revoke without being asked to confirm").option("-v, --verbose", "Enable verbose debug output").action((target, options) => revokeCredentialCommand(target, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wawesome",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "CLI tool for building and deploying serverless functions on wawesome.io platform",
5
5
  "type": "module",
6
6
  "bin": {