docs(bnbagent-sdk): add a TypeScript quickstart - #884
Conversation
Pull Request ReviewThis docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering ERC-8004 agent registration and ERC-8183 provider and client flows. It also distinguishes the Python and TypeScript guides, documents the TypeScript SDK’s transport-agnostic provider model, and updates the documentation index, LLM index, and MkDocs navigation. Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering ERC-8004 agent registration and ERC-8183 provider and client workflows. It also distinguishes the Python and TypeScript quickstarts across navigation and indexes, documents their independent release cycles, and clarifies that the TypeScript SDK provides a headless provider loop rather than an HTTP server layer. Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
|
Heads-up on merge order: this PR and #885 both edit the same Suggested order: merge #885 first, then rebase this one. The resolution is mechanical — keep #885's Studio-above-SDK ordering and this PR's two quickstart lines inside the SDK block. Happy to rebase and force-push whenever you've picked an order. |
942b06a to
63b4c43
Compare
Pull Request ReviewThis docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering agent registration, provider job handling, and the client lifecycle, while distinguishing it from the existing Python guide and updating navigation/indexes. It also substantially revises BNB Agent Studio documentation to describe its TypeScript, single-runtime/single-signer architecture, generated project layout, IDE skill workflow, and deployment options. Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
|
Rebased onto #885 — the This PR is now stacked on #885, so its commit list includes #885's commit until that one merges. Merge order: #885 first, then this one (it will fast-forward cleanly). Resulting Developer Kit nav: Verified after the rebase: |
The SDK README commits to Python and TypeScript both being "first-class, long-term", but the only quickstart was Python. The one page where a developer picks a language showed one language. Adds quickstart-typescript.md covering the same three flows: register an agent (ERC-8004), earn as a provider, buy as a client. Every snippet is taken from shipped code, not written fresh: - registration from typescript/examples/agent-server/scripts/register.ts, retargeted from relative src/ imports to the published subpath exports - provider and client flows from the typescript/README.md quickstart States plainly that the TypeScript SDK ships no HTTP server layer. The Python provider examples wrap the protocol in FastAPI; the TS path is a headless fundedJobWatcher loop. Implying otherwise is what made the Python quickstart's server section wrong in the first place. quickstart.md is retitled "(Python)" and both pages cross-link, with a note that independent release cadences mean the version numbers differ by design. Existing /quickstart/ URL is unchanged. Verified: all 7 documented APIs exist in typescript/src (ERC8004Agent.create at erc8004/agent.ts:351, policy.disputeWindow used at erc8183/client.ts:366, tokenDecimals/createJob/registerJob/fund/settle/getJob/setBudget all present); subpath exports and Node >=20 from typescript/package.json; every nav path and relative link resolves; the three GitHub links return 200.
Node is the path being pushed for agentic use, so it should be the first quickstart a developer sees. Applies to both the nav and the overview page's guide table. Neither page's URL changes.
63b4c43 to
0fde380
Compare
Pull Request ReviewThis docs-only PR adds a TypeScript quickstart for the BNB Agent SDK covering ERC-8004 registration and ERC-8183 provider/client flows, while distinguishing it from the existing Python quickstart and updating navigation and indexes. It also substantially refreshes BNB Agent Studio documentation to describe its TypeScript, single-runtime architecture, generated project layout, guided IDE workflow, payment rails, and deployment options. Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
…dk-quickstart # Conflicts: # docs/llms.txt
Pull Request ReviewThis docs-only PR adds a TypeScript quickstart for the BNB Agent SDK, covering ERC-8004 agent registration and ERC-8183 provider and client workflows. It also distinguishes the existing Python quickstart, adds cross-links and release guidance, and updates the documentation index, navigation, and LLM index to list both languages. Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Summary
The SDK README states that Python and TypeScript are both "first-class, long-term" and that they "target the same protocols and network deployments". The docs had only a Python quickstart — so the single page where a developer chooses a language showed one language.
This adds
quickstart-typescript.mdcovering the same three flows: register an agent (ERC-8004), earn as a provider, buy as a client.Snippets are shipped code, not freshly written
Every code block was lifted from working source and retargeted to the published package imports:
typescript/examples/agent-server/scripts/register.ts— relative../../../src/imports swapped for@bnbagent/sdk/erc8004typescript/README.md§Quickstart (b)typescript/README.md§Quickstart (a)It says plainly that TS has no HTTP server layer
The Python provider examples wrap the protocol in FastAPI. The TypeScript SDK is transport-agnostic — the provider path is a headless
fundedJobWatcherloop. The page calls that out in an admonition rather than implying a server exists.That omission is deliberate: implying a FastAPI-style server layer existed is exactly what made the Python quickstart's server section wrong (see #882, where
bnbagent.erc8183.serverturned out not to exist at all).Verification
Every API used exists in
typescript/src:ERC8004Agent.createsrc/erc8004/agent.ts:351AgentEndpoint,ERC8004Agent,AgentURIGeneratorsrc/erc8004/index.tspolicy.disputeWindow()src/erc8183/client.ts:366tokenDecimals/createJob/registerJob/fund/settle/getJob/setBudgetsrc/erc8183/TWAKProvidersrc/index.ts:79Also checked: subpath exports (
.,./erc8004,./erc8183,./x402,./storage,./wallets,./signing,./networks,./utils) andengines.node >= 20fromtypescript/package.json; everymkdocs.ymlnav path resolves to a real file; every relative link in the new page resolves; the three GitHub links return 200.Other changes
quickstart.mdretitled (Python), with a cross-link to the TS page. The existing/quickstart/URL is unchanged — no redirect needed.mkdocs.ymlnav:Quickstart (Python)+Quickstart (TypeScript).index.mddoc table andllms.txtindex updated to list both.Docs-only.