@bnbagent/studio-cli 0.0.13-alpha.5 → 0.0.13-alpha.7
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/dist/bag.js +10 -5
- package/dist/{chunk-BCUJGB4Y.js → chunk-YZ4WH5MD.js} +2 -2
- package/dist/{deployCli-2YVGILHK.js → deployCli-A4EW5FTF.js} +1 -1
- package/package.json +2 -2
- package/skills/references/bnbagent-studio-adding-to-project.md +1 -1
- package/skills/references/bnbagent-studio-operating.md +1 -1
- package/skills/references/bnbagent-studio-selling-via-b402.md +2 -2
- package/skills/references/bnbagent-studio-use-azure-foundry.md +1 -1
package/dist/bag.js
CHANGED
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
x402SellerIsFree,
|
|
56
56
|
x402SellerPricingState,
|
|
57
57
|
x402SellerUsesB402
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-YZ4WH5MD.js";
|
|
59
59
|
import {
|
|
60
60
|
TWAK_CLI_MIN_VERSION,
|
|
61
61
|
TWAK_CLI_VERSION,
|
|
@@ -233,7 +233,7 @@ import {
|
|
|
233
233
|
var CAMPAIGN_DOC_URL = "https://www.bnbchain.org/en/blog/bnb-agent-studio-is-live-on-bnb-chain-ai-agents-from-one-prompt";
|
|
234
234
|
var CAMPAIGN_CHECK_TIMEOUT_MS = 6e3;
|
|
235
235
|
async function fetchCampaignActive() {
|
|
236
|
-
const { bnbPlatformApiUrl: bnbPlatformApiUrl2 } = await import("./deployCli-
|
|
236
|
+
const { bnbPlatformApiUrl: bnbPlatformApiUrl2 } = await import("./deployCli-A4EW5FTF.js");
|
|
237
237
|
const controller = new AbortController();
|
|
238
238
|
const timer = setTimeout(() => controller.abort(), CAMPAIGN_CHECK_TIMEOUT_MS);
|
|
239
239
|
try {
|
|
@@ -2467,7 +2467,7 @@ function isErc8183AmountKey(parts) {
|
|
|
2467
2467
|
return parts.length === 3 && parts[0] === "payments" && parts[1] === "erc8183" && ["price", "min_price", "max_price"].includes(parts[2]);
|
|
2468
2468
|
}
|
|
2469
2469
|
function isB402PriceKey(parts) {
|
|
2470
|
-
return parts.length === 3 && parts[0] === "payments" && parts[1] === "x402_seller" && parts[2] === "price_usd";
|
|
2470
|
+
return parts.length === 3 && parts[0] === "payments" && (parts[1] === "b402_seller" || parts[1] === "x402_seller") && parts[2] === "price_usd";
|
|
2471
2471
|
}
|
|
2472
2472
|
function coerceKnownValue(parts, rawValue, typeFlag) {
|
|
2473
2473
|
if (!isErc8183AmountKey(parts) && !isB402PriceKey(parts)) {
|
|
@@ -17437,7 +17437,9 @@ async function printAzureAgentClientPrompt(root) {
|
|
|
17437
17437
|
"",
|
|
17438
17438
|
"REQUEST",
|
|
17439
17439
|
`- POST application/json: ${request}`,
|
|
17440
|
-
...hasA2a ? [
|
|
17440
|
+
...hasA2a ? [
|
|
17441
|
+
`- Send \`A2A-Version: ${AZURE_FOUNDRY_A2A_VERSION}\` with the native JSON-RPC A2A request.`
|
|
17442
|
+
] : [],
|
|
17441
17443
|
...hasX402 ? [
|
|
17442
17444
|
...hasA2a ? [
|
|
17443
17445
|
`- ${paymentLabel} carrier alternative: ${JSON.stringify(azureX402CarrierBody(paymentProtocol))}`
|
|
@@ -17789,6 +17791,7 @@ Quick-verify ${paymentProtocol} endpoint:
|
|
|
17789
17791
|
}
|
|
17790
17792
|
var AZURE_FOUNDRY_TOKEN_RESOURCE = "https://ai.azure.com";
|
|
17791
17793
|
var AZURE_FOUNDRY_TOKEN_SCOPE = `${AZURE_FOUNDRY_TOKEN_RESOURCE}/.default`;
|
|
17794
|
+
var AZURE_FOUNDRY_A2A_VERSION = "0.3";
|
|
17792
17795
|
function azureNegotiateQuickVerifyBody() {
|
|
17793
17796
|
return {
|
|
17794
17797
|
input: JSON.stringify({
|
|
@@ -17808,6 +17811,7 @@ function azureA2aQuickVerifyBody() {
|
|
|
17808
17811
|
method: "message/send",
|
|
17809
17812
|
params: {
|
|
17810
17813
|
message: {
|
|
17814
|
+
kind: "message",
|
|
17811
17815
|
messageId: "bag-quick-verify",
|
|
17812
17816
|
role: "user",
|
|
17813
17817
|
parts: [
|
|
@@ -18032,7 +18036,8 @@ ${paymentLabel} request curl:`
|
|
|
18032
18036
|
printOut(
|
|
18033
18037
|
` AZURE_RESPONSE=$(curl -sS -D "$AZURE_HEADERS" -X POST "$AZURE_ENDPOINT" \\
|
|
18034
18038
|
-H "Authorization: Bearer $AZURE_TOKEN" \\
|
|
18035
|
-
-H "Content-Type: application/json"${hasA2a ?
|
|
18039
|
+
-H "Content-Type: application/json"${hasA2a ? ` \\
|
|
18040
|
+
-H "A2A-Version: ${AZURE_FOUNDRY_A2A_VERSION}"` : ""} \\
|
|
18036
18041
|
-d '${JSON.stringify(body)}')`
|
|
18037
18042
|
);
|
|
18038
18043
|
printOut(' printf "%s\\n" "$AZURE_RESPONSE"');
|
|
@@ -791,8 +791,8 @@ function packageRoot() {
|
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
793
|
function studioCliVersion() {
|
|
794
|
-
if ("0.0.13-alpha.
|
|
795
|
-
return "0.0.13-alpha.
|
|
794
|
+
if ("0.0.13-alpha.7") {
|
|
795
|
+
return "0.0.13-alpha.7";
|
|
796
796
|
}
|
|
797
797
|
const file = path3.join(packageRoot(), "package.json");
|
|
798
798
|
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.13-alpha.
|
|
3
|
+
"version": "0.0.13-alpha.7",
|
|
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.13-alpha.
|
|
57
|
+
"@bnbagent/studio-runtime": "0.0.13-alpha.7"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@a2a-js/sdk": "^0.3.14",
|
|
@@ -74,7 +74,7 @@ Tune the price in `app/agent/studio.toml` (`[payments.erc8183]` `min_price`/ `ma
|
|
|
74
74
|
|
|
75
75
|
Use `bag config set payments.erc8183.price 0` only for an explicit FREE product decision. Studio stores ERC-8183 amounts as decimal strings and reports FREE in `bag doctor`; the canonical stack supports zero funding. If a custom deployment is selected, set all three `ERC8183_*_ADDRESS` overrides from that same stack. The buyer still runs `setBudget(0)` and `fund(0)`, but no ERC-20 approval or token escrow occurs. Require `bag doctor` and `bag deploy prepare` to pass.
|
|
76
76
|
|
|
77
|
-
For an X402 face, choose its request price independently. Use `bag config set payments.
|
|
77
|
+
For an X402 face, choose its request price independently. Use `bag config set payments.b402_seller.price_usd 0` only when the existing agent is intentionally becoming an unrestricted anonymous FREE API. This path bypasses B402 verify/settle, payment, and settlement audit; it needs no merchant credentials and Studio will not synchronize any configured B402 secrets. Positive prices retain the paid B402 onboarding and settle-before-work flow. Verify the choice with `bag x402 sell status`, `bag doctor`, and `bag deploy prepare`.
|
|
78
78
|
|
|
79
79
|
## Step 4c - LLM credit continuity (automatic, NOT an LLM tool)
|
|
80
80
|
|
|
@@ -164,7 +164,7 @@ JobStatus enum: `OPEN` (0) → `FUNDED` (1) → `SUBMITTED` (2) → `COMPLETED`
|
|
|
164
164
|
| Job stays `FUNDED`, never reaches `SUBMITTED` after an `accepted` ack | Background delivery failed (`runWork` / `submitResult` raised) - **not** visible in the A2A reply | The ack only confirms verify passed; delivery runs in the background. Observe the failure via the chain (job never leaves `FUNDED`) + CloudWatch logs; a later `notify_funded` re-attempts it via the sweep |
|
|
165
165
|
| `ERC8183JobOps` has no such export from `@bnbagent/sdk` | package.json pinned an old `@bnbagent/sdk` (missing class) | Bump the dependency and reinstall |
|
|
166
166
|
| ERC-8183 contract override is incomplete | Only one or two of commerce/router/policy were selected | Set or remove all three together; never mix stacks |
|
|
167
|
-
| `/x402` is public without a 402 challenge | `payments.
|
|
167
|
+
| `/x402` is public without a 402 challenge | `payments.b402_seller.price_usd = "0"` selected anonymous FREE passthrough | If payment is intended, set a positive decimal price, configure the complete B402 credential set, rerun `bag doctor`, and redeploy |
|
|
168
168
|
| B402 credentials are missing but x402 reports FREE | Expected: FREE bypasses B402 and does not synchronize its secrets | No credential fix is needed; change to a positive price only when the route should charge |
|
|
169
169
|
| `OPENROUTER_API_KEY env var is required` | Loading the entrypoint triggers the emitted `buildModel()` factory | Set the env var even for `bag dev --help` smoke |
|
|
170
170
|
| RPC `limit exceeded` | Public RPC throttle | Retry, or set `STUDIO_BSC_TESTNET_RPC=<private rpc>` |
|
|
@@ -14,7 +14,7 @@ Use this playbook to activate the x402 seller rail for one agent. First choose P
|
|
|
14
14
|
- The agent wallet already exists. In PAID mode its address receives U.
|
|
15
15
|
- The project targets the managed platform or self-hosted AgentCore (azure-foundry cannot activate the rail).
|
|
16
16
|
- PAID managed platform only: an interactive GitHub-login session from `bag platform login` is available for reading the platform Relay egress IPs. A `bnbk_…` CI token does not satisfy this endpoint's GitHub-user check.
|
|
17
|
-
- `[payments.
|
|
17
|
+
- `[payments.b402_seller]` exists. If not, run `bag x402 sell init`.
|
|
18
18
|
|
|
19
19
|
The PAID application uses the **agent wallet address**, not a developer treasury, buyer wallet, or platform wallet.
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ Use one of these explicit boundaries:
|
|
|
25
25
|
```bash
|
|
26
26
|
bag init <name> --rails b402 --b402-price 0
|
|
27
27
|
bag x402 sell init --price-usd 0
|
|
28
|
-
bag config set payments.
|
|
28
|
+
bag config set payments.b402_seller.price_usd 0
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
`"0"` means anonymous FREE passthrough. The runtime returns work directly and does not issue a 402 challenge, call B402 `/supported`/verify/settle, transfer U, or write an `x402_sell` settlement audit. B402 credentials are ignored and not synchronized. Run `bag x402 sell status`, `bag doctor`, and `bag deploy prepare`; all must label the route FREE.
|
|
@@ -105,7 +105,7 @@ session, logs lists the recent sessions visible to the current Azure identity.
|
|
|
105
105
|
Foundry scopes that list by identity/isolation key, so an external buyer or
|
|
106
106
|
gateway must still preserve the session header from its own response.
|
|
107
107
|
|
|
108
|
-
The built-in smoke proves the container contract, not the seller signature. For a release E2E, POST A2A JSON-RPC `message/send` to the recorded A2A endpoint with `A2A-Version:
|
|
108
|
+
The built-in smoke proves the container contract, not the seller signature. For a release E2E, POST A2A JSON-RPC `message/send` to the recorded A2A endpoint with `A2A-Version: 0.3`, `params.message.kind = "message"`, and the JSON skill envelope in a `text` part; or use the Responses/Invocations contract selected for the deployment. Require `response.accepted=true`, a non-empty `negotiation_hash`, and `provider_sig`.
|
|
109
109
|
|
|
110
110
|
### X402 external gateway
|
|
111
111
|
|