@axorum/client 0.0.0-stage → 1.1.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/LICENSE +202 -0
- package/README.md +537 -2
- package/dist/agent-uri.d.ts +33 -0
- package/dist/agent-uri.d.ts.map +1 -0
- package/dist/agent-uri.js +231 -0
- package/dist/agent-uri.js.map +1 -0
- package/dist/authorize.d.ts +671 -0
- package/dist/authorize.d.ts.map +1 -0
- package/dist/authorize.js +947 -0
- package/dist/authorize.js.map +1 -0
- package/dist/capabilities.d.ts +30 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +40 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/chart.d.ts +74 -0
- package/dist/chart.d.ts.map +1 -0
- package/dist/chart.js +107 -0
- package/dist/chart.js.map +1 -0
- package/dist/client.d.ts +645 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1303 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +646 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +928 -0
- package/dist/errors.js.map +1 -0
- package/dist/failover.d.ts +197 -0
- package/dist/failover.d.ts.map +1 -0
- package/dist/failover.js +289 -0
- package/dist/failover.js.map +1 -0
- package/dist/freshness.d.ts +65 -0
- package/dist/freshness.d.ts.map +1 -0
- package/dist/freshness.js +148 -0
- package/dist/freshness.js.map +1 -0
- package/dist/generated/agent-plane.d.ts +1865 -0
- package/dist/generated/agent-plane.d.ts.map +1 -0
- package/dist/generated/agent-plane.js +19 -0
- package/dist/generated/agent-plane.js.map +1 -0
- package/dist/idempotency.d.ts +160 -0
- package/dist/idempotency.d.ts.map +1 -0
- package/dist/idempotency.js +208 -0
- package/dist/idempotency.js.map +1 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +88 -0
- package/dist/index.js.map +1 -0
- package/dist/intent.d.ts +163 -0
- package/dist/intent.d.ts.map +1 -0
- package/dist/intent.js +82 -0
- package/dist/intent.js.map +1 -0
- package/dist/json.d.ts +49 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +259 -0
- package/dist/json.js.map +1 -0
- package/dist/key.d.ts +64 -0
- package/dist/key.d.ts.map +1 -0
- package/dist/key.js +71 -0
- package/dist/key.js.map +1 -0
- package/dist/payment.d.ts +172 -0
- package/dist/payment.d.ts.map +1 -0
- package/dist/payment.js +178 -0
- package/dist/payment.js.map +1 -0
- package/dist/refusal.d.ts +121 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +176 -0
- package/dist/refusal.js.map +1 -0
- package/dist/retry.d.ts +215 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +297 -0
- package/dist/retry.js.map +1 -0
- package/dist/typeid.d.ts +64 -0
- package/dist/typeid.d.ts.map +1 -0
- package/dist/typeid.js +119 -0
- package/dist/typeid.js.map +1 -0
- package/dist/types.d.ts +245 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +14 -0
- package/dist/types.js.map +1 -0
- package/package.json +58 -3
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `agent://` URIs a payment may name: exactly the canonical form `agent-uri` 0.6.0
|
|
3
|
+
* renders, which the Rust SDK and the service parse with.
|
|
4
|
+
*
|
|
5
|
+
* A keyed payment derives its transaction id from the agent URI's bytes, so two
|
|
6
|
+
* spellings of one agent would derive two ids for one payment. Accepting only the
|
|
7
|
+
* canonical spelling makes both SDKs derive the same id. The rules, all pinned against
|
|
8
|
+
* the Rust parser by `spec/fixtures/agent-uri-canonical-v1.json`:
|
|
9
|
+
*
|
|
10
|
+
* - the grammar: `agent://<trust root>/<capability path>/<agent id>`, within the length
|
|
11
|
+
* and segment limits, where an agent id's type class may be a single letter;
|
|
12
|
+
* - the scheme is lowercase, and `AGENT://` parses with `agent://` as its canonical form;
|
|
13
|
+
* - a host of four dotted numeric labels is an IPv4 address and never a domain, so it
|
|
14
|
+
* parses only with every octet 0-255 and none with a leading zero;
|
|
15
|
+
* - N1: a domain is lowercase;
|
|
16
|
+
* - N2, N3: a port is decimal with no leading zero and no sign;
|
|
17
|
+
* - N4: an IPv6 address is written as RFC 5952 writes it, and an IPv4-mapped one in
|
|
18
|
+
* dotted form (`::ffff:192.0.2.1`), as Rust's `Ipv6Addr` displays it;
|
|
19
|
+
* - no query and no fragment.
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
const SCHEME = "agent://";
|
|
24
|
+
const MAX_URI_BYTES = 512;
|
|
25
|
+
const MAX_TRUST_ROOT_BYTES = 128;
|
|
26
|
+
const MAX_DOMAIN_BYTES = 253;
|
|
27
|
+
const MAX_LABEL_BYTES = 63;
|
|
28
|
+
const MAX_PATH_BYTES = 256;
|
|
29
|
+
const MAX_PATH_SEGMENTS = 32;
|
|
30
|
+
const MAX_SEGMENT_BYTES = 64;
|
|
31
|
+
const MAX_AGENT_ID_BYTES = 90;
|
|
32
|
+
const MAX_PREFIX_BYTES = 63;
|
|
33
|
+
const LABEL = /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/;
|
|
34
|
+
const SCHEME_ANY_CASE = /^[Aa][Gg][Ee][Nn][Tt]:\/\//;
|
|
35
|
+
const NUMERIC_LABEL = /^[0-9]+$/;
|
|
36
|
+
const OCTET = /^(?:0|[1-9][0-9]{0,2})$/;
|
|
37
|
+
const SEGMENT = /^[a-z0-9-]+$/;
|
|
38
|
+
const PREFIX = /^[a-z](?:[a-z_]*[a-z])?$/;
|
|
39
|
+
const SUFFIX = /^[0-7][0-9a-hjkmnp-tv-z]{25}$/;
|
|
40
|
+
const MAPPED = /^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/;
|
|
41
|
+
const bytes = (text) => new TextEncoder().encode(text).length;
|
|
42
|
+
/**
|
|
43
|
+
* Why `uri` is not an agent URI in canonical form, or `undefined` when it is. When the
|
|
44
|
+
* part before any query or fragment parses, `canonical` names the form to pass. Pure.
|
|
45
|
+
*/
|
|
46
|
+
export function agentUriProblem(uri) {
|
|
47
|
+
const cut = uri.search(/[?#]/);
|
|
48
|
+
const base = cut === -1 ? uri : uri.slice(0, cut);
|
|
49
|
+
const parsed = canonicalAgentUri(base);
|
|
50
|
+
const canonical = parsed.ok ? parsed.canonical : undefined;
|
|
51
|
+
if (cut !== -1) {
|
|
52
|
+
return { reason: "a paying agent's URI carries no query or fragment", canonical };
|
|
53
|
+
}
|
|
54
|
+
if (!parsed.ok) {
|
|
55
|
+
return { reason: parsed.problem, canonical: undefined };
|
|
56
|
+
}
|
|
57
|
+
return parsed.canonical === uri ? undefined : { reason: "it is not in canonical form", canonical };
|
|
58
|
+
}
|
|
59
|
+
const refuse = (problem) => ({ ok: false, problem });
|
|
60
|
+
/**
|
|
61
|
+
* The canonical form of `input`, a URI with no query or fragment, as `agent-uri`'s
|
|
62
|
+
* `AgentUri::parse(input).canonical()` renders it; or why it does not parse. Pure.
|
|
63
|
+
*/
|
|
64
|
+
function canonicalAgentUri(input) {
|
|
65
|
+
if (input.length === 0) {
|
|
66
|
+
return refuse("it is empty");
|
|
67
|
+
}
|
|
68
|
+
if (bytes(input) > MAX_URI_BYTES) {
|
|
69
|
+
return refuse(`it is over ${MAX_URI_BYTES} bytes`);
|
|
70
|
+
}
|
|
71
|
+
if (!SCHEME_ANY_CASE.test(input)) {
|
|
72
|
+
return refuse("it does not start with agent://");
|
|
73
|
+
}
|
|
74
|
+
const rest = input.slice(SCHEME.length);
|
|
75
|
+
const firstSlash = rest.indexOf("/");
|
|
76
|
+
if (firstSlash <= 0 || firstSlash === rest.length - 1) {
|
|
77
|
+
return refuse("expected agent://<trust root>/<capability path>/<agent id>");
|
|
78
|
+
}
|
|
79
|
+
const pathWithId = rest.slice(firstSlash + 1);
|
|
80
|
+
const lastSlash = pathWithId.lastIndexOf("/");
|
|
81
|
+
if (lastSlash <= 0 || lastSlash === pathWithId.length - 1) {
|
|
82
|
+
return refuse("expected agent://<trust root>/<capability path>/<agent id>");
|
|
83
|
+
}
|
|
84
|
+
const trustRoot = canonicalTrustRoot(rest.slice(0, firstSlash));
|
|
85
|
+
if (!trustRoot.ok) {
|
|
86
|
+
return trustRoot;
|
|
87
|
+
}
|
|
88
|
+
const path = pathWithId.slice(0, lastSlash);
|
|
89
|
+
const pathProblem = capabilityPathProblem(path);
|
|
90
|
+
if (pathProblem !== undefined) {
|
|
91
|
+
return refuse(pathProblem);
|
|
92
|
+
}
|
|
93
|
+
const id = pathWithId.slice(lastSlash + 1);
|
|
94
|
+
const idProblem = agentIdProblem(id);
|
|
95
|
+
if (idProblem !== undefined) {
|
|
96
|
+
return refuse(idProblem);
|
|
97
|
+
}
|
|
98
|
+
return { ok: true, canonical: `${SCHEME}${trustRoot.canonical}/${path}/${id}` };
|
|
99
|
+
}
|
|
100
|
+
/** A trust root's canonical form (host, then any port), or why it does not parse. Pure. */
|
|
101
|
+
function canonicalTrustRoot(input) {
|
|
102
|
+
if (bytes(input) > MAX_TRUST_ROOT_BYTES) {
|
|
103
|
+
return refuse(`the trust root is over ${MAX_TRUST_ROOT_BYTES} bytes`);
|
|
104
|
+
}
|
|
105
|
+
if (input.startsWith("[")) {
|
|
106
|
+
const close = input.indexOf("]");
|
|
107
|
+
if (close === -1) {
|
|
108
|
+
return refuse("the IPv6 literal has no closing bracket");
|
|
109
|
+
}
|
|
110
|
+
const address = canonicalIpv6(input.slice(1, close));
|
|
111
|
+
if (address === undefined) {
|
|
112
|
+
return refuse("the IPv6 address does not parse");
|
|
113
|
+
}
|
|
114
|
+
const after = input.slice(close + 1);
|
|
115
|
+
if (after.length === 0) {
|
|
116
|
+
return { ok: true, canonical: `[${address}]` };
|
|
117
|
+
}
|
|
118
|
+
// Rust's `u16::from_str`: an optional `+`, then decimal digits.
|
|
119
|
+
const port = after.startsWith(":") ? parsePort(after.slice(1), true) : undefined;
|
|
120
|
+
return port === undefined ? refuse("the port is not 0-65535") : { ok: true, canonical: `[${address}]:${port}` };
|
|
121
|
+
}
|
|
122
|
+
let host = input;
|
|
123
|
+
let port;
|
|
124
|
+
const colon = input.lastIndexOf(":");
|
|
125
|
+
if (colon !== -1 && /^[0-9]+$/.test(input.slice(colon + 1))) {
|
|
126
|
+
port = parsePort(input.slice(colon + 1), false);
|
|
127
|
+
if (port === undefined) {
|
|
128
|
+
return refuse("the port is not 0-65535");
|
|
129
|
+
}
|
|
130
|
+
host = input.slice(0, colon);
|
|
131
|
+
}
|
|
132
|
+
const problem = ipv4Problem(host) ?? domainProblem(host);
|
|
133
|
+
if (problem !== undefined) {
|
|
134
|
+
return refuse(problem);
|
|
135
|
+
}
|
|
136
|
+
const lower = host.toLowerCase();
|
|
137
|
+
return { ok: true, canonical: port === undefined ? lower : `${lower}:${port}` };
|
|
138
|
+
}
|
|
139
|
+
/** A decimal port 0-65535, leading zeros allowed, and a leading `+` when `signed`. Pure. */
|
|
140
|
+
function parsePort(text, signed) {
|
|
141
|
+
const digits = signed && text.startsWith("+") ? text.slice(1) : text;
|
|
142
|
+
if (!/^[0-9]+$/.test(digits)) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
const value = Number(digits);
|
|
146
|
+
return value <= 65_535 ? value : undefined;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Why `host`, shaped as an IPv4 address (four dotted numeric labels), is not one, or
|
|
150
|
+
* `undefined` when it is one or is not that shape. Such a host is never a domain. Pure.
|
|
151
|
+
*/
|
|
152
|
+
function ipv4Problem(host) {
|
|
153
|
+
const labels = host.split(".");
|
|
154
|
+
if (labels.length !== 4 || !labels.every((label) => NUMERIC_LABEL.test(label))) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
const valid = labels.every((label) => OCTET.test(label) && Number(label) <= 255);
|
|
158
|
+
return valid ? undefined : "an IPv4 address's octets must be 0-255, with no leading zero";
|
|
159
|
+
}
|
|
160
|
+
/** Why `host` is not a DNS name `agent-uri` accepts, or `undefined`. Pure. */
|
|
161
|
+
function domainProblem(host) {
|
|
162
|
+
if (bytes(host) > MAX_DOMAIN_BYTES) {
|
|
163
|
+
return `the domain is over ${MAX_DOMAIN_BYTES} bytes`;
|
|
164
|
+
}
|
|
165
|
+
for (const label of host.split(".")) {
|
|
166
|
+
if (label.length > MAX_LABEL_BYTES) {
|
|
167
|
+
return `a domain label is over ${MAX_LABEL_BYTES} bytes`;
|
|
168
|
+
}
|
|
169
|
+
if (!LABEL.test(label)) {
|
|
170
|
+
return "the domain's labels must be letters, digits and inner hyphens";
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* An IPv6 address as Rust's `Ipv6Addr` displays it: RFC 5952, with an IPv4-mapped
|
|
177
|
+
* address in dotted form. `undefined` when it does not parse. Pure.
|
|
178
|
+
*/
|
|
179
|
+
function canonicalIpv6(text) {
|
|
180
|
+
let hostname;
|
|
181
|
+
try {
|
|
182
|
+
hostname = new URL(`http://[${text}]/`).hostname;
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
// The WHATWG serializer is RFC 5952 but never dotted.
|
|
188
|
+
const address = hostname.slice(1, -1);
|
|
189
|
+
const mapped = MAPPED.exec(address);
|
|
190
|
+
if (mapped === null) {
|
|
191
|
+
return address;
|
|
192
|
+
}
|
|
193
|
+
const high = Number.parseInt(mapped[1], 16);
|
|
194
|
+
const low = Number.parseInt(mapped[2], 16);
|
|
195
|
+
return `::ffff:${high >> 8}.${high & 0xff}.${low >> 8}.${low & 0xff}`;
|
|
196
|
+
}
|
|
197
|
+
/** Why `path` is not a capability path, or `undefined`. Pure. */
|
|
198
|
+
function capabilityPathProblem(path) {
|
|
199
|
+
if (bytes(path) > MAX_PATH_BYTES) {
|
|
200
|
+
return `the capability path is over ${MAX_PATH_BYTES} bytes`;
|
|
201
|
+
}
|
|
202
|
+
const segments = path.split("/");
|
|
203
|
+
if (segments.length > MAX_PATH_SEGMENTS) {
|
|
204
|
+
return `the capability path has over ${MAX_PATH_SEGMENTS} segments`;
|
|
205
|
+
}
|
|
206
|
+
for (const segment of segments) {
|
|
207
|
+
if (!SEGMENT.test(segment) || segment.length > MAX_SEGMENT_BYTES) {
|
|
208
|
+
return `each capability path segment must be 1 to ${MAX_SEGMENT_BYTES} of a-z, 0-9 and -`;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
/** Why `id` is not a TypeID agent id, or `undefined`. Pure. */
|
|
214
|
+
function agentIdProblem(id) {
|
|
215
|
+
if (bytes(id) > MAX_AGENT_ID_BYTES) {
|
|
216
|
+
return `the agent id is over ${MAX_AGENT_ID_BYTES} bytes`;
|
|
217
|
+
}
|
|
218
|
+
const separator = id.lastIndexOf("_");
|
|
219
|
+
if (separator <= 0) {
|
|
220
|
+
return "the agent id must be <prefix>_<suffix>";
|
|
221
|
+
}
|
|
222
|
+
const prefix = id.slice(0, separator);
|
|
223
|
+
if (prefix.length > MAX_PREFIX_BYTES || !PREFIX.test(prefix)) {
|
|
224
|
+
return "the agent id's prefix must be lowercase letters and underscores, starting and ending with a letter";
|
|
225
|
+
}
|
|
226
|
+
if (!SUFFIX.test(id.slice(separator + 1))) {
|
|
227
|
+
return "the agent id's suffix must be 26 lowercase Crockford base32 characters, the first 0-7";
|
|
228
|
+
}
|
|
229
|
+
return undefined;
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=agent-uri.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-uri.js","sourceRoot":"","sources":["../src/agent-uri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,MAAM,MAAM,GAAG,UAAU,CAAC;AAC1B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACj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