@bnbagent/studio-cli 0.0.11-alpha.3 → 0.0.11-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/dist/bag.js +24 -6
- package/dist/{chunk-MIYN6U2D.js → chunk-GKFTJDDJ.js} +7 -4
- package/dist/{deployCli-AED2MLUB.js → deployCli-YYV7FFFG.js} +1 -1
- package/package.json +2 -2
- package/skills/bnbagent-studio.md +1 -1
- package/skills/references/bnbagent-studio-use-aws-agentcore.md +1 -1
- package/skills/references/bnbagent-studio-use-azure-foundry.md +8 -3
- package/skills/references/bnbagent-studio-use-bnb-trial.md +1 -1
package/dist/bag.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
x402SellerIsFree,
|
|
51
51
|
x402SellerPricingState,
|
|
52
52
|
x402SellerUsesB402
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-GKFTJDDJ.js";
|
|
54
54
|
import {
|
|
55
55
|
TWAK_CLI_MIN_VERSION,
|
|
56
56
|
TWAK_CLI_VERSION,
|
|
@@ -228,7 +228,7 @@ import {
|
|
|
228
228
|
var CAMPAIGN_DOC_URL = "https://www.bnbchain.org/en/blog/bnb-agent-studio-is-live-on-bnb-chain-ai-agents-from-one-prompt";
|
|
229
229
|
var CAMPAIGN_CHECK_TIMEOUT_MS = 6e3;
|
|
230
230
|
async function fetchCampaignActive() {
|
|
231
|
-
const { bnbPlatformApiUrl: bnbPlatformApiUrl2 } = await import("./deployCli-
|
|
231
|
+
const { bnbPlatformApiUrl: bnbPlatformApiUrl2 } = await import("./deployCli-YYV7FFFG.js");
|
|
232
232
|
const controller = new AbortController();
|
|
233
233
|
const timer = setTimeout(() => controller.abort(), CAMPAIGN_CHECK_TIMEOUT_MS);
|
|
234
234
|
try {
|
|
@@ -4270,6 +4270,7 @@ async function deployAzureFoundry(opts) {
|
|
|
4270
4270
|
"deploy",
|
|
4271
4271
|
"-f",
|
|
4272
4272
|
files.configPath,
|
|
4273
|
+
...opts.onboard ? ["--onboard"] : [],
|
|
4273
4274
|
...opts.skipSmoke ? [] : ["--smoke"],
|
|
4274
4275
|
...extra
|
|
4275
4276
|
],
|
|
@@ -14390,6 +14391,7 @@ function utcStamp() {
|
|
|
14390
14391
|
function buyerAccess(root) {
|
|
14391
14392
|
const base = bnbPlatformApiUrl();
|
|
14392
14393
|
const cfg = loadAgentCfg(root);
|
|
14394
|
+
const backend = platformCfg(root).backend === "azure" ? "azure" : "aws";
|
|
14393
14395
|
const faces = stackFaces(tableOf12(cfg, "stack"), tableOf12(cfg, "payments"));
|
|
14394
14396
|
const protocol = nativeProtocolOf(faces);
|
|
14395
14397
|
const rawAgentId = platformCfg(root).agent_id;
|
|
@@ -14418,6 +14420,7 @@ function buyerAccess(root) {
|
|
|
14418
14420
|
}
|
|
14419
14421
|
return {
|
|
14420
14422
|
base,
|
|
14423
|
+
backend,
|
|
14421
14424
|
faces,
|
|
14422
14425
|
protocol,
|
|
14423
14426
|
agentId,
|
|
@@ -14838,7 +14841,6 @@ function printAgentClientPrompt(root, invokeUrl, status) {
|
|
|
14838
14841
|
const base = access.base;
|
|
14839
14842
|
const tokenUrl = access.tokenUrl;
|
|
14840
14843
|
const deploymentId = String(platformCfg(root).deployment_id || "n/a");
|
|
14841
|
-
const managedBackend = platformCfg(root).backend === "azure" ? "azure" : "aws";
|
|
14842
14844
|
const selftestLine = "- Quick self-test (operator): run `bag deploy info --with-curl`";
|
|
14843
14845
|
const rt = agentId ? `${base}/v1/rt/${agentId}` : `${base}/v1/rt/<agentId>`;
|
|
14844
14846
|
const cardUrl = `${rt}/.well-known/agent-card.json`;
|
|
@@ -14918,7 +14920,7 @@ function printAgentClientPrompt(root, invokeUrl, status) {
|
|
|
14918
14920
|
"- The anonymous x402 route does not use the OAuth2 token flow shown for ERC-8183."
|
|
14919
14921
|
],
|
|
14920
14922
|
...!x402Only && hasA2aFace(faces) ? [
|
|
14921
|
-
|
|
14923
|
+
'- A2A callers: send the payload as a DATA part, NOT text \u2014 parts:[{"kind":"data","data":{ ...payload above... }}]. The managed gateway adapts this canonical buyer contract to the selected backend.'
|
|
14922
14924
|
] : [],
|
|
14923
14925
|
"",
|
|
14924
14926
|
"YOUR TASK",
|
|
@@ -15306,7 +15308,10 @@ function registerDeploy(program) {
|
|
|
15306
15308
|
(opts) => cmdDestroy(opts)
|
|
15307
15309
|
)
|
|
15308
15310
|
);
|
|
15309
|
-
p.command("logs").description("Show the selected deployment's logs via bnbagent-deploy.").option("--project-root <path>", "Override project root.").addOption(providerOption()).option("--since <dur>", "Lower bound, e.g. 5m/2h/1d (default 10m).", "10m").option("--follow", "Stream new lines (poll ~3s).").option("--limit <n>", "Number of recent lines (default 50).").option(
|
|
15311
|
+
p.command("logs").description("Show the selected deployment's logs via bnbagent-deploy.").option("--project-root <path>", "Override project root.").addOption(providerOption()).option("--since <dur>", "Lower bound, e.g. 5m/2h/1d (default 10m).", "10m").option("--follow", "Stream new lines (poll ~3s).").option("--limit <n>", "Number of recent lines (default 50).").option(
|
|
15312
|
+
"--session <id>",
|
|
15313
|
+
"Managed Azure runtime session; capture x-agent-session-id from buyer response headers."
|
|
15314
|
+
).addOption(
|
|
15310
15315
|
new Option4(
|
|
15311
15316
|
"--job <id>",
|
|
15312
15317
|
"Deprecated Studio direct-CloudWatch filter."
|
|
@@ -16025,6 +16030,7 @@ async function cmdAgent(opts, agentcoreArgs) {
|
|
|
16025
16030
|
rc = await deployAzureFoundry({
|
|
16026
16031
|
projectRoot: root,
|
|
16027
16032
|
extraArgs: stripLeadingDdash2(agentcoreArgs),
|
|
16033
|
+
onboard: Boolean(opts.yes),
|
|
16028
16034
|
skipSmoke: opts.skipSmoke
|
|
16029
16035
|
});
|
|
16030
16036
|
if (rc !== 0) {
|
|
@@ -16697,12 +16703,24 @@ Quick-verify x402 endpoint:
|
|
|
16697
16703
|
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'`
|
|
16698
16704
|
);
|
|
16699
16705
|
} else {
|
|
16706
|
+
const captureAzureSession = access.backend === "azure";
|
|
16707
|
+
if (captureAzureSession) {
|
|
16708
|
+
printOut(" HDR=$(mktemp)");
|
|
16709
|
+
}
|
|
16700
16710
|
printOut(
|
|
16701
|
-
` curl -X POST ${invokeUrl}/a2a \\
|
|
16711
|
+
` curl ${captureAzureSession ? '-sS -D "$HDR" ' : ""}-X POST ${invokeUrl}/a2a \\
|
|
16702
16712
|
-H "Authorization: Bearer $TOKEN" \\
|
|
16703
16713
|
-H "Content-Type: application/json" \\
|
|
16704
16714
|
-d '{"jsonrpc":"2.0","id":1,"method":"message/send","params":{"message":{"role":"user","messageId":"nego-1","parts":[{"kind":"data","data":{"skill":"negotiate","task_description":"Create a concise launch checklist","terms":{"deliverables":"A 5-item checklist","quality_standards":"Clear and actionable"}}}]}}}'`
|
|
16705
16715
|
);
|
|
16716
|
+
if (captureAzureSession) {
|
|
16717
|
+
printOut(
|
|
16718
|
+
` SESSION=$(awk 'tolower($1)=="x-agent-session-id:"{gsub(/\\r/,"",$2);print $2}' "$HDR")
|
|
16719
|
+
rm -f "$HDR"
|
|
16720
|
+
# Inspect this Azure buyer call's runtime logs when needed:
|
|
16721
|
+
bag deploy logs --provider bnb --session "$SESSION"`
|
|
16722
|
+
);
|
|
16723
|
+
}
|
|
16706
16724
|
if (hasMcpFace(access.faces)) {
|
|
16707
16725
|
printOut(
|
|
16708
16726
|
` # MCP is also published at ${invokeUrl}/mcp through the buffered platform gateway tunnel; initialize a streamable-HTTP session before tools/list.`
|
|
@@ -686,8 +686,8 @@ function packageRoot() {
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
function studioCliVersion() {
|
|
689
|
-
if ("0.0.11-alpha.
|
|
690
|
-
return "0.0.11-alpha.
|
|
689
|
+
if ("0.0.11-alpha.4") {
|
|
690
|
+
return "0.0.11-alpha.4";
|
|
691
691
|
}
|
|
692
692
|
const file = path3.join(packageRoot(), "package.json");
|
|
693
693
|
const pkg = JSON.parse(fs3.readFileSync(file, "utf-8"));
|
|
@@ -904,7 +904,7 @@ function isTable(value) {
|
|
|
904
904
|
}
|
|
905
905
|
|
|
906
906
|
// src/cli/_deploy/deployCli.ts
|
|
907
|
-
var DEPLOY_CLI_VERSION = "0.5.
|
|
907
|
+
var DEPLOY_CLI_VERSION = "0.5.11";
|
|
908
908
|
var DEPLOY_CLI_PACKAGE = `@bnbagent/deploy-cli@${DEPLOY_CLI_VERSION}`;
|
|
909
909
|
var BNB_PLATFORM_API_URL = "https://bnbagent-api.bnbchain.world";
|
|
910
910
|
var BNB_PLATFORM_API_URL_ENV = "BNBAGENT_API_URL";
|
|
@@ -1261,7 +1261,10 @@ function trialFromDeployCliJson(data) {
|
|
|
1261
1261
|
};
|
|
1262
1262
|
}
|
|
1263
1263
|
function bnbEnv() {
|
|
1264
|
-
return {
|
|
1264
|
+
return {
|
|
1265
|
+
[BNB_PLATFORM_API_URL_ENV]: bnbPlatformApiUrl(),
|
|
1266
|
+
BNBAGENT_CLI_SURFACE: "studio"
|
|
1267
|
+
};
|
|
1265
1268
|
}
|
|
1266
1269
|
async function runPlatformAccountCommand(argv, opts = {}) {
|
|
1267
1270
|
const run = async (args, cwd) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bnbagent/studio-cli",
|
|
3
|
-
"version": "0.0.11-alpha.
|
|
3
|
+
"version": "0.0.11-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.11-alpha.
|
|
57
|
+
"@bnbagent/studio-runtime": "0.0.11-alpha.4"
|
|
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] [--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.
|
|
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] [--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.11`.
|
|
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.
|
|
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.11`), 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.
|
|
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.11`. 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.
|
|
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.11 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.
|
|
52
|
+
Provider-native overrides go in the optional `studio.toml [deploy.foundry]` table (verbatim deploy-spec keys; deploy-cli 0.5.11 consumes `account`, `cpu`, `location`, `memory`, `project`, `projectEndpoint`, `protocol`, `registry` and warns about anything else). The `[azure]` block's `account_name` / `project_name` / `project_endpoint` / `location` win over conflicting `[deploy.foundry]` keys.
|
|
53
53
|
|
|
54
54
|
## Typical workflow
|
|
55
55
|
|
|
@@ -74,6 +74,11 @@ bag deploy --provider azure # delegated: onboard → build+push
|
|
|
74
74
|
|
|
75
75
|
`bag deploy --provider azure` runs an HTTP contract smoke by default (pass `--skip-smoke` to omit it) and captures the Foundry endpoint into `app/agent/studio.toml [azure].agent_endpoint`. If Foundry creates the resource but that post-create check fails, Studio still records the discovered endpoint so `status`, `logs`, and `destroy` can manage the resource; the deploy command continues to return non-zero.
|
|
76
76
|
|
|
77
|
+
For a first deploy in non-interactive automation, pass `--yes`. Studio treats
|
|
78
|
+
that as confirmation of the full deployment plan and delegates explicit
|
|
79
|
+
Foundry project onboarding. Configure `[azure]` account/subscription selection
|
|
80
|
+
when several candidates are accessible so no prompt or guess is required.
|
|
81
|
+
|
|
77
82
|
### C. Validate / operate
|
|
78
83
|
|
|
79
84
|
```bash
|
|
@@ -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
|
+
All auth and cloud lifecycle work must cross the pinned `@bnbagent/deploy-cli@0.5.11` 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
|
|