wawesome 0.14.0 → 0.14.1

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,7 +325,7 @@ 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
 
@@ -395,6 +395,162 @@ looking in their CI settings instead of your dashboard.
395
395
 
396
396
  ---
397
397
 
398
+ ## Your agent, over MCP
399
+
400
+ The same deploy credential connects a coding agent to your workspace, over MCP. Nothing to install and
401
+ no local process to keep running: it is an endpoint on the gateway, `https://api.wawesome.io/v1/mcp`,
402
+ and the credential is the whole of the authentication.
403
+
404
+ ### Install it
405
+
406
+ In Claude Code, one command:
407
+
408
+ ```bash
409
+ claude mcp add --transport http wawesome https://api.wawesome.io/v1/mcp \
410
+ --header "Authorization: Bearer wawe_..."
411
+ ```
412
+
413
+ In Cursor, `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` for every project:
414
+
415
+ ```json
416
+ {
417
+ "mcpServers": {
418
+ "wawesome": {
419
+ "url": "https://api.wawesome.io/v1/mcp",
420
+ "headers": { "Authorization": "Bearer wawe_..." }
421
+ }
422
+ }
423
+ }
424
+ ```
425
+
426
+ In VS Code, `.vscode/mcp.json` in the workspace, or the file **MCP: Open User Configuration** opens.
427
+ The shape is the same address and header map, under the key `servers` rather than `mcpServers`:
428
+
429
+ ```json
430
+ {
431
+ "servers": {
432
+ "wawesome": {
433
+ "type": "http",
434
+ "url": "https://api.wawesome.io/v1/mcp",
435
+ "headers": { "Authorization": "Bearer wawe_..." }
436
+ }
437
+ }
438
+ }
439
+ ```
440
+
441
+ A file inside the project is a file your repository carries, and the secret with it. VS Code takes an
442
+ `inputs` entry and a `${input:...}` placeholder in the header, so it asks once and holds the value
443
+ itself. In Cursor, put the credential in `~/.cursor/mcp.json`, which is outside every repository.
444
+
445
+ ### Where a bearer credential reaches
446
+
447
+ It works in Claude Code, the Claude Agent SDK, Cursor, VS Code, Windsurf, Zed and the Gemini CLI. It
448
+ works in every agent framework that takes a URL and a header map, among them the OpenAI Agents SDK,
449
+ LangChain, the Vercel AI SDK and Pydantic AI. Anything that speaks streamable HTTP MCP and lets you
450
+ set a header can connect.
451
+
452
+ Whichever protocol revision your client speaks, the endpoint answers it. It holds both eras at one
453
+ address: the current revision, `2026-07-28`, and the three handshake-based ones the installed base is
454
+ still on. A client ahead of your editor's next release connects, and so does one behind it.
455
+
456
+ It does **not** work in the connector dialog in claude.ai or Claude Desktop, or in ChatGPT
457
+ connectors. Those three accept "no authentication" or OAuth and have no field for a token, so there
458
+ is nowhere to put `wawe_...`. Reaching them needs an OAuth authorization server, which the platform
459
+ does not run today, and nothing you can configure works around that.
460
+
461
+ ### What your agent gets
462
+
463
+ Every tool is listed for every credential, and each one names the capability it needs. A credential
464
+ that does not carry that word is refused by name, so your agent tells you what to mint rather than
465
+ concluding the platform cannot do it.
466
+
467
+ | Tool | What it does | Needs |
468
+ |:---------------------------|:------------------------------------------------------------------------|:--------------|
469
+ | `list_templates` | The template catalogue, with what each one is for | nothing |
470
+ | `get_template` | One template's files, environment contract and outbound providers | nothing |
471
+ | `list_apps` | The Apps in the workspace, with the slug each is addressed by | `deploy` |
472
+ | `list_functions` | The Functions in one App, and what their live version carries | `read` |
473
+ | `list_versions` | A Function's Versions, and which one is live | `read` |
474
+ | `get_usage` | The Tenant's usage and headroom | `read` |
475
+ | `list_invocations` | Recent Invocations of a Function, failures included | `logs:read` |
476
+ | `get_invocation` | One Invocation by id | `logs:read` |
477
+ | `read_invocation_logs` | An Invocation's log body, a page at a time | `logs:read` |
478
+ | `diagnose_latest_failure` | The latest failure, its logs and the Version that ran it, in one call | `logs:read`, `read` |
479
+ | `deploy_function` | Deploys code and the static files it carries | `deploy` |
480
+ | `deploy_status` | How a deploy went, by the handle it answered with | `deploy` |
481
+ | `rollback_function` | Puts a Version the Function already has back on its public address | `deploy` |
482
+ | `set_env_var` | Sets an App's environment variable, read at the next invocation | `deploy` |
483
+ | `invoke_function` | Runs a deployed Function once and answers with the Invocation id | `invoke` |
484
+
485
+ A deploy is two calls. The first says which of your files the platform does not already hold, by
486
+ content hash; your agent uploads those bytes to `PUT /v1/assets/{content_hash}` with the same
487
+ credential and asks again, so a redeploy that changed only its code uploads nothing. The second
488
+ answers with a handle rather than waiting for the build, because a dropped connection would otherwise
489
+ cancel a deploy that was going fine. `deploy_status` reads the handle whenever your agent asks.
490
+
491
+ When the deploy is out and something is wrong, `diagnose_latest_failure` answers the latest failed
492
+ run of a Function, that run's log output, and the version that ran it, in one call. Mirroring the
493
+ routes there costs four round trips and four chances to carry the wrong identifier between them.
494
+
495
+ Log output comes back a page at a time, with a cursor for the next one, and nothing is held open.
496
+ Your own `wawesome logs --follow` keeps running while your agent reads. One live tail per credential
497
+ is all the platform permits, and an agent taking it would end yours.
498
+
499
+ ### Which credential for which job
500
+
501
+ A credential carries the words its job needs and stops there. They are the same words
502
+ [Deploy credentials](#mint-one) mints with.
503
+
504
+ **Read and investigate, without the ability to ship.** The agent reads Functions, Versions,
505
+ Invocations and log bodies, diagnoses a failure, checks usage, and browses templates. Every tool that
506
+ ships code or runs it refuses:
507
+
508
+ ```bash
509
+ npx wawesome credentials mint investigator -c read,logs:read -a prod
510
+ ```
511
+
512
+ One thing to know before you hand it over: `list_apps` sits behind `deploy`, the same word the HTTP
513
+ route behind it asks for, so an investigation credential cannot enumerate your Apps. Name the App in
514
+ the task and every other read works.
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 neither is
536
+ held to the restriction yet, so an agent already holding an id can read that Invocation's telemetry
537
+ and log body whichever App it belongs to.
538
+
539
+ ### When a tool refuses
540
+
541
+ A refusal is the tool's answer, not a protocol error, and it carries the same `reason` code the CLI
542
+ prints:
543
+
544
+ - `credential-missing-capability`. The credential does not carry a word this tool needs. The refusal
545
+ names it in `missing_capability`, which is the word to mint a credential with.
546
+ - `app-outside-credential-scope`. The credential is restricted to named Apps and this is not one of
547
+ them. A wider capability changes nothing here.
548
+
549
+ A quota refusal carries its numbers under `allowance` beside the prose, so your agent reports
550
+ "3 of 3 App slots" rather than handing you a sentence to read.
551
+
552
+ ---
553
+
398
554
  ## Configuration and a custom gateway
399
555
 
400
556
  ### `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.1";
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)").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)").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.1",
4
4
  "description": "CLI tool for building and deploying serverless functions on wawesome.io platform",
5
5
  "type": "module",
6
6
  "bin": {