@bnbagent/studio-cli 0.0.11-alpha.6 → 0.0.11-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 CHANGED
@@ -52,7 +52,7 @@ import {
52
52
  x402SellerIsFree,
53
53
  x402SellerPricingState,
54
54
  x402SellerUsesB402
55
- } from "./chunk-VVHPUKLV.js";
55
+ } from "./chunk-3QSCJAXQ.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-5DZVAKMZ.js");
233
+ const { bnbPlatformApiUrl: bnbPlatformApiUrl2 } = await import("./deployCli-374HYGDA.js");
234
234
  const controller = new AbortController();
235
235
  const timer = setTimeout(() => controller.abort(), CAMPAIGN_CHECK_TIMEOUT_MS);
236
236
  try {
@@ -4423,7 +4423,24 @@ async function deployAzureFoundry(opts) {
4423
4423
  async function destroyAzureFoundry(opts) {
4424
4424
  const workspaceRoot = deployWorkspaceRoot(opts.projectRoot);
4425
4425
  if (!opts.execute) {
4426
- const extra = opts.purge ? " --purge" : "";
4426
+ if (opts.purge || opts.purgeImages) {
4427
+ return withDeployFiles(
4428
+ opts.projectRoot,
4429
+ { target: "azure/foundry", packaging: "container" },
4430
+ async (files, spec) => runDeployCliStream(
4431
+ [
4432
+ "destroy",
4433
+ "-f",
4434
+ files.configPath,
4435
+ "--yes",
4436
+ "--dry-run",
4437
+ ...opts.purgeImages ? ["--purge-images"] : [],
4438
+ ...opts.purge ? ["--purge"] : []
4439
+ ],
4440
+ { cwd: spec.agentRoot }
4441
+ )
4442
+ );
4443
+ }
4427
4444
  printOut("=== bag deploy destroy \u2014 teardown plan (dry-run) ===\n");
4428
4445
  printOut(
4429
4446
  `project: ${path16.basename(workspaceRoot)} (runtime: azure-foundry)
@@ -4431,9 +4448,7 @@ async function destroyAzureFoundry(opts) {
4431
4448
  );
4432
4449
  printOut("--- Agent (Foundry Hosted Agent) ---");
4433
4450
  printOut(
4434
- ` Teardown (delegated to bnbagent-deploy \u2014 removes the hosted agent + the Foundry resources its deploy record tracks):
4435
- bnbagent-deploy destroy --yes${extra}
4436
- Run \`bag deploy destroy --provider azure --execute\` to do this. Add \`--purge\` to also delete retained resources (e.g. the soft-deleted account, freeing the custom subdomain now instead of ~48h).`
4451
+ " Teardown (delegated to bnbagent-deploy \u2014 removes the hosted agent + the Foundry resources its deploy record tracks):\n bnbagent-deploy destroy --yes\n Run `bag deploy destroy --provider azure --execute` to do this. Add `--purge-images` to preview/remove this agent's owned ACR repository, or `--purge` to also delete retained infrastructure (e.g. the soft-deleted account, freeing the custom subdomain now instead of ~48h)."
4437
4452
  );
4438
4453
  printOut(
4439
4454
  "\n--- always note ---\n - the encrypted keystore (.studio/wallets/) is left UNTOUCHED."
@@ -4452,6 +4467,7 @@ async function destroyAzureFoundry(opts) {
4452
4467
  "-f",
4453
4468
  files.configPath,
4454
4469
  "--yes",
4470
+ ...opts.purgeImages ? ["--purge-images"] : [],
4455
4471
  ...opts.purge ? ["--purge"] : []
4456
4472
  ],
4457
4473
  { cwd: spec.agentRoot }
@@ -6140,9 +6156,7 @@ var LEGACY_SKILL_NAMES = [
6140
6156
  ];
6141
6157
  var ROUTER_SKILL_NAME = "bnbagent-studio";
6142
6158
  var META_FILENAME = ".bag-meta.json";
6143
- var HIDDEN_SKILL_NAMES = /* @__PURE__ */ new Set([
6144
- "bnbagent-studio-use-azure-foundry"
6145
- ]);
6159
+ var HIDDEN_SKILL_NAMES = /* @__PURE__ */ new Set();
6146
6160
  function isDir3(p) {
6147
6161
  try {
6148
6162
  return fs20.statSync(p).isDirectory();
@@ -13898,6 +13912,7 @@ async function runPrepare(opts = {}) {
13898
13912
  checkLocalKeystoreExists,
13899
13913
  checkWalletPasswordEnvSet,
13900
13914
  checkLlmProviderKeySet,
13915
+ checkPieverseKeyHash,
13901
13916
  checkCommerceReady,
13902
13917
  ...azureFoundryChecks
13903
13918
  ],
@@ -15433,9 +15448,12 @@ function registerDeploy(program) {
15433
15448
  ).option(
15434
15449
  "--yes",
15435
15450
  "Skip the typed project-name confirmation (required for --execute on a non-interactive terminal)."
15451
+ ).option(
15452
+ "--purge-images",
15453
+ "Azure: inspect and delete only this agent's owned ACR repository; dry-run unless --execute is also supplied."
15436
15454
  ).option(
15437
15455
  "--purge",
15438
- "Also delete retained resources (ECR repository + CloudWatch log groups) via bnbagent-deploy's --purge."
15456
+ "Also delete retained provider-owned infrastructure via bnbagent-deploy's --purge."
15439
15457
  ).action(
15440
15458
  act(
15441
15459
  (opts) => cmdDestroy(opts)
@@ -16170,6 +16188,7 @@ async function cmdAgent(opts, agentcoreArgs) {
16170
16188
  return rc;
16171
16189
  }
16172
16190
  await printAccessNextSteps2(root, "azure-foundry");
16191
+ await printAzureAgentClientPrompt(root);
16173
16192
  return 0;
16174
16193
  }
16175
16194
  migrateEnvLocal(root);
@@ -16543,6 +16562,60 @@ async function printAgentClientPrompt2(root, destination, opts = {}) {
16543
16562
  printOut(` Scrolled past it? Run: cat ${saved}`);
16544
16563
  }
16545
16564
  }
16565
+ async function printAzureAgentClientPrompt(root) {
16566
+ const agentRoot2 = findSubProjectRoot16("agent", root) ?? root;
16567
+ const deployment = discoverRecordedDeployments(
16568
+ deployWorkspaceRoot2(root)
16569
+ ).find((candidate) => candidate.provider === "azure");
16570
+ const endpoint = deployment?.endpoint ?? recordedEndpoint(root) ?? "<run `bag deploy info --provider azure` to recover the endpoint>";
16571
+ const faces = deployment?.faces ?? agentFacesOf(agentRoot2);
16572
+ const hasX402 = hasX402Face(faces);
16573
+ const hasA2a = hasA2aFace(faces);
16574
+ const request = hasA2a ? JSON.stringify(azureNegotiateQuickVerifyBody()) : hasX402 ? JSON.stringify(azureX402CarrierBody()) : JSON.stringify(azureNegotiateQuickVerifyBody());
16575
+ const lines = [
16576
+ "",
16577
+ CLIENT_PROMPT_RULE2,
16578
+ "\u{1F4CB} COPY EVERYTHING BELOW THIS LINE INTO CLAUDE CODE OR CURSOR",
16579
+ " \u2014 it will build and run an Azure Foundry operator/gateway client",
16580
+ CLIENT_PROMPT_RULE2,
16581
+ "I deployed a BNB Chain seller to Azure Foundry. Build a small TypeScript (fetch) Azure Foundry operator/gateway client and run one non-destructive smoke request.",
16582
+ "",
16583
+ "WHAT WAS DEPLOYED",
16584
+ `- Faces: ${faces.join(", ") || "unknown"}`,
16585
+ `- Entra-authenticated Invocations endpoint: ${endpoint}`,
16586
+ `- Token scope: ${AZURE_FOUNDRY_TOKEN_SCOPE}`,
16587
+ "- This is not an anonymous buyer URL. A public x402 buyer requires an external HTTPS gateway in front of Foundry.",
16588
+ "",
16589
+ "REQUEST",
16590
+ `- POST application/json: ${request}`,
16591
+ ...hasA2a ? ["- The input field contains the JSON-stringified negotiate payload."] : [],
16592
+ ...hasX402 ? [
16593
+ ...hasA2a ? [
16594
+ `- X402 carrier alternative: ${JSON.stringify(azureX402CarrierBody())}`
16595
+ ] : [],
16596
+ "- The outer object is http-envelope-v1. Build it with:",
16597
+ ' const inner = { prompt: "Say hi in one short sentence." };',
16598
+ ' const body = Buffer.from(JSON.stringify(inner)).toString("base64");',
16599
+ "- The outer response is another HTTP envelope. Decode response.body from base64 before parsing the inner x402 JSON."
16600
+ ] : [],
16601
+ "",
16602
+ "AUTHENTICATION AND LOGS",
16603
+ "- Obtain an Entra token for https://ai.azure.com with DefaultAzureCredential, ClientSecretCredential, or an operator-only `az account get-access-token` smoke command.",
16604
+ "- Capture the response header `x-agent-session-id`; then stream that exact invocation with `bag deploy logs --provider azure --session <id>`.",
16605
+ "",
16606
+ "YOUR TASK",
16607
+ "Create and run the client, print the outer status and body, decode the inner envelope when present, print x-agent-session-id, and show the exact logs command for that session. Do not claim that the Foundry endpoint is anonymously reachable.",
16608
+ CLIENT_PROMPT_RULE2
16609
+ ];
16610
+ const text2 = lines.join("\n");
16611
+ printOut(text2);
16612
+ const saved = persistDeploySummary2(root, text2);
16613
+ if (saved !== null) {
16614
+ printOut(`
16615
+ \u{1F4BE} Saved the copy-paste prompt above to ${saved}`);
16616
+ printOut(` Scrolled past it? Run: cat ${saved}`);
16617
+ }
16618
+ }
16546
16619
  function persistDeploySummary2(root, text2) {
16547
16620
  try {
16548
16621
  if (!fs37.statSync(path37.resolve(root)).isDirectory()) {
@@ -16885,9 +16958,10 @@ function azureX402CarrierBody() {
16885
16958
  path: "/x402",
16886
16959
  query: {},
16887
16960
  headers: { "content-type": "application/json" },
16888
- body: Buffer.from(JSON.stringify({ prompt: "" }), "utf8").toString(
16889
- "base64"
16890
- )
16961
+ body: Buffer.from(
16962
+ JSON.stringify({ prompt: "Say hi in one short sentence." }),
16963
+ "utf8"
16964
+ ).toString("base64")
16891
16965
  };
16892
16966
  }
16893
16967
  function sameFaces(a, b) {
@@ -16960,7 +17034,7 @@ function printAzureInfo(root, deployment, opts) {
16960
17034
  method: "POST",
16961
17035
  content_type: "application/json",
16962
17036
  body: x402Body,
16963
- executes_seller_work: false
17037
+ executes_seller_work: x402Status === "free"
16964
17038
  }
16965
17039
  }
16966
17040
  } : {
@@ -17033,26 +17107,39 @@ function printAzureInfo(root, deployment, opts) {
17033
17107
  );
17034
17108
  if (hasA2a && x402Body) {
17035
17109
  printOut(
17036
- ` x402 no-work route probe: ${JSON.stringify(x402Body)} (expect an inner 400 in FREE mode or 402 before payment in PAID mode)`
17110
+ ` x402 request example: ${JSON.stringify(x402Body)} (expect work in FREE mode or 402 before payment in PAID mode)`
17037
17111
  );
17038
17112
  }
17039
17113
  printOut(` x402 gateway guide: ${foundryX402GatewayGuideUrl()}`);
17040
17114
  }
17041
17115
  }
17042
17116
  if (opts.withCurl && body) {
17043
- printOut(
17044
- hasA2a ? "\nQuick-verify curl:" : "\nX402 no-work route-probe curl:"
17045
- );
17117
+ printOut(hasA2a ? "\nQuick-verify curl:" : "\nX402 request curl:");
17046
17118
  printOut(
17047
17119
  ` AZURE_TOKEN=$(az account get-access-token --resource ${AZURE_FOUNDRY_TOKEN_RESOURCE} --query accessToken -o tsv)`
17048
17120
  );
17049
17121
  printOut(` AZURE_ENDPOINT=${JSON.stringify(endpoint)}`);
17122
+ printOut(" AZURE_HEADERS=$(mktemp)");
17050
17123
  printOut(
17051
- ` curl -sS -X POST "$AZURE_ENDPOINT" \\
17124
+ ` AZURE_RESPONSE=$(curl -sS -D "$AZURE_HEADERS" -X POST "$AZURE_ENDPOINT" \\
17052
17125
  -H "Authorization: Bearer $AZURE_TOKEN" \\
17053
17126
  -H "Content-Type: application/json" \\
17054
- -d '${JSON.stringify(body)}'`
17127
+ -d '${JSON.stringify(body)}')`
17055
17128
  );
17129
+ printOut(' printf "%s\\n" "$AZURE_RESPONSE"');
17130
+ printOut(
17131
+ ` AZURE_SESSION=$(awk 'tolower($1) == "x-agent-session-id:" {gsub(/\\r/, "", $2); print $2}' "$AZURE_HEADERS" | tail -1)`
17132
+ );
17133
+ printOut(' printf "session: %s\\n" "$AZURE_SESSION"');
17134
+ printOut(' bag deploy logs --provider azure --session "$AZURE_SESSION"');
17135
+ if (!hasA2a && x402Body) {
17136
+ printOut(
17137
+ "\n Decode response.body from base64 to read the inner x402 JSON."
17138
+ );
17139
+ printOut(
17140
+ ` node -e 'const outer=JSON.parse(process.argv[1]); console.log(Buffer.from(outer.body,"base64").toString("utf8"))' "$AZURE_RESPONSE"`
17141
+ );
17142
+ }
17056
17143
  printOut(
17057
17144
  "\n The Azure CLI command is only a convenient way to mint a token for this curl. Deployment itself does not require az/azd; DefaultAzureCredential or ClientSecretCredential can mint the same scope in an application."
17058
17145
  );
@@ -17170,6 +17257,10 @@ async function cmdDestroy(opts) {
17170
17257
  "destroy"
17171
17258
  );
17172
17259
  if (typeof deployment === "number") return deployment;
17260
+ if (opts.purgeImages && deployment.provider !== "azure") {
17261
+ printErr("error: --purge-images is only valid for Azure self-deployments");
17262
+ return 2;
17263
+ }
17173
17264
  if (deployment.provider === "bnb") {
17174
17265
  return platformDestroy({
17175
17266
  root,
@@ -17198,7 +17289,8 @@ async function cmdDestroy(opts) {
17198
17289
  return destroyAzureFoundry({
17199
17290
  projectRoot: workspaceRoot,
17200
17291
  execute: Boolean(opts.execute),
17201
- purge: Boolean(opts.purge)
17292
+ purge: Boolean(opts.purge),
17293
+ purgeImages: Boolean(opts.purgeImages)
17202
17294
  });
17203
17295
  }
17204
17296
  return runDestroy({
@@ -686,8 +686,8 @@ function packageRoot() {
686
686
  }
687
687
  }
688
688
  function studioCliVersion() {
689
- if ("0.0.11-alpha.6") {
690
- return "0.0.11-alpha.6";
689
+ if ("0.0.11-alpha.7") {
690
+ return "0.0.11-alpha.7";
691
691
  }
692
692
  const file = path3.join(packageRoot(), "package.json");
693
693
  const pkg = JSON.parse(fs3.readFileSync(file, "utf-8"));
@@ -937,7 +937,7 @@ function isTable(value) {
937
937
  }
938
938
 
939
939
  // src/cli/_deploy/deployCli.ts
940
- var DEPLOY_CLI_VERSION = "0.5.12";
940
+ var DEPLOY_CLI_VERSION = "0.5.13";
941
941
  var DEPLOY_CLI_PACKAGE = `@bnbagent/deploy-cli@${DEPLOY_CLI_VERSION}`;
942
942
  var BNB_PLATFORM_API_URL = "https://bnbagent-api.bnbchain.world";
943
943
  var BNB_PLATFORM_API_URL_ENV = "BNBAGENT_API_URL";
@@ -18,7 +18,7 @@ import {
18
18
  runPlatformAccountCommand,
19
19
  trialFromDeployCliJson,
20
20
  withDeployFiles
21
- } from "./chunk-VVHPUKLV.js";
21
+ } from "./chunk-3QSCJAXQ.js";
22
22
  import "./chunk-RO726HJG.js";
23
23
  export {
24
24
  BNB_PLATFORM_API_URL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bnbagent/studio-cli",
3
- "version": "0.0.11-alpha.6",
3
+ "version": "0.0.11-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.11-alpha.6"
57
+ "@bnbagent/studio-runtime": "0.0.11-alpha.7"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@a2a-js/sdk": "^0.3.14",
@@ -53,7 +53,7 @@ Treat ERC-8183 amounts as decimal strings at CLI/config boundaries and `bigint`
53
53
 
54
54
  ## CLI groups at a glance
55
55
 
56
- `init`, `scan`, `recipe`, `skills`, `wallet`, `erc8004`, `erc8183`, `x402`, `agents`, `config`, `env`, `dev`, `doctor`, `audit`, `deploy`, `platform`, `llm`, `bundle`, `budget` - see `bag --help` for details. `bag deploy [--provider bnb\|aws\|azure] [--backend aws\|azure]` is the primary deploy command; `--backend` is valid only for provider `bnb` and confirms the recipe-derived managed backend. `prepare`, `verify`, `status`, `info`, `destroy`, `logs`, and `fix-gitignore` remain lifecycle subcommands (`deploy agent` is a deprecated compatibility alias). Provider deploy/status/logs/destroy and deploy-time credential validation are delegated to pinned `@bnbagent/deploy-cli@0.5.12`.
56
+ `init`, `scan`, `recipe`, `skills`, `wallet`, `erc8004`, `erc8183`, `x402`, `agents`, `config`, `env`, `dev`, `doctor`, `audit`, `deploy`, `platform`, `llm`, `bundle`, `budget` - see `bag --help` for details. `bag deploy [--provider bnb\|aws\|azure] [--backend aws\|azure]` is the primary deploy command; `--backend` is valid only for provider `bnb` and confirms the recipe-derived managed backend. `prepare`, `verify`, `status`, `info`, `destroy`, `logs`, and `fix-gitignore` remain lifecycle subcommands (`deploy agent` is a deprecated compatibility alias). Provider deploy/status/logs/destroy and deploy-time credential validation are delegated to pinned `@bnbagent/deploy-cli@0.5.13`.
57
57
 
58
58
  ## Tool surface
59
59
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bnbagent-studio-use-aws-agentcore
3
- description: When the user wants to deploy or operate a bnbagent-studio project on AWS Bedrock AgentCore - deploy with `bag deploy --provider aws` (all cloud lifecycle mutations are delegated to pinned `@bnbagent/deploy-cli@0.5.12`), inspect with `bag deploy status` / `logs --provider aws` / `verify --provider aws`, and tear down with `bag deploy destroy --provider aws --execute [--purge]`. Also covers AWS credential prerequisites, the optional read-only quota probe, and the runtime-secret channel.
3
+ description: When the user wants to deploy or operate a bnbagent-studio project on AWS Bedrock AgentCore - deploy with `bag deploy --provider aws` (all cloud lifecycle mutations are delegated to pinned `@bnbagent/deploy-cli@0.5.13`), inspect with `bag deploy status` / `logs --provider aws` / `verify --provider aws`, and tear down with `bag deploy destroy --provider aws --execute [--purge]`. Also covers AWS credential prerequisites, the optional read-only quota probe, and the runtime-secret channel.
4
4
  ---
5
5
 
6
6
  > **Reference file** of the `bnbagent-studio` router skill - installed at `bnbagent-studio/references/` and loaded on demand (not a standalone skill). Route here via the router's decision tree.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bnbagent-studio-use-azure-foundry
3
- description: When the user wants to deploy or operate a bnbagent-studio project on Azure AI Foundry Hosted Agents - scaffold with `bag init --runtime azure-foundry`, deploy either to the managed platform with `bag deploy --provider bnb --backend azure` or directly with `bag deploy --provider azure`; all cloud lifecycle execution is delegated to pinned `@bnbagent/deploy-cli@0.5.12`. Native MCP is not supported on Azure; use AgentCore for MCP.
3
+ description: When the user wants to deploy or operate a bnbagent-studio project on Azure AI Foundry Hosted Agents - scaffold with `bag init --runtime azure-foundry`, deploy either to the managed platform with `bag deploy --provider bnb --backend azure` or directly with `bag deploy --provider azure`; all cloud lifecycle execution is delegated to pinned `@bnbagent/deploy-cli@0.5.13`. Native MCP is not supported on Azure; use AgentCore for MCP.
4
4
  ---
5
5
 
6
6
  > **Reference file** of the `bnbagent-studio` router skill - installed at `bnbagent-studio/references/` and loaded on demand (not a standalone skill). Route here via the router's decision tree.
@@ -31,7 +31,7 @@ Procedure for deploying and operating the seller Agent on **Azure AI Foundry Hos
31
31
 
32
32
  1. **Bun 1.3+ (`bunx`) on PATH** - the pinned `@bnbagent/deploy-cli` runs through it.
33
33
  2. **Docker running** - the image is built locally (linux/amd64) before push.
34
- 3. **An Azure subscription** the operator may provision in (Foundry account/project, container registry, hosted agent). Before a local self-deploy, run `bunx --bun @bnbagent/deploy-cli@0.5.12 login --provider azure`; use OIDC/service-principal credentials in CI.
34
+ 3. **An Azure subscription** the operator may provision in (Foundry account/project, container registry, hosted agent). Before a local self-deploy, run `bunx --bun @bnbagent/deploy-cli@0.5.13 login --provider azure`; use OIDC/service-principal credentials in CI.
35
35
 
36
36
  ## ⚠️ Foundry gotchas (read before deploying)
37
37
 
@@ -49,7 +49,7 @@ Procedure for deploying and operating the seller Agent on **Azure AI Foundry Hos
49
49
 
50
50
  > The encrypted keystore (`.studio/wallets/`) stays at the workspace root and rides only that secret channel - never baked into the image.
51
51
 
52
- Provider-native overrides go in the optional `studio.toml [deploy.foundry]` table (verbatim deploy-spec keys; deploy-cli 0.5.12 consumes `account`, `cpu`, `location`, `memory`, `project`, `projectEndpoint`, `protocol`, `registry`, `subscriptionId` and warns about anything else). The `[azure]` block's `subscription_id` / `account_name` / `project_name` / `project_endpoint` / `location` win over conflicting `[deploy.foundry]` keys.
52
+ Provider-native overrides go in the optional `studio.toml [deploy.foundry]` table (verbatim deploy-spec keys; deploy-cli 0.5.13 consumes `account`, `cpu`, `location`, `memory`, `project`, `projectEndpoint`, `protocol`, `registry`, `subscriptionId` and warns about anything else). The `[azure]` block's `subscription_id` / `account_name` / `project_name` / `project_endpoint` / `location` win over conflicting `[deploy.foundry]` keys.
53
53
 
54
54
  ## Typical workflow
55
55
 
@@ -95,6 +95,13 @@ Invocations request. This does not make the Azure CLI a deploy prerequisite;
95
95
  application clients may mint the same `https://ai.azure.com/.default` scope
96
96
  with `DefaultAzureCredential` or `ClientSecretCredential`.
97
97
 
98
+ The generated curl stores the response headers, extracts
99
+ `x-agent-session-id`, and prints the exact
100
+ `bag deploy logs --provider azure --session <id>` command. Without an explicit
101
+ session, logs lists the recent sessions visible to the current Azure identity.
102
+ Foundry scopes that list by identity/isolation key, so an external buyer or
103
+ gateway must still preserve the session header from its own response.
104
+
98
105
  The built-in smoke proves the container contract, not the seller signature. For a release E2E, invoke with a complete `negotiate` envelope and require `response.accepted=true`, a non-empty `negotiation_hash`, and `provider_sig`. The Invocations body is `{"input":"<serialized skill JSON>"}`.
99
106
 
100
107
  ### X402 external gateway
@@ -117,7 +124,9 @@ body:
117
124
  ```
118
125
 
119
126
  `bag deploy info --provider azure --json` reports the deployed face snapshot,
120
- seller state, carrier contract, and a no-work route probe. A PAID seller also
127
+ seller state, carrier contract, and a request example. In FREE mode that
128
+ example executes seller work without a payment; in PAID mode it returns the
129
+ inner 402 before work until a valid payment is supplied. A PAID seller also
121
130
  needs fixed facilitator egress; use an Azure Container Apps workload-profiles
122
131
  environment with VNet integration and a NAT Gateway static IP, then allowlist
123
132
  that IP with B402. Studio does not deploy or manage the gateway or network.
@@ -126,11 +135,21 @@ that IP with B402. Studio does not deploy or manage the gateway or network.
126
135
 
127
136
  ```bash
128
137
  bag deploy destroy --provider azure # dry-run plan
138
+ bag deploy destroy --provider azure --purge-images # read-only ACR repository inventory
129
139
  bag deploy destroy --provider azure --execute # delegates `destroy --yes`
140
+ bag deploy destroy --provider azure --execute --purge-images # delete this agent's owned ACR repository
130
141
  bag deploy destroy --provider azure --execute --purge # retained resources too
131
142
  ```
132
143
 
133
- `--purge` also removes the retained resources the deploy record tracks - including the soft-deleted Cognitive Services account, freeing the custom subdomain immediately (otherwise held ~48h). A successful teardown clears the recorded `[azure].agent_endpoint`.
144
+ Default destroy keeps pushed images and reports that they continue to bill for
145
+ storage. `--purge-images` inventories manifest/tag count and estimated image
146
+ size, then deletes only the deterministic `bnbagent/<agent-name>` repository in
147
+ a registry proven to be owned by bnbagent-deploy. External registry overrides,
148
+ untagged registries, and registries shared by another Foundry project are kept.
149
+ `--purge` also removes the retained resources the deploy record tracks -
150
+ including the soft-deleted Cognitive Services account, freeing the custom
151
+ subdomain immediately (otherwise held ~48h). A successful teardown clears the
152
+ recorded `[azure].agent_endpoint`.
134
153
 
135
154
  ## Scope note
136
155
 
@@ -9,7 +9,7 @@ description: Use when deploying or operating a bnbagent-studio seller on the BNB
9
9
 
10
10
  Treat this provider as a temporary testnet sandbox. Require a throwaway wallet, keep `bsc-testnet`, and explain that the runtime signing material is transmitted to the operator's managed secret store for the trial. Never use a mainnet key. Exception: `wallet.kind='altana'` ships only the bounded, budget-limited, revocable session - the throwaway-wallet advice does not apply; tighten the session instead (`bag wallet session grant --force --budget-u <small> --expiry-days <short>`) and never run `bag wallet new` on an altana project (it breaks the session's `[wallet].address` anchor).
11
11
 
12
- All auth and cloud lifecycle work must cross the pinned `@bnbagent/deploy-cli@0.5.12` boundary. Do not call a cloud CLI or platform REST routes directly. The managed backend is recipe-derived: `agentcore` uses AWS; `azure-foundry` uses Azure. For headless managed Azure, confirm with `bag deploy --provider bnb --backend azure --yes`; never treat `--backend` as a cross-cloud recipe converter.
12
+ All auth and cloud lifecycle work must cross the pinned `@bnbagent/deploy-cli@0.5.13` boundary. Do not call a cloud CLI or platform REST routes directly. The managed backend is recipe-derived: `agentcore` uses AWS; `azure-foundry` uses Azure. For headless managed Azure, confirm with `bag deploy --provider bnb --backend azure --yes`; never treat `--backend` as a cross-cloud recipe converter.
13
13
 
14
14
  ## Select and authenticate
15
15