brainchain-mcp 0.4.0 → 0.4.1

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 CHANGED
@@ -92,6 +92,14 @@ These clients keep the key in that file as plain text.
92
92
  }
93
93
  ```
94
94
 
95
+ ### OpenClaw
96
+
97
+ ```sh
98
+ openclaw mcp set brainchain '{"command":"npx","args":["-y","brainchain-mcp@0.4.0"],"env":{"BRAINCHAIN_PAYER_KEY":"${BRAINCHAIN_PAYER_KEY}"}}'
99
+ ```
100
+
101
+ OpenClaw resolves `${BRAINCHAIN_PAYER_KEY}` from its environment when it starts the server, so the config holds no secret. [`examples/openclaw/brainchain`](examples/openclaw/brainchain) is an OpenClaw skill that tells the agent when to hand work to BrainChain, how to write the brief and levels, and checks the wallet before it pays.
102
+
95
103
  Each setup above pays in USDG on Robinhood Chain. To pay in USDC on Base instead, add `BRAINCHAIN_PAY_ON=base` to the server's environment (`-e BRAINCHAIN_PAY_ON=base` in Claude Code).
96
104
 
97
105
  ## Tasks are public
package/dist/payments.js CHANGED
@@ -330,6 +330,17 @@ export function guidance(view, config) {
330
330
  case "refunding":
331
331
  return wait(60, `${why} The refund is being sent on ${config.chain}.`);
332
332
  }
333
+ // A dispute, a ruling under its appeal window and an appeal can each still change a grade, accepted or not.
334
+ const due = typeof task.due?.by === "string" ? task.due.by : undefined;
335
+ const by = due ? ` by ${due}` : "";
336
+ switch (task.status) {
337
+ case "disputed":
338
+ return wait(600, `The grade is disputed; Jev rules on it${by}. If no ruling comes, the grade stands.`);
339
+ case "ruled":
340
+ return wait(900, `Jev ruled on the dispute. The ruling settles when its appeal window closes${due ? ` at ${due}` : ""}, unless the side it went against appeals.`);
341
+ case "appealed":
342
+ return wait(600, `The ruling was appealed; Jev rules again${by}. If no second ruling comes, the first one stands.`);
343
+ }
333
344
  if (task.accepted === false) {
334
345
  return { done: true, next: `Jev did not accept the work, so the result is withheld. The full amount is refunded on ${config.chain} when the dispute window closes, ${config.terms.finalAfter} after grading.` };
335
346
  }
@@ -341,8 +352,6 @@ export function guidance(view, config) {
341
352
  case "delivered":
342
353
  case "submitted":
343
354
  return wait(30, `The model delivered; Jev is grading the work.${unless("Jev has not graded it")}`);
344
- case "disputed":
345
- return wait(600, "The grade is disputed; Jev will rule on it.");
346
355
  case "graded":
347
356
  return wait(60, "Jev accepted the work; the result is being prepared.");
348
357
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brainchain-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "MCP server for BrainChain: let your agent hire a frontier model for a task and pay in USDG on Robinhood Chain or USDC on Base, only for work that meets the quality bar you set.",
5
5
  "mcpName": "com.usebrainchain/brainchain",
6
6
  "license": "MIT",