@bnbagent/studio-cli 0.0.14-alpha.1 → 0.0.14-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -2
- package/dist/bag.js +3433 -2480
- package/dist/{chunk-QVYWAJEK.js → chunk-YYT75RJ2.js} +44 -5
- package/dist/{deployCli-F3AOM5UO.js → deployCli-63QLUHXM.js} +5 -1
- package/package.json +5 -5
- package/recipes/agent/recipe.toml +1 -1
- package/recipes/mpp-buyer/recipe.toml +1 -1
- package/recipes/runtimes/agentcore/recipe.toml +1 -1
- package/recipes/runtimes/azure-foundry/recipe.toml +1 -1
- package/recipes/x402-buyer/recipe.toml +1 -1
- package/skills/bnbagent-studio.md +6 -4
- package/skills/references/bnbagent-studio-scaffolding-agent.md +2 -0
- package/skills/references/bnbagent-studio-use-aws-agentcore.md +1 -1
- package/skills/references/bnbagent-studio-use-azure-foundry.md +2 -2
- package/skills/references/bnbagent-studio-use-bnb-trial.md +1 -1
- package/skills/references/bnbagent-studio-use-createos.md +118 -0
- package/skills/references/bnbagent-studio-using-altana-wallet.md +1 -1
- package/skills/references/bnbagent-studio-using-twak-wallet.md +2 -2
|
@@ -622,7 +622,7 @@ async function runCaptureOut(cmd, args, opts = {}) {
|
|
|
622
622
|
reject: false,
|
|
623
623
|
stripFinalNewline: false,
|
|
624
624
|
stdout: "pipe",
|
|
625
|
-
stderr: "inherit"
|
|
625
|
+
stderr: opts.quiet ? "pipe" : "inherit"
|
|
626
626
|
});
|
|
627
627
|
return {
|
|
628
628
|
code: result.exitCode ?? 1,
|
|
@@ -947,8 +947,8 @@ function packageRoot() {
|
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
function studioCliVersion() {
|
|
950
|
-
if ("0.0.14-alpha.
|
|
951
|
-
return "0.0.14-alpha.
|
|
950
|
+
if ("0.0.14-alpha.3") {
|
|
951
|
+
return "0.0.14-alpha.3";
|
|
952
952
|
}
|
|
953
953
|
const file = path4.join(packageRoot(), "package.json");
|
|
954
954
|
const pkg = JSON.parse(fs4.readFileSync(file, "utf-8"));
|
|
@@ -1230,7 +1230,7 @@ function isTable(value) {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
1232
|
// src/cli/_deploy/deployCli.ts
|
|
1233
|
-
var DEPLOY_CLI_VERSION = "0.
|
|
1233
|
+
var DEPLOY_CLI_VERSION = "0.6.2";
|
|
1234
1234
|
var DEPLOY_CLI_PACKAGE = `@bnbagent/deploy-cli@${DEPLOY_CLI_VERSION}`;
|
|
1235
1235
|
var require2 = createRequire(import.meta.url);
|
|
1236
1236
|
function resolveLocalDeployCli() {
|
|
@@ -1334,6 +1334,10 @@ function providerPassthrough(studio, table4) {
|
|
|
1334
1334
|
return { ...raw };
|
|
1335
1335
|
}
|
|
1336
1336
|
function buildDeploySpec(root, opts) {
|
|
1337
|
+
if (opts.target === "nodeops/createos")
|
|
1338
|
+
throw new Error(
|
|
1339
|
+
"CreateOS uses its Node.js SDK adapter; generic cloud spec translation is unavailable."
|
|
1340
|
+
);
|
|
1337
1341
|
const agentRoot = findSubProjectRoot2("agent", root) ?? root;
|
|
1338
1342
|
const studio = loadStudioToml3(path7.join(agentRoot, "studio.toml"));
|
|
1339
1343
|
const name = String(
|
|
@@ -1610,6 +1614,7 @@ async function runDeployCliJson(argv, opts = {}) {
|
|
|
1610
1614
|
(result) => result.code !== 0,
|
|
1611
1615
|
() => runCaptureOut(bin, [...prefix, ...argv, "--json"], {
|
|
1612
1616
|
cwd: opts.cwd,
|
|
1617
|
+
quiet: opts.quiet,
|
|
1613
1618
|
env: opts.env ? { ...process.env, ...opts.env } : void 0
|
|
1614
1619
|
})
|
|
1615
1620
|
);
|
|
@@ -1620,7 +1625,7 @@ async function runDeployCliJson(argv, opts = {}) {
|
|
|
1620
1625
|
const parsed = JSON.parse(trimmed);
|
|
1621
1626
|
data = parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
1622
1627
|
} catch {
|
|
1623
|
-
printErr("error: bnbagent-deploy returned invalid JSON");
|
|
1628
|
+
if (!opts.quiet) printErr("error: bnbagent-deploy returned invalid JSON");
|
|
1624
1629
|
return { code: code === 0 ? 1 : code, data: {} };
|
|
1625
1630
|
}
|
|
1626
1631
|
}
|
|
@@ -1646,7 +1651,38 @@ function bnbEnv() {
|
|
|
1646
1651
|
BNBAGENT_CLI_SURFACE: "studio"
|
|
1647
1652
|
};
|
|
1648
1653
|
}
|
|
1654
|
+
function platformSessionFile() {
|
|
1655
|
+
return path7.join(
|
|
1656
|
+
process.env.BNBAGENT_DEPLOY_HOME?.trim() || path7.join(os2.homedir(), ".bnbagent-deploy"),
|
|
1657
|
+
"bnb",
|
|
1658
|
+
"session.json"
|
|
1659
|
+
);
|
|
1660
|
+
}
|
|
1661
|
+
function platformHostMismatchMessage(recorded, target) {
|
|
1662
|
+
return `Your platform login points at ${recorded}, but this command targets ${target}. Run \`bag platform logout && bag platform login\` to switch, then retry. If you intended to use the previous host, set BNBAGENT_API_URL to ${recorded} for login and subsequent commands.`;
|
|
1663
|
+
}
|
|
1664
|
+
function platformSessionHostError() {
|
|
1665
|
+
if (process.env.BNBAGENT_API_TOKEN?.trim()) return null;
|
|
1666
|
+
try {
|
|
1667
|
+
const session = JSON.parse(fs6.readFileSync(platformSessionFile(), "utf8"));
|
|
1668
|
+
const recorded = new URL(session.apiUrl).origin;
|
|
1669
|
+
const target = new URL(bnbPlatformApiUrl()).origin;
|
|
1670
|
+
return recorded === target ? null : platformHostMismatchMessage(recorded, target);
|
|
1671
|
+
} catch {
|
|
1672
|
+
return null;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1649
1675
|
async function runPlatformAccountCommand(argv, opts = {}) {
|
|
1676
|
+
if (!["login", "logout"].includes(argv[0] ?? "")) {
|
|
1677
|
+
const message = platformSessionHostError();
|
|
1678
|
+
if (message) {
|
|
1679
|
+
if (!opts.quiet) printErr(`error: ${message}`);
|
|
1680
|
+
return {
|
|
1681
|
+
code: 1,
|
|
1682
|
+
data: { error: { code: "auth.host_mismatch", message } }
|
|
1683
|
+
};
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1650
1686
|
const run = async (args, cwd) => {
|
|
1651
1687
|
if (opts.json) {
|
|
1652
1688
|
return runDeployCliJson(args, { cwd, env: bnbEnv(), quiet: opts.quiet });
|
|
@@ -1695,6 +1731,7 @@ export {
|
|
|
1695
1731
|
entryStemOf,
|
|
1696
1732
|
devPortOf,
|
|
1697
1733
|
recipeModeOf,
|
|
1734
|
+
buildZip,
|
|
1698
1735
|
dryRunBundle,
|
|
1699
1736
|
DEFAULT_B402_PRICE_USD,
|
|
1700
1737
|
B402_DEVELOPER_ACCOUNT_URL,
|
|
@@ -1755,5 +1792,7 @@ export {
|
|
|
1755
1792
|
runDeployCliJson,
|
|
1756
1793
|
trialFromDeployCliJson,
|
|
1757
1794
|
bnbEnv,
|
|
1795
|
+
platformSessionFile,
|
|
1796
|
+
platformHostMismatchMessage,
|
|
1758
1797
|
runPlatformAccountCommand
|
|
1759
1798
|
};
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
bunxInstallDir,
|
|
13
13
|
deployCommand,
|
|
14
14
|
deployEndpointValue,
|
|
15
|
+
platformHostMismatchMessage,
|
|
16
|
+
platformSessionFile,
|
|
15
17
|
providerPassthrough,
|
|
16
18
|
renderSecretEnvFile,
|
|
17
19
|
runDeployCliJson,
|
|
@@ -19,7 +21,7 @@ import {
|
|
|
19
21
|
runPlatformAccountCommand,
|
|
20
22
|
trialFromDeployCliJson,
|
|
21
23
|
withDeployFiles
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YYT75RJ2.js";
|
|
23
25
|
export {
|
|
24
26
|
BNB_PLATFORM_API_URL,
|
|
25
27
|
BNB_PLATFORM_API_URL_ENV,
|
|
@@ -33,6 +35,8 @@ export {
|
|
|
33
35
|
bunxInstallDir,
|
|
34
36
|
deployCommand,
|
|
35
37
|
deployEndpointValue,
|
|
38
|
+
platformHostMismatchMessage,
|
|
39
|
+
platformSessionFile,
|
|
36
40
|
providerPassthrough,
|
|
37
41
|
renderSecretEnvFile,
|
|
38
42
|
runDeployCliJson,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bnbagent/studio-cli",
|
|
3
|
-
"version": "0.0.14-alpha.
|
|
3
|
+
"version": "0.0.14-alpha.3",
|
|
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",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"bag": "./dist/bag.js"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@bnbagent/deploy-cli": "0.
|
|
46
|
-
"@bnbagent/sdk": "0.5.
|
|
45
|
+
"@bnbagent/deploy-cli": "0.6.2",
|
|
46
|
+
"@bnbagent/sdk": "0.5.7-alpha.2",
|
|
47
47
|
"ai": "^7.0.29",
|
|
48
48
|
"archiver": "^8.0.0",
|
|
49
49
|
"commander": "^15.0.0",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"proper-lockfile": "^4.1.2",
|
|
54
54
|
"smol-toml": "^1.3.0",
|
|
55
55
|
"tar": "^7.4.0",
|
|
56
|
-
"viem": "^2.
|
|
56
|
+
"viem": "^2.56.3",
|
|
57
57
|
"yaml": "^2.9.0",
|
|
58
|
-
"@bnbagent/studio-runtime": "0.0.14-alpha.
|
|
58
|
+
"@bnbagent/studio-runtime": "0.0.14-alpha.3"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@a2a-js/sdk": "^0.3.14",
|
|
@@ -11,7 +11,7 @@ node = [
|
|
|
11
11
|
# neutral. The agent project's serving deps (@a2a-js/sdk / MCP SDK / ai)
|
|
12
12
|
# come from the runtimes/<R>/ recipe selected at `bag init` time.
|
|
13
13
|
"@bnbagent/studio-runtime",
|
|
14
|
-
"@bnbagent/sdk@0.5.
|
|
14
|
+
"@bnbagent/sdk@0.5.7-alpha.2",
|
|
15
15
|
"zod@^3.25.0",
|
|
16
16
|
]
|
|
17
17
|
|
|
@@ -32,7 +32,7 @@ node = [
|
|
|
32
32
|
# BNBAGENT_RUNTIME_SECRET_ID is set (default secretsmanager mode + platform).
|
|
33
33
|
"@aws-sdk/client-secrets-manager@^3.600.0",
|
|
34
34
|
"@bnbagent/studio-runtime",
|
|
35
|
-
"@bnbagent/sdk@0.5.
|
|
35
|
+
"@bnbagent/sdk@0.5.7-alpha.2",
|
|
36
36
|
# The LLM work hook (generateText + tools) and the model factory.
|
|
37
37
|
"ai@^7.0.29",
|
|
38
38
|
# Tool input schemas (AI SDK tools + MCP registerTool).
|
|
@@ -29,7 +29,7 @@ node = [
|
|
|
29
29
|
# on either cloud.
|
|
30
30
|
"@aws-sdk/client-secrets-manager@^3.600.0",
|
|
31
31
|
"@bnbagent/studio-runtime",
|
|
32
|
-
"@bnbagent/sdk@0.5.
|
|
32
|
+
"@bnbagent/sdk@0.5.7-alpha.2",
|
|
33
33
|
# The LLM work hook (generateText + tools) and the model factory
|
|
34
34
|
# (model.ts buildModel — studio.toml [llm] + the provider key env).
|
|
35
35
|
"ai@^7.0.29",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bnbagent-studio
|
|
3
|
-
description: The single entry point for bnbagent-studio - a TypeScript CLI (`bag`) for building a blockchain SELLER agent that earns $U on BNB Chain via ERC-8004 + ERC-8183 + an x402 or MPP B402 payment face (Pieverse LLM inside). Load this skill whenever the user works in a bnbagent-studio / `bag` project, or wants to create/scaffold, deploy, run, debug, operate, or monetize such a seller agent (composable A2A, MCP, and alternative X402/MPP faces; BNB Chain trial, AWS AgentCore,
|
|
3
|
+
description: The single entry point for bnbagent-studio - a TypeScript CLI (`bag`) for building a blockchain SELLER agent that earns $U on BNB Chain via ERC-8004 + ERC-8183 + an x402 or MPP B402 payment face (Pieverse LLM inside). Load this skill whenever the user works in a bnbagent-studio / `bag` project, or wants to create/scaffold, deploy, run, debug, operate, or monetize such a seller agent (composable A2A, MCP, and alternative X402/MPP faces; BNB Chain trial, AWS AgentCore, Azure Foundry, or CreateOS). All detailed playbooks ship as references/ files inside this skill - route via the decision tree in the body. When invoked with arguments, treat them as the user's intent and route the same way.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# bnbagent-studio (the single entry point)
|
|
7
7
|
|
|
8
|
-
`bnbagent-studio` (CLI: `bag`) wires the `@bnbagent/sdk` protocol layer (wallet / ERC-8004 / ERC-8183 / Pieverse LLM) into a TypeScript agent project, then deploys it as a **single blockchain seller runtime**. A2A, MCP, and X402 are composable public faces selected with `--protocols`; every wallet kind scaffolds A2A + X402 with both ERC-8183 and B402 rails by default (for altana the paid B402 payout lands at the admin address). `bag deploy` uses **scheme C**: every new deploy or redeploy explicitly selects BNB, AWS, or
|
|
8
|
+
`bnbagent-studio` (CLI: `bag`) wires the `@bnbagent/sdk` protocol layer (wallet / ERC-8004 / ERC-8183 / Pieverse LLM) into a TypeScript agent project, then deploys it as a **single blockchain seller runtime**. A2A, MCP, and X402 are composable public faces selected with `--protocols`; every wallet kind scaffolds A2A + X402 with both ERC-8183 and B402 rails by default (for altana the paid B402 payout lands at the admin address). `bag deploy` uses **scheme C**: every new deploy or redeploy explicitly selects BNB, AWS, Azure, or CreateOS; a recorded deployment is used only to offer an explicit update action, never as a silent default. BNB is a 48h testnet trial and is disabled after expiry. AWS and Azure self-deploy into the user's own account. All cloud lifecycle mutations go through the pinned deploy packages (NodeOps uses their Node.js SDK); the optional AWS CLI is used only by the fail-open, read-only AgentCore quota check in `bag deploy prepare`. AgentCore and Azure Foundry share the unified A2A/X402 entrypoint; Azure rejects MCP. Treat an incompatible provider row as unavailable-do not force through it or mutate the scaffold during deploy.
|
|
9
9
|
|
|
10
10
|
Invoked as `/bnbagent-studio <ask>`? Treat `<ask>` as the user's intent and route it through the decision tree below, exactly like a natural-language ask.
|
|
11
11
|
|
|
@@ -35,13 +35,15 @@ One deployed runtime, one signer: a single valuable Agent serves the selected fa
|
|
|
35
35
|
| Report a CLI problem or share product feedback | Run `bag feedback`, review the local JSON bundle before attaching it, and read `references/bnbagent-studio-operating.md`; Studio never uploads or submits it automatically |
|
|
36
36
|
| Implement what the Agent sells, tune pricing, publish over A2A and/or MCP, defend disputes (seller flow) | `references/bnbagent-studio-selling-via-8183.md` |
|
|
37
37
|
| Sell one paid or FREE HTTP request through the selected B402-backed x402 or MPP rail (pricing choice; paid merchant application, RSA key, credentials, IP allowlist, activation) | `references/bnbagent-studio-selling-via-b402.md` |
|
|
38
|
-
| Deploy / redeploy / status / logs / destroy | Run `bag deploy` and explicitly choose a provider. Non-interactive deploy requires `--provider bnb\|aws\|azure --yes` (and `--allow-multiple` when keeping another provider active). Read `references/bnbagent-studio-use-bnb-trial.md`, `references/bnbagent-studio-use-aws-agentcore.md`,
|
|
38
|
+
| Deploy / redeploy / status / logs / destroy | Run `bag deploy` and explicitly choose a provider. Non-interactive deploy requires `--provider bnb\|aws\|azure\|nodeops --yes` (and `--allow-multiple` when keeping another provider active). Read `references/bnbagent-studio-use-bnb-trial.md`, `references/bnbagent-studio-use-aws-agentcore.md`, `references/bnbagent-studio-use-azure-foundry.md`, or `references/bnbagent-studio-use-createos.md` for the selected provider. `bag deploy status` lists every recorded provider; multi-deployment logs/verify/destroy require `--provider`. |
|
|
39
|
+
| CreateOS / NodeOps account or wallet deployment, wallet balances, health failure, payment recovery | Read `references/bnbagent-studio-use-createos.md`. Prefer account mode for seller agents; check wallet secret/signing limits before any payment. |
|
|
39
40
|
| Wire chain-read tools into the Agent's LLM (AI SDK `tool()` wrappers, or any TS agent framework) | `references/bnbagent-studio-wiring-llm-tools.md` |
|
|
40
41
|
| Buy a service from another ERC-8183 seller via CLI - incl. testing your own seller from the buyer side (v2/internal - NOT the v1 seller product flow) | `references/bnbagent-studio-buying-via-8183.md` |
|
|
41
42
|
| Give the agent a PAID x402 capability - CMC market data / Binance Bazaar (B402) merchants / any pay-per-call API (`bag x402 trust`, x402-buyer recipe, 402 buyer errors) | `references/bnbagent-studio-buying-from-bazaar.md` |
|
|
42
43
|
| Give the agent a native MPP+B402 buyer capability (`bag mpp trust/quote/buy`, mpp-buyer recipe, recipient/realm pins, unknown outcomes) | `references/bnbagent-studio-buying-via-mpp.md` |
|
|
43
44
|
| Extend the EIP-712 signing allowlist (custom contract / new x402 service / diagnose `PolicyViolation` / `X402PolicyError`) | `references/bnbagent-studio-extending-signing.md` |
|
|
44
45
|
| Project uses `[wallet].kind = "twak"` (create / fund / SIWE-bind / container deploy / known limitations) | `references/bnbagent-studio-using-twak-wallet.md` |
|
|
46
|
+
| NodeOps wallet selection, deployment payment or hosting renewal | Read `references/bnbagent-studio-use-createos.md` before choosing a wallet or promising payment/renewal support. |
|
|
45
47
|
| Project uses `[wallet].kind = "altana"` (admin keystore / bounded session / quote checker / x402 allowance / local dev / session-only deploy + renewal) | `references/bnbagent-studio-using-altana-wallet.md` |
|
|
46
48
|
| (Pieverse projects only) Fund the LLM, switch to a paid model, hit insufficient credits (`PieverseBudgetExhaustedError` / `PieverseAccountBalanceExhaustedError`) | skill `funding-pieverse-llm` (project-scope; emitted at `bag init --llm-provider pieverse-llm`) |
|
|
47
49
|
|
|
@@ -65,7 +67,7 @@ Treat ERC-8183 amounts as decimal strings at CLI/config boundaries and `bigint`
|
|
|
65
67
|
|
|
66
68
|
## CLI groups at a glance
|
|
67
69
|
|
|
68
|
-
`init`, `scan`, `recipe`, `skills`, `wallet`, `erc8004`, `erc8183`, `x402`, `mpp`, `agents`, `config`, `env`, `dev`, `doctor`, `feedback`, `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.
|
|
70
|
+
`init`, `scan`, `recipe`, `skills`, `wallet`, `erc8004`, `erc8183`, `x402`, `mpp`, `agents`, `config`, `env`, `dev`, `doctor`, `feedback`, `audit`, `deploy`, `platform`, `llm`, `bundle`, `budget` - see `bag --help` for details. `bag deploy [--provider bnb\|aws\|azure\|nodeops] [--backend aws\|azure]` is the primary deploy command; `--backend` is valid only for provider `bnb` and confirms the recipe-derived managed backend. `prepare`, `list`, `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.6.2`.
|
|
69
71
|
|
|
70
72
|
## Tool surface
|
|
71
73
|
|
|
@@ -124,6 +124,8 @@ Proceeding in 3 commands… (interrupt now if anything's off)
|
|
|
124
124
|
|
|
125
125
|
Then execute Stage 2 **without further prompts** until you hit a step that genuinely requires user action (funding the wallet).
|
|
126
126
|
|
|
127
|
+
For NodeOps deployment, first read `bnbagent-studio-use-createos.md`: select account or wallet mode, verify the installed deploy capabilities, and choose a compatible wallet. Use `--destination self` for NodeOps and the user's AWS/Azure account. NodeOps wallet funding uses USDC plus possible BNB approval gas; the optional U-funding guidance below does not cover cloud payment. Pieverse auto-renew renews model credits, not NodeOps hosting.
|
|
128
|
+
|
|
127
129
|
## Stage 2 - Generate a todo list (visible to the user)
|
|
128
130
|
|
|
129
131
|
Build a TodoWrite list. The shape depends on the `wallet kind`. The canonical 8-step layout (evm-local default, Pieverse default LLM; plus a conditional Step 6b for self-hosted durable storage):
|
|
@@ -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.
|
|
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.6.2`), 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.
|
|
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.6.2`. 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.
|
|
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.6.2 login --provider azure`; use OIDC/service-principal credentials in CI.
|
|
35
35
|
|
|
36
36
|
## ⚠️ Foundry gotchas (read before deploying)
|
|
37
37
|
|
|
@@ -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.
|
|
12
|
+
All auth and cloud lifecycle work must cross the pinned `@bnbagent/deploy-cli@0.6.2` 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
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bnbagent-studio-use-createos
|
|
3
|
+
description: Deploy and operate Studio agents on CreateOS through the nodeops provider and published deploy 0.6.2 SDK. Covers account credentials, ZIP/container packaging, runtime secrets, health recovery, project lifecycle and wallet payment restrictions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deploy and operate on CreateOS
|
|
7
|
+
|
|
8
|
+
Use Studio's `nodeops` provider for NodeOps-hosted infrastructure. AWS and Azure providers remain separate choices for infrastructure in the user's own cloud account. Studio pins `@bnbagent/deploy-cli@0.6.2` and resolves the published `@bnbagent/deploy-provider-nodeops/sdk` through that dependency. No local deploy checkout, source override or Bun process is required for NodeOps.
|
|
9
|
+
|
|
10
|
+
## Check the installed CLI
|
|
11
|
+
|
|
12
|
+
Run `bag --version` and `bag deploy --help`. Confirm that `nodeops` is advertised before following this reference; older Studio releases lack the adapter. If absent, use the main skill's approved upgrade workflow. Do not bypass Studio with a raw provider deployment, because it omits Studio packaging, secrets and resource records.
|
|
13
|
+
|
|
14
|
+
## Account mode for seller agents
|
|
15
|
+
|
|
16
|
+
Add to `app/agent/studio.toml`:
|
|
17
|
+
|
|
18
|
+
```toml
|
|
19
|
+
[deploy.nodeops]
|
|
20
|
+
mode = "account"
|
|
21
|
+
port = 8080
|
|
22
|
+
packaging = "zip"
|
|
23
|
+
# health_path = "/ping"
|
|
24
|
+
# account_id = "your-createos-account-id"
|
|
25
|
+
# environment = "production" # must already exist
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Inject `CREATEOS_API_KEY` through the process environment. Use the existing Studio secret workflow for model, wallet and storage credentials; never copy secrets into source or the archive. Studio sends runtime secrets separately from the artifact and excludes the control-plane API Key. The account needs sufficient CreateOS credits; account deployment does not buy credits automatically.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bag deploy prepare --provider nodeops
|
|
32
|
+
bag deploy --provider nodeops --yes
|
|
33
|
+
bag deploy list --provider nodeops --json
|
|
34
|
+
bag deploy status --provider nodeops --json
|
|
35
|
+
bag deploy verify --provider nodeops --skip-register
|
|
36
|
+
bag deploy logs --provider nodeops
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Readiness builds and validates a temporary artifact without cloud mutation. ZIP packaging needs an HTTP entrypoint compatible with Studio's generated A2A/MCP recipes. For container packaging, set `packaging = "container"` and `image_repository = "ghcr.io/owner/agent"`, supply a Dockerfile and safe `.dockerignore`, and authenticate Docker to the registry. The resulting image must be publicly pullable. TWAK requires a container with its CLI installed.
|
|
40
|
+
|
|
41
|
+
Redeploying in account mode updates the matching project. If another provider remains active, automation needs `--allow-multiple`. Preserve the account pin when managing an existing project. Studio rejects ambiguous identities rather than selecting one silently.
|
|
42
|
+
|
|
43
|
+
## Public buyer URL
|
|
44
|
+
|
|
45
|
+
Before opening the service to buyers, set `BNBAGENT_PUBLIC_URL` in workspace `.studio/.env.local` to the stable public base URL (without `/x402` or `/mpp`). Studio synchronizes it for payment challenges and also supplies `AGENTCORE_RUNTIME_URL`, the legacy variable used by generated A2A agent cards. Use a stable CreateOS environment URL or your configured domain; a deployment-specific URL can change on the next upload. Studio does not infer a domain or claim that a successful health probe validates the card's advertised URL. After configuring it, deploy the account project and inspect `/.well-known/agent-card.json` before registering the endpoint.
|
|
46
|
+
|
|
47
|
+
## Health, records and recovery
|
|
48
|
+
|
|
49
|
+
Studio checks `/ping` (or `health_path`) and the A2A agent card when enabled. Deploy exits nonzero on health failure, but the cloud resource and `.studio/deployments/nodeops.json` record remain. `status --json` includes `last_health`, a saved observation rather than a new application probe. Retry `verify --skip-register` to refresh it without redeploying or paying. Omitting `--skip-register` may register/update the ERC-8004 endpoint through Studio's normal workflow.
|
|
50
|
+
|
|
51
|
+
Remote `list` can find projects absent from local records. Status/logs/verify/destroy use locally recorded mode, origin, subject and environment even if configuration later changes. Do not fabricate local records from a similarly named project.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
bag deploy destroy --provider nodeops # preview
|
|
55
|
+
bag deploy destroy --provider nodeops --execute --yes # delete entire project
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Deletion removes project environments too; registry images and payment history remain. `--purge` and `--purge-images` are unsupported for NodeOps.
|
|
59
|
+
|
|
60
|
+
## Wallet deployment through conversation
|
|
61
|
+
|
|
62
|
+
Read this section before choosing a wallet for NodeOps. Use `evm-local` for the currently tested Studio signing path. Turnkey implements the required public signing interfaces but still needs provider-specific live acceptance testing. TWAK lacks generic EIP-712 signing; Altana's session `x402.pay` is not wired into Gateway authentication/payment. Do not silently replace an existing wallet to work around these limits.
|
|
63
|
+
|
|
64
|
+
Studio pins published deploy 0.6.2, which supports runtime credentials through `settings.runEnvs`, independently of the uploaded archive. The 2026-09-10 standalone live probe confirmed Dockerfile deployment, BSC MPP settlement and runtime variable injection; the installed-package integration suite covers the Studio path with injected HTTP responses. These do not establish secret-vault encryption, redaction or variable rotation. If readiness reports an older SDK without runtime variable support, follow the approved CLI upgrade workflow; do not use a source override or embed credentials in the artifact.
|
|
65
|
+
|
|
66
|
+
For a new project, follow the scaffolding reference with `--destination self --wallet-kind evm-local --no-onboard`, install dependencies, and run `(cd app/agent && bag wallet new --generate-password)`. Reuse an initialized wallet instead of generating another. Configure model/storage credentials using the existing local secret workflow; never collect private keys, passwords or API keys in chat. A wallet used to pay NodeOps is not automatically compatible with every runtime wallet backend.
|
|
67
|
+
|
|
68
|
+
Merge the following into `app/agent/studio.toml`. These amounts are example spending caps, **not a NodeOps quote**; use the user's approved limits. Keep existing signing-policy entries.
|
|
69
|
+
|
|
70
|
+
```toml
|
|
71
|
+
[deploy.nodeops]
|
|
72
|
+
mode = "wallet"
|
|
73
|
+
packaging = "zip"
|
|
74
|
+
port = 8080
|
|
75
|
+
|
|
76
|
+
[deploy.nodeops.payment]
|
|
77
|
+
protocol = "mpp"
|
|
78
|
+
chain = "bsc"
|
|
79
|
+
asset = "USDC"
|
|
80
|
+
months = 1
|
|
81
|
+
max_per_payment_usd = "5.00"
|
|
82
|
+
max_per_day_usd = "5.00"
|
|
83
|
+
max_per_month_usd = "20.00"
|
|
84
|
+
max_approval_gas_wei = "1000000000000000"
|
|
85
|
+
auto_pay = false
|
|
86
|
+
use_existing_credits = false
|
|
87
|
+
|
|
88
|
+
[wallet.signing]
|
|
89
|
+
extra_domains = [[56, "0x000000000022D473030F116dDEE9F6B43aC78BA3"]]
|
|
90
|
+
extra_primary_types = ["PermitWitnessTransferFrom"]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Studio uses public wallet signing operations, never private-key export. SDK `0.5.7-alpha.2` supports the nested EIP-712 types. BSC payment uses USDC at `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`, not the U token used for Pieverse/jobs. The wallet needs USDC and, when allowance is insufficient, BNB for gas. `max_approval_gas_wei` explicitly caps a bounded USDC-to-Permit2 approval. Studio signs only chain 56 legacy `approve` transactions to this token and spender, within the approved amount/gas caps; it rejects arbitrary transactions. The approval is available only during an authorized payment (`--pay`, or configured `auto_pay`), not readiness/status. Without that gas option, allowance must already be sufficient.
|
|
94
|
+
|
|
95
|
+
Run the following from `app/agent`:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bag deploy wallet --json
|
|
99
|
+
bag deploy prepare --provider nodeops
|
|
100
|
+
# After the user has authorized deployment and payment within the configured caps:
|
|
101
|
+
bag deploy --provider nodeops --yes --pay
|
|
102
|
+
bag deploy status --provider nodeops --json
|
|
103
|
+
bag deploy verify --provider nodeops --skip-register
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`deploy wallet` is read-only and reports on-chain USDC. `createosCredits: null` means unknown hosting credits, not zero. Funding and hidden credential entry may require the user's terminal/wallet. Base/Arbitrum require their exact USDC domain and validity-window policy instead of the BSC Permit2 configuration. `RPC_URL_BSC` overrides the default `https://bsc-dataseed.bnbchain.org`; RPC requests have bounded timeouts and do not retry broadcasts automatically.
|
|
107
|
+
|
|
108
|
+
`--yes` confirms deployment; `--pay` additionally authorizes payment within the caps. An initial deploy POST may consume existing credits and create a project even without a payment challenge. `use_existing_credits` is the separate choice for credits shared by active projects. `auto_pay=true` additionally requires the approved `pay_to` recipient pin. It automates payment when deployment is invoked; it does not schedule renewal.
|
|
109
|
+
|
|
110
|
+
Wallet deployments are create-only. Use `status` and `verify` after an acknowledged build failure, timeout or uncertain response; retain `.studio/deployments/nodeops.json` and deploy's durable journal under `~/.bnbagent-deploy/nodeops/payments/`. All callers of a wallet must share one journal for budget aggregation and locking. Do not change names, clear the journal or submit another payment to recover an unknown outcome. Logs, existing-image deployment, named-environment management and in-place updates are not exposed by the current wallet adapter.
|
|
111
|
+
|
|
112
|
+
## When the user asks to renew
|
|
113
|
+
|
|
114
|
+
Distinguish hosting renewal from Pieverse LLM-credit replenishment and Altana session expiry. The latter have their own references; neither renews a NodeOps project.
|
|
115
|
+
|
|
116
|
+
An agent can implement a hosting renewal policy and scheduler. However, this integration has not verified the existing-wallet/project recharge operation or how its result extends the active resource. Public Gateway `/agent/deploy` couples credit purchase with creating a deployment; `months` is a credit price multiplier. Do not invent `bag deploy renew`, treat USDC balance as hosting credits, transfer USDC directly to a quoted recipient, or schedule repeated deployment POSTs as renewal.
|
|
117
|
+
|
|
118
|
+
For now, inspect recorded status/inventory and report that NodeOps hosting renewal is not executable through Studio. Do not claim auto-renew is enabled. To implement it, first verify a recharge path tied to the existing billing identity, then add budget checks, serialized execution, receipt reconciliation and a scheduler that can still run if the hosted agent stops. This is an integration gap, not evidence that the NodeOps backend cannot renew resources.
|
|
@@ -11,7 +11,7 @@ Altana separates trusted administration from runtime authority:
|
|
|
11
11
|
- `.studio/wallets/altana-session.json` is the one bounded, expiring runtime session and must stay mode `0600`.
|
|
12
12
|
- `WALLET_PASSWORD` is admin-only. The Agent gets `ALTANA_SESSION`, never the password or admin keystore.
|
|
13
13
|
- Generic signing is refused. ERC-8183 uses `sessionQuoteSigner()` and the approved quote checker.
|
|
14
|
-
- The generated project pins `@bnbagent/sdk@0.5.
|
|
14
|
+
- The generated project pins `@bnbagent/sdk@0.5.7-alpha.2` and `@altananetwork/sdk@0.7.1`; doctor, readiness, and runtime loading reject version drift. SDK 0.5.4 introduced selector-bound calls, removed session-key token approvals, and requires an admin-provisioned bounded Commerce allowance. Projects upgrading from SDK versions older than 0.5.4 must update it, re-grant with `bag wallet session grant --force`, and redeploy.
|
|
15
15
|
- Deployment ships ONLY the serialized session as the `ALTANA_SESSION` runtime secret; the admin keystore and `WALLET_PASSWORD` never leave the operator machine. Renewal after expiry: `bag wallet session grant --force`, then re-run `bag deploy`. Readiness fails on a missing/expired/address-mismatched session, a group/world-readable session file, a session inside the artifact root, or an unresolvable project-local `@altananetwork/sdk`; it warns under 7 days remaining. `bag deploy verify` needs `--skip-register` (no generic signing for the ERC-8004 register).
|
|
16
16
|
- Altana refuses generic message signing, so Pieverse SIWE cannot authenticate `bag llm activate` or runtime credit renewal. `bag init --wallet-kind altana --llm-provider pieverse-llm` is rejected outright; use OpenRouter, OpenAI, or Anthropic (API-key providers). `bag llm activate` and `bag doctor` also flag the combination on projects edited by hand.
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@ This one Studio command:
|
|
|
25
25
|
|
|
26
26
|
1. Collects the NaaS Access ID and HMAC secret through hidden Studio prompts. It never starts `twak setup` or asks which AI harnesses to wire.
|
|
27
27
|
2. Runs the project-pinned `twak init --json` with the two credentials in the child environment.
|
|
28
|
-
3. Performs an authenticated `twak
|
|
28
|
+
3. Performs an authenticated `twak search BNB --networks 20000714 --limit 1 --json` read. Newly written credentials are removed if this verification fails; pre-existing credentials are never deleted.
|
|
29
29
|
4. Generates `TWAK_WALLET_PASSWORD` from 32 bytes of the OS cryptographic random source and writes it to `.studio/.env.local` (0600). There is no weak-random fallback and the value is never printed.
|
|
30
30
|
5. Creates the project-dedicated wallet with `--no-keychain --json`, tightens `.twak/` to 0700 and its credential/wallet files to 0600, reads the BSC address, and anchors it into `studio.toml`.
|
|
31
31
|
6. Refuses to replace an anchored identity and never overwrites an existing wallet or credential file.
|
|
@@ -42,7 +42,7 @@ bag llm activate
|
|
|
42
42
|
bag doctor
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
No separate `bag wallet new` step is required. An existing wallet is adopted only after Studio verifies its password and reads its address. If its password is not already in `.studio/.env.local`, the user enters it through a hidden Studio prompt
|
|
45
|
+
No separate `bag wallet new` step is required. An existing wallet is adopted only after Studio verifies its password and reads its address. If its password is not already in `.studio/.env.local`, the user enters it through a hidden Studio prompt or supplies the original password using `--password-stdin` / `--password-file <0600 file>`; Studio never invents a replacement password for an existing wallet.
|
|
46
46
|
|
|
47
47
|
### Other wallet placements
|
|
48
48
|
|