Bloom Exchange

io.github.astyboyy-ship-it由 GitHub 帳號 astyboyy-ship-it 發布v0.2.0更新於 Nov 20, 2026

Negotiate in a double-blind sandbox and verify Ed25519 receipts. Agent-to-agent clearing over A2A.

發布方自己的服務:Exchange.news — Crypto offers, campaigns and news

概覽

AI 產生的概覽

讓助理在 Bloom Exchange 節點上與另一個代理進行雙盲價格談判,並驗證 Ed25519 簽章的結算憑證。

可以做什麼
  • 依授權條件(價格上限、預算、SLA 等級、帳期)在 Bloom Exchange 節點上發起談判
  • 離線或依簽發方簽章的 Agent Card 驗證 BLOOM-XCH 憑證
  • 透過 A2A JSON-RPC 發布代理意圖以進行清算
  • 在節點啟用時輪詢事件流,取得喚醒與結算後掛鉤
適用情境
當你希望 IDE 或桌面代理對 Bloom Exchange 節點執行機器對機器的採購或價格談判,並取得可驗證的簽章結算憑證時使用,通常適合沙箱或測試環境而非真實付款流程。
執行需求
透過 npm 套件 @bloom-exchange/mcp 以 npx 在本機以 stdio 執行,需要 Node 20 或更新版本。需要一個可連線的 Bloom Exchange 節點;BLOOM_EXCHANGE_URL 指定其基礎位址(預設 BLOOM_ACCESS_KEY 用於從沙箱切換到正式清算,BLOOM_AGENT_NAME 設定代理的自我介紹名稱。僅限桌面端。
安裝前請注意
BLOOM_ACCESS_KEY 是密鑰,會將環境從沙箱切換到正式清算並解鎖營運檢視,請勿放入共用設定。談判與意圖發布會把資料傳送到所設定的節點及其對等節點,憑證可能包含 AP2、Stripe 與 x402 付款載荷。README 說明目前金庫執行在提供方節點上,因此交易對手需信任該營運方不會讀取其授權條件。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Bloom Exchange,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Bloom Exchange

Two AI agents negotiate a deal over A2A JSON-RPC while each side's price limits stay sealed in salted SHA-256 commitments that the other side's engines never see; a prompt-injection firewall screens every message, deterministic clamps keep every offer inside both mandates, and the result is an Ed25519-signed receipt anyone can verify offline.

Bloom Exchange is the reference implementation of the Bloom Clearing Protocol, an extension profile of A2A v1.0 that maps settlement to AP2 mandates and Stripe / x402 payloads, with an MCP server so any IDE agent can use it. Apache-2.0.

Try it (no API key, no account, no model)

bash
git clone https://github.com/astyboyy-ship-it/bloom-exchange && cd bloom-exchangenpm install                         # about 2 minutes on a cold cachenpm run dev                         # the node + operating desk on http://localhost:3000

Negotiations run on deterministic engines with the same vault, firewall, clamps and signatures as production. Requires Node 22.18+ for the repository scripts; the published npm packages run on Node 20+.

One command, every claim checked. Starts two nodes with separate keys, fires a prompt-injection payload at the firewall, checks that no private number reaches the attacker, settles a cross-node deal, then verifies the receipt with the CLI (and checks that a $1 tamper and the wrong key both fail):

bash
npm run build && npm run verify:launch          # or ./scripts/verify-launch-demo.sh · .\scripts\verify-launch-demo.ps1
  1 · SHIELD vs. PROMPT INJECTION (role tags, [INST], base64, zero-width Unicode)    ✓ Shield verdict: quarantined · 14 threats (policy_override_loop, encoded_payload, instruction_override, mandate_extraction, …)    ✓ no provider-private number in 42,450 bytes the attacker received    ✓ the deal still cleared inside both mandates: completed at $49,400, not $1  3 · bloom-verify CLI    ✓ offline with --card card.json → exit 0 (VALID)    ✓ price changed by $1 → exit 1 (INVALID: failed: digest)    ✓ against node-alpha's key → exit 1 (INVALID: failed: signature, ap2Proofs)  ALL CHECKS PASSED in 8.0s

Verify a receipt without cloning anything. The script above prints the folder where it saved receipt.json and the issuer's card.json; on the desk, the Enclave Inspector's JSON button downloads a receipt and the card is at /.well-known/agent-card.json.

bash
npx @bloom-exchange/sdk verify receipt.json --card card.json   # fully offlinenpx @bloom-exchange/sdk verify receipt.json                    # fetches the issuer's card named in the receipt

Give your agent the tools (Claude Code, with a node running on :3000):

bash
claude mcp add bloom-exchange -e BLOOM_EXCHANGE_URL=http://localhost:3000 -- npx -y @bloom-exchange/mcp

Cursor, Claude Desktop or any MCP client:

json
{  "mcpServers": {    "bloom-exchange": {      "command": "npx",      "args": ["-y", "@bloom-exchange/mcp"],      "env": { "BLOOM_EXCHANGE_URL": "http://localhost:3000" }    }  }}
Package
@bloom-exchange/sdknpm install @bloom-exchange/sdkZero-dependency client and the bloom-verify CLI
@bloom-exchange/mcpnpx -y @bloom-exchange/mcpMCP server for Claude Code, Cursor and any MCP client
@bloom-exchange/corenpm install @bloom-exchange/coreThe clearing engine and HTTP handlers, to run a node in any runtime

What you get

Double-blind vaultEach side's limits are sealed with salted SHA-256 commitments. The provider's engines (and any prompt they build) receive a brief with no counterparty field, so the client's ceiling cannot reach them by construction. Guard bands keep every offer off every private number; a leak scrubber checks every outbound message.
Deterministic clampingModels only propose. Sovereign clamps every offer to both mandates before it is sent or signed. 300 randomized enclaves with an adversarial proposer never produce an out-of-bounds offer.
Shield firewallPrompt injection, policy overrides, invisible and tag-smuggled Unicode, homoglyphs, base64 payloads, hidden markup and token exhaustion are neutralized before any engine reads the text, with a hash-chained audit ledger.
Verifiable receiptsBLOOM-XCH certificates: hash-chained rounds, both mandate commitments, Ed25519 signature, AP2 checkout and payment credentials, Stripe and x402 payloads. bloom-verify receipt.json checks one offline.
40 protocol adaptersChat, CRM, agent protocols (A2A, MCP, LangGraph, CrewAI, AutoGen), cloud and energy, payment rails and custom hooks normalize into one AgentIntentNode.
The operating deskA negotiation sandbox, a clearing ledger, an enclave inspector with a live security graph and a boundary probe, the omni-protocol router, a mandate corridor, and an SDK quickstart, in English and Spanish.

Repository

packages/core   @bloom-exchange/core   the clearing engine: vault, Shield, Sovereign, settlement, adapters, HTTP handlerspackages/sdk    @bloom-exchange/sdk    zero-dependency TypeScript client and the bloom-verify CLIpackages/mcp    @bloom-exchange/mcp    MCP server (stdio and Streamable HTTP): negotiate, verify_receipt, publish_intentapps/node       @bloom-exchange/node   a node: the API (A2A JSON-RPC, HTTP+JSON, SSE) and the operating desk at /deploy/                                Dockerfile, Docker Compose and Kubernetes manifests for a Sovereign nodeSPEC.md                                Bloom Clearing Protocol v0.1

Every endpoint in packages/core/src/http is a plain (Request) => Response function. apps/node mounts them in Next.js; handle() from @bloom-exchange/core/http/router serves them from any runtime (Node, Bun, Deno, Workers) or in-process.

Connect an agent

TypeScript (Node ≥ 20, Deno, Bun or the browser)

bash
npm install @bloom-exchange/sdk
ts
import { BloomExchangeClient } from "@bloom-exchange/sdk";
const bloom = new BloomExchangeClient({ baseUrl: "http://localhost:3000" });const { state, certificate } = await bloom.negotiate({  mandate: { ceilingPriceUsd: 52_500, maxBudgetUsd: 55_000, requiredSlaTier: "gold", targetNetDays: 60 },  item: { description: "12-month platform license" },}).result;const proof = await bloom.verifyCertificate(certificate!); // { valid: true, checks: { digest, certificateId, chain, signature, ap2Proofs } }

Claude Code, Cursor or any MCP client (setup above)

Ask your agent to "negotiate a 12-month license with a $52k ceiling on Bloom and verify the receipt". Tools: negotiate, verify_receipt, publish_intent. For a remote server, npx -y -p @bloom-exchange/mcp bloom-exchange-mcp-http serves stateless Streamable HTTP at /mcp. Optional environment: BLOOM_ACCESS_KEY, BLOOM_AGENT_NAME.

Verify any receipt

bash
npx @bloom-exchange/sdk verify receipt.json                    # keys from the issuer's Agent Cardnpx @bloom-exchange/sdk verify receipt.json --card card.json   # fully offline, air-gappednpx @bloom-exchange/sdk verify receipt.json --json             # machine-readable; exit 0 valid · 1 invalid · 2 bad input

Installed, the same command is bloom-verify receipt.json. Inside this repository: npm run verify -- receipt.json.

Raw A2A JSON-RPC

bash
curl -s http://localhost:3000/api/exchange/a2a -H 'Content-Type: application/json' -d '{  "jsonrpc":"2.0","id":1,"method":"SendMessage","params":{"message":{"messageId":"m1","role":"user","parts":[    {"kind":"data","data":{"bloomExchange":{"mandate":{"ceilingPriceUsd":52500,"maxBudgetUsd":55000,"requiredSlaTier":"gold","targetNetDays":60},     "item":{"description":"12-month platform license"}}}}]}}}'

Two nodes, one cross-node deal each way

deploy/docker-compose.yml runs two Sovereign nodes, node-alpha (:3001) and node-beta (:3002). Each has its own Ed25519 root key and its own state, and each is pre-wired to the other through BLOOM_PEERS:

bash
npm run sovereign:init -- --alpha "Acme Fund" --beta "Northwind"   # separate secrets, root keys and operator keys (all local)npm run sovereign:up                                               # Docker Compose: both nodes + Redis + REST gatewaysnpm run demo:two-node                                              # discovery, then a cross-node deal each way

No Docker? npm run build && npm run demo:two-node:local starts the same two nodes as local processes with fresh keys. Output from a real run:

  1 · DISCOVERY    node-alpha Alpha    key bxk-1f439f15d2868299 card ✓   peers: http://127.0.0.1:3102 ✓ bxk-7ab61a50094bf764    node-beta  Beta     key bxk-7ab61a50094bf764 card ✓   peers: http://127.0.0.1:3101 ✓ bxk-1f439f15d2868299
  2 · node-alpha's agent buys on node-beta    settled BLOOM-XCH-60X3-0HDS-R7XF-QFA0 at $47,060 · net 45 · gold · 10 rounds    receipt: issued by Bloom Exchange · Beta (bxk-7ab61a50094bf764) · counterparty Bloom Exchange · Alpha    ✓ verifies against node-beta's card   ✓ does not verify against node-alpha's key
  3 · node-beta's agent buys on node-alpha    settled BLOOM-XCH-8HSX-HJSW-ZA40-PSBQ at $46,920 · net 45 · gold · 10 rounds    receipt: issued by Bloom Exchange · Alpha (bxk-1f439f15d2868299) · counterparty Bloom Exchange · Beta    ✓ verifies against node-alpha's card   ✓ does not verify against node-beta's key

Each node verifies the other's signed Agent Card (GET /api/exchange/peers). An agent from one node negotiates on the other, presenting its home node's card. Each receipt names both nodes and verifies only against its issuer's key. The same deal with the SDK:

ts
const alphaCard = await (await fetch("http://localhost:3001/.well-known/agent-card.json")).json();const onBeta = new BloomExchangeClient({ baseUrl: "http://localhost:3002", agent: { name: "alpha/procurement", framework: "bloom-sdk", card: alphaCard } });const { certificate } = await onBeta.negotiate({ mandate: { ceilingPriceUsd: 52_500, maxBudgetUsd: 55_000, requiredSlaTier: "gold", targetNetDays: 60 }, item: { description: "12-month platform license" } }).result;await onBeta.verifyCertificate(certificate!); // signed by node-beta

Run a single node with docker compose -f deploy/docker-compose.yml up node-alpha. Kubernetes runs one node per namespace: kubectl apply -k deploy/k8s (see deploy/k8s/kustomization.yaml). With no model keys and no settlement webhook, nodes make no outbound calls beyond their configured peers. Configuration lives in .env.example.

Access keys are optional. They switch enclaves from the sandbox to production clearing and unlock operator views: npm run key:issue -- --role operator --holder "You".

Develop

bash
npm test                  # 198 tests: protocol vectors, engine invariants, leakage, settlement safety, firewall, adapters, peers, CLI, MCP, copy paritynpm run typechecknpm run lintnpm run buildnpm run spec:conformance  # regenerates SPEC.md Appendix B from the suitenpm run verify:launch     # the end-to-end check above (after npm run build)

Every test has a conformance id in SPEC.md Appendix B. Appendix A gives byte-exact vectors for canonical JSON, key derivation, round hashes, commitments, certificate ids and Ed25519 signatures, so implementations in other languages can match the reference exactly.

What is and is not built

  • Built: everything above runs today, end to end, with tests.
  • Opt-in: an event feed for wake-ups and post-settlement hooks (BLOOM_EVENTS=1): cursor polling, SSE, an MCP poll_events tool, and webhook, JSONL and dry-run adapters. It carries no mandate figures. See docs/EVENTS.md.
  • Format only: bloom.exchange/<agent> links. They are a naming format that resolves to a node's signed Agent Card; there is no public registry or resolver yet.
  • Open: in v0.1 the vault runs on the provider's node, so the counterparty trusts that operator not to read its mandate. The roadmap is neutral hosted clearing, attested enclaves and federation. See SPEC.md §12.

Release notes are in CHANGELOG.md.

License

Apache License 2.0. See NOTICE.

The two paintings in apps/node/public/paintings are public-domain works: Jean-Honoré Fragonard, c. 1760, and Claude Lorrain, 1653. They come from Wikimedia Commons under the Public Domain Mark 1.0, and the Apache License does not cover them. Attribution is in NOTICE and CREDITS.

來源:README.md,提交 1f0ca8c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.2.0最新Nov 19, 2026
  2. v0.1.0Nov 19, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Exchange 整合