@vantic/sdk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Accept — the requirement side, over HTTP.
3
+ *
4
+ * `checkMandate` (gate.ts) is the raw decision: does a presented mandate authorize a payment
5
+ * to THIS counterparty? This module turns that into the thing a resource server actually does:
6
+ * demand a mandate on the wire, and answer with HTTP 402 (Payment Required) + a challenge when
7
+ * one is missing or insufficient. That is what makes a mandate something a counterparty
8
+ * *requires* rather than a self-check an agent can code around — the requirement lives here, on
9
+ * the receiving side.
10
+ *
11
+ * Two integration shapes, both zero-dependency and duck-typed (we import no web framework):
12
+ * - `mandateGate(...)` — Express/Connect/raw-Node middleware `(req, res, next)`.
13
+ * - `withMandate(...)` — Web-standard `(Request) => Response` for Hono, Next.js route
14
+ * handlers, Bun, Deno, and Cloudflare Workers.
15
+ *
16
+ * Wire format: the agent presents `X-Vantic-Mandate: base64(JSON{ mandate, receipts? })`.
17
+ * A 402 answer echoes an x402-flavored `accepts` array describing what would satisfy the route.
18
+ *
19
+ * Budget caveat carries over from gate.ts: an isolated counterparty soundly enforces the
20
+ * signature, validity window, revocation, counterparty/action scope, and per-transaction cap
21
+ * (none of which need history), but NOT the global rolling budget — the agent controls which
22
+ * receipts it presents. See spec §8.
23
+ */
24
+ import { type ResourceRequirement, type GateResult } from "./gate.js";
25
+ import type { VerifyOptions } from "./verify.js";
26
+ import type { Mandate, Receipt } from "./types.js";
27
+ /** Header an agent uses to present its mandate to a resource server. */
28
+ export declare const MANDATE_HEADER = "x-vantic-mandate";
29
+ export interface MandatePresentation {
30
+ mandate: Mandate;
31
+ /** The agent's spend history under this mandate (optional; see budget caveat). */
32
+ receipts?: Receipt[];
33
+ }
34
+ /** Encode a mandate (+ optional receipts) into the `X-Vantic-Mandate` header value. */
35
+ export declare function encodeMandatePresentation(p: MandatePresentation): string;
36
+ /** Build the header object an agent attaches to its request. */
37
+ export declare function mandateHeaders(p: MandatePresentation): Record<string, string>;
38
+ /** Decode an `X-Vantic-Mandate` header value. Returns null if absent or malformed. */
39
+ export declare function decodeMandatePresentation(headerValue: string | undefined | null): MandatePresentation | null;
40
+ export interface MandateChallenge {
41
+ error: "mandate_required" | "mandate_invalid";
42
+ /** Present when a mandate was supplied but rejected. */
43
+ reasons?: string[];
44
+ /** x402-flavored: what would satisfy this route. */
45
+ accepts: Array<{
46
+ scheme: "vantic";
47
+ counterparty: string;
48
+ action: string;
49
+ amount: number;
50
+ currency: string;
51
+ }>;
52
+ }
53
+ /** Build the 402 challenge body for a requirement (optionally with rejection reasons). */
54
+ export declare function mandateChallenge(req: ResourceRequirement, reasons?: string[]): MandateChallenge;
55
+ export interface GateDecision {
56
+ granted: boolean;
57
+ /** 200 if granted, else 402. */
58
+ status: 200 | 402;
59
+ /** The gate result, present iff a (decodable) mandate was supplied. */
60
+ result: GateResult | null;
61
+ /** The 402 challenge, present iff not granted. */
62
+ challenge: MandateChallenge | null;
63
+ /** The decoded presentation, present iff a decodable mandate was supplied. */
64
+ presentation: MandatePresentation | null;
65
+ }
66
+ /**
67
+ * Core, transport-agnostic decision: given the raw header value and this route's requirement,
68
+ * decode + verify and return whether to serve (200) or challenge (402).
69
+ */
70
+ export declare function evaluateMandate(headerValue: string | undefined | null, requirement: ResourceRequirement, opts?: VerifyOptions): GateDecision;
71
+ /** Requirement, or a function that derives it from the request (per-route/dynamic pricing). */
72
+ export type Requirement<Req> = ResourceRequirement | ((req: Req) => ResourceRequirement);
73
+ export interface MandateGateOptions extends VerifyOptions {
74
+ /** Header to read the mandate from. Default: `x-vantic-mandate`. */
75
+ header?: string;
76
+ }
77
+ /** What the gate attaches on success (Express: `req.vantic`; Web: the handler's 2nd arg). */
78
+ export interface MandateContext {
79
+ /** The verified principal (sponsor) — present iff the signature checked out. */
80
+ principal?: string;
81
+ /** The agent the mandate authorizes. */
82
+ agent: string;
83
+ mandate: Mandate;
84
+ receipts: Receipt[];
85
+ }
86
+ /**
87
+ * Express / Connect / raw-Node middleware. On an authorized request it attaches
88
+ * `req.vantic` (a MandateContext) and calls `next()`; otherwise it answers 402 with the
89
+ * challenge and does NOT call `next()`, so the protected handler never runs.
90
+ */
91
+ export declare function mandateGate<Req = any>(requirement: Requirement<Req>, opts?: MandateGateOptions): (req: any, res: any, next: (err?: unknown) => void) => void;
92
+ /**
93
+ * Web-standard wrapper: `(Request) => Response`. On success it calls
94
+ * `handler(req, ctx)` with the verified MandateContext; otherwise returns a 402 Response.
95
+ * Works with Hono, Next.js route handlers, Bun, Deno, and Cloudflare Workers.
96
+ */
97
+ export declare function withMandate(requirement: Requirement<Request>, handler: (req: Request, ctx: MandateContext) => Response | Promise<Response>, opts?: MandateGateOptions): (req: Request) => Promise<Response>;
98
+ //# sourceMappingURL=accept.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accept.d.ts","sourceRoot":"","sources":["../src/accept.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAgB,KAAK,mBAAmB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEnD,wEAAwE;AACxE,eAAO,MAAM,cAAc,qBAAqB,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,uFAAuF;AACvF,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAGxE;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE7E;AAED,sFAAsF;AACtF,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,CAAC;CACjB;AAED,6FAA6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAkCD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAG,GAAG,EAAE,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,IAAI,GAAE,kBAAuB,IAEhF,KAAK,GAAG,EAAE,KAAK,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,IAAI,KAAG,IAAI,CAU1E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,EACjC,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,EAC5E,IAAI,GAAE,kBAAuB,GAC5B,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAarC"}
package/dist/accept.js ADDED
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Accept — the requirement side, over HTTP.
3
+ *
4
+ * `checkMandate` (gate.ts) is the raw decision: does a presented mandate authorize a payment
5
+ * to THIS counterparty? This module turns that into the thing a resource server actually does:
6
+ * demand a mandate on the wire, and answer with HTTP 402 (Payment Required) + a challenge when
7
+ * one is missing or insufficient. That is what makes a mandate something a counterparty
8
+ * *requires* rather than a self-check an agent can code around — the requirement lives here, on
9
+ * the receiving side.
10
+ *
11
+ * Two integration shapes, both zero-dependency and duck-typed (we import no web framework):
12
+ * - `mandateGate(...)` — Express/Connect/raw-Node middleware `(req, res, next)`.
13
+ * - `withMandate(...)` — Web-standard `(Request) => Response` for Hono, Next.js route
14
+ * handlers, Bun, Deno, and Cloudflare Workers.
15
+ *
16
+ * Wire format: the agent presents `X-Vantic-Mandate: base64(JSON{ mandate, receipts? })`.
17
+ * A 402 answer echoes an x402-flavored `accepts` array describing what would satisfy the route.
18
+ *
19
+ * Budget caveat carries over from gate.ts: an isolated counterparty soundly enforces the
20
+ * signature, validity window, revocation, counterparty/action scope, and per-transaction cap
21
+ * (none of which need history), but NOT the global rolling budget — the agent controls which
22
+ * receipts it presents. See spec §8.
23
+ */
24
+ import { checkMandate } from "./gate.js";
25
+ /** Header an agent uses to present its mandate to a resource server. */
26
+ export const MANDATE_HEADER = "x-vantic-mandate";
27
+ /** Encode a mandate (+ optional receipts) into the `X-Vantic-Mandate` header value. */
28
+ export function encodeMandatePresentation(p) {
29
+ const json = JSON.stringify({ mandate: p.mandate, receipts: p.receipts ?? [] });
30
+ return Buffer.from(json, "utf8").toString("base64");
31
+ }
32
+ /** Build the header object an agent attaches to its request. */
33
+ export function mandateHeaders(p) {
34
+ return { [MANDATE_HEADER]: encodeMandatePresentation(p) };
35
+ }
36
+ /** Decode an `X-Vantic-Mandate` header value. Returns null if absent or malformed. */
37
+ export function decodeMandatePresentation(headerValue) {
38
+ if (!headerValue)
39
+ return null;
40
+ try {
41
+ const obj = JSON.parse(Buffer.from(headerValue, "base64").toString("utf8"));
42
+ if (!obj || typeof obj !== "object" || !obj.mandate)
43
+ return null;
44
+ return {
45
+ mandate: obj.mandate,
46
+ receipts: Array.isArray(obj.receipts) ? obj.receipts : [],
47
+ };
48
+ }
49
+ catch {
50
+ return null;
51
+ }
52
+ }
53
+ /** Build the 402 challenge body for a requirement (optionally with rejection reasons). */
54
+ export function mandateChallenge(req, reasons) {
55
+ const rejected = reasons != null && reasons.length > 0;
56
+ return {
57
+ error: rejected ? "mandate_invalid" : "mandate_required",
58
+ ...(rejected ? { reasons } : {}),
59
+ accepts: [{ scheme: "vantic", counterparty: req.counterparty, action: req.action, amount: req.amount, currency: req.currency }],
60
+ };
61
+ }
62
+ /**
63
+ * Core, transport-agnostic decision: given the raw header value and this route's requirement,
64
+ * decode + verify and return whether to serve (200) or challenge (402).
65
+ */
66
+ export function evaluateMandate(headerValue, requirement, opts = {}) {
67
+ const presentation = decodeMandatePresentation(headerValue);
68
+ if (!presentation) {
69
+ return { granted: false, status: 402, result: null, challenge: mandateChallenge(requirement), presentation: null };
70
+ }
71
+ const result = checkMandate(presentation.mandate, requirement, presentation.receipts ?? [], opts);
72
+ if (!result.granted) {
73
+ return { granted: false, status: 402, result, challenge: mandateChallenge(requirement, result.reasons), presentation };
74
+ }
75
+ return { granted: true, status: 200, result, challenge: null, presentation };
76
+ }
77
+ function contextFrom(d) {
78
+ return {
79
+ principal: d.result?.principal,
80
+ agent: d.result.agent,
81
+ mandate: d.presentation.mandate,
82
+ receipts: d.presentation.receipts ?? [],
83
+ };
84
+ }
85
+ function readHeader(req, header) {
86
+ const h = req?.headers;
87
+ if (!h)
88
+ return undefined;
89
+ const v = typeof h.get === "function" ? h.get(header) : h[header] ?? h[header.toLowerCase()];
90
+ return Array.isArray(v) ? v[0] : (v ?? undefined);
91
+ }
92
+ function send402(res, challenge) {
93
+ const body = JSON.stringify(challenge);
94
+ if (typeof res.status === "function" && typeof res.json === "function") {
95
+ if (typeof res.set === "function")
96
+ res.set("WWW-Authenticate", "Mandate");
97
+ else if (typeof res.setHeader === "function")
98
+ res.setHeader("WWW-Authenticate", "Mandate");
99
+ res.status(402).json(challenge);
100
+ }
101
+ else if (typeof res.writeHead === "function") {
102
+ res.writeHead(402, { "content-type": "application/json", "www-authenticate": "Mandate" });
103
+ res.end(body);
104
+ }
105
+ else {
106
+ res.statusCode = 402;
107
+ if (typeof res.setHeader === "function")
108
+ res.setHeader("content-type", "application/json");
109
+ res.end?.(body);
110
+ }
111
+ }
112
+ /**
113
+ * Express / Connect / raw-Node middleware. On an authorized request it attaches
114
+ * `req.vantic` (a MandateContext) and calls `next()`; otherwise it answers 402 with the
115
+ * challenge and does NOT call `next()`, so the protected handler never runs.
116
+ */
117
+ export function mandateGate(requirement, opts = {}) {
118
+ const header = (opts.header ?? MANDATE_HEADER).toLowerCase();
119
+ return function (req, res, next) {
120
+ const required = typeof requirement === "function" ? requirement(req) : requirement;
121
+ const decision = evaluateMandate(readHeader(req, header), required, opts);
122
+ if (decision.granted) {
123
+ req.vantic = contextFrom(decision);
124
+ next();
125
+ return;
126
+ }
127
+ send402(res, decision.challenge);
128
+ };
129
+ }
130
+ /**
131
+ * Web-standard wrapper: `(Request) => Response`. On success it calls
132
+ * `handler(req, ctx)` with the verified MandateContext; otherwise returns a 402 Response.
133
+ * Works with Hono, Next.js route handlers, Bun, Deno, and Cloudflare Workers.
134
+ */
135
+ export function withMandate(requirement, handler, opts = {}) {
136
+ const header = opts.header ?? MANDATE_HEADER;
137
+ return async (req) => {
138
+ const required = typeof requirement === "function" ? requirement(req) : requirement;
139
+ const decision = evaluateMandate(req.headers.get(header), required, opts);
140
+ if (!decision.granted) {
141
+ return new Response(JSON.stringify(decision.challenge), {
142
+ status: 402,
143
+ headers: { "content-type": "application/json", "www-authenticate": "Mandate" },
144
+ });
145
+ }
146
+ return handler(req, contextFrom(decision));
147
+ };
148
+ }
149
+ //# sourceMappingURL=accept.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accept.js","sourceRoot":"","sources":["../src/accept.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAC;AAIpF,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAQjD,uFAAuF;AACvF,MAAM,UAAU,yBAAyB,CAAC,CAAsB;IAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC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,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAE,WAAmD,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAC7H,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;gBACtD,MAAM,EAAE,GAAG;gBACX,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,SAAS,EAAE;aAC/E,CAAC,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@vantic/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
+ "mcpName": "io.github.vanticlabs/vantic",
4
5
  "description": "Vantic — a spending firewall and permission layer for AI agents: signed mandates, allowlists, and tamper-proof receipts for every money-moving action.",
5
6
  "type": "module",
6
7
  "license": "Apache-2.0",