@bnbagent/studio-cli 0.0.11-alpha.6 → 0.0.11
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/_agentcoreName-DZDWEYD3.js +0 -0
- package/dist/_twak-4XF4H5PL.js +0 -0
- package/dist/bag.js +113 -21
- package/dist/chunk-RO726HJG.js +0 -0
- package/dist/chunk-U7IDQ3K5.js +0 -0
- package/dist/{chunk-VVHPUKLV.js → chunk-VGSWNATS.js} +3 -3
- package/dist/{deployCli-5DZVAKMZ.js → deployCli-4ATY3SUP.js} +1 -1
- package/package.json +12 -11
- 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 +24 -5
- package/skills/references/bnbagent-studio-use-bnb-trial.md +1 -1
- package/LICENSE +0 -201
|
File without changes
|
package/dist/_twak-4XF4H5PL.js
CHANGED
|
File without changes
|
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-VGSWNATS.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-4ATY3SUP.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
|
-
|
|
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
|
-
|
|
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
|
|
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(
|
|
16889
|
-
"
|
|
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:
|
|
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
|
|
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({
|
package/dist/chunk-RO726HJG.js
CHANGED
|
File without changes
|
package/dist/chunk-U7IDQ3K5.js
CHANGED
|
File without changes
|
|
@@ -686,8 +686,8 @@ function packageRoot() {
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
function studioCliVersion() {
|
|
689
|
-
if ("0.0.11
|
|
690
|
-
return "0.0.11
|
|
689
|
+
if ("0.0.11") {
|
|
690
|
+
return "0.0.11";
|
|
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.
|
|
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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bnbagent/studio-cli",
|
|
3
|
-
"version": "0.0.11
|
|
3
|
+
"version": "0.0.11",
|
|
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",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"directory": "packages/studio-cli"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
|
+
"packageManager": "pnpm@10.24.0",
|
|
28
29
|
"engines": {
|
|
29
30
|
"node": ">=22"
|
|
30
31
|
},
|
|
@@ -41,8 +42,16 @@
|
|
|
41
42
|
"bin": {
|
|
42
43
|
"bag": "./dist/bag.js"
|
|
43
44
|
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsup",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"lint": "biome check src tests",
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"check": "pnpm typecheck && pnpm lint && pnpm test && pnpm build"
|
|
51
|
+
},
|
|
44
52
|
"dependencies": {
|
|
45
53
|
"@bnbagent/sdk": "0.5.0",
|
|
54
|
+
"@bnbagent/studio-runtime": "0.0.11",
|
|
46
55
|
"ai": "^7.0.29",
|
|
47
56
|
"archiver": "^8.0.0",
|
|
48
57
|
"commander": "^15.0.0",
|
|
@@ -53,8 +62,7 @@
|
|
|
53
62
|
"smol-toml": "^1.3.0",
|
|
54
63
|
"tar": "^7.4.0",
|
|
55
64
|
"viem": "^2.54.0",
|
|
56
|
-
"yaml": "^2.9.0"
|
|
57
|
-
"@bnbagent/studio-runtime": "0.0.11-alpha.6"
|
|
65
|
+
"yaml": "^2.9.0"
|
|
58
66
|
},
|
|
59
67
|
"devDependencies": {
|
|
60
68
|
"@a2a-js/sdk": "^0.3.14",
|
|
@@ -70,12 +78,5 @@
|
|
|
70
78
|
"typescript": "^5.5.0",
|
|
71
79
|
"vitest": "^2.0.0",
|
|
72
80
|
"zod": "^3.25.76"
|
|
73
|
-
},
|
|
74
|
-
"scripts": {
|
|
75
|
-
"build": "tsup",
|
|
76
|
-
"test": "vitest run",
|
|
77
|
-
"lint": "biome check src tests",
|
|
78
|
-
"typecheck": "tsc --noEmit",
|
|
79
|
-
"check": "pnpm typecheck && pnpm lint && pnpm test && pnpm build"
|
|
80
81
|
}
|
|
81
|
-
}
|
|
82
|
+
}
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
+
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
|
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of tracking or otherwise improving the Work,
|
|
59
|
-
but excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for describing the origin of the Work and
|
|
141
|
-
reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Support. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or support.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of "Purpose" be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2026 BNB Chain Studio
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
200
|
-
implied. See the License for the specific language governing
|
|
201
|
-
permissions and limitations under the License.
|