@priors/plugin-elizaos 0.3.0 → 0.3.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/elizaos.plugin.json +1 -1
- package/package.json +2 -2
- package/src/parse.js +5 -3
- package/src/priors.js +1 -1
package/elizaos.plugin.json
CHANGED
|
@@ -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.3.
|
|
5
|
+
"version": "0.3.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.3.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
23
|
-
"@priors/mcp": "0.
|
|
23
|
+
"@priors/mcp": "0.18.1"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@elizaos/core": "^1.7.0"
|
package/src/parse.js
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
const num = (s) => { const n = Number(String(s).replace(",", ".")); return Number.isFinite(n) && n >= 0 ? n : null; };
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
// a URL as the prose holds it: everything up to the next whitespace. ")", "]", "'" and the rest are a URL's own
|
|
7
|
+
// characters (RFC 3986), so stopping at one left the URL's tail in the prose (GHSA-mc89)
|
|
8
|
+
const URL_RE = /https?:\/\/\S+/gi;
|
|
9
|
+
/** The message's own words: every URL taken out whole, so nothing in a seller's path, query or fragment
|
|
10
|
+
* (/pay1/borrow5.json, #123, #)borrow$5) is ever read as an amount or an id (GHSA-rf6g, GHSA-62m7, GHSA-mc89). */
|
|
9
11
|
export const proseOf = (text) => String(text || "").replace(URL_RE, " ");
|
|
10
12
|
|
|
11
13
|
/** The first https URL in the text, or null. */
|
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.3.
|
|
9
|
+
export const CLIENT = { name: "elizaos-plugin-priors", version: "0.3.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([
|