@absol-labs/agent 0.10.0 → 0.11.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 +107 -23
- package/dist/capability/invocation-capability.d.ts +18 -6
- package/dist/capability/invocation-capability.d.ts.map +1 -1
- package/dist/capability/invocation-capability.js.map +1 -1
- package/dist/cli/commands/claim.d.ts.map +1 -1
- package/dist/cli/commands/claim.js +20 -4
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.d.ts.map +1 -1
- package/dist/cli/commands/close.js +16 -4
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/invoke.d.ts.map +1 -1
- package/dist/cli/commands/invoke.js +1 -0
- package/dist/cli/commands/invoke.js.map +1 -1
- package/dist/cli/commands/open.d.ts.map +1 -1
- package/dist/cli/commands/open.js +63 -11
- package/dist/cli/commands/open.js.map +1 -1
- package/dist/cli/commands/reclaim-unverified.d.ts.map +1 -1
- package/dist/cli/commands/reclaim-unverified.js +12 -4
- package/dist/cli/commands/reclaim-unverified.js.map +1 -1
- package/dist/cli/commands/reclaim.d.ts.map +1 -1
- package/dist/cli/commands/reclaim.js +16 -5
- package/dist/cli/commands/reclaim.js.map +1 -1
- package/dist/cli/commands/streams.js +1 -1
- package/dist/cli/commands/streams.js.map +1 -1
- package/dist/cli/deps.d.ts +53 -7
- package/dist/cli/deps.d.ts.map +1 -1
- package/dist/cli/deps.js +65 -15
- package/dist/cli/deps.js.map +1 -1
- package/dist/cli/privy.d.ts +83 -0
- package/dist/cli/privy.d.ts.map +1 -0
- package/dist/cli/privy.js +230 -0
- package/dist/cli/privy.js.map +1 -0
- package/dist/cli/spend-policy.d.ts +60 -0
- package/dist/cli/spend-policy.d.ts.map +1 -0
- package/dist/cli/spend-policy.js +65 -0
- package/dist/cli/spend-policy.js.map +1 -0
- package/dist/cli/wallet.d.ts +108 -39
- package/dist/cli/wallet.d.ts.map +1 -1
- package/dist/cli/wallet.js +108 -43
- package/dist/cli/wallet.js.map +1 -1
- package/dist/gateway/caller-auth-gateway.d.ts +38 -3
- package/dist/gateway/caller-auth-gateway.d.ts.map +1 -1
- package/dist/gateway/caller-auth-gateway.js +25 -1
- package/dist/gateway/caller-auth-gateway.js.map +1 -1
- package/dist/gateway/http-server.d.ts +53 -0
- package/dist/gateway/http-server.d.ts.map +1 -1
- package/dist/gateway/http-server.js +189 -4
- package/dist/gateway/http-server.js.map +1 -1
- package/dist/gateway/x402-mode.d.ts +123 -0
- package/dist/gateway/x402-mode.d.ts.map +1 -0
- package/dist/gateway/x402-mode.js +212 -0
- package/dist/gateway/x402-mode.js.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/mandates/env.d.ts +3 -2
- package/dist/mandates/env.d.ts.map +1 -1
- package/dist/mandates/env.js +3 -2
- package/dist/mandates/env.js.map +1 -1
- package/dist/mcp/server.d.ts +49 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +513 -24
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/service-invoker.d.ts +97 -0
- package/dist/mcp/service-invoker.d.ts.map +1 -0
- package/dist/mcp/service-invoker.js +167 -0
- package/dist/mcp/service-invoker.js.map +1 -0
- package/dist/sdk/invoke.d.ts +19 -4
- package/dist/sdk/invoke.d.ts.map +1 -1
- package/dist/sdk/invoke.js +69 -5
- package/dist/sdk/invoke.js.map +1 -1
- package/dist/x402/delivery-oracle.d.ts +108 -0
- package/dist/x402/delivery-oracle.d.ts.map +1 -0
- package/dist/x402/delivery-oracle.js +174 -0
- package/dist/x402/delivery-oracle.js.map +1 -0
- package/dist/x402/facilitator-server-entry.d.ts +3 -0
- package/dist/x402/facilitator-server-entry.d.ts.map +1 -0
- package/dist/x402/facilitator-server-entry.js +27 -0
- package/dist/x402/facilitator-server-entry.js.map +1 -0
- package/dist/x402/facilitator-server.d.ts +73 -0
- package/dist/x402/facilitator-server.d.ts.map +1 -0
- package/dist/x402/facilitator-server.js +305 -0
- package/dist/x402/facilitator-server.js.map +1 -0
- package/dist/x402/facilitator.d.ts +69 -17
- package/dist/x402/facilitator.d.ts.map +1 -1
- package/dist/x402/facilitator.js +76 -33
- package/dist/x402/facilitator.js.map +1 -1
- package/dist/x402/payment-requirements.d.ts +106 -0
- package/dist/x402/payment-requirements.d.ts.map +1 -0
- package/dist/x402/payment-requirements.js +138 -0
- package/dist/x402/payment-requirements.js.map +1 -0
- package/dist/x402/relayer.d.ts +41 -0
- package/dist/x402/relayer.d.ts.map +1 -0
- package/dist/x402/relayer.js +64 -0
- package/dist/x402/relayer.js.map +1 -0
- package/dist/x402/resource-index.d.ts +75 -0
- package/dist/x402/resource-index.d.ts.map +1 -0
- package/dist/x402/resource-index.js +126 -0
- package/dist/x402/resource-index.js.map +1 -0
- package/dist/x402/verified-delivery-facilitator.d.ts +285 -0
- package/dist/x402/verified-delivery-facilitator.d.ts.map +1 -0
- package/dist/x402/verified-delivery-facilitator.js +423 -0
- package/dist/x402/verified-delivery-facilitator.js.map +1 -0
- package/dist/zktls/t2-delivery-proof.d.ts +6 -6
- package/docs/agent-layer.md +12 -8
- package/docs/cli.md +158 -22
- package/docs/mcp-hosted.md +4 -3
- package/docs/mcp-reference.md +175 -0
- package/docs/quickstart.md +18 -4
- package/docs/threat-model.md +4 -3
- package/docs/x402.md +648 -0
- package/package.json +18 -7
- package/src/capability/invocation-capability.ts +17 -1
- package/src/cli/commands/claim.ts +30 -4
- package/src/cli/commands/close.ts +20 -4
- package/src/cli/commands/invoke.ts +1 -0
- package/src/cli/commands/open.ts +76 -10
- package/src/cli/commands/reclaim-unverified.ts +16 -4
- package/src/cli/commands/reclaim.ts +22 -5
- package/src/cli/commands/streams.ts +1 -1
- package/src/cli/deps.ts +115 -24
- package/src/cli/privy.ts +396 -0
- package/src/cli/spend-policy.ts +139 -0
- package/src/cli/wallet.ts +188 -57
- package/src/gateway/caller-auth-gateway.ts +77 -6
- package/src/gateway/http-server.ts +280 -6
- package/src/gateway/x402-mode.ts +350 -0
- package/src/index.ts +40 -5
- package/src/mandates/env.ts +3 -2
- package/src/mcp/server.ts +681 -29
- package/src/mcp/service-invoker.ts +285 -0
- package/src/sdk/invoke.ts +90 -12
- package/src/x402/delivery-oracle.ts +285 -0
- package/src/x402/facilitator-server-entry.ts +35 -0
- package/src/x402/facilitator-server.ts +445 -0
- package/src/x402/facilitator.ts +125 -46
- package/src/x402/payment-requirements.ts +231 -0
- package/src/x402/relayer.ts +122 -0
- package/src/x402/resource-index.ts +228 -0
- package/src/x402/verified-delivery-facilitator.ts +744 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { buildMetrikPaymentRequirements, buildX402PaymentRequiredBody, } from "../x402/payment-requirements.js";
|
|
2
|
+
/**
|
|
3
|
+
* Standard x402 mode for the seller-side gateway (Tier 1).
|
|
4
|
+
*
|
|
5
|
+
* The gateway already authorizes requests that carry a Metrik
|
|
6
|
+
* `InvocationCapability` — a buyer with an open, funded, verified stream. That
|
|
7
|
+
* path is untouched. This module adds a SECOND, independent way in: a request
|
|
8
|
+
* with no capability gets an ordinary HTTP `402` carrying real x402
|
|
9
|
+
* `PaymentRequirements`, so an agent holding nothing but `x402-fetch` can pay
|
|
10
|
+
* per call without knowing Metrik exists.
|
|
11
|
+
*
|
|
12
|
+
* ## The two paths never overlap
|
|
13
|
+
*
|
|
14
|
+
* - capability header present -> stream path, exactly as before;
|
|
15
|
+
* - capability header absent, x402 mode on -> `402` + `PaymentRequirements`;
|
|
16
|
+
* - BOTH present -> rejected. A request that looks like both is ambiguous about
|
|
17
|
+
* which one is paying for it, and the failure mode of guessing is charging the
|
|
18
|
+
* caller twice for one call. Better a loud `400` than a silent double charge.
|
|
19
|
+
*
|
|
20
|
+
* ## The per-call price is the seller's, and is not signed
|
|
21
|
+
*
|
|
22
|
+
* `payTo` comes from the operator-signed descriptor (see
|
|
23
|
+
* `../x402/payment-requirements.ts`). The price does not — the descriptor has no
|
|
24
|
+
* per-call price field. It is the seller's own number on the seller's own
|
|
25
|
+
* gateway, which is legitimate, but a buyer cannot cross-check it against the
|
|
26
|
+
* registry the way they can cross-check the payee.
|
|
27
|
+
*/
|
|
28
|
+
/** Request header carrying the x402 payment payload (x402 v1). */
|
|
29
|
+
export const X402_PAYMENT_HEADER = "x-payment";
|
|
30
|
+
/** Response header carrying the settlement result (x402 v1). */
|
|
31
|
+
export const X402_PAYMENT_RESPONSE_HEADER = "x-payment-response";
|
|
32
|
+
/**
|
|
33
|
+
* Talks to any x402 facilitator over HTTP — including Metrik's own
|
|
34
|
+
* (`../x402/facilitator-server.ts`), which is the point: a seller who wires this
|
|
35
|
+
* gateway to the Metrik facilitator gets a paywall whose payments stop when
|
|
36
|
+
* their own delivery stops being verifiable.
|
|
37
|
+
*/
|
|
38
|
+
export function createHttpFacilitatorClient(options) {
|
|
39
|
+
const base = options.url.replace(/\/+$/, "");
|
|
40
|
+
const timeoutMs = options.timeoutMs ?? 10_000;
|
|
41
|
+
const doFetch = options.fetch ?? globalThis.fetch;
|
|
42
|
+
async function post(path, body) {
|
|
43
|
+
const controller = new AbortController();
|
|
44
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
45
|
+
try {
|
|
46
|
+
const response = await doFetch(`${base}${path}`, {
|
|
47
|
+
method: "POST",
|
|
48
|
+
headers: {
|
|
49
|
+
"content-type": "application/json",
|
|
50
|
+
...(options.token === undefined
|
|
51
|
+
? {}
|
|
52
|
+
: { authorization: `Bearer ${options.token}` }),
|
|
53
|
+
...(options.headers ?? {}),
|
|
54
|
+
},
|
|
55
|
+
body: JSON.stringify(body),
|
|
56
|
+
signal: controller.signal,
|
|
57
|
+
});
|
|
58
|
+
return await response.json();
|
|
59
|
+
}
|
|
60
|
+
finally {
|
|
61
|
+
clearTimeout(timer);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
async verify(payload, requirements) {
|
|
66
|
+
const result = (await post("/verify", {
|
|
67
|
+
x402Version: 1,
|
|
68
|
+
paymentPayload: payload,
|
|
69
|
+
paymentRequirements: requirements,
|
|
70
|
+
}));
|
|
71
|
+
// Fail closed: an unreadable facilitator answer is not a pass.
|
|
72
|
+
if (typeof result !== "object" || result === null) {
|
|
73
|
+
return { isValid: false, invalidReason: "unexpected_verify_error" };
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
},
|
|
77
|
+
async settle(payload, requirements) {
|
|
78
|
+
return (await post("/settle", {
|
|
79
|
+
x402Version: 1,
|
|
80
|
+
paymentPayload: payload,
|
|
81
|
+
paymentRequirements: requirements,
|
|
82
|
+
}));
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/** One flat price per call, quoted against the request's own path. */
|
|
87
|
+
export function createListingPriceQuoter(options) {
|
|
88
|
+
const base = new URL(options.resourceBaseUrl);
|
|
89
|
+
return (request) => [
|
|
90
|
+
buildMetrikPaymentRequirements({
|
|
91
|
+
listing: options.listing,
|
|
92
|
+
resource: new URL(request.path, base).toString(),
|
|
93
|
+
priceBaseUnits: options.pricePerCallBaseUnits,
|
|
94
|
+
chainId: options.chainId,
|
|
95
|
+
...(options.description === undefined
|
|
96
|
+
? {}
|
|
97
|
+
: { description: options.description }),
|
|
98
|
+
...(options.mimeType === undefined ? {} : { mimeType: options.mimeType }),
|
|
99
|
+
...(options.maxTimeoutSeconds === undefined
|
|
100
|
+
? {}
|
|
101
|
+
: { maxTimeoutSeconds: options.maxTimeoutSeconds }),
|
|
102
|
+
...(options.asset === undefined ? {} : { asset: options.asset }),
|
|
103
|
+
}),
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Evaluates the x402 half of a request. Returns either the `402` body to send or
|
|
108
|
+
* an accepted payment to settle after the upstream has been called.
|
|
109
|
+
*/
|
|
110
|
+
export async function evaluateX402Request(request, paymentHeader, mode) {
|
|
111
|
+
const accepts = await mode.quote(request);
|
|
112
|
+
if (paymentHeader === undefined || paymentHeader.trim().length === 0) {
|
|
113
|
+
return {
|
|
114
|
+
outcome: "payment-required",
|
|
115
|
+
body: buildX402PaymentRequiredBody(accepts),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
const payload = decodePaymentHeader(paymentHeader);
|
|
119
|
+
if (payload === undefined) {
|
|
120
|
+
return {
|
|
121
|
+
outcome: "payment-required",
|
|
122
|
+
body: buildX402PaymentRequiredBody(accepts, "X-PAYMENT header is not base64-encoded JSON"),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const requirements = selectRequirements(accepts, payload);
|
|
126
|
+
if (requirements === undefined) {
|
|
127
|
+
return {
|
|
128
|
+
outcome: "payment-required",
|
|
129
|
+
body: buildX402PaymentRequiredBody(accepts, "X-PAYMENT does not match any offered payment requirements"),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
let verified;
|
|
133
|
+
try {
|
|
134
|
+
verified = await mode.facilitator.verify(payload, requirements);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
// An unreachable facilitator is a refusal, never a free call.
|
|
138
|
+
return {
|
|
139
|
+
outcome: "payment-required",
|
|
140
|
+
body: buildX402PaymentRequiredBody(accepts, `payment could not be verified: ${error instanceof Error ? error.message : "facilitator unreachable"}`),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
if (!verified.isValid) {
|
|
144
|
+
return {
|
|
145
|
+
outcome: "payment-required",
|
|
146
|
+
body: buildX402PaymentRequiredBody(accepts, verified.invalidReason ?? "payment rejected by facilitator"),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
// A Metrik facilitator reports up front whether it would actually broadcast
|
|
150
|
+
// this payment (asset allowlist, settlement scope, ...). Refusing HERE — before
|
|
151
|
+
// the upstream runs — is the difference between "the caller gets nothing" and
|
|
152
|
+
// "the caller gets the upstream's side effects for free and we cannot charge
|
|
153
|
+
// for them". A non-Metrik facilitator omits the field and nothing changes.
|
|
154
|
+
const annotation = verified.metrik;
|
|
155
|
+
if (annotation?.settleable === false) {
|
|
156
|
+
return {
|
|
157
|
+
outcome: "payment-required",
|
|
158
|
+
body: buildX402PaymentRequiredBody(accepts, `facilitator will not settle this payment: ${annotation.detail ?? "refused"}`),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
const validBefore = readValidBefore(payload);
|
|
162
|
+
return {
|
|
163
|
+
outcome: "accepted",
|
|
164
|
+
payment: {
|
|
165
|
+
payload,
|
|
166
|
+
requirements,
|
|
167
|
+
...(verified.payer === undefined ? {} : { payer: verified.payer }),
|
|
168
|
+
...(validBefore === undefined ? {} : { validBefore }),
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/** Reads the exact-EVM authorization deadline, if the payload has one. */
|
|
173
|
+
function readValidBefore(payload) {
|
|
174
|
+
const authorization = payload?.payload?.authorization;
|
|
175
|
+
const raw = authorization?.validBefore;
|
|
176
|
+
if (typeof raw !== "string" && typeof raw !== "number") {
|
|
177
|
+
return undefined;
|
|
178
|
+
}
|
|
179
|
+
const parsed = Number(raw);
|
|
180
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Seconds of headroom the settlement leg needs after the upstream returns.
|
|
184
|
+
*
|
|
185
|
+
* The x402 `exact` verifier rejects an authorization whose `validBefore` is less
|
|
186
|
+
* than 6 s away, so an upstream allowed to run right up to the deadline would
|
|
187
|
+
* hand back a response that can never be settled. This leaves room for that
|
|
188
|
+
* check plus the settle round trip.
|
|
189
|
+
*/
|
|
190
|
+
export const X402_SETTLEMENT_HEADROOM_SECONDS = 10;
|
|
191
|
+
/** Matches the payload's scheme+network against the quotes actually offered. */
|
|
192
|
+
function selectRequirements(accepts, payload) {
|
|
193
|
+
if (typeof payload !== "object" || payload === null) {
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
const { scheme, network } = payload;
|
|
197
|
+
return accepts.find((candidate) => candidate.scheme === scheme && candidate.network === network);
|
|
198
|
+
}
|
|
199
|
+
export function decodePaymentHeader(header) {
|
|
200
|
+
try {
|
|
201
|
+
const decoded = Buffer.from(header.trim(), "base64").toString("utf8");
|
|
202
|
+
const parsed = JSON.parse(decoded);
|
|
203
|
+
return typeof parsed === "object" && parsed !== null ? parsed : undefined;
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
return undefined;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
export function encodeSettleResponseHeader(response) {
|
|
210
|
+
return Buffer.from(JSON.stringify(response), "utf8").toString("base64");
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=x402-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x402-mode.js","sourceRoot":"","sources":["../../src/gateway/x402-mode.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,GAI7B,MAAM,iCAAiC,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAoB,CAAC;AAExD,gEAAgE;AAChE,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAA6B,CAAC;AA4B1E;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACzC,OAAqC;IAErC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,MAAM,CAAC;IAC9C,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC;IAElD,KAAK,UAAU,IAAI,CAAC,IAAY,EAAE,IAAa;QAC7C,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,UAAU,CAA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Mandate, checkMandatePolicy, verifySignedMandate, verifyMandateOwnerSignature, spendMandateDomain, spendMandateTypedData, type SpendMandate, type SignedSpendMandate, type HireRequest, type MandateDecision, type MandateVerificationContext, } from "./mandates/mandate.js";
|
|
2
2
|
export { DEFAULT_SERVER_MANDATE_TTL_SECONDS, ServerMandateConfigError, parseServerMandateCapsEnv, signServerMandate, type ServerMandateCaps, type SignServerMandateOptions, } from "./mandates/env.js";
|
|
3
|
-
export {
|
|
3
|
+
export { METRIK_PAYMENT_HEADER, METRIK_STREAM_SCHEME, VerifiedStreamFacilitator, DeliveryProofUnavailableError, SettlementTargetMismatchError, SpendControlUnavailableError, StreamPayloadError, encodeStreamPayloadHeader, parseStreamChallengeJson, parseStreamPayloadHeader, streamChallengeSchema, streamOpenPayloadSchema, verifiedStreamRequirementsSchema, type ConsumedHttpsResponseProofInput, type StreamChallenge, type StreamFacilitator, type StreamOpenPayload, type VerifiedStreamFacilitatorOptions, type VerifiedStreamRequirements, } from "./x402/facilitator.js";
|
|
4
|
+
export { VerifiedStreamX402Facilitator, X402PayloadError, X402SpendControlUnavailableError, X402_SCHEME, encodeX402PayloadHeader, parseX402ChallengeJson, parseX402PayloadHeader, x402StreamChallengeSchema, x402OpenPayloadSchema, type X402ConsumedHttpsResponseProofInput, type X402Facilitator, type X402OpenPayload, type X402StreamChallenge, } from "./x402/facilitator.js";
|
|
4
5
|
export { DEFAULT_METRIK_PUBLIC_REGISTRY_URL, DEFAULT_METRIK_REGISTRY_URL, DEMO_SEED_LISTING, DEMO_SEED_SERVICE_REF, LIVE_DATA_SEED_LISTING, LIVE_DATA_SEED_SERVICE_REF, RegistryUnavailableError, discoverServices, discoverServicesDetailed, type DiscoverResult, type DiscoverServicesOptions, type DiscoveredService, type ServiceListing, } from "./discovery/registry.js";
|
|
5
|
-
export { METRIK_MCP_TOOLS, STREAMPROOF_MCP_TOOLS, FileStreamRegistry, InMemoryStreamRegistry, createVerifiedStreamMcpServer, createVerifiedStreamMcpServerFromEnv, createVerifiedStreamMcpServerOptionsFromEnv, parseMetrikAgentEnv, startVerifiedStreamMcpServerStdio, type McpToolSpec, type ParsedMetrikAgentEnv, type StoredStreamRecord, type StreamRegistry, type VerifiedStreamMcpClient, type VerifiedStreamMcpServerOptions, type VerifiedStreamMcpServerRuntime, } from "./mcp/server.js";
|
|
6
|
+
export { ALLOW_UNVERIFIED_OPERATOR_ENV, METERING_MODEL, METRIK_MCP_TOOLS, STREAMPROOF_MCP_TOOLS, FileStreamRegistry, InMemoryStreamRegistry, createVerifiedStreamMcpServer, createVerifiedStreamMcpServerFromEnv, createVerifiedStreamMcpServerOptionsFromEnv, parseMetrikAgentEnv, startVerifiedStreamMcpServerStdio, type EscrowGeneration, type McpToolSpec, type ParsedMetrikAgentEnv, type StoredStreamRecord, type StreamRegistry, type VerifiedStreamMcpClient, type VerifiedStreamMcpServerOptions, type VerifiedStreamMcpServerRuntime, } from "./mcp/server.js";
|
|
7
|
+
export { MAX_INVOCATION_RESPONSE_BYTES, ServiceListingNotFoundError, createServiceInvoker, type CreateServiceInvokerOptions, type ServiceInvocationRequest, type ServiceInvocationResult, type ServiceInvoker, } from "./mcp/service-invoker.js";
|
|
6
8
|
export { StaticTenantResolver, createHostedMcpHttpServer, createHostedMcpTenants, parseHostedMcpServerConfig, startHostedMcpHttpServerFromEnv, type HostedMcpHttpServer, type HostedMcpHttpServerOptions, type HostedMcpServerConfig, type HostedMcpTenant, type HostedMcpTenantConfig, type TenantResolver, } from "./mcp/http.js";
|
|
7
9
|
export { MandateDeniedError, VerifiedStreamAgentClient, type AgentSdkClient, type AgentSdkClientFactory, type MandateAuthorizedStreamActionInput, type OpenVerifiedStreamInput, type ReclaimAuthorizedStreamInput, type ReclaimVerifiedStreamOptions, type ReclaimVerifiedStreamResult, isCheckpointStream, type StreamStatusStream, type StreamStatusView, type VerifiedStreamAgentOpener, } from "./sdk/client.js";
|
|
8
10
|
export { AgentWalletConfigError, createPrivyEmbeddedAccount, createWalletBackedAgentClient, parseAgentWalletEnv, PrivyEmbeddedWalletError, resolveAgentWallet, type AgentWalletInput, type CdpClientLike, type CdpWalletConfig, type PrivyEip1193Provider, type PrivyEmbeddedWalletConfig, type ResolvedAgentWallet, type WalletBackedAgentClient, } from "./wallet/provider.js";
|
|
@@ -14,8 +16,8 @@ export { AutonomousWalletBroker, AutonomousWalletBrokerError, InMemoryAutonomous
|
|
|
14
16
|
export { UnsupportedFaucetChainError, faucetHint, getWalletBalances, requestCdpFaucet, type BalanceReader, type CdpFaucetClientLike, type FaucetHint, type FaucetRequestResult, type FaucetToken, type GetWalletBalancesOptions, type RequestCdpFaucetOptions, type WalletBalances, } from "./wallet/lifecycle.js";
|
|
15
17
|
export { ReclaimConsumerProofService, ResponseProofUnavailableError, ResponseProofVerificationError, buildDeliveryContextEnvelopeV2, createReclaimConsumerProofServiceFromEnv, deliveryContextEnvelopeV2Schema, parseReclaimProofEnv, type ConsumerDeliveryProofService, type DeliveryContextEnvelopeV2, type DeliveryContextEnvelopeV2Input, type DeliveryProofBinding, type HttpsResponseMatch, type HttpsResponseRedaction, type ParsedReclaimProofEnv, type ProveConsumedHttpsResponseInput, type ReclaimClientLike, type ReclaimProof, type ReclaimProofServiceConfig, type VerifiedConsumedHttpsResponseProof, type VerifyProofFn, } from "./zktls/reclaim.js";
|
|
16
18
|
export { NoDeliveryAttestorConfiguredError, PaidRouteNonceInjectionError, ReclaimDeliveryProofAttestor, buildT2DeliveryProofSubmission, createReclaimT2AttestorFromEnv, deliveryProofRequestBodySchema, toWireDeliveryReceipt, type BuildT2DeliveryProofInput, type BuildT2DeliveryProofResult, type DeliveryProofAttestor, type DeliveryProofRequestBody, type PaidRouteRequestSpec, type ProveDeliveryResponseInput, type T2NonceInjection, type WireDeliveryReceipt, } from "./zktls/t2-delivery-proof.js";
|
|
17
|
-
export { CAPABILITY_HEADER_NAME, DEFAULT_CAPABILITY_TTL_SECONDS, InvalidCapabilityHeaderError, buildInvocationCapabilityTypedData, createInvocationCapabilityEip712Domain, decodeCapabilityHeader, encodeCapabilityHeader, generateCapabilityNonce, hashInvocationPath, httpMethodSchema, invocationCapabilityDomainName, invocationCapabilityDomainVersion, invocationCapabilitySchema, invocationCapabilityTypedData, normalizeInvocationPath, recoverInvocationCapabilitySigner, signInvocationCapability, signedInvocationCapabilitySchema, type HttpMethod, type InvocationCapability, type InvocationCapabilityDomainInput, type SignedInvocationCapability, } from "./capability/invocation-capability.js";
|
|
19
|
+
export { CAPABILITY_HEADER_NAME, DEFAULT_CAPABILITY_TTL_SECONDS, InvalidCapabilityHeaderError, buildInvocationCapabilityTypedData, createInvocationCapabilityEip712Domain, decodeCapabilityHeader, encodeCapabilityHeader, generateCapabilityNonce, hashInvocationPath, httpMethodSchema, invocationCapabilityDomainName, invocationCapabilityDomainVersion, invocationCapabilitySchema, invocationCapabilityTypedData, normalizeInvocationPath, recoverInvocationCapabilitySigner, signInvocationCapability, signedInvocationCapabilitySchema, type HttpMethod, type InvocationCapability, type InvocationCapabilityDomainInput, type InvocationCapabilitySigner, type SignedInvocationCapability, } from "./capability/invocation-capability.js";
|
|
18
20
|
export { CallerAuthGateway, DEFAULT_MAX_STATE_STALENESS_SECONDS, InMemoryNonceReplayCache, InMemoryStreamRevocationSet, MAX_CORROBORATING_STREAM_READERS, UnknownStreamGatewayError, createSdkStreamReader, type CallerAuthDecision, type CallerAuthDenialReason, type CallerAuthGatewayConfig, type CallerAuthRequestInput, type GatewayStreamView, type NonceReplayCache, type StreamReader, type StreamRevocationSet, } from "./gateway/caller-auth-gateway.js";
|
|
19
21
|
export { createCallerAuthGatewayServer, parseCallerAuthGatewayEnvConfig, startCallerAuthGatewayServerFromEnv, type CallerAuthGatewayEnvConfig, type CallerAuthGatewayServer, type CallerAuthGatewayServerConfig, } from "./gateway/http-server.js";
|
|
20
|
-
export { InvokeBuyerMismatchError, InvokeAccessUrlError, InvokePathError, InvokeServiceRefMismatchError, InvokeStreamExpiredError, InvokeStreamNotActiveError, capabilityFor, createSdkInvokeStreamReader, invoke, invokeWithT2DeliveryProof, type CapabilityForOptions, type InvokeOptions, type InvokeResult, type InvokeServiceInput, type InvokeStreamReader, type InvokeStreamView, type InvokeWithT2DeliveryProofOptions, type InvokeWithT2DeliveryProofResult, } from "./sdk/invoke.js";
|
|
22
|
+
export { InvokeBuyerMismatchError, InvokeAccessUrlError, InvokePathError, resolveInvocationUrl, InvokeServiceRefMismatchError, InvokeStreamExpiredError, InvokeStreamNotActiveError, capabilityFor, createSdkInvokeStreamReader, invoke, invokeWithT2DeliveryProof, type CapabilityForOptions, type InvokeOptions, type InvokeResult, type InvokeServiceInput, type InvokeStreamReader, type InvokeStreamView, type InvokeWithT2DeliveryProofOptions, type InvokeWithT2DeliveryProofResult, } from "./sdk/invoke.js";
|
|
21
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,0BAA0B,GAChC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kCAAkC,EAClC,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB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uB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,iCAAiC,EACjC,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,iCAAiC,EACjC,wBAAwB,EACxB,gCAAgC,EAChC,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,GAChC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,iBAAiB,EACjB,mCAAmC,EACnC,wBAAwB,EACxB,2BAA2B,EAC3B,gCAAgC,EAChC,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,aAAa,EACb,2BAA2B,EAC3B,MAAM,EACN,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,GACrC,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export { createSpendMandateTypedData, spendMandateSchema, signedSpendMandateSchema, checkMandate, checkMandatePolicy, verifySignedMandate, verifyMandateOwnerSignature, spendMandateDomain, spendMandateTypedData, } from "./mandates/mandate.js";
|
|
2
2
|
export { DEFAULT_SERVER_MANDATE_TTL_SECONDS, ServerMandateConfigError, parseServerMandateCapsEnv, signServerMandate, } from "./mandates/env.js";
|
|
3
|
-
|
|
3
|
+
// Metrik-native 402 challenge flow. NOT the x402 protocol — see docs/x402.md.
|
|
4
|
+
export { METRIK_PAYMENT_HEADER, METRIK_STREAM_SCHEME, VerifiedStreamFacilitator, DeliveryProofUnavailableError, SettlementTargetMismatchError, SpendControlUnavailableError, StreamPayloadError, encodeStreamPayloadHeader, parseStreamChallengeJson, parseStreamPayloadHeader, streamChallengeSchema, streamOpenPayloadSchema, verifiedStreamRequirementsSchema, } from "./x402/facilitator.js";
|
|
5
|
+
// Deprecated `x402`-flavoured aliases of the exports above, kept for
|
|
6
|
+
// compatibility. Same values and same class objects — prefer the names above.
|
|
7
|
+
export { VerifiedStreamX402Facilitator, X402PayloadError, X402SpendControlUnavailableError, X402_SCHEME, encodeX402PayloadHeader, parseX402ChallengeJson, parseX402PayloadHeader, x402StreamChallengeSchema, x402OpenPayloadSchema, } from "./x402/facilitator.js";
|
|
4
8
|
export { DEFAULT_METRIK_PUBLIC_REGISTRY_URL, DEFAULT_METRIK_REGISTRY_URL, DEMO_SEED_LISTING, DEMO_SEED_SERVICE_REF, LIVE_DATA_SEED_LISTING, LIVE_DATA_SEED_SERVICE_REF, RegistryUnavailableError, discoverServices, discoverServicesDetailed, } from "./discovery/registry.js";
|
|
5
|
-
export { METRIK_MCP_TOOLS, STREAMPROOF_MCP_TOOLS, FileStreamRegistry, InMemoryStreamRegistry, createVerifiedStreamMcpServer, createVerifiedStreamMcpServerFromEnv, createVerifiedStreamMcpServerOptionsFromEnv, parseMetrikAgentEnv, startVerifiedStreamMcpServerStdio, } from "./mcp/server.js";
|
|
9
|
+
export { ALLOW_UNVERIFIED_OPERATOR_ENV, METERING_MODEL, METRIK_MCP_TOOLS, STREAMPROOF_MCP_TOOLS, FileStreamRegistry, InMemoryStreamRegistry, createVerifiedStreamMcpServer, createVerifiedStreamMcpServerFromEnv, createVerifiedStreamMcpServerOptionsFromEnv, parseMetrikAgentEnv, startVerifiedStreamMcpServerStdio, } from "./mcp/server.js";
|
|
10
|
+
export { MAX_INVOCATION_RESPONSE_BYTES, ServiceListingNotFoundError, createServiceInvoker, } from "./mcp/service-invoker.js";
|
|
6
11
|
export { StaticTenantResolver, createHostedMcpHttpServer, createHostedMcpTenants, parseHostedMcpServerConfig, startHostedMcpHttpServerFromEnv, } from "./mcp/http.js";
|
|
7
12
|
export { MandateDeniedError, VerifiedStreamAgentClient, isCheckpointStream, } from "./sdk/client.js";
|
|
8
13
|
export { AgentWalletConfigError, createPrivyEmbeddedAccount, createWalletBackedAgentClient, parseAgentWalletEnv, PrivyEmbeddedWalletError, resolveAgentWallet, } from "./wallet/provider.js";
|
|
@@ -17,7 +22,7 @@ export { NoDeliveryAttestorConfiguredError, PaidRouteNonceInjectionError, Reclai
|
|
|
17
22
|
export { CAPABILITY_HEADER_NAME, DEFAULT_CAPABILITY_TTL_SECONDS, InvalidCapabilityHeaderError, buildInvocationCapabilityTypedData, createInvocationCapabilityEip712Domain, decodeCapabilityHeader, encodeCapabilityHeader, generateCapabilityNonce, hashInvocationPath, httpMethodSchema, invocationCapabilityDomainName, invocationCapabilityDomainVersion, invocationCapabilitySchema, invocationCapabilityTypedData, normalizeInvocationPath, recoverInvocationCapabilitySigner, signInvocationCapability, signedInvocationCapabilitySchema, } from "./capability/invocation-capability.js";
|
|
18
23
|
export { CallerAuthGateway, DEFAULT_MAX_STATE_STALENESS_SECONDS, InMemoryNonceReplayCache, InMemoryStreamRevocationSet, MAX_CORROBORATING_STREAM_READERS, UnknownStreamGatewayError, createSdkStreamReader, } from "./gateway/caller-auth-gateway.js";
|
|
19
24
|
export { createCallerAuthGatewayServer, parseCallerAuthGatewayEnvConfig, startCallerAuthGatewayServerFromEnv, } from "./gateway/http-server.js";
|
|
20
|
-
export { InvokeBuyerMismatchError, InvokeAccessUrlError, InvokePathError, InvokeServiceRefMismatchError, InvokeStreamExpiredError, InvokeStreamNotActiveError, capabilityFor, createSdkInvokeStreamReader, invoke, invokeWithT2DeliveryProof, } from "./sdk/invoke.js";
|
|
25
|
+
export { InvokeBuyerMismatchError, InvokeAccessUrlError, InvokePathError, resolveInvocationUrl, InvokeServiceRefMismatchError, InvokeStreamExpiredError, InvokeStreamNotActiveError, capabilityFor, createSdkInvokeStreamReader, invoke, invokeWithT2DeliveryProof, } from "./sdk/invoke.js";
|
|
21
26
|
// Framework adapters are NOT re-exported from this top-level barrel on purpose.
|
|
22
27
|
// Some of them (notably the Coinbase AgentKit adapter) pull heavy optional
|
|
23
28
|
// dependency graphs, so importing "@absol-labs/agent" must stay light and load
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GAMtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kCAAkC,EAClC,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,GAGlB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GAMtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kCAAkC,EAClC,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,GAGlB,MAAM,mBAAmB,CAAC;AAE3B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kC,EAClC,sCAAsC,EACtC,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,iCAAiC,EACjC,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,iCAAiC,EACjC,wBAAwB,EACxB,gCAAgC,GAMjC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,iBAAiB,EACjB,mCAAmC,EACnC,wBAAwB,EACxB,2BAA2B,EAC3B,gCAAgC,EAChC,yBAAyB,EACzB,qBAAqB,GAStB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,GAIpC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,aAAa,EACb,2BAA2B,EAC3B,MAAM,EACN,yBAAyB,GAS1B,MAAM,iBAAiB,CAAC;AAEzB,gFAAgF;AAChF,2EAA2E;AAC3E,+EAA+E;AAC/E,0EAA0E;AAC1E,2EAA2E;AAC3E,EAAE;AACF,uEAAuE;AACvE,iEAAiE;AACjE,sFAAsF;AACtF,oFAAoF"}
|
package/dist/mandates/env.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ import { type SignedSpendMandate } from "./mandate.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Server-side spend-mandate provisioning.
|
|
5
5
|
*
|
|
6
|
-
* The MCP/
|
|
7
|
-
* MCP, a paying agent
|
|
6
|
+
* The MCP / Metrik-402 fund-moving surface is driven by autonomous callers (an
|
|
7
|
+
* LLM over MCP, a paying agent driving Metrik's own `402` challenge flow — not
|
|
8
|
+
* the x402 protocol, see docs/x402.md) that CANNOT produce an EIP-712 signature. The
|
|
8
9
|
* spend mandate is therefore NOT a per-call argument — it is configured once, at
|
|
9
10
|
* the server's construction, exactly like the AgentKit action provider's
|
|
10
11
|
* `signedMandate`. The deploying operator declares the spend caps via env and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/mandates/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,OAAO,EACb,MAAM,MAAM,CAAC;AAGd,OAAO,EAGL,KAAK,kBAAkB,EAExB,MAAM,cAAc,CAAC;AAEtB
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/mandates/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,OAAO,EACb,MAAM,MAAM,CAAC;AAGd,OAAO,EAGL,KAAK,kBAAkB,EAExB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;GAeG;AAEH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAI5B;AAmBD,iFAAiF;AACjF,eAAO,MAAM,kCAAkC,QAAe,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAC;IACpD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,iBAAiB,GAAG,IAAI,CA4D1B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AA2BD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAyC7B"}
|
package/dist/mandates/env.js
CHANGED
|
@@ -4,8 +4,9 @@ import { createSpendMandateTypedData, signedSpendMandateSchema, } from "./mandat
|
|
|
4
4
|
/**
|
|
5
5
|
* Server-side spend-mandate provisioning.
|
|
6
6
|
*
|
|
7
|
-
* The MCP/
|
|
8
|
-
* MCP, a paying agent
|
|
7
|
+
* The MCP / Metrik-402 fund-moving surface is driven by autonomous callers (an
|
|
8
|
+
* LLM over MCP, a paying agent driving Metrik's own `402` challenge flow — not
|
|
9
|
+
* the x402 protocol, see docs/x402.md) that CANNOT produce an EIP-712 signature. The
|
|
9
10
|
* spend mandate is therefore NOT a per-call argument — it is configured once, at
|
|
10
11
|
* the server's construction, exactly like the AgentKit action provider's
|
|
11
12
|
* `signedMandate`. The deploying operator declares the spend caps via env and the
|
package/dist/mandates/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/mandates/env.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,GAEZ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,GAGzB,MAAM,cAAc,CAAC;AAEtB
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/mandates/env.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,GAEZ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,GAGzB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;GAeG;AAEH,MAA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AAS,GAAG,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC;IAE7C,MAAM,OAAO,GAAiB;QAC5B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;QAC/C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;QAC3C,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC;YAClC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAE;YAClD,CAAC,CAAC,EAAE,CAAC;QACP,SAAS;KACV,CAAC;IAEF,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7E,MAAM,SAAS,GAAG,2BAA2B,CAAC;QAC5C,SAAS;QACT,KAAK;QACL,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ;QACR,OAAO;KACR,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAEzD,OAAO,wBAAwB,CAAC,KAAK,CAAC;QACpC,SAAS;QACT,KAAK;QACL,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ;QACR,OAAO;QACP,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -5,12 +5,37 @@ import { type SignedSpendMandate } from "../mandates/mandate.js";
|
|
|
5
5
|
import { type ReclaimAuthorizedStreamInput, type ReclaimVerifiedStreamResult, type StreamStatusView, type VerifiedStreamAgentOpener } from "../sdk/client.js";
|
|
6
6
|
import { type AgentWalletInput } from "../wallet/provider.js";
|
|
7
7
|
import { type ConsumerDeliveryProofService } from "../zktls/reclaim.js";
|
|
8
|
+
import { type ServiceInvoker } from "./service-invoker.js";
|
|
9
|
+
/**
|
|
10
|
+
* Opt out of the operator/serviceRef cross-check on hire. Operator-set input
|
|
11
|
+
* only — an MCP caller can neither read nor set it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ALLOW_UNVERIFIED_OPERATOR_ENV = "METRIK_AGENT_ALLOW_UNVERIFIED_OPERATOR";
|
|
14
|
+
/**
|
|
15
|
+
* Escrow generations this server can talk to.
|
|
16
|
+
*
|
|
17
|
+
* Declared, not inferred. The client sets `escrowV2` (which selects the
|
|
18
|
+
* checkpoint decoder for every read) purely from configuration, so the
|
|
19
|
+
* generation has to be a stated fact that can be wrong out loud, rather than an
|
|
20
|
+
* assumption buried in one constructor argument.
|
|
21
|
+
*/
|
|
22
|
+
export type EscrowGeneration = "v2";
|
|
8
23
|
export interface McpToolSpec {
|
|
9
24
|
name: string;
|
|
10
25
|
description: string;
|
|
11
26
|
/** Whether invoking this tool can move funds (must pass a spend mandate check). */
|
|
12
27
|
movesFunds: boolean;
|
|
13
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* The one sentence every stream-opening surface has to carry.
|
|
31
|
+
*
|
|
32
|
+
* A reviewer made ONE call against a stream and was billed for 302 seconds. The
|
|
33
|
+
* escrow behaved exactly as designed — and nothing in the tool surface had told
|
|
34
|
+
* them what they were buying. An LLM picks a tool from its description alone, so
|
|
35
|
+
* the meter is stated in the description of every tool that opens, reads, or
|
|
36
|
+
* ends a stream, not only in the docs it will never read.
|
|
37
|
+
*/
|
|
38
|
+
export declare const METERING_MODEL = "METERING: this is TIME-metered rental of an endpoint that keeps proving it is live, NOT per-call billing. Cost = ratePerSecondUsdc x seconds the oracle VERIFIED, capped at the escrowed budget. One call and a thousand calls cost the same second, and the clock runs while you call nothing. Only closing the stream (reclaim_unspent) stops it; nothing refunds automatically.";
|
|
14
39
|
export declare const METRIK_MCP_TOOLS: readonly McpToolSpec[];
|
|
15
40
|
/** @deprecated Renamed to METRIK_MCP_TOOLS; retained for back-compat. */
|
|
16
41
|
export declare const STREAMPROOF_MCP_TOOLS: readonly McpToolSpec[];
|
|
@@ -70,6 +95,23 @@ export interface VerifiedStreamMcpServerOptions {
|
|
|
70
95
|
*/
|
|
71
96
|
readonly mandateProvider?: () => SignedSpendMandate | Promise<SignedSpendMandate>;
|
|
72
97
|
readonly registry?: StreamRegistry;
|
|
98
|
+
/**
|
|
99
|
+
* Escape hatch for the operator/serviceRef cross-check, from
|
|
100
|
+
* {@link ALLOW_UNVERIFIED_OPERATOR_ENV}.
|
|
101
|
+
*
|
|
102
|
+
* OFF by default and deliberately not reachable from a tool argument: the
|
|
103
|
+
* caller being asked to relax a fund-safety check is the LLM the check exists
|
|
104
|
+
* to constrain. Even when on, a positive contradiction (`mismatch`) is still
|
|
105
|
+
* refused — this only downgrades "could not verify" from a refusal to a
|
|
106
|
+
* warning, for an operator who has accepted that risk explicitly.
|
|
107
|
+
*/
|
|
108
|
+
readonly allowUnverifiedOperatorPairing?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Drives `invoke_service`. Omitted, the tool is not registered at all rather
|
|
111
|
+
* than advertised and broken — the env builder always supplies one, so this
|
|
112
|
+
* is only omitted by callers wiring the server by hand (and by tests).
|
|
113
|
+
*/
|
|
114
|
+
readonly serviceInvoker?: ServiceInvoker;
|
|
73
115
|
readonly deliveryProofService?: ConsumerDeliveryProofService;
|
|
74
116
|
readonly mandateStateResolver?: Partial<MandateStateResolver>;
|
|
75
117
|
readonly now?: () => number;
|
|
@@ -93,6 +135,13 @@ export interface VerifiedStreamMcpServerRuntime {
|
|
|
93
135
|
export interface ParsedMetrikAgentEnv {
|
|
94
136
|
readonly rpcUrl: string;
|
|
95
137
|
readonly escrow: `0x${string}`;
|
|
138
|
+
/** Which escrow generation {@link escrow} is, as CONFIGURED (never probed). */
|
|
139
|
+
readonly escrowGeneration: EscrowGeneration;
|
|
140
|
+
/** Registry the invocation origin is verified against. Undefined = the public default. */
|
|
141
|
+
readonly registryUrl?: string;
|
|
142
|
+
readonly registryApiKey?: string;
|
|
143
|
+
/** {@link ALLOW_UNVERIFIED_OPERATOR_ENV}; false unless explicitly `true`. */
|
|
144
|
+
readonly allowUnverifiedOperatorPairing: boolean;
|
|
96
145
|
readonly usdc: `0x${string}`;
|
|
97
146
|
readonly chain: Chain;
|
|
98
147
|
readonly stateFile?: string;
|
package/dist/mcp/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAA0B,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAI1D,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAM/E,OAAO,EAGL,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,4BAA4B,EAElC,MAAM,qBAAqB,CAAC;AAe7B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAkL9B;;;GAGG;AACH,eAAO,MAAM,6BAA6B,2CACA,CAAC;AAK3C;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,mFAAmF;IACnF,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,eAAO,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