@wzrd_sol/eliza-plugin 0.10.0 → 0.10.2
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 +34 -1
- package/dist/paying-fetch.d.ts +1 -1
- package/dist/paying-fetch.js +1 -1
- package/dist/receipt-verify.js +5 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ const agent = new AgentRuntime({ plugins: [wzrdPlugin] });
|
|
|
128
128
|
`payWrap` receives the **guarded** fetch. Opt out with `TWZRD_AUTO_GATE=0` or `{ disabled: true }`.
|
|
129
129
|
Lookups carry `X-TWZRD-Integration: eliza-plugin/<version>` unless you pass your own `attribution`.
|
|
130
130
|
|
|
131
|
-
On `twzrd-x402-gate` 0.
|
|
131
|
+
On `twzrd-x402-gate` 0.20.2 the guard refuses each of these before `payWrap` signs (the 0.13 defaults, unchanged since):
|
|
132
132
|
|
|
133
133
|
| Refused by default | Reason | Opt out (restores the 0.12.5 outcome) |
|
|
134
134
|
|---|---|---|
|
|
@@ -139,6 +139,11 @@ On `twzrd-x402-gate` 0.14.0 the guard refuses each of these before `payWrap` sig
|
|
|
139
139
|
An unreachable card is still an outage, decided by `failOpen`. The env opt-outs also accept
|
|
140
140
|
`false`, `no` and `off`; any other value leaves the refusal on.
|
|
141
141
|
|
|
142
|
+
The guard also refuses a 402 it cannot read the way a pay client does: a `payTo`, `asset` or
|
|
143
|
+
`network` that is not a string, or an amount that is an array or an object (`payto_malformed`,
|
|
144
|
+
`asset_malformed`, `network_malformed`, `amount_malformed`). These are refused before intel is
|
|
145
|
+
asked, and `failOpen` does not open them.
|
|
146
|
+
|
|
142
147
|
### Paid trust receipt
|
|
143
148
|
|
|
144
149
|
```typescript
|
|
@@ -154,6 +159,34 @@ const agent = new AgentRuntime({ plugins: [wzrdPlugin] });
|
|
|
154
159
|
|
|
155
160
|
Without a paying fetch, `WZRD_INTEL_TRUST` returns the HTTP 402 requirements.
|
|
156
161
|
|
|
162
|
+
## 0.10.2 changes
|
|
163
|
+
|
|
164
|
+
Security release: the `twzrd-x402-gate` pin moves from `0.14.0` to `0.20.2`.
|
|
165
|
+
|
|
166
|
+
- On gate 0.14.0, `installTwzrdAutoGate` read a 402 field of the wrong type as absent, or coerced
|
|
167
|
+
it, while a pay client uses the raw value. A `payTo` sent as a one-element array was scored as
|
|
168
|
+
the wallet inside it, and an `asset` that was not a string was read as no asset named. The guard
|
|
169
|
+
could approve one payment while the client signed another. Gate 0.20.2 refuses these before
|
|
170
|
+
`payWrap` signs.
|
|
171
|
+
- The pin is exact, so this plugin installs its own copy of the gate. Upgrading `twzrd-x402-gate`
|
|
172
|
+
in your app does not change the copy the plugin calls: upgrade the plugin.
|
|
173
|
+
- The move crosses gate 0.15.0 to 0.20.2. On `installTwzrdAutoGate` that also means: a Solana
|
|
174
|
+
`exact` offer that carries `extra.splits` is refused (`svm_splits_refused`), a `batch-settlement`
|
|
175
|
+
offer is refused (`batch_settlement_refused`), and a `.kill` or `.pause` file in the gate's state
|
|
176
|
+
directory (`stateDir`, `TWZRD_STATE_DIR`) refuses the payment. A well-formed offer is decided as
|
|
177
|
+
before, and the refusal defaults in the table above are unchanged.
|
|
178
|
+
- No other source change. `X-Twzrd-Caller` reads `eliza-plugin/0.10.2@0.20.2`.
|
|
179
|
+
|
|
180
|
+
## 0.10.1 changes
|
|
181
|
+
|
|
182
|
+
- `verifyReceipt` and `getIntelClient().verify` report `freshnessUnauthenticated: false` only when the
|
|
183
|
+
verify passes. `twzrd-receipt-verifier` 1.4.4 reports `freshness_unauthenticated: false` for any V7
|
|
184
|
+
domain, even when it rejects the receipt, and 0.10.0 passed that through: a rejected V7 receipt read
|
|
185
|
+
`valid: false` with `freshnessUnauthenticated: false`. `valid` and `freshness` (`unauthenticated`) were
|
|
186
|
+
already correct there; only that flag was wrong.
|
|
187
|
+
- Dependency ranges and the `twzrd-x402-gate` `0.14.0` pin are unchanged. `X-Twzrd-Caller` reads
|
|
188
|
+
`eliza-plugin/0.10.1@0.14.0`.
|
|
189
|
+
|
|
157
190
|
## 0.10.0 changes
|
|
158
191
|
|
|
159
192
|
- Depends on `@wzrd_sol/sdk` `^0.5.1` (was `^0.4.8`) and on `twzrd-x402-gate` exactly `0.14.0` (was `0.13.1`),
|
package/dist/paying-fetch.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type InstallAutoGateOptions, type PayWrap } from 'twzrd-x402-gate';
|
|
|
3
3
|
/** This package's version, stamped into X-TWZRD-Integration on gate lookups. */
|
|
4
4
|
export declare const PLUGIN_VERSION: string;
|
|
5
5
|
/** Exact twzrd-x402-gate pin. A caret would float onto a later line. */
|
|
6
|
-
export declare const GATE_PIN = "0.
|
|
6
|
+
export declare const GATE_PIN = "0.20.2";
|
|
7
7
|
export declare function integrationTag(): string;
|
|
8
8
|
/** Seat stamp: X-Twzrd-Caller eliza-plugin/<version>@<GATE_PIN>. */
|
|
9
9
|
export declare function callerTag(): string;
|
package/dist/paying-fetch.js
CHANGED
|
@@ -6,7 +6,7 @@ const require = createRequire(import.meta.url);
|
|
|
6
6
|
/** This package's version, stamped into X-TWZRD-Integration on gate lookups. */
|
|
7
7
|
export const PLUGIN_VERSION = require('../package.json').version;
|
|
8
8
|
/** Exact twzrd-x402-gate pin. A caret would float onto a later line. */
|
|
9
|
-
export const GATE_PIN = '0.
|
|
9
|
+
export const GATE_PIN = '0.20.2';
|
|
10
10
|
export function integrationTag() {
|
|
11
11
|
return `eliza-plugin/${PLUGIN_VERSION}`;
|
|
12
12
|
}
|
package/dist/receipt-verify.js
CHANGED
|
@@ -110,8 +110,11 @@ export function verifyReceipt(receipt, opts = {}) {
|
|
|
110
110
|
const raw = verifier.verify(receipt, trustedPubkey, {
|
|
111
111
|
maxAgeSeconds: opts.maxAgeSeconds,
|
|
112
112
|
});
|
|
113
|
-
// Fail closed:
|
|
114
|
-
|
|
113
|
+
// Fail closed: freshness is authenticated only on a passing verify. The
|
|
114
|
+
// verifier's flag describes the domain's leaf layout: 1.4.0 omitted it on an
|
|
115
|
+
// early return (kind/version mismatch), but 1.4.4 classifies the domain first
|
|
116
|
+
// and reports false for any V7 domain, even when it rejects the receipt.
|
|
117
|
+
const freshnessUnauthenticated = !(raw.valid === true && raw.freshness_unauthenticated === false);
|
|
115
118
|
const result = {
|
|
116
119
|
valid: !!raw.valid,
|
|
117
120
|
leafValid: !!raw.leaf_valid,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wzrd_sol/eliza-plugin",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "TWZRD Agent Intel for ElizaOS. Free preflight ReadinessCard + merchant_card (wash_flagged refuse default), paid GET /v1/intel/trust (~0.05 USDC) V7 receipt, offline verify via twzrd-receipt-verifier. Paid lookups need WZRD_INTEL_ALLOW_PAID or confirm_spend; merchant_card outages fail closed.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@wzrd_sol/sdk": "^0.5.1",
|
|
22
22
|
"twzrd-receipt-verifier": "^1.4.0",
|
|
23
|
-
"twzrd-x402-gate": "0.
|
|
23
|
+
"twzrd-x402-gate": "0.20.2"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@elizaos/core": "^1.0.0"
|