@visa/cli 4.1.0-rc.289 → 4.1.0-rc.290

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
@@ -387,6 +387,29 @@ The ceremony timed out — restart with `visa setup start "Name"`, then follow
387
387
  **Tools don't appear in the AI client**
388
388
  Restart the client or reconnect the MCP server (`/mcp` → `visa-cli` → reconnect in Claude Code). Re-run `visa-cli connect <client>` to rewrite the config.
389
389
 
390
+ **Branching on failures from `--format json`**
391
+ Every failure envelope carries `code`, `kind`, `fix`, and `nextAction`. Branch on
392
+ `code` (stable, append-only) and `kind` (`caller` = fix it yourself and retry;
393
+ `platform` = stop and escalate to a human), never on the English `error` text.
394
+ Deterministic preconditions always resolve to a specific code:
395
+
396
+ | Condition | `code` | `kind` |
397
+ |-----------|--------|--------|
398
+ | Not logged in (`find`, `activity`, `receipt`) | `session_required` | `caller` |
399
+ | No wallet grant on this runtime (`wallet show\|fund\|limits`, `pay`, `--local` reads) | `wallet_credential_required` | `platform` |
400
+ | Wallet grant approved but not fully delivered (`pay`) | `wallet_delivery_required` | `platform` |
401
+ | Local identity record missing for the selected agent (`pay`) | `identity_required` | `caller` |
402
+ | Identity root migrated; direct signing retired (`pay`) | `universal_required_managed_only` | `platform` |
403
+ | Managed wallet limits are owner-set (`wallet limits` with caps) | `managed_limits_owner_controlled` | `platform` |
404
+ | Listing is not x402 (`pay <listing-id>`) | `invalid_argument` | `caller` |
405
+ | Activity id not found or not attributable (`receipt`) | `activity_entry_not_found` | `caller` |
406
+
407
+ `unspecified_error` (`platform`) is reserved for failures the CLI cannot
408
+ classify and is intentionally kept on two guards: a wallet binding that does not
409
+ match the signed-in owner profile (an integrity refusal, not a caller state),
410
+ and a `wallet limits` change that would broaden policy without the operator's
411
+ `VISA_V4_WALLET_ALLOW_POLICY_RAISE=1`. Both need a human; escalate rather than retry.
412
+
390
413
  ## Monorepo context
391
414
 
392
415
  Request routing (MCP vs MPP vs web): [docs/agents/ARCHITECTURE.md](../../docs/agents/ARCHITECTURE.md). Branches and deploy: [docs/agents/PIPELINE.md](../../docs/agents/PIPELINE.md). Contributor workflow: [AGENTS.md](../../AGENTS.md), doc index: [docs/agents/README.md](../../docs/agents/README.md).