@priors/plugin-elizaos 0.2.0 → 0.2.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
@@ -21,7 +21,7 @@ Add it to the character's plugins (elizaOS 1.7 or later):
21
21
  "secrets": {
22
22
  "PRIORS_KEY_FILE": "/path/to/agent-wallet.key",
23
23
  "PRIORS_AGENT_ID": "1234",
24
- "PRIORS_PAY_HOSTS": "check.blockpin.dev"
24
+ "PRIORS_PAY_HOSTS": "api.priors.trade"
25
25
  }
26
26
  }
27
27
  }
@@ -50,9 +50,9 @@ Without a key, only `PRIORS_AGENT_RECORD` works.
50
50
 
51
51
  Example messages:
52
52
 
53
- - "Before we pay it, check agent #9233's record on Priors."
54
- - "Pay https://check.blockpin.dev/check at most 0.10, borrow up to 5 if the wallet is short."
55
- - "Buy a chat completion from https://agent402.tools/v1/chat/completions at most 0.02: {"model": "…", "messages": [{"role": "user", "content": "…"}]}" (the URL, the price and any borrow are read outside the JSON)
53
+ - "Before we pay it, check agent #1234's record on Priors."
54
+ - "Pay https://api.priors.trade/v1/report/1234 at most 0.05, borrow up to 5 if the wallet is short."
55
+ - "Buy a chat completion from https://models.example/v1/chat/completions at most 0.02: {"model": "…", "messages": [{"role": "user", "content": "…"}]}" (the URL, the price and any borrow are read outside the JSON; `models.example` stands for an OpenAI-compatible model API you choose that charges over x402, its host in `PRIORS_PAY_HOSTS`)
56
56
  - "Repay loan 50900 now."
57
57
 
58
58
  ## How it works
@@ -72,10 +72,7 @@ URLs are read from the user's message, never chosen by the model.
72
72
 
73
73
  ## Demo
74
74
 
75
- ![An elizaOS agent paying an x402 API on credit with this plugin](../../docs/demos/elizaos.gif)
76
-
77
- A production run in elizaOS 1.7.2 on 2026-10-30 (agent #437, Robinhood Chain mainnet), its own output lines with waits
78
- over 6 seconds shortened. The agent reads the seller's record (Blockpin, agent #9233), then pays its x402 check (0.10
75
+ A production run in elizaOS 1.7.2 on 2026-10-30 (agent #437, Robinhood Chain mainnet). The agent reads the seller's record, then pays its x402 check (0.10
79
76
  USDG) from an empty wallet: PRIORS_PAY_X402 borrows 5 USDG, the pool's minimum loan (loan #50896). The agent's income
80
77
  then arrives from another wallet, and PRIORS_REPAY closes the loan for 5.011666 USDG.
81
78
  Transactions: [borrow](https://robinhoodchain.blockscout.com/tx/0x1a17ff6a4f4329d4a16fee0c7654f43104b037a0d9109f9c7ee4c503cbdd2d81),
@@ -2,7 +2,7 @@
2
2
  "id": "priors",
3
3
  "name": "@priors/plugin-elizaos",
4
4
  "description": "Priors credit for agents on Robinhood Chain: pay x402 APIs and borrow the gap in USDG from the agent's line, repay it, and read another agent's repayment record before paying it.",
5
- "version": "0.2.0",
5
+ "version": "0.2.1",
6
6
  "kind": "plugin",
7
7
  "requiredSecrets": [],
8
8
  "configSchema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@priors/plugin-elizaos",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Priors credit for elizaOS agents: pay x402 APIs and borrow the gap in USDG from the agent's Priors line on Robinhood Chain, repay it, and read another agent's repayment record before paying it.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -66,11 +66,11 @@ export const payX402Action = {
66
66
  return answer(callback, "PRIORS_PAY_X402", r.ok, r.text, { url, maxPrice, maxBorrow: borrow ?? 0, ...(b ? { method: "POST" } : {}) });
67
67
  },
68
68
  examples: [[
69
- { name: "{{user1}}", content: { text: "Pay https://check.blockpin.dev/check at most 0.10, borrow up to 5 if the wallet is short." } },
70
- { name: "{{agentName}}", content: { text: "Paid 0.10 USDG; the wallet was short, so it borrowed 5 USDG, the pool's minimum loan, from the Priors line (loan #50900, due 6 November).", actions: ["PRIORS_PAY_X402"] } },
69
+ { name: "{{user1}}", content: { text: "Pay https://api.priors.trade/v1/report/1234 at most 0.05, borrow up to 5 if the wallet is short." } },
70
+ { name: "{{agentName}}", content: { text: "Paid 0.03 USDG; the wallet was short, so it borrowed 5 USDG, the pool's minimum loan, from the Priors line (loan #50900, due 6 November).", actions: ["PRIORS_PAY_X402"] } },
71
71
  ], [
72
- { name: "{{user1}}", content: { text: "Buy one chat completion from https://agent402.tools/v1/chat/completions at most 0.02: {\"model\": \"openai/gpt-4o-mini\", \"messages\": [{\"role\": \"user\", \"content\": \"Summarise x402 in one line.\"}]}" } },
73
- { name: "{{agentName}}", content: { text: "Paid 0.02 USDG to agent402.tools with POST; the model answered: \"x402 lets an API charge per call over HTTP 402.\"", actions: ["PRIORS_PAY_X402"] } },
72
+ { name: "{{user1}}", content: { text: "Buy one chat completion from https://models.example/v1/chat/completions at most 0.02: {\"model\": \"…\", \"messages\": [{\"role\": \"user\", \"content\": \"Summarise x402 in one line.\"}]}" } },
73
+ { name: "{{agentName}}", content: { text: "Paid 0.02 USDG to models.example with POST; the model answered: \"x402 lets an API charge per call over HTTP 402.\"", actions: ["PRIORS_PAY_X402"] } },
74
74
  ]],
75
75
  };
76
76
 
package/src/priors.js CHANGED
@@ -6,7 +6,7 @@ import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
6
6
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
7
7
 
8
8
  export const HOSTED_URL = "https://mcp.priors.trade/mcp";
9
- export const CLIENT = { name: "elizaos-plugin-priors", version: "0.2.0" };
9
+ export const CLIENT = { name: "elizaos-plugin-priors", version: "0.2.1" };
10
10
 
11
11
  /** The settings @priors/mcp reads, taken from the agent's settings (runtime.getSetting), else the process env. */
12
12
  export const SETTINGS = Object.freeze([