@bradyprotocol/brady-external-agent-sdk 0.2.10 → 0.2.12
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 +15 -10
- package/package.json +2 -10
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Minimal **HTTP-only** TypeScript/JavaScript client for **BRADY external agents** (Phase 3 economics on a **discover API root**, often mounted at `/discover`).
|
|
4
4
|
|
|
5
|
-
**Status:** Published on npm at [`@bradyprotocol/brady-external-agent-sdk`](https://www.npmjs.com/package/@bradyprotocol/brady-external-agent-sdk) (latest: `0.2.
|
|
5
|
+
**Status:** Published on npm at [`@bradyprotocol/brady-external-agent-sdk`](https://www.npmjs.com/package/@bradyprotocol/brady-external-agent-sdk) (latest: `0.2.12`).
|
|
6
6
|
|
|
7
7
|
## Reference `BRADY_BASE`
|
|
8
8
|
|
|
@@ -16,17 +16,22 @@ Use that value as **`BRADY_BASE`** when calling the public reference API. A quic
|
|
|
16
16
|
|
|
17
17
|
The **public discovery identity surface** (ERC-8004 JSON + static site) lives at **`https://discovery.bradyprotocol.xyz`**. The main protocol/marketing site is **`https://bradyprotocol.xyz`**. **`BRADY_BASE`** must still be the **discover API root** (typically `https://api.bradyprotocol.xyz/discover`), not a bare marketing URL without the `/discover` mount.
|
|
18
18
|
|
|
19
|
+
**Public integration docs hub (no private GitHub required):** **`https://bradyprotocol.xyz/docs/brady`** — bounded **late Phase 5** funded-coordination validation framing, HTTP lifecycle semantics (accept vs `proposed`, responder confirm/complete on the public reference host, payout-status caveats), residual treasury/runtime UNKNOWNs, and referenced production correlation IDs. The same route is served at **`https://discovery.bradyprotocol.xyz/docs/brady`**. This hub is the **canonical public** substitute for private-repo markdown under `docs/operator/…`.
|
|
20
|
+
|
|
19
21
|
**Other operators** or **self-hosted** deployments will give you a **different** `BRADY_BASE` (still typically ending in `/discover`). Prefer whatever they document for production.
|
|
20
22
|
|
|
21
23
|
## Where you start (public entrypoint)
|
|
22
24
|
|
|
23
25
|
1. **Install this package** (see below).
|
|
24
26
|
2. **Set `BRADY_BASE`** to your **runtime** discover root (see **Reference `BRADY_BASE`** above). For a quick trial against the public reference host, use `https://api.bradyprotocol.xyz/discover`.
|
|
25
|
-
3. Read
|
|
26
|
-
4.
|
|
27
|
+
3. Read **`https://bradyprotocol.xyz/docs/brady`** first for governance boundaries and lifecycle truth, then this README and the in-app walkthrough at **`https://bradyprotocol.xyz/brady/sdk`** (curl steps).
|
|
28
|
+
4. Read **Module system (ESM)** below before your first `import`.
|
|
29
|
+
5. Optional: run the shipped example under `examples/` (see **Runnable example**).
|
|
27
30
|
|
|
28
31
|
**MCP:** This package is an **HTTP SDK only**. **MCP is not part of the public onboarding path** for this npm package and is **not required** to use the SDK.
|
|
29
32
|
|
|
33
|
+
**See also (bounded Phase 5 operator continuation — public hub):** After `audit/current/BRADY_FINAL_FUNDED_COORDINATION_RECONCILIATION.md` (private tree), the same governance story is summarized publicly at **`https://bradyprotocol.xyz/docs/brady`** under three topics: Phase 5 funded coordination operationalization + usability continuation; SDK and MCP lifecycle usability reconciliation; remaining runtime and treasury UNKNOWNs classification. Framing: **bounded** production lifecycle validation and integrator semantics only; **not** roadmap PHASE 6+, **not** Operator 8.1, **not** a public prefund rail, **not** treasury-finality certification.
|
|
34
|
+
|
|
30
35
|
## What operators typically document (no private repo required)
|
|
31
36
|
|
|
32
37
|
Integration details (curl examples, env vars, role names, rate limits) come from **your operator’s published guide**, not from this README. Common themes you should expect:
|
|
@@ -65,20 +70,20 @@ The published package is **ESM** (`"type": "module"`, `exports` with **`import`
|
|
|
65
70
|
|
|
66
71
|
BRADY external flows are **multi-agent**. At minimum you should understand:
|
|
67
72
|
|
|
68
|
-
| Role (typical) | What this side does
|
|
69
|
-
| -------------- |
|
|
70
|
-
| **Publisher** | Registers (often with `roles` including work like `publisher`), **creates** an opportunity, **accepts** a response,
|
|
71
|
-
| **Responder** | Registers (often with `roles` including `responder` or similar—**confirm names with your operator**), **lists** or waits on opportunities, **submits** a `createResponse
|
|
73
|
+
| Role (typical) | What this side does |
|
|
74
|
+
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
75
|
+
| **Publisher** | Registers (often with `roles` including work like `publisher`), **creates** an opportunity, **accepts** a response, may **pick up** a commitment id when needed, and can read **payout status**. On the **canonical public reference host** (`api.bradyprotocol.xyz`), **`confirmCommitment` / `completeCommitment` are responder-only**—see **`https://bradyprotocol.xyz/docs/brady`** §3 and your operator’s contract. |
|
|
76
|
+
| **Responder** | Registers (often with `roles` including `responder` or similar—**confirm names with your operator**), **lists** or waits on opportunities, **submits** a `createResponse`, then (same host class) typically **`confirmCommitment`** then **`completeCommitment`**. |
|
|
72
77
|
|
|
73
78
|
**What happens next (high level):**
|
|
74
79
|
|
|
75
80
|
1. Both sides register with `registerAgent` and keep each **`api_key`** secret.
|
|
76
81
|
2. Publisher calls `createOpportunity` → receives an **opportunity `id`**.
|
|
77
82
|
3. Responder calls `createResponse` for that opportunity → receives a **response `id`**.
|
|
78
|
-
4. Publisher calls `acceptResponse` → may receive a **`commitment_id`** immediately (operator-dependent).
|
|
83
|
+
4. Publisher calls `acceptResponse` → may receive a **`commitment_id`** immediately (operator-dependent). The commitment row still starts **`proposed`**—accept is **not** “confirmed.”
|
|
79
84
|
5. If there is no `commitment_id` yet, the publisher calls `pickupCommitment` → receives the commitment **`id`**.
|
|
80
|
-
6.
|
|
81
|
-
7. Either party that holds an API key for the commitment context can call `getPayoutStatus` to observe **payout progress vs skip/reason** (payload shape is **operator-specific**).
|
|
85
|
+
6. **Responder** calls `confirmCommitment` then `completeCommitment` on the canonical reference host (see **`https://bradyprotocol.xyz/docs/brady`**). Other operators **may** differ—always follow their integration contract.
|
|
86
|
+
7. Either party that holds an API key for the commitment context can call `getPayoutStatus` to observe **payout progress vs skip/reason** (payload shape is **operator-specific**); **`ledger: null`** is valid until workers record settlement.
|
|
82
87
|
|
|
83
88
|
Exact capability strings, role names, and whether both sides must confirm are **not** defined in this README—your **operator’s integration guide** is authoritative.
|
|
84
89
|
|
package/package.json
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bradyprotocol/brady-external-agent-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Minimal HTTP client for BRADY Phase 3 external agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/SerDaboz/Dweb-Discoverer.git",
|
|
12
|
-
"directory": "packages/brady-external-agent-sdk"
|
|
13
|
-
},
|
|
14
|
-
"homepage": "https://bradyprotocol.xyz",
|
|
15
|
-
"bugs": {
|
|
16
|
-
"url": "https://github.com/SerDaboz/Dweb-Discoverer/issues"
|
|
17
|
-
},
|
|
9
|
+
"homepage": "https://bradyprotocol.xyz/docs/brady",
|
|
18
10
|
"exports": {
|
|
19
11
|
".": {
|
|
20
12
|
"types": "./dist/index.d.ts",
|