@valiron/sdk 1.4.0 → 2.0.0
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 +5 -154
- package/dist/clients.d.ts +6 -6
- package/dist/clients.js +33 -26
- package/dist/identity.d.ts +6 -0
- package/dist/identity.js +6 -1
- package/dist/identityMiddleware.d.ts +8 -0
- package/dist/identityMiddleware.js +12 -4
- package/dist/index.d.ts +5 -10
- package/dist/index.js +4 -10
- package/dist/middleware.d.ts +18 -9
- package/dist/middleware.js +41 -16
- package/dist/operatorSdk.d.ts +11 -2
- package/dist/operatorSdk.js +13 -7
- package/dist/types.d.ts +14 -4
- package/docs/AGENT-READY-APIS.md +3 -181
- package/docs/API-REFERENCE.md +88 -546
- package/docs/CHAINS.md +3 -3
- package/docs/CRAWLER-PROTECTION.md +376 -0
- package/docs/DASHBOARD.md +39 -23
- package/docs/E2E-MIDDLEWARE-INTEGRATION.md +19 -13
- package/docs/ERRORS.md +27 -19
- package/docs/IDENTITY.md +16 -14
- package/docs/PROVIDER-IDENTITY.md +15 -5
- package/docs/QUICKSTART.md +34 -24
- package/docs/README.md +15 -4
- package/docs/SANDBOX.md +7 -1
- package/docs/SDK-REFERENCE.md +70 -52
- package/docs/SECURITY-UPGRADE-2026-10-31.md +98 -0
- package/docs/TRUST-MODEL.md +14 -11
- package/docs/llms.txt +65 -307
- package/package.json +3 -3
- package/docs/MCP.md +0 -50
package/docs/API-REFERENCE.md
CHANGED
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
# Valiron API Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
See the [security upgrade guide](SECURITY-UPGRADE-2026-10-31.md) before upgrading existing integrations: trust gates require request-bound identity verification, and enrollment and signed-request contracts have changed.
|
|
4
|
+
|
|
5
|
+
[Valiron Crawler Protection](./CRAWLER-PROTECTION.md) runs as a standalone HTTP gateway or in-process middleware with shared admission state. Its private per-deployment work API lets other server languages acquire/release database capacity; it is not part of this hosted public REST API and must remain on private authenticated ingress. The package includes its protocol contract. The website dashboard validates/exports account-scoped configuration without deploying protection and displays optional runtime-reported crawler analytics. Its exports belong to the `@valiron/crawler-protection` package, not `@valiron/sdk`.
|
|
6
|
+
|
|
7
|
+
SDK 0.2.0+ requires a Free/Pro/Enterprise operator API key and account-bound activation via `activateCrawlerProtection()` before constructing its runtime. Activation uses a short-lived local lease, refreshed in the background. Each protected HTTP request requires hosted monthly quota admission; database operations are not counted again. See the crawler guide for revocation, outage and recovery behavior.
|
|
8
|
+
|
|
9
|
+
Machine-readable contract: [Valiron OpenAPI](https://www.valiron.co/openapi.json).
|
|
4
10
|
|
|
5
11
|
Base URL: `https://valiron-edge-proxy.onrender.com`
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
Supported integration endpoints:
|
|
8
14
|
|
|
9
|
-
- **Trust evaluation** (`/operator/agent/*`, `/operator/gate/*`, etc.) — Profile
|
|
10
|
-
- **Dashboard** (`/operator/register`, `/operator/login`, `/operator/endpoints`, etc.) — JWT-authenticated. Used by the Operator Dashboard. See [DASHBOARD.md](./DASHBOARD.md) for the UI guide.
|
|
15
|
+
- **Trust evaluation** (`/operator/agent/*`, `/operator/gate/*`, etc.) — Profile reads, runtime gate and identity-verification requests require an operator key; Only Social Graph (Icebreaker) requires Pro signal access; use `Authorization: Bearer val_op_...`.
|
|
11
16
|
- **Agent-ready wrappers** (`/wrap/:operatorId/*`) — Public agent-facing URLs created from Dashboard endpoint configs. These can enforce x402/MPP payment, optional trust checks, rate limits, and upstream forwarding.
|
|
12
17
|
|
|
13
18
|
---
|
|
14
19
|
|
|
20
|
+
## Authentication
|
|
21
|
+
|
|
22
|
+
Get an operator API key from [the dashboard](https://www.valiron.co/dashboard). Send `Authorization: Bearer val_op_...` from your backend for profile/status reads and trust operations. Missing, invalid, or revoked credentials return HTTP 401. Keep keys out of browser code and public repositories.
|
|
23
|
+
|
|
24
|
+
Health and key-identity enrollment remain accessible without an operator key. Enrollment proves control of an agent key; it does not authorize profile reads or protected actions. Human verification uses signed proofs/provider callbacks. The private Icebreaker lookup also accepts a verified agent session for that agent's own address. Manage accounts, keys, and analytics through the website.
|
|
25
|
+
|
|
15
26
|
## Access and data boundaries
|
|
16
27
|
|
|
17
|
-
|
|
28
|
+
Profile endpoints require operator authentication and return identity and trust summaries. They do not return raw behavioral metrics, stored-evidence links, RPC URLs, internal errors, or verification-provider records. Self and World ID responses return an allowlisted verification summary; nullifiers, credential subjects, and provider storage references are private.
|
|
18
29
|
|
|
19
|
-
Sandbox runs require an operator API key.
|
|
30
|
+
Sandbox runs require an operator API key. World ID/Self profiles, wallet intelligence, the trust-gated proxy, analytics, and webhook registration are included with Free and require an operator API key. Social Graph (Icebreaker) requires Pro. Crawler Protection is included on Free. Webhook deliveries are scoped to the operator that initiated the evaluation and the selected chain. Legacy global evaluation history and platform statistics are restricted to Valiron administrators; view your own account analytics in the dashboard.
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
Hosted gates, proxy forwarding, World ID enrollment and Self session creation also require a fresh registry-owner signature over the agent ID, chain, HTTP method, full destination URL and JSON body. Send `x-agent-timestamp`, `x-agent-nonce` and `x-agent-request-signature`; see the [exact signing contract](./SECURITY-UPGRADE-2026-10-31.md#hosted-wrappers-gates-and-proxy). Legacy key-registration challenges and `x-agent-session` do not authorize these routes. Trust-enabled wrappers require the same owner proof in addition to `x-agent-id`.
|
|
22
33
|
|
|
23
34
|
## Monthly request allowance
|
|
24
35
|
|
|
25
|
-
Free includes **
|
|
26
|
-
Request 100,000 is allowed; subsequent requests return HTTP 429 with
|
|
36
|
+
Free includes **10,000 metered agent requests per account per UTC calendar month**. Pro includes **100,000**. Bot protection has its own allowance of 10,000 on Free and 100,000 on Pro. Enterprise: email founders@valiron.co.
|
|
37
|
+
Request 10,000 on Free (100,000 on Pro) is allowed; subsequent requests return HTTP 429 with
|
|
27
38
|
`code: "MONTHLY_REQUEST_LIMIT_EXCEEDED"`, `error: "upgrade_required"`, `limit`,
|
|
28
|
-
`used`, `resetsAt`, and `upgradeUrl`.
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
`used`, `resetsAt`, and `upgradeUrl`. Free accounts can upgrade to Pro ($149/month, 100,000 requests per product),
|
|
40
|
+
while Pro accounts can email founders@valiron.co for Enterprise, or wait until
|
|
41
|
+
the next month at 00:00 UTC. Enterprise allowances are agreed separately; existing feature gates, per-endpoint rate limits and traffic
|
|
31
42
|
protections still apply. Crossing the limit never automatically subscribes or
|
|
32
43
|
charges an account.
|
|
33
44
|
|
|
@@ -36,16 +47,13 @@ The shared account allowance counts admitted calls to:
|
|
|
36
47
|
- `POST /operator/gate/:agentId`
|
|
37
48
|
- `POST /operator/identity/verify`
|
|
38
49
|
- `POST /operator/trigger-sandbox/:agentId` and `/operator/trigger-sandbox-key/:agentAddress`
|
|
39
|
-
- `POST /proxy/:agentId` (
|
|
50
|
+
- `POST /proxy/:agentId` (available on Free within usage limits)
|
|
40
51
|
- Any configured `/wrap/:operatorId/*` request, charged to the endpoint owner.
|
|
41
52
|
|
|
42
|
-
Direct metered calls require `Authorization: Bearer val_op_
|
|
43
|
-
JWT is also accepted). Gate/proxy agent identity requirements still apply.
|
|
53
|
+
Direct metered calls require `Authorization: Bearer val_op_...`. Gate/proxy agent identity requirements still apply.
|
|
44
54
|
Wrappers resolve the account from the stored endpoint; an internal trust check
|
|
45
|
-
is included in the wrapper request, not counted again.
|
|
46
|
-
|
|
47
|
-
fails. Requests rejected by authentication or the monthly limit do not count.
|
|
48
|
-
Public profile/discovery reads, identity challenges, health, account management,
|
|
55
|
+
is included in the wrapper request, not counted again. For hosted wrappers, payment validation, local rate checks and trust admission precede the monthly counter. Rejected payment, rate or trust requests do not consume the owner's monthly allowance. Once admitted, a wrapper request can still count if its upstream subsequently fails. Authentication and monthly-limit rejections do not count.
|
|
56
|
+
Summary profile/discovery reads, identity challenges, health, account management,
|
|
49
57
|
checkout, and analytics are outside this allowance.
|
|
50
58
|
|
|
51
59
|
Responses include `X-Valiron-Monthly-Used` and `X-Valiron-Monthly-Reset`.
|
|
@@ -59,7 +67,7 @@ there is no process-local fallback that could bypass the allowance.
|
|
|
59
67
|
### POST /operator/identity/verify
|
|
60
68
|
|
|
61
69
|
Normalize and verify a provider-backed agent identity proof. This endpoint is
|
|
62
|
-
provider-independent. SDK
|
|
70
|
+
provider-independent. The SDK exposes it as `verifyAgentIdentity()` and provides
|
|
63
71
|
dedicated middleware for `x-valiron-identity-*` proof headers. The ANS adapter
|
|
64
72
|
and provider credentials run inside Valiron's hosted service.
|
|
65
73
|
|
|
@@ -79,6 +87,9 @@ fresh signature, and unused nonce return `identityStatus: "verified"`.
|
|
|
79
87
|
"nonce": "nonce-0123456789abcdef",
|
|
80
88
|
"requestDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
81
89
|
"keyId": "optional-provider-key-id",
|
|
90
|
+
"audience": "https://api.example.com",
|
|
91
|
+
"method": "POST",
|
|
92
|
+
"url": "https://api.example.com/quote",
|
|
82
93
|
"policy": {
|
|
83
94
|
"anonymous": "challenge",
|
|
84
95
|
"claimed": "block",
|
|
@@ -98,6 +109,9 @@ fresh signature, and unused nonce return `identityStatus: "verified"`.
|
|
|
98
109
|
| `signature` | string | for verification | Base64/base64url or `0x`-hex signature unless the resolver defines a provider-specific proof |
|
|
99
110
|
| `timestamp` | ISO timestamp | for verification | Signed time; default acceptance window is five minutes |
|
|
100
111
|
| `nonce` | string | for verification | 16–256 URL-safe characters; atomically claimed to prevent replay |
|
|
112
|
+
| `audience` | string | for verification | Trusted API audience, included in the v2 signature |
|
|
113
|
+
| `method` | string | for verification | Uppercase protected HTTP method |
|
|
114
|
+
| `url` | string | for verification | Exact absolute protected request URL, including query |
|
|
101
115
|
| `requestDigest` | string | for verification | `sha256:` plus 64 hexadecimal characters for the protected request bytes |
|
|
102
116
|
| `keyId` | string | no | Selects one provider-resolved verification key |
|
|
103
117
|
| `policy` | object | no | Per-status and per-risk actions. Every action must be `allow`, `limit`, `challenge`, or `block` |
|
|
@@ -200,16 +214,15 @@ Retrieve the complete trust profile for an agent.
|
|
|
200
214
|
"trustModels": ["reputation_on_chain", "behavioral_sandbox"]
|
|
201
215
|
},
|
|
202
216
|
"onchainReputation": {
|
|
203
|
-
"
|
|
217
|
+
"count": "12",
|
|
218
|
+
"totalFeedback": 12,
|
|
204
219
|
"averageScore": 92.5
|
|
205
220
|
},
|
|
206
221
|
"routing": {
|
|
207
|
-
"finalRoute": "prod"
|
|
208
|
-
"meetsThreshold": true
|
|
222
|
+
"finalRoute": "prod"
|
|
209
223
|
},
|
|
210
224
|
"chain": {
|
|
211
|
-
"
|
|
212
|
-
"chainId": 1
|
|
225
|
+
"network": "ethereum"
|
|
213
226
|
},
|
|
214
227
|
"timestamp": "2026-03-23T12:00:00.000Z"
|
|
215
228
|
}
|
|
@@ -241,9 +254,9 @@ Same structure as `GET /operator/agent/:agentId`.
|
|
|
241
254
|
|
|
242
255
|
---
|
|
243
256
|
|
|
244
|
-
## GET /operator/wallet-risk/:wallet
|
|
257
|
+
## GET /operator/wallet-risk/:wallet
|
|
245
258
|
|
|
246
|
-
Return an explainable wallet-history assessment. Requires
|
|
259
|
+
Return an explainable wallet-history assessment. Requires an operator API key on Free or paid accounts in `Authorization: Bearer val_op_...`.
|
|
247
260
|
|
|
248
261
|
### Parameters
|
|
249
262
|
|
|
@@ -291,7 +304,7 @@ Provider failures return HTTP 200 with `available: false`, `provider: "none"`, a
|
|
|
291
304
|
| Status | Meaning |
|
|
292
305
|
|--------|---------|
|
|
293
306
|
| 400 | Invalid EVM or Solana wallet address |
|
|
294
|
-
|
|
|
307
|
+
| 401 | Missing or invalid operator API key |
|
|
295
308
|
| 500 | Unexpected wallet-risk route failure |
|
|
296
309
|
|
|
297
310
|
---
|
|
@@ -300,7 +313,7 @@ Provider failures return HTTP 200 with `available: false`, `provider: "none"`, a
|
|
|
300
313
|
|
|
301
314
|
Lightweight wallet → agentId resolution. Returns just the agent ID and how it was resolved, without the full trust profile.
|
|
302
315
|
|
|
303
|
-
|
|
316
|
+
Wallet resolution returns the associated agent ID when available.
|
|
304
317
|
|
|
305
318
|
### Parameters
|
|
306
319
|
|
|
@@ -347,8 +360,7 @@ Execute real-time sandbox tests against an agent and compute a trust evaluation.
|
|
|
347
360
|
"meetsThreshold": true,
|
|
348
361
|
"testSummary": {},
|
|
349
362
|
"chain": {
|
|
350
|
-
"
|
|
351
|
-
"chainId": 1
|
|
363
|
+
"network": "ethereum"
|
|
352
364
|
},
|
|
353
365
|
"message": "Sandbox evaluation complete"
|
|
354
366
|
}
|
|
@@ -381,7 +393,7 @@ Trust gate — combined on-chain reputation + sandbox check. Returns an allow/de
|
|
|
381
393
|
| Field | Type | Default | Description |
|
|
382
394
|
|-------|------|---------|-------------|
|
|
383
395
|
| `minScore` | number | 65 | Minimum composite trust score required to allow |
|
|
384
|
-
| `trustSignals` | string[] | automatic | Selected signals.
|
|
396
|
+
| `trustSignals` | string[] | automatic | Selected signals. Only `icebreaker` (Social Graph) requires Pro |
|
|
385
397
|
| `ttlMs` | number | 86400000 | Cache TTL in milliseconds (default 24 hours) |
|
|
386
398
|
|
|
387
399
|
### Response — 200 OK
|
|
@@ -396,8 +408,7 @@ Trust gate — combined on-chain reputation + sandbox check. Returns an allow/de
|
|
|
396
408
|
"agentId": "25459",
|
|
397
409
|
"wallet": "0x52ce...",
|
|
398
410
|
"chain": {
|
|
399
|
-
"
|
|
400
|
-
"chainId": 1
|
|
411
|
+
"network": "ethereum"
|
|
401
412
|
},
|
|
402
413
|
"sandboxRan": false,
|
|
403
414
|
"cached": true,
|
|
@@ -457,7 +468,7 @@ Get the latest behavioral snapshot hash for an agent. Returns an opaque hash sui
|
|
|
457
468
|
|
|
458
469
|
## POST /operator/webhooks/register
|
|
459
470
|
|
|
460
|
-
Register a public HTTPS webhook with
|
|
471
|
+
Register a public HTTPS webhook with an operator API key on Free or paid accounts. Events are limited to evaluations initiated by that operator on the selected `chain`; registrations cannot subscribe to other operators. Existing registrations must be recreated after the privacy update. Set `?chain=<network>` when registering; use `?chain=key` for key-based evaluations.
|
|
461
472
|
|
|
462
473
|
### Request Body
|
|
463
474
|
|
|
@@ -533,7 +544,7 @@ When an evaluation completes, Valiron POSTs the following to your registered URL
|
|
|
533
544
|
|
|
534
545
|
---
|
|
535
546
|
|
|
536
|
-
## POST /proxy/:agentId
|
|
547
|
+
## POST /proxy/:agentId
|
|
537
548
|
|
|
538
549
|
Forward a request through Valiron's edge proxy with automatic trust gating, logging, and SSRF protection.
|
|
539
550
|
|
|
@@ -633,7 +644,7 @@ Verify a signed challenge to authenticate a key-based agent.
|
|
|
633
644
|
|
|
634
645
|
### GET /operator/key/:agentAddress
|
|
635
646
|
|
|
636
|
-
Get the
|
|
647
|
+
Get the summary profile of a key-based agent using your operator API key. Icebreaker context and reasons are
|
|
637
648
|
redacted from this response.
|
|
638
649
|
|
|
639
650
|
#### Response — 200 OK
|
|
@@ -696,64 +707,51 @@ Verify agent-human linkage via Worldcoin's zero-knowledge proof system.
|
|
|
696
707
|
|
|
697
708
|
### POST /operator/world-id/verify/:agentId
|
|
698
709
|
|
|
699
|
-
Submit
|
|
700
|
-
|
|
701
|
-
| Parameter | Location | Type | Required | Description |
|
|
702
|
-
|-----------|----------|------|----------|-------------|
|
|
703
|
-
| `agentId` | path | string | yes | ERC-8004 token ID |
|
|
704
|
-
|
|
705
|
-
#### Request Body
|
|
710
|
+
Submit the complete, unmodified production IDKit result for an on-chain agent with an authenticated operator and fresh owner-signed request. The server validates the configured action and RP verifier response before storing the link. Current enrollment accepts proof-of-human credentials and derives the stored strength from verified evidence; an `orb`, `device` or `phone` string supplied by the caller does not prove strength. Older links without server-verification provenance require re-verification.
|
|
706
711
|
|
|
707
712
|
```json
|
|
708
713
|
{
|
|
709
714
|
"merkle_root": "0x...",
|
|
710
715
|
"nullifier_hash": "0x...",
|
|
711
716
|
"proof": "0x...",
|
|
712
|
-
"
|
|
717
|
+
"verification_level": "orb",
|
|
718
|
+
"idkit_result": {
|
|
719
|
+
"protocol_version": "4.0",
|
|
720
|
+
"environment": "production",
|
|
721
|
+
"action": "verify-agent",
|
|
722
|
+
"responses": [{ "identifier": "proof_of_human", "issuer_schema_id": 1, "nullifier": "0x...", "proof": ["0x..."] }]
|
|
723
|
+
}
|
|
713
724
|
}
|
|
714
725
|
```
|
|
715
726
|
|
|
727
|
+
The example is schematic: forward the actual IDKit result unchanged, not reconstructed placeholder fields. A successful response contains only the allowlisted verification summary.
|
|
728
|
+
|
|
716
729
|
#### Response — 200 OK
|
|
717
730
|
|
|
718
731
|
```json
|
|
719
732
|
{
|
|
720
|
-
"
|
|
733
|
+
"ok": true,
|
|
721
734
|
"agentId": "25459",
|
|
722
|
-
"
|
|
723
|
-
"
|
|
735
|
+
"worldId": { "verified": true, "verificationLevel": "orb" },
|
|
736
|
+
"timestamp": "2026-04-01T12:00:00.000Z"
|
|
724
737
|
}
|
|
725
738
|
```
|
|
726
739
|
|
|
727
740
|
### GET /operator/world-id/status/:agentId
|
|
728
741
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
#### Response — 200 OK
|
|
742
|
+
Read verification status with your operator API key.
|
|
732
743
|
|
|
733
744
|
```json
|
|
734
745
|
{
|
|
735
|
-
"
|
|
736
|
-
"
|
|
737
|
-
"
|
|
746
|
+
"agentId": "25459",
|
|
747
|
+
"worldId": { "verified": true, "verificationLevel": "orb" },
|
|
748
|
+
"timestamp": "2026-04-01T12:00:00.000Z"
|
|
738
749
|
}
|
|
739
750
|
```
|
|
740
751
|
|
|
741
752
|
### GET /operator/world-id/profile/:agentId
|
|
742
753
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
#### Response — 200 OK
|
|
746
|
-
|
|
747
|
-
```json
|
|
748
|
-
{
|
|
749
|
-
"agentId": "25459",
|
|
750
|
-
"worldId": {
|
|
751
|
-
"verified": true,
|
|
752
|
-
"level": "orb",
|
|
753
|
-
"verifiedAt": "2026-04-01T12:00:00.000Z"
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
```
|
|
754
|
+
Requires a Free or paid operator key. Social Graph enrichment is returned only for Pro/Enterprise; Free receives `icebreaker: { "attested": false }`, `humanTrust.hasBackground: false`, and no social reasons. Returns `agentId`, the same allowlisted `worldId` summary, `identity`, `icebreaker`, `humanTrust`, `reasons`, and `timestamp`. `identity` can be `null`; `icebreaker` is `{ "attested": false }` when no attestation is found. The `humanTrust` object contains `hasHumanLink`, `hasBackground`, and `verificationLevel`.
|
|
757
755
|
|
|
758
756
|
---
|
|
759
757
|
|
|
@@ -763,7 +761,7 @@ Create Self Enterprise verification sessions, receive signed Self webhooks, and
|
|
|
763
761
|
|
|
764
762
|
### POST /operator/self/session/:agentId
|
|
765
763
|
|
|
766
|
-
Create a Self Enterprise verification session
|
|
764
|
+
Create a Self Enterprise verification session with operator authentication and a fresh registry-owner signature. Only owner-authorized sessions can establish a trusted link through the signed provider callback. Omit return URLs or use HTTPS URLs on `https://valiron.co`; arbitrary callback origins are rejected.
|
|
767
765
|
|
|
768
766
|
| Parameter | Location | Type | Required | Description |
|
|
769
767
|
|-----------|----------|------|----------|-------------|
|
|
@@ -775,8 +773,8 @@ Create a Self Enterprise verification session for an agent.
|
|
|
775
773
|
{
|
|
776
774
|
"selfAgentId": "self-agent-...",
|
|
777
775
|
"selfAgentRegistry": "0x...",
|
|
778
|
-
"successUrl": "https://
|
|
779
|
-
"failureUrl": "https://
|
|
776
|
+
"successUrl": "https://valiron.co/verified",
|
|
777
|
+
"failureUrl": "https://valiron.co/failed",
|
|
780
778
|
"expiresInSeconds": 900,
|
|
781
779
|
"metadata": {}
|
|
782
780
|
}
|
|
@@ -799,39 +797,13 @@ Create a Self Enterprise verification session for an agent.
|
|
|
799
797
|
}
|
|
800
798
|
```
|
|
801
799
|
|
|
802
|
-
### POST /operator/self/webhook
|
|
803
|
-
|
|
804
|
-
Receive signed Self Enterprise webhooks. This endpoint verifies the raw request body with `SelfWebhooks.verify(...)`, stores only valid `verification.completed` events, and optionally re-verifies proofs when `SELF_TEST_ORG_ID` or `SELF_LIVE_ORG_ID` is configured.
|
|
805
|
-
|
|
806
|
-
Configure this URL in the Self dashboard:
|
|
807
|
-
|
|
808
|
-
```text
|
|
809
|
-
https://<edge-proxy-host>/operator/self/webhook
|
|
810
|
-
```
|
|
811
|
-
|
|
812
|
-
Self environment variables are split by deployment mode. `SELF_ENV=test` or `SELF_ENV=live` selects which credentials create new sessions; the webhook accepts both configured test and live signing secrets.
|
|
813
|
-
|
|
814
|
-
```text
|
|
815
|
-
SELF_ENV=test
|
|
816
|
-
SELF_TEST_API_KEY=sk_test_...
|
|
817
|
-
SELF_TEST_FLOW_ID=...
|
|
818
|
-
SELF_TEST_WEBHOOK_SECRET=whsec_...
|
|
819
|
-
SELF_LIVE_API_KEY=sk_live_...
|
|
820
|
-
SELF_LIVE_FLOW_ID=...
|
|
821
|
-
SELF_LIVE_WEBHOOK_SECRET=whsec_...
|
|
822
|
-
```
|
|
823
|
-
|
|
824
800
|
### GET /operator/self/status/:agentId
|
|
825
801
|
|
|
826
802
|
Check if an agent has a verified Self eligible-human link.
|
|
827
803
|
|
|
828
804
|
### GET /operator/self/profile/:agentId
|
|
829
805
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
### POST /operator/self/verify/:agentId
|
|
833
|
-
|
|
834
|
-
Trusted-payload ingestion for local/internal tests only. Disabled unless `SELF_ALLOW_TRUSTED_PAYLOADS=true`; production should use `/operator/self/session/:agentId` and `/operator/self/webhook`.
|
|
806
|
+
Requires a Free or paid operator key. Returns `self` eligibility and agent-binding predicates, `identity`, `humanTrust`, `reasons`, and `timestamp`. Provider identifiers are omitted from `self`.
|
|
835
807
|
|
|
836
808
|
---
|
|
837
809
|
|
|
@@ -844,7 +816,7 @@ Health check endpoint.
|
|
|
844
816
|
```json
|
|
845
817
|
{
|
|
846
818
|
"status": "ok",
|
|
847
|
-
"supportedChains": ["ethereum", "monad", "arbitrum", "base"
|
|
819
|
+
"supportedChains": ["ethereum", "monad", "arbitrum", "base"],
|
|
848
820
|
"defaultChain": "ethereum"
|
|
849
821
|
}
|
|
850
822
|
```
|
|
@@ -866,7 +838,7 @@ Solana agent identity and reputation data is provided by [QuantuLabs 8004-solana
|
|
|
866
838
|
| **Identity source** | ERC-8004 `ownerOf()` on-chain call | QuantuLabs `loadAgent()` SDK call |
|
|
867
839
|
| **Reputation source** | ERC-8004 `getSummary()` | QuantuLabs ATOM engine (`getEnrichedSummary()`) |
|
|
868
840
|
| **Extra reputation fields** | — | `solana.trustTier`, `solana.qualityScore`, `solana.confidence`, `solana.riskScore`, `solana.uniqueCallers` |
|
|
869
|
-
| **Wallet → Agent resolution** |
|
|
841
|
+
| **Wallet → Agent resolution** | Supported EVM registries | Supported Solana registry |
|
|
870
842
|
| **Liveness check** | — | `isItAlive()` endpoint-by-endpoint health probe |
|
|
871
843
|
| **Feedback write-back** | — | Valiron scores written on-chain via `giveFeedback()` when enabled by Valiron |
|
|
872
844
|
|
|
@@ -876,10 +848,10 @@ Solana agents are primarily identified by their base-58 asset pubkey, but the Qu
|
|
|
876
848
|
|
|
877
849
|
```bash
|
|
878
850
|
# By asset pubkey (primary)
|
|
879
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
851
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
880
852
|
|
|
881
853
|
# By sequential ID (convenience)
|
|
882
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
854
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
883
855
|
```
|
|
884
856
|
|
|
885
857
|
When a sequential ID is used, the response includes a `sequentialId` field mapping back to the numeric ID.
|
|
@@ -941,278 +913,30 @@ When querying a Solana agent, the `onchainReputation` object may include an addi
|
|
|
941
913
|
|
|
942
914
|
```bash
|
|
943
915
|
# Get Solana agent profile
|
|
944
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
916
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
945
917
|
|
|
946
918
|
# Get Solana agent by sequential ID
|
|
947
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
919
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
948
920
|
|
|
949
921
|
# Gate a Solana agent
|
|
950
|
-
curl -X POST "https://valiron-edge-proxy.onrender.com/operator/gate/GL4k...?chain=solana"
|
|
922
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" -X POST "https://valiron-edge-proxy.onrender.com/operator/gate/GL4k...?chain=solana"
|
|
951
923
|
|
|
952
924
|
# Check liveness
|
|
953
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k.../liveness?chain=solana"
|
|
925
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k.../liveness?chain=solana"
|
|
954
926
|
|
|
955
927
|
# Look up by Solana wallet
|
|
956
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/wallet/7xKX...?chain=solana"
|
|
928
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/wallet/7xKX...?chain=solana"
|
|
957
929
|
|
|
958
930
|
# Trigger sandbox for Solana agent
|
|
959
|
-
curl -X POST "https://valiron-edge-proxy.onrender.com/operator/trigger-sandbox/GL4k...?chain=solana"
|
|
931
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" -X POST "https://valiron-edge-proxy.onrender.com/operator/trigger-sandbox/GL4k...?chain=solana"
|
|
960
932
|
```
|
|
961
933
|
|
|
962
934
|
|
|
963
|
-
## Dashboard Endpoints (JWT-Authenticated)
|
|
964
|
-
|
|
965
|
-
All dashboard endpoints require a `Authorization: Bearer <jwt>` header. Get a JWT by calling `POST /operator/login`.
|
|
966
|
-
|
|
967
|
-
---
|
|
968
|
-
|
|
969
|
-
### POST /operator/register
|
|
970
|
-
|
|
971
|
-
Create a new operator account.
|
|
972
|
-
|
|
973
|
-
#### Request Body
|
|
974
|
-
|
|
975
|
-
```json
|
|
976
|
-
{
|
|
977
|
-
"email": "you@example.com",
|
|
978
|
-
"password": "SecurePass123!",
|
|
979
|
-
"name": "Your Name"
|
|
980
|
-
}
|
|
981
|
-
```
|
|
982
|
-
|
|
983
|
-
#### Response — 200 OK
|
|
984
|
-
|
|
985
|
-
```json
|
|
986
|
-
{
|
|
987
|
-
"operator": { "id": "uuid", "email": "you@example.com", "name": "Your Name", "role": "operator" },
|
|
988
|
-
"apiKey": "val_op_xxxx..."
|
|
989
|
-
}
|
|
990
|
-
```
|
|
991
|
-
|
|
992
|
-
> **Important:** The `apiKey` is shown once. Copy it immediately.
|
|
993
|
-
|
|
994
|
-
---
|
|
995
|
-
|
|
996
|
-
### POST /operator/login
|
|
997
|
-
|
|
998
|
-
Authenticate and receive a JWT token.
|
|
999
|
-
|
|
1000
|
-
#### Request Body
|
|
1001
|
-
|
|
1002
|
-
```json
|
|
1003
|
-
{
|
|
1004
|
-
"email": "you@example.com",
|
|
1005
|
-
"password": "SecurePass123!"
|
|
1006
|
-
}
|
|
1007
|
-
```
|
|
1008
|
-
|
|
1009
|
-
#### Response — 200 OK
|
|
1010
|
-
|
|
1011
|
-
```json
|
|
1012
|
-
{
|
|
1013
|
-
"operator": { "id": "uuid", "email": "you@example.com", "name": "Your Name", "role": "operator" },
|
|
1014
|
-
"token": "eyJhbGciOi..."
|
|
1015
|
-
}
|
|
1016
|
-
```
|
|
1017
|
-
|
|
1018
|
-
---
|
|
1019
|
-
|
|
1020
|
-
### GET /operator/me
|
|
1021
|
-
|
|
1022
|
-
Get the current operator's profile. Requires JWT.
|
|
1023
|
-
|
|
1024
|
-
#### Response — 200 OK
|
|
1025
|
-
|
|
1026
|
-
```json
|
|
1027
|
-
{
|
|
1028
|
-
"ok": true,
|
|
1029
|
-
"operator": {
|
|
1030
|
-
"id": "uuid",
|
|
1031
|
-
"email": "you@example.com",
|
|
1032
|
-
"name": "Your Name",
|
|
1033
|
-
"role": "operator",
|
|
1034
|
-
"plan": "standard",
|
|
1035
|
-
"fee_rate": "0.03",
|
|
1036
|
-
"onboarding_completed_at": "2026-01-01T00:05:00.000Z",
|
|
1037
|
-
"created_at": "2026-01-01T00:00:00.000Z",
|
|
1038
|
-
"updated_at": "2026-01-01T00:00:00.000Z"
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
```
|
|
1042
|
-
|
|
1043
|
-
---
|
|
1044
|
-
|
|
1045
|
-
### PATCH /operator/me
|
|
1046
|
-
|
|
1047
|
-
Update operator name. Requires JWT.
|
|
1048
|
-
|
|
1049
|
-
#### Request Body
|
|
1050
|
-
|
|
1051
|
-
```json
|
|
1052
|
-
{
|
|
1053
|
-
"name": "New Name"
|
|
1054
|
-
}
|
|
1055
|
-
```
|
|
1056
|
-
|
|
1057
|
-
---
|
|
1058
|
-
|
|
1059
|
-
### POST /operator/onboarding/complete
|
|
1060
|
-
|
|
1061
|
-
Mark the guided account setup as completed or dismissed. Requires JWT. This
|
|
1062
|
-
endpoint is idempotent, so clients can safely retry it.
|
|
1063
|
-
|
|
1064
|
-
New accounts have a null `onboarding_completed_at` value until this endpoint is
|
|
1065
|
-
called. Valiron uses that value to resume unfinished setup after email, Google,
|
|
1066
|
-
or GitHub authentication.
|
|
1067
|
-
|
|
1068
|
-
#### Response — 200 OK
|
|
1069
|
-
|
|
1070
|
-
```json
|
|
1071
|
-
{
|
|
1072
|
-
"ok": true,
|
|
1073
|
-
"operator": {
|
|
1074
|
-
"id": "uuid",
|
|
1075
|
-
"email": "you@example.com",
|
|
1076
|
-
"onboarding_completed_at": "2026-01-01T00:05:00.000Z"
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
```
|
|
1080
|
-
|
|
1081
|
-
---
|
|
1082
|
-
|
|
1083
|
-
### GET /operator/keys
|
|
1084
|
-
|
|
1085
|
-
List all API keys for the current operator. Requires JWT.
|
|
1086
|
-
|
|
1087
|
-
#### Response — 200 OK
|
|
1088
|
-
|
|
1089
|
-
```json
|
|
1090
|
-
[
|
|
1091
|
-
{
|
|
1092
|
-
"id": "uuid",
|
|
1093
|
-
"keyPrefix": "val_op_c010...",
|
|
1094
|
-
"label": null,
|
|
1095
|
-
"revoked": false,
|
|
1096
|
-
"lastUsed": "2026-04-01T00:00:00.000Z",
|
|
1097
|
-
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
1098
|
-
}
|
|
1099
|
-
]
|
|
1100
|
-
```
|
|
1101
|
-
|
|
1102
|
-
---
|
|
1103
|
-
|
|
1104
|
-
### POST /operator/keys/rotate
|
|
1105
|
-
|
|
1106
|
-
Generate a new API key. Requires JWT.
|
|
1107
|
-
|
|
1108
|
-
#### Request Body (optional)
|
|
1109
|
-
|
|
1110
|
-
```json
|
|
1111
|
-
{
|
|
1112
|
-
"label": "production-key"
|
|
1113
|
-
}
|
|
1114
|
-
```
|
|
1115
|
-
|
|
1116
|
-
#### Response — 200 OK
|
|
1117
|
-
|
|
1118
|
-
```json
|
|
1119
|
-
{
|
|
1120
|
-
"key": "val_op_xxxx...",
|
|
1121
|
-
"id": "uuid",
|
|
1122
|
-
"label": "production-key"
|
|
1123
|
-
}
|
|
1124
|
-
```
|
|
1125
|
-
|
|
1126
|
-
> **Important:** The full key is shown once. Copy it immediately.
|
|
1127
|
-
|
|
1128
|
-
---
|
|
1129
|
-
|
|
1130
|
-
### DELETE /operator/keys/:keyId
|
|
1131
|
-
|
|
1132
|
-
Revoke an API key. Requires JWT.
|
|
1133
|
-
|
|
1134
|
-
---
|
|
1135
|
-
|
|
1136
|
-
### GET /operator/endpoints
|
|
1137
|
-
|
|
1138
|
-
List all registered agent-ready wrappers for the current operator. Requires JWT.
|
|
1139
|
-
|
|
1140
|
-
#### Response — 200 OK
|
|
1141
|
-
|
|
1142
|
-
```json
|
|
1143
|
-
[
|
|
1144
|
-
{
|
|
1145
|
-
"id": "uuid",
|
|
1146
|
-
"path": "/weather",
|
|
1147
|
-
"method": "GET",
|
|
1148
|
-
"pricePerCall": "0.001000",
|
|
1149
|
-
"description": "Returns weather data",
|
|
1150
|
-
"rateLimit": 60,
|
|
1151
|
-
"targetUrl": "https://api.example.com",
|
|
1152
|
-
"paymentProtocol": "x402",
|
|
1153
|
-
"paymentNetwork": "eip155:8453",
|
|
1154
|
-
"trustEnabled": false,
|
|
1155
|
-
"upstreamAuthType": "none",
|
|
1156
|
-
"active": true,
|
|
1157
|
-
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
1158
|
-
}
|
|
1159
|
-
]
|
|
1160
|
-
```
|
|
1161
|
-
|
|
1162
|
-
---
|
|
1163
|
-
|
|
1164
|
-
### POST /operator/endpoints
|
|
1165
|
-
|
|
1166
|
-
Create a hosted agent-ready API wrapper. Requires JWT.
|
|
1167
|
-
|
|
1168
|
-
#### Request Body
|
|
1169
|
-
|
|
1170
|
-
```json
|
|
1171
|
-
{
|
|
1172
|
-
"path": "/weather",
|
|
1173
|
-
"method": "GET",
|
|
1174
|
-
"pricePerCall": 0.001,
|
|
1175
|
-
"description": "Returns weather data",
|
|
1176
|
-
"rateLimit": 60,
|
|
1177
|
-
"targetUrl": "https://api.example.com",
|
|
1178
|
-
"paymentProtocol": "x402",
|
|
1179
|
-
"paymentNetwork": "eip155:8453",
|
|
1180
|
-
"payoutAddress": "0xYourReceivingWallet",
|
|
1181
|
-
"trustEnabled": false,
|
|
1182
|
-
"upstreamAuthType": "hmac",
|
|
1183
|
-
"upstreamAuthSecret": "replace-with-a-unique-shared-secret"
|
|
1184
|
-
}
|
|
1185
|
-
```
|
|
1186
|
-
|
|
1187
|
-
| Field | Type | Required | Description |
|
|
1188
|
-
|-------|------|----------|-------------|
|
|
1189
|
-
| `path` | string | yes | Public wrapper path (e.g. `/weather`). Callers use `/wrap/{operatorId}/weather`. |
|
|
1190
|
-
| `method` | string | no | HTTP method (default: `GET`) |
|
|
1191
|
-
| `pricePerCall` | number | yes | Price in USD per call. Use `0` for a free wrapper. |
|
|
1192
|
-
| `description` | string | no | Endpoint description |
|
|
1193
|
-
| `rateLimit` | number | no | Max requests/min per agent (null = unlimited) |
|
|
1194
|
-
| `targetUrl` | string | yes | Existing upstream API base URL. Valiron appends `path` to this base URL when forwarding. Must be HTTPS in production. Private/internal addresses are blocked. |
|
|
1195
|
-
| `paymentProtocol` | string | no | `x402` or `mpp`. Defaults to `x402`. |
|
|
1196
|
-
| `paymentNetwork` | string | no | Payment network. Use `eip155:8453` or `eip155:84532` for x402, and `tempo:4217` or `tempo:42431` for MPP. |
|
|
1197
|
-
| `payoutAddress` | string | no | Receiving wallet for paid x402 wrappers. Required if no platform default receiving address is configured. |
|
|
1198
|
-
| `trustEnabled` | boolean | no | When true, the wrapper requires Valiron agent identity headers and checks trust before forwarding. |
|
|
1199
|
-
| `upstreamAuthType` | string | no | `none`, `bearer`, `api_key`, or `hmac`. Defaults to `none`. Use `hmac` for a public origin that must reject direct requests. |
|
|
1200
|
-
| `upstreamAuthHeader` | string | no | Header name for `api_key` or `hmac`; defaults to `x-api-key` and `x-valiron-signature` respectively. Ignored by `bearer`. |
|
|
1201
|
-
| `upstreamAuthSecret` | string | required when auth is enabled | Shared secret, stored encrypted at rest. For `hmac`, your origin uses it to verify the signature and `x-valiron-timestamp`. |
|
|
1202
|
-
|
|
1203
|
-
---
|
|
1204
|
-
|
|
1205
|
-
### DELETE /operator/endpoints/:endpointId
|
|
1206
|
-
|
|
1207
|
-
Deactivate an endpoint (soft delete). Requires JWT.
|
|
1208
|
-
|
|
1209
|
-
---
|
|
1210
|
-
|
|
1211
935
|
## Agent-Ready Wrapper Endpoint
|
|
1212
936
|
|
|
1213
937
|
### ALL /wrap/:operatorId/*
|
|
1214
938
|
|
|
1215
|
-
Public agent-facing wrapper URL. This endpoint is created by `POST /operator/endpoints` or the **
|
|
939
|
+
Public agent-facing wrapper URL. This endpoint is created by `POST /operator/endpoints` or the **API Scaffolding → Endpoints & testing** dashboard flow.
|
|
1216
940
|
|
|
1217
941
|
```text
|
|
1218
942
|
https://valiron-edge-proxy.onrender.com/wrap/{operatorId}/{path}
|
|
@@ -1226,7 +950,11 @@ The wrapper matches the operator ID, path, and HTTP method to an active endpoint
|
|
|
1226
950
|
|--------|----------|-------------|
|
|
1227
951
|
| `X-PAYMENT` | paid x402 retry | x402 payment payload returned by an x402-capable client. |
|
|
1228
952
|
| `Authorization: Payment ...` | paid MPP retry | MPP payment authorization header. |
|
|
1229
|
-
| `x-agent-id` | if trust enabled |
|
|
953
|
+
| `x-agent-id` | if trust enabled | Registry agent ID; this header alone cannot authorize the caller. |
|
|
954
|
+
| `x-agent-timestamp` | if trust enabled | Signed timestamp in milliseconds; accepted within 60 seconds. |
|
|
955
|
+
| `x-agent-nonce` | if trust enabled | Fresh 24–128 character URL-safe nonce; single use. |
|
|
956
|
+
| `x-agent-request-signature` | if trust enabled | Current registry-owner signature over the v2 wallet-request payload. |
|
|
957
|
+
| `x-chain` | explicit chain recommended | Selects the wrapper registry network; the signed chain must match. |
|
|
1230
958
|
| `x-agent-address` | not supported by hosted trust wrappers | Use SDK middleware in your own backend when you need key/address identity support. |
|
|
1231
959
|
|
|
1232
960
|
#### Free Wrapper Response
|
|
@@ -1278,193 +1006,7 @@ pnpm exec mppx https://valiron-edge-proxy.onrender.com/wrap/{operatorId}/researc
|
|
|
1278
1006
|
|
|
1279
1007
|
---
|
|
1280
1008
|
|
|
1281
|
-
### GET /operator/analytics/stats
|
|
1282
|
-
|
|
1283
|
-
Aggregate stats for the current operator. Requires JWT.
|
|
1284
|
-
|
|
1285
|
-
#### Response — 200 OK
|
|
1286
|
-
|
|
1287
|
-
```json
|
|
1288
|
-
{
|
|
1289
|
-
"totalCalls": 1250,
|
|
1290
|
-
"totalRevenue": "62.50",
|
|
1291
|
-
"uniqueAgents": 18,
|
|
1292
|
-
"avgResponseMs": 145,
|
|
1293
|
-
"errorRate": "0.024",
|
|
1294
|
-
"callsToday": 42,
|
|
1295
|
-
"revenueToday": "2.10"
|
|
1296
|
-
}
|
|
1297
|
-
```
|
|
1298
|
-
|
|
1299
|
-
---
|
|
1300
|
-
|
|
1301
|
-
### GET /operator/analytics/revenue?days=30
|
|
1302
|
-
|
|
1303
|
-
Daily revenue time series. Requires JWT.
|
|
1304
|
-
|
|
1305
|
-
#### Response — 200 OK
|
|
1306
|
-
|
|
1307
|
-
```json
|
|
1308
|
-
[
|
|
1309
|
-
{ "date": "2026-04-01", "revenue": "3.50", "calls": 70 },
|
|
1310
|
-
{ "date": "2026-04-02", "revenue": "4.25", "calls": 85 }
|
|
1311
|
-
]
|
|
1312
|
-
```
|
|
1313
|
-
|
|
1314
|
-
---
|
|
1315
|
-
|
|
1316
|
-
### GET /operator/analytics/top-endpoints?limit=10
|
|
1317
|
-
|
|
1318
|
-
Top endpoints ranked by call volume. Requires JWT.
|
|
1319
|
-
|
|
1320
|
-
---
|
|
1321
|
-
|
|
1322
|
-
### GET /operator/analytics/agents?sortBy=lastSeen&limit=50&offset=0
|
|
1323
|
-
|
|
1324
|
-
Paginated agent summaries. Requires JWT.
|
|
1325
|
-
|
|
1326
|
-
| Parameter | Type | Default | Description |
|
|
1327
|
-
|-----------|------|---------|-------------|
|
|
1328
|
-
| `sortBy` | string | `lastSeen` | Sort by: `lastSeen`, `calls`, `spent`, `errors` |
|
|
1329
|
-
| `limit` | number | 50 | Page size |
|
|
1330
|
-
| `offset` | number | 0 | Offset |
|
|
1331
|
-
|
|
1332
|
-
---
|
|
1333
|
-
|
|
1334
|
-
### GET /operator/analytics/agents/:agentId
|
|
1335
|
-
|
|
1336
|
-
Detailed view of a single agent. Requires JWT. Returns summary stats, endpoint breakdown, recent call log, and the current predictive risk forecast.
|
|
1337
|
-
|
|
1338
|
-
The `prediction` object is an explainable forecast derived from recent sandbox evaluations, behavioral fingerprints, and operator call logs:
|
|
1339
|
-
|
|
1340
|
-
```json
|
|
1341
|
-
{
|
|
1342
|
-
"prediction": {
|
|
1343
|
-
"agentId": "25459",
|
|
1344
|
-
"modelVersion": "heuristic-v1",
|
|
1345
|
-
"predictedNextScore": 72,
|
|
1346
|
-
"passProbability": 0.68,
|
|
1347
|
-
"riskDirection": "worsening",
|
|
1348
|
-
"confidence": "medium",
|
|
1349
|
-
"recommendedPolicy": "sandbox",
|
|
1350
|
-
"recommendedTests": ["rate_limit", "concurrency"],
|
|
1351
|
-
"reasons": [
|
|
1352
|
-
{
|
|
1353
|
-
"severity": "warning",
|
|
1354
|
-
"signal": "score_trend",
|
|
1355
|
-
"message": "Recent evaluation scores are trending down.",
|
|
1356
|
-
"weight": -12
|
|
1357
|
-
}
|
|
1358
|
-
],
|
|
1359
|
-
"evidenceWindow": {
|
|
1360
|
-
"evaluationCount": 5,
|
|
1361
|
-
"callCount": 42,
|
|
1362
|
-
"fingerprintSampleCount": 5,
|
|
1363
|
-
"from": "2026-07-01T12:00:00.000Z",
|
|
1364
|
-
"to": "2026-07-13T12:00:00.000Z"
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
```
|
|
1369
|
-
|
|
1370
|
-
---
|
|
1371
|
-
|
|
1372
|
-
### GET /operator/analytics/agents/:agentId/prediction
|
|
1373
|
-
|
|
1374
|
-
Fetch only the predictive risk forecast for one agent. Requires JWT.
|
|
1375
|
-
|
|
1376
|
-
Use this when you want to show a pre-action warning, trigger a new sandbox test, or decide whether the next request should be allowed, throttled, stepped up, sandboxed, or denied.
|
|
1377
|
-
|
|
1378
|
-
Before using persisted prediction snapshots in a new edge-proxy deployment, apply database migrations:
|
|
1379
|
-
|
|
1380
|
-
```bash
|
|
1381
|
-
pnpm --filter edge-proxy db:migrate
|
|
1382
|
-
```
|
|
1383
|
-
|
|
1384
|
-
| Field | Type | Description |
|
|
1385
|
-
|-------|------|-------------|
|
|
1386
|
-
| `predictedNextScore` | number | Forecasted next Valiron score on a 0-110 scale |
|
|
1387
|
-
| `passProbability` | number | Estimated probability that the next evaluation/action passes policy |
|
|
1388
|
-
| `riskDirection` | string | `improving`, `stable`, `worsening`, or `unknown` |
|
|
1389
|
-
| `confidence` | string | `low`, `medium`, or `high` based on evidence volume |
|
|
1390
|
-
| `recommendedPolicy` | string | `allow`, `throttle`, `sandbox`, `step_up`, or `deny` |
|
|
1391
|
-
| `recommendedTests` | string[] | Test families most relevant to run next |
|
|
1392
|
-
| `reasons` | object[] | Human-readable signals explaining the forecast |
|
|
1393
|
-
|
|
1394
|
-
---
|
|
1395
|
-
|
|
1396
|
-
### GET /operator/analytics/logs
|
|
1397
|
-
|
|
1398
|
-
Paginated call logs. Requires JWT.
|
|
1399
|
-
|
|
1400
|
-
| Parameter | Type | Default | Description |
|
|
1401
|
-
|-----------|------|---------|-------------|
|
|
1402
|
-
| `limit` | number | 50 | Page size |
|
|
1403
|
-
| `offset` | number | 0 | Offset |
|
|
1404
|
-
| `days` | number | — | Filter to last N days |
|
|
1405
|
-
| `agentId` | string | — | Filter by agent |
|
|
1406
|
-
| `endpointId` | string | — | Filter by endpoint |
|
|
1407
|
-
|
|
1408
|
-
---
|
|
1409
|
-
|
|
1410
|
-
### POST /operator/playground
|
|
1411
|
-
|
|
1412
|
-
Execute a test request through the edge proxy as a simulated agent. Requires JWT. See [DASHBOARD.md — API Playground](./DASHBOARD.md#api-playground).
|
|
1413
|
-
|
|
1414
|
-
#### Request Body
|
|
1415
|
-
|
|
1416
|
-
```json
|
|
1417
|
-
{
|
|
1418
|
-
"method": "GET",
|
|
1419
|
-
"path": "/api/v1/weather?city=NYC",
|
|
1420
|
-
"headers": { "Content-Type": "application/json" },
|
|
1421
|
-
"body": null,
|
|
1422
|
-
"agentId": "25459",
|
|
1423
|
-
"chain": "ethereum",
|
|
1424
|
-
"dryRun": false
|
|
1425
|
-
}
|
|
1426
|
-
```
|
|
1427
|
-
|
|
1428
|
-
| Field | Type | Required | Description |
|
|
1429
|
-
|-------|------|----------|-------------|
|
|
1430
|
-
| `path` | string | yes | Target path or absolute URL |
|
|
1431
|
-
| `agentId` | string | yes | ERC-8004 agent ID to simulate |
|
|
1432
|
-
| `method` | string | no | HTTP method (default: `GET`) |
|
|
1433
|
-
| `headers` | object | no | Custom request headers |
|
|
1434
|
-
| `body` | string | no | Request body (for POST/PUT/PATCH) |
|
|
1435
|
-
| `chain` | string | no | Chain (default: `ethereum`) |
|
|
1436
|
-
| `dryRun` | boolean | no | If `true`, returns trust evaluation without logging the call |
|
|
1437
1009
|
|
|
1438
|
-
|
|
1010
|
+
## Crawler Protection telemetry (Free / Pro / Enterprise)
|
|
1439
1011
|
|
|
1440
|
-
|
|
1441
|
-
{
|
|
1442
|
-
"ok": true,
|
|
1443
|
-
"statusCode": 200,
|
|
1444
|
-
"statusText": "OK",
|
|
1445
|
-
"responseHeaders": {},
|
|
1446
|
-
"responseBody": "<downstream response body or trust evaluation JSON>",
|
|
1447
|
-
"responseMs": 145,
|
|
1448
|
-
"costCharged": "0.0500",
|
|
1449
|
-
"route": "prod",
|
|
1450
|
-
"tierResolved": "AA"
|
|
1451
|
-
}
|
|
1452
|
-
```
|
|
1453
|
-
|
|
1454
|
-
#### Response — 200 OK (dry-run mode)
|
|
1455
|
-
|
|
1456
|
-
```json
|
|
1457
|
-
{
|
|
1458
|
-
"ok": true,
|
|
1459
|
-
"statusCode": null,
|
|
1460
|
-
"statusText": null,
|
|
1461
|
-
"responseHeaders": {},
|
|
1462
|
-
"responseBody": "{\"dryRun\":true,\"message\":\"Routing and pricing validated — request was not forwarded to your backend\",\"agentId\":\"25459\",\"chain\":\"ethereum\",\"tier\":\"AA\",\"route\":\"prod\",\"pricePerCall\":\"0.0500\",\"endpointRegistered\":true,\"trustProfile\":{\"onchainScore\":92.5,\"feedbackCount\":\"12\",\"routingDecision\":null}}",
|
|
1463
|
-
"responseMs": null,
|
|
1464
|
-
"costCharged": "0.0500",
|
|
1465
|
-
"route": "prod",
|
|
1466
|
-
"tierResolved": "AA"
|
|
1467
|
-
}
|
|
1468
|
-
```
|
|
1469
|
-
|
|
1470
|
-
---
|
|
1012
|
+
`POST /operator/crawlers/telemetry` accepts bounded cumulative reports using a server-side operator API key. `GET /operator/crawlers/analytics` uses the dashboard operator session and returns only that account's rolling origin metrics, instance status, shared capacity and monitoring alerts. Neither endpoint accepts a caller-selected account. Both require current Free/Pro/Enterprise access and return private, non-cacheable responses. Invalid snapshots return 400, authentication failures 401, plan/tenant failures 403, counter/cardinality conflicts 409, excessive reporting frequency 429 and unavailable storage 503. Duplicate or older sequences return `{ "accepted": false }` without adding counts. The first accepted report establishes a baseline. See [reporting setup and limits](./CRAWLER-PROTECTION.md#live-dashboard-analytics). The private work-admission API remains on customer infrastructure.
|