@bnbagent/studio-cli 0.0.12-alpha.3 → 0.0.12-alpha.4
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 +2 -2
- package/dist/bag.js +13 -13
- package/dist/{chunk-APRWJKEA.js → chunk-JRLJ26NS.js} +2 -2
- package/dist/{deployCli-HCI42S6E.js → deployCli-BFGXTMC6.js} +1 -1
- package/package.json +2 -2
- package/recipes/agent/recipe.toml +1 -1
- package/recipes/runtimes/agentcore/recipe.toml +1 -1
- package/recipes/runtimes/azure-foundry/recipe.toml +1 -1
- package/recipes/x402-buyer/recipe.toml +1 -1
- package/skills/bnbagent-studio.md +1 -1
- package/skills/references/bnbagent-studio-operating.md +1 -1
- package/skills/references/bnbagent-studio-scaffolding-agent.md +1 -1
- package/skills/references/bnbagent-studio-selling-via-b402.md +1 -1
- package/skills/references/bnbagent-studio-using-altana-wallet.md +1 -1
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ Studio does not force every agent through one fixed path. The skill guides these
|
|
|
101
101
|
| --- | --- | --- | --- |
|
|
102
102
|
| `evm-local` (default) | Encrypted keystore in workspace-root `.studio/wallets/` | Node code zip by default | Set `WALLET_PASSWORD` in the owner-only local env file. The keystore stays outside `app/agent/`. |
|
|
103
103
|
| `twak` | Self-custody wallet managed by Trust Wallet Agent Kit in a project-dedicated home | Container | Requires the supported TWAK CLI. Docker is required for the managed-platform image path. |
|
|
104
|
-
| `altana` | Local admin keystore grants a budget- and time-bounded runtime session | Node code zip | The runtime receives only the session. Pieverse SIWE activation
|
|
104
|
+
| `altana` | Local admin keystore grants a budget- and time-bounded runtime session | Node code zip | The runtime receives only the session. Pieverse SIWE activation is not supported; paid B402 payouts land at the admin address; renew or revoke the session explicitly. |
|
|
105
105
|
|
|
106
106
|
For AWS, runtime material is injected into infrastructure in your own account. For the managed BNB trial, the runtime runs in the operator's cloud: `evm-local` and `twak` signing material is transmitted to its managed secret store. Use a fresh testnet-only wallet and never reuse it on mainnet. An Altana deployment sends only its bounded session; keep the budget and expiry tight.
|
|
107
107
|
|
|
@@ -165,7 +165,7 @@ The X402 face exposes `/x402`. Its seller rail has two intentional modes:
|
|
|
165
165
|
- a positive `price_usd` returns a payment challenge and uses B402 to verify and settle before work starts;
|
|
166
166
|
- `price_usd = "0"` is anonymous FREE passthrough and bypasses B402 credentials, verification, settlement, and payment auditing.
|
|
167
167
|
|
|
168
|
-
Paid mode requires a complete per-agent B402 merchant setup
|
|
168
|
+
Paid mode requires a complete per-agent B402 merchant setup; any supported wallet kind can be the payout wallet (for altana the payout lands at the admin address). Payment settles before work; if later work fails, there is no automatic refund. On self-hosted AWS AgentCore the rail runs in-process, but a buyer-facing x402 URL requires your own gateway that authenticates its relay call to AgentCore and, for paid mode, a fixed-egress path to B402.
|
|
169
169
|
|
|
170
170
|
## Service faces
|
|
171
171
|
|
package/dist/bag.js
CHANGED
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
x402SellerIsFree,
|
|
53
53
|
x402SellerPricingState,
|
|
54
54
|
x402SellerUsesB402
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-JRLJ26NS.js";
|
|
56
56
|
import {
|
|
57
57
|
TWAK_CLI_MIN_VERSION,
|
|
58
58
|
TWAK_CLI_VERSION,
|
|
@@ -230,7 +230,7 @@ import {
|
|
|
230
230
|
var CAMPAIGN_DOC_URL = "https://www.bnbchain.org/en/blog/bnb-agent-studio-is-live-on-bnb-chain-ai-agents-from-one-prompt";
|
|
231
231
|
var CAMPAIGN_CHECK_TIMEOUT_MS = 6e3;
|
|
232
232
|
async function fetchCampaignActive() {
|
|
233
|
-
const { bnbPlatformApiUrl: bnbPlatformApiUrl2 } = await import("./deployCli-
|
|
233
|
+
const { bnbPlatformApiUrl: bnbPlatformApiUrl2 } = await import("./deployCli-BFGXTMC6.js");
|
|
234
234
|
const controller = new AbortController();
|
|
235
235
|
const timer = setTimeout(() => controller.abort(), CAMPAIGN_CHECK_TIMEOUT_MS);
|
|
236
236
|
try {
|
|
@@ -8153,7 +8153,7 @@ function registerInit(program) {
|
|
|
8153
8153
|
).addOption(
|
|
8154
8154
|
new Option2(
|
|
8155
8155
|
"--rails <rails>",
|
|
8156
|
-
"Commerce rail(s) to scaffold: 8183, b402, or both (default
|
|
8156
|
+
"Commerce rail(s) to scaffold: 8183, b402, or both (default)."
|
|
8157
8157
|
).choices(["8183", "b402", "both"])
|
|
8158
8158
|
).option(
|
|
8159
8159
|
"--erc8183-price <base-units>",
|
|
@@ -8346,7 +8346,7 @@ async function cmdInitFlow(nameArg, opts) {
|
|
|
8346
8346
|
if (llmProvider === null) {
|
|
8347
8347
|
return 2;
|
|
8348
8348
|
}
|
|
8349
|
-
const inferredRails = opts.rails ?? (facesExplicit ? hasX402Face(faces) ? "both" : "8183" :
|
|
8349
|
+
const inferredRails = opts.rails ?? (facesExplicit ? hasX402Face(faces) ? "both" : "8183" : void 0);
|
|
8350
8350
|
let rails = await resolveRails(inferredRails, isTty);
|
|
8351
8351
|
if (!facesExplicit) {
|
|
8352
8352
|
faces = normalizeProtocolFaces(
|
|
@@ -8491,9 +8491,9 @@ async function cmdInitFlow(nameArg, opts) {
|
|
|
8491
8491
|
}
|
|
8492
8492
|
const budgetFlag = opts.enableAutoTopup ? "enable" : opts.autoTopup === false ? "disable" : null;
|
|
8493
8493
|
const budgetChoice = walletKind2 === "altana" && llmProvider !== "pieverse-llm" && budgetFlag === null ? null : await resolveBudgetChoice(budgetFlag);
|
|
8494
|
-
if ((rails === "b402" || rails === "both") && x402SellerPricingState({ price_usd: b402Price }).kind === "paid" && !["evm-local", "twak", "turnkey"].includes(walletKind2)) {
|
|
8494
|
+
if ((rails === "b402" || rails === "both") && x402SellerPricingState({ price_usd: b402Price }).kind === "paid" && !["evm-local", "twak", "turnkey", "altana"].includes(walletKind2)) {
|
|
8495
8495
|
printErr(
|
|
8496
|
-
`error: the b402 seller rail supports wallet.kind evm-local, twak or
|
|
8496
|
+
`error: the b402 seller rail supports wallet.kind evm-local, twak, turnkey or altana only; '${walletKind2}' cannot act as the b402 payout wallet. Re-run with --rails 8183 or a supported --wallet-kind.`
|
|
8497
8497
|
);
|
|
8498
8498
|
fs23.rmSync(target, { recursive: true, force: true });
|
|
8499
8499
|
return 2;
|
|
@@ -9471,7 +9471,7 @@ async function resolveWalletKind(flagValue, isTty) {
|
|
|
9471
9471
|
" 2. twak \u2014 Trust Wallet CLI wallet; forces container packaging for deploys"
|
|
9472
9472
|
);
|
|
9473
9473
|
printOut(
|
|
9474
|
-
" 3. altana \u2014 bounded session signer; incompatible with pieverse-llm
|
|
9474
|
+
" 3. altana \u2014 bounded session signer; incompatible with pieverse-llm"
|
|
9475
9475
|
);
|
|
9476
9476
|
printOut(
|
|
9477
9477
|
" 4. turnkey \u2014 remote signer; key held in Turnkey's AWS Nitro enclave; billable signatures"
|
|
@@ -12049,11 +12049,11 @@ function x402SellerRailChecks(agentRoot2, cfg, target) {
|
|
|
12049
12049
|
}
|
|
12050
12050
|
}
|
|
12051
12051
|
const walletKind2 = String(tableOf2(cfg, "wallet").kind ?? "evm-local");
|
|
12052
|
-
if (paid && !["evm-local", "twak"].includes(walletKind2)) {
|
|
12052
|
+
if (paid && !["evm-local", "twak", "turnkey", "altana"].includes(walletKind2)) {
|
|
12053
12053
|
out.push({
|
|
12054
12054
|
level: Level.CRITICAL,
|
|
12055
12055
|
name: "x402_wallet_kind_unsupported",
|
|
12056
|
-
message: `[wallet].kind = "${walletKind2}" cannot run the b402 seller rail; supported kinds are evm-local and
|
|
12056
|
+
message: `[wallet].kind = "${walletKind2}" cannot run the b402 seller rail; supported kinds are evm-local, twak, turnkey, and altana.`,
|
|
12057
12057
|
details: { walletKind: walletKind2 }
|
|
12058
12058
|
});
|
|
12059
12059
|
}
|
|
@@ -18682,11 +18682,11 @@ function checkX402Seller(data, agentRoot2) {
|
|
|
18682
18682
|
}
|
|
18683
18683
|
];
|
|
18684
18684
|
const walletKind2 = String(tableOf14(data, "wallet").kind ?? "evm-local");
|
|
18685
|
-
if (!["evm-local", "twak", "turnkey"].includes(walletKind2)) {
|
|
18685
|
+
if (!["evm-local", "twak", "turnkey", "altana"].includes(walletKind2)) {
|
|
18686
18686
|
out.push({
|
|
18687
18687
|
name: "x402 payout wallet",
|
|
18688
18688
|
status: FAIL,
|
|
18689
|
-
detail: `PAID B402 supports evm-local, twak or
|
|
18689
|
+
detail: `PAID B402 supports evm-local, twak, turnkey or altana, not ${walletKind2}.`
|
|
18690
18690
|
});
|
|
18691
18691
|
}
|
|
18692
18692
|
const credentials = b402Credentials(agentRoot2);
|
|
@@ -21486,9 +21486,9 @@ async function cmdSellInit(priceFlag) {
|
|
|
21486
21486
|
}
|
|
21487
21487
|
const free = x402SellerPricingState({ price_usd: priceUsd }).kind === "free";
|
|
21488
21488
|
const walletKind2 = String(tableOf16(cfg, "wallet").kind ?? "evm-local");
|
|
21489
|
-
if (!free && !["evm-local", "twak"].includes(walletKind2)) {
|
|
21489
|
+
if (!free && !["evm-local", "twak", "turnkey", "altana"].includes(walletKind2)) {
|
|
21490
21490
|
printErr(
|
|
21491
|
-
`error: the b402 seller rail supports wallet.kind evm-local or
|
|
21491
|
+
`error: the b402 seller rail supports wallet.kind evm-local, twak, turnkey or altana only; '${walletKind2}' cannot act as the b402 payout wallet.`
|
|
21492
21492
|
);
|
|
21493
21493
|
return 1;
|
|
21494
21494
|
}
|
|
@@ -756,8 +756,8 @@ function packageRoot() {
|
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
function studioCliVersion() {
|
|
759
|
-
if ("0.0.12-alpha.
|
|
760
|
-
return "0.0.12-alpha.
|
|
759
|
+
if ("0.0.12-alpha.4") {
|
|
760
|
+
return "0.0.12-alpha.4";
|
|
761
761
|
}
|
|
762
762
|
const file = path3.join(packageRoot(), "package.json");
|
|
763
763
|
const pkg = JSON.parse(fs3.readFileSync(file, "utf-8"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bnbagent/studio-cli",
|
|
3
|
-
"version": "0.0.12-alpha.
|
|
3
|
+
"version": "0.0.12-alpha.4",
|
|
4
4
|
"description": "Skills-first toolkit and bag CLI for BNB Chain seller agents: ERC-8004 identity, ERC-8183 escrowed commerce, and x402 payments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bnb-chain",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"tar": "^7.4.0",
|
|
55
55
|
"viem": "^2.54.0",
|
|
56
56
|
"yaml": "^2.9.0",
|
|
57
|
-
"@bnbagent/studio-runtime": "0.0.12-alpha.
|
|
57
|
+
"@bnbagent/studio-runtime": "0.0.12-alpha.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@a2a-js/sdk": "^0.3.14",
|
|
@@ -11,7 +11,7 @@ node = [
|
|
|
11
11
|
# neutral. The agent project's serving deps (@a2a-js/sdk / MCP SDK / ai)
|
|
12
12
|
# come from the runtimes/<R>/ recipe selected at `bag init` time.
|
|
13
13
|
"@bnbagent/studio-runtime",
|
|
14
|
-
"@bnbagent/sdk@0.5.1-alpha.
|
|
14
|
+
"@bnbagent/sdk@0.5.1-alpha.3",
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[env]
|
|
@@ -32,7 +32,7 @@ node = [
|
|
|
32
32
|
# BNBAGENT_RUNTIME_SECRET_ID is set (default secretsmanager mode + platform).
|
|
33
33
|
"@aws-sdk/client-secrets-manager@^3.600.0",
|
|
34
34
|
"@bnbagent/studio-runtime",
|
|
35
|
-
"@bnbagent/sdk@0.5.1-alpha.
|
|
35
|
+
"@bnbagent/sdk@0.5.1-alpha.3",
|
|
36
36
|
# The LLM work hook (generateText + tools) and the model factory.
|
|
37
37
|
"ai@^7.0.29",
|
|
38
38
|
# Tool input schemas (AI SDK tools + MCP registerTool).
|
|
@@ -29,7 +29,7 @@ node = [
|
|
|
29
29
|
# on either cloud.
|
|
30
30
|
"@aws-sdk/client-secrets-manager@^3.600.0",
|
|
31
31
|
"@bnbagent/studio-runtime",
|
|
32
|
-
"@bnbagent/sdk@0.5.1-alpha.
|
|
32
|
+
"@bnbagent/sdk@0.5.1-alpha.3",
|
|
33
33
|
# The LLM work hook (generateText + tools) and the model factory
|
|
34
34
|
# (model.ts buildModel — studio.toml [llm] + the provider key env).
|
|
35
35
|
"ai@^7.0.29",
|
|
@@ -5,7 +5,7 @@ description: The single entry point for bnbagent-studio - a TypeScript CLI (`bag
|
|
|
5
5
|
|
|
6
6
|
# bnbagent-studio (the single entry point)
|
|
7
7
|
|
|
8
|
-
`bnbagent-studio` (CLI: `bag`) wires the `@bnbagent/sdk` protocol layer (wallet / ERC-8004 / ERC-8183 / Pieverse LLM) into a TypeScript agent project, then deploys it as a **single blockchain seller runtime**. A2A, MCP, and X402 are composable public faces selected with `--protocols`;
|
|
8
|
+
`bnbagent-studio` (CLI: `bag`) wires the `@bnbagent/sdk` protocol layer (wallet / ERC-8004 / ERC-8183 / Pieverse LLM) into a TypeScript agent project, then deploys it as a **single blockchain seller runtime**. A2A, MCP, and X402 are composable public faces selected with `--protocols`; every wallet kind scaffolds A2A + X402 with both ERC-8183 and B402 rails by default (for altana the paid B402 payout lands at the admin address). `bag deploy` uses **scheme C**: every new deploy or redeploy explicitly selects BNB, AWS, or Azure; a recorded deployment is used only to offer an explicit update action, never as a silent default. BNB is a 48h testnet trial and is disabled after expiry. AWS and Azure self-deploy into the user's own account. All cloud lifecycle mutations go through the pinned `@bnbagent/deploy-cli`; the optional AWS CLI is used only by the fail-open, read-only AgentCore quota check in `bag deploy prepare`. AgentCore and Azure Foundry share the unified A2A/X402 entrypoint; Azure rejects MCP. Treat an incompatible provider row as unavailable-do not force through it or mutate the scaffold during deploy.
|
|
9
9
|
|
|
10
10
|
Invoked as `/bnbagent-studio <ask>`? Treat `<ask>` as the user's intent and route it through the decision tree below, exactly like a natural-language ask.
|
|
11
11
|
|
|
@@ -136,7 +136,7 @@ The `--all` form is the right move when `app/agent/studio.toml`'s `[network].def
|
|
|
136
136
|
|
|
137
137
|
`bag doctor` prints ERC-8183 pricing as `PAID` or `FREE`. FREE works on the canonical contract stack. If a custom deployment is selected, set `ERC8183_COMMERCE_ADDRESS`, `ERC8183_ROUTER_ADDRESS`, and `ERC8183_POLICY_ADDRESS` together; a partial set fails because it can mix incompatible commerce, router, and policy deployments.
|
|
138
138
|
|
|
139
|
-
For the inbound x402 seller rail, `bag doctor` also prints `PAID` or `FREE`. PAID requires the complete B402 merchant credential set
|
|
139
|
+
For the inbound x402 seller rail, `bag doctor` also prints `PAID` or `FREE`. PAID requires the complete B402 merchant credential set; any supported wallet kind can be the payout wallet (for altana the payout lands at the admin address anchored as `[wallet].address`). Explicit zero is anonymous FREE passthrough: it does not read B402 credentials, call the facilitator, settle a payment, or apply the paid-mode payout-wallet allowlist. Confirm the same state with `bag x402 sell status`.
|
|
140
140
|
|
|
141
141
|
> The current CLI has no `bag wallet transfer`, `bag erc20 approve/allowance` group, or `bag wallet balance --address` / `--token` flag. Running them returns an invalid-command or unknown-option error. Use an external wallet to move funds or set allowances; ERC-8183 funding auto-approves U as part of the buy flow.
|
|
142
142
|
|
|
@@ -138,7 +138,7 @@ Build a TodoWrite list. The shape depends on the `wallet kind`. The canonical 8-
|
|
|
138
138
|
|
|
139
139
|
> **Onboarding note.** On a human TTY, `bag init` runs steps 3, 4 and 6 automatically (it prompts once for the wallet password, runs `bag wallet new`, zero-deposit-activates Pieverse, and prints faucet URLs). **You (Claude Code) drive `bag init` non-interactively**, so that auto-flow does NOT fire - keep steps 3/4/6 below. Pass `--no-onboard` to `bag init` to make this explicit and deterministic regardless of how the shell wires stdin.
|
|
140
140
|
|
|
141
|
-
1. `bag init <name> --llm-provider <p> --network <n> --storage-provider <s> --wallet-kind <k> [--protocols <comma-list>] [--rails <8183|b402|both>] [--erc8183-price <base-units>] [--b402-price <usd>] --no-onboard` - scaffold the current workspace. **`<name>` must start with a letter, use ASCII letters and digits only, and be at most 23 characters.** `bag init` rejects `-`, `_`, `.`, and overlong names instead of renaming them. Pass `--wallet-kind evm-local` (default) or `--wallet-kind twak` (twak is fully supported - pass the flag to opt in), and `--storage-provider local` (default) or `ipfs`, per the Stage-1 choices; for twak, add `--twak-home <path>` ONLY if the user wants to reuse an existing wallet (otherwise omit - a project-dedicated `.studio/twak` is the safe default). Omit `--protocols` and `--rails` for the default A2A + X402 faces with both ERC-8183 and B402 rails
|
|
141
|
+
1. `bag init <name> --llm-provider <p> --network <n> --storage-provider <s> --wallet-kind <k> [--protocols <comma-list>] [--rails <8183|b402|both>] [--erc8183-price <base-units>] [--b402-price <usd>] --no-onboard` - scaffold the current workspace. **`<name>` must start with a letter, use ASCII letters and digits only, and be at most 23 characters.** `bag init` rejects `-`, `_`, `.`, and overlong names instead of renaming them. Pass `--wallet-kind evm-local` (default) or `--wallet-kind twak` (twak is fully supported - pass the flag to opt in), and `--storage-provider local` (default) or `ipfs`, per the Stage-1 choices; for twak, add `--twak-home <path>` ONLY if the user wants to reuse an existing wallet (otherwise omit - a project-dedicated `.studio/twak` is the safe default). Omit `--protocols` and `--rails` for the default A2A + X402 faces with both ERC-8183 and B402 rails (all wallet kinds, altana included — its paid B402 payout lands at the admin address). Pass either flag when the user chose another face/rail combination (`--protocol <one>` is only a legacy alias), add `--model <m>` only if the user overrode the provider default, and `--enable-auto-topup` / `--no-auto-topup` only if they made an explicit choice (otherwise omit - consent stays deferred). Pass `--erc8183-price 0` only when the user explicitly chose FREE; omitting the flag preserves the paid 0.1 U default. The canonical stack supports FREE; if a custom deployment is selected, set all three `ERC8183_COMMERCE_ADDRESS`, `ERC8183_ROUTER_ADDRESS`, and `ERC8183_POLICY_ADDRESS` values from that same stack. For B402, pass `--b402-price 0` only after the user explicitly accepts an unrestricted anonymous FREE `/x402` endpoint. FREE bypasses B402 verify/settle and needs no merchant credentials; a positive price keeps the `$0.01` default and requires the paid onboarding playbook. **Destination:** while the trial campaign runs, bare `bag init` (no `--destination`) defaults to `platform` - so pass `--destination self` **explicitly** whenever the user chose their own AWS, otherwise studio.toml silently records `platform` and the confirmation block you echoed no longer matches what was written. Omit `--destination` only when the user actually wants the `platform` 48h testnet trial (the campaign default) - do NOT treat that default as a mistake or re-confirm it; it is the intended behavior while the campaign is open. (Bare init also resolves to `self` once the campaign ends, or when `--network bsc-mainnet` / a non-agentcore `--runtime` is passed.) On the `platform` path `bag init` hard-forces `bsc-testnet`, pins `--runtime agentcore` + packages an artifact (a zip for the default evm-local and altana wallets, a container for twak). For evm-local a wallet key will later leave your machine, so pair it with a throwaway `bag wallet new`; for altana only the bounded session ships - do NOT create a new wallet (full flow: `docs/guides/platform-deploy.md`). Defaults `--runtime agentcore` (the only advertised runtime; the Preview `azure-foundry` runtime remains explicitly selectable but is outside this playbook; there is no `--framework` flag because the AI SDK model/tools story is part of the runtime templates). Creates `<name>/` workspace root + `<name>/app/agent/` (the single sub-project: A2A emits `src/unifiedMain.ts` (the express + A2A entrypoint, one code set for both deploy clouds) + `src/sellerCore.ts` (the protocol-neutral core; executor inherits it) + `src/executor.ts` + `src/agentCard.ts`; MCP emits `src/mcpMain.ts`; both include `src/signing.ts` + `src/tools.ts` + `src/model.ts` + their own `studio.toml` + `package.json` + `tsconfig.json`) + `<name>/agentcore/` (`agentcore.json` + `aws-targets.json`, self-rendered - no agentcore CLI needed at init). The workspace root holds the `agentcore/` deploy descriptor, the `.studio/wallets/` keystore, a thin `package.json` + `pnpm-workspace.yaml`, README, and `.gitignore`. (v1 is seller-only - no `--role`.)
|
|
142
142
|
> **Altana + custom contracts:** Altana sessions remain bound to the canonical ERC-8183 targets. Use `evm-local` for a custom Commerce/Router/Policy stack; doctor and deploy readiness reject this unsupported combination when the ERC-8183 rail is active.
|
|
143
143
|
|
|
144
144
|
2. `cd <name>`, then make sure the dependencies are installed. `bag init` already runs the install by default (skip only if it was scaffolded with `--no-install`); the manual equivalent from the workspace root is:
|
|
@@ -164,6 +164,6 @@ On the managed platform the deploy summary must say `x402 rail is ACTIVE` (or `A
|
|
|
164
164
|
- Binance `/settle` is asynchronous. A parseable `success: false` response with a transaction is pending and requires an idempotent poll with the same settlement payload. Studio v0.0.6 and the latest `@bnb-chain/b402@0.1.0` do not yet perform that poll; they classify pending as unknown. Do not claim current mainnet readiness until this is updated.
|
|
165
165
|
- Settlement happens before work. A later work failure retains the payment and does not trigger an automatic refund.
|
|
166
166
|
- The rail activates on AgentCore and Azure Foundry targets (managed platform or self-hosted); self-hosted targets have no anonymous URL and need an operator-run envelope-v1 front.
|
|
167
|
-
-
|
|
167
|
+
- Every supported `wallet.kind` can be the PAID B402 payout wallet: `evm-local`, `twak`, `turnkey`, and `altana`. The payout lands at the configured `pay_to` or, by default, `[wallet].address`; for altana that address is the admin EOA (EIP-7702 — the smart account address equals the admin address), so the locally-held admin keystore can always move the revenue. Register the B402 merchant credentials for that exact address. FREE x402 bypasses B402 and has no payout.
|
|
168
168
|
- Buyer compatibility: the 402 challenge advertises both `exact` rails - `eip3009` (EOA buyers, no pre-authorization) and `permit2-exact` (B402 verifies ERC-1271 smart-account signatures on this rail, so Altana sessions and ERC-4337 wallets can pay; the buyer needs a bounded U→Permit2 allowance first - see `bnbagent-studio-using-altana-wallet.md`). Rails are filtered against the facilitator's live `/supported`; `bag x402 sell status` prints which rails it actually offers, e.g. `(eip3009, permit2-exact)`. The seller never verifies signatures locally on either rail.
|
|
169
169
|
- Never describe FREE as a zero-value B402 settlement. It bypasses B402.
|
|
@@ -50,6 +50,6 @@ bag wallet session x402-setup --allowance-u <U> --yes
|
|
|
50
50
|
|
|
51
51
|
Once armed, `bag x402 buy` pays b402-facilitated merchants (e.g. CoinMarketCap) end to end: B402 verifies the session's ERC-1271 signature on its **permit2 rails** (live since 2026-08). Studio's own b402 sellers advertise `permit2-exact` alongside `eip3009`, so Altana wallets can pay studio-hosted merchants too; eip3009-only merchants still need a 65-byte EOA signature and cannot be paid by a smart account. The buy preflight checks the U→Permit2 allowance against the spend cap, and `bag doctor` reports `[wallet] Altana x402 buying`. Use `@altananetwork/sdk` 0.7.1 in the project.
|
|
52
52
|
|
|
53
|
-
Altana
|
|
53
|
+
Altana can also be the b402 **seller** payout wallet for a positive price: the payout lands at `[wallet].address`, which for an EIP-7702 altana account is the admin EOA, so the locally-held admin keystore can always move the revenue. Issue the B402 merchant credentials for that exact address. Explicit `price_usd = "0"` stays FREE passthrough (no payout, bypasses B402). The outbound buying authority above remains a separate feature.
|
|
54
54
|
|
|
55
55
|
For troubleshooting, run `bag doctor` and `bag wallet session status`. Do not print, parse, or copy the `signer` portion of the serialized session, and never move `.studio/wallets/` under `app/agent/`.
|