@t2000/cli 4.3.1 → 4.4.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.
@@ -0,0 +1,1305 @@
1
+ import { createRequire as __createRequire } from 'module'; import { fileURLToPath as __fileURLToPath } from 'url'; import { dirname as __pathDirname } from 'path'; const require = __createRequire(import.meta.url); const __filename = __fileURLToPath(import.meta.url); const __dirname = __pathDirname(__filename);
2
+ import {
3
+ $brand,
4
+ $input,
5
+ $output,
6
+ Base64_exports,
7
+ Bytes_exports,
8
+ Hash_exports,
9
+ Hex_exports,
10
+ Json_exports,
11
+ NEVER,
12
+ TimePrecision,
13
+ ZodMiniAny,
14
+ ZodMiniArray,
15
+ ZodMiniBase64,
16
+ ZodMiniBase64URL,
17
+ ZodMiniBigInt,
18
+ ZodMiniBigIntFormat,
19
+ ZodMiniBoolean,
20
+ ZodMiniCIDRv4,
21
+ ZodMiniCIDRv6,
22
+ ZodMiniCUID,
23
+ ZodMiniCUID2,
24
+ ZodMiniCatch,
25
+ ZodMiniCodec,
26
+ ZodMiniCustom,
27
+ ZodMiniCustomStringFormat,
28
+ ZodMiniDate,
29
+ ZodMiniDefault,
30
+ ZodMiniDiscriminatedUnion,
31
+ ZodMiniE164,
32
+ ZodMiniEmail,
33
+ ZodMiniEmoji,
34
+ ZodMiniEnum,
35
+ ZodMiniExactOptional,
36
+ ZodMiniFile,
37
+ ZodMiniFunction,
38
+ ZodMiniGUID,
39
+ ZodMiniIPv4,
40
+ ZodMiniIPv6,
41
+ ZodMiniISODate,
42
+ ZodMiniISODateTime,
43
+ ZodMiniISODuration,
44
+ ZodMiniISOTime,
45
+ ZodMiniIntersection,
46
+ ZodMiniJWT,
47
+ ZodMiniKSUID,
48
+ ZodMiniLazy,
49
+ ZodMiniLiteral,
50
+ ZodMiniMAC,
51
+ ZodMiniMap,
52
+ ZodMiniNaN,
53
+ ZodMiniNanoID,
54
+ ZodMiniNever,
55
+ ZodMiniNonOptional,
56
+ ZodMiniNull,
57
+ ZodMiniNullable,
58
+ ZodMiniNumber,
59
+ ZodMiniNumberFormat,
60
+ ZodMiniObject,
61
+ ZodMiniOptional,
62
+ ZodMiniPipe,
63
+ ZodMiniPrefault,
64
+ ZodMiniPromise,
65
+ ZodMiniReadonly,
66
+ ZodMiniRecord,
67
+ ZodMiniSet,
68
+ ZodMiniString,
69
+ ZodMiniStringFormat,
70
+ ZodMiniSuccess,
71
+ ZodMiniSymbol,
72
+ ZodMiniTemplateLiteral,
73
+ ZodMiniTransform,
74
+ ZodMiniTuple,
75
+ ZodMiniType,
76
+ ZodMiniULID,
77
+ ZodMiniURL,
78
+ ZodMiniUUID,
79
+ ZodMiniUndefined,
80
+ ZodMiniUnion,
81
+ ZodMiniUnknown,
82
+ ZodMiniVoid,
83
+ ZodMiniXID,
84
+ ZodMiniXor,
85
+ _catch,
86
+ _default,
87
+ _endsWith,
88
+ _enum,
89
+ _function,
90
+ _gt,
91
+ _gte,
92
+ _includes,
93
+ _instanceof,
94
+ _lazy,
95
+ _length,
96
+ _lowercase,
97
+ _lt,
98
+ _lte,
99
+ _maxLength,
100
+ _maxSize,
101
+ _mime,
102
+ _minLength,
103
+ _minSize,
104
+ _multipleOf,
105
+ _negative,
106
+ _nonnegative,
107
+ _nonpositive,
108
+ _normalize,
109
+ _null,
110
+ _overwrite,
111
+ _positive,
112
+ _property,
113
+ _regex,
114
+ _size,
115
+ _startsWith,
116
+ _toLowerCase,
117
+ _toUpperCase,
118
+ _trim,
119
+ _undefined,
120
+ _uppercase,
121
+ _void,
122
+ any,
123
+ array,
124
+ base64,
125
+ base64url,
126
+ bigint,
127
+ boolean,
128
+ catchall,
129
+ check,
130
+ cidrv4,
131
+ cidrv6,
132
+ clone,
133
+ codec,
134
+ coerce_exports,
135
+ config,
136
+ core_exports,
137
+ cuid,
138
+ cuid2,
139
+ custom,
140
+ date,
141
+ decode,
142
+ decodeAsync,
143
+ describe,
144
+ discriminatedUnion,
145
+ e164,
146
+ email,
147
+ emoji,
148
+ encode,
149
+ encodeAsync,
150
+ exactOptional,
151
+ extend,
152
+ external_exports,
153
+ file,
154
+ flattenError,
155
+ float32,
156
+ float64,
157
+ formatError,
158
+ globalRegistry,
159
+ guid,
160
+ hex,
161
+ hostname,
162
+ httpUrl,
163
+ int,
164
+ int32,
165
+ int64,
166
+ intersection,
167
+ invertCodec,
168
+ ipv4,
169
+ ipv6,
170
+ iso_exports,
171
+ json,
172
+ jwt,
173
+ keyof,
174
+ ksuid,
175
+ literal,
176
+ locales_exports,
177
+ looseObject,
178
+ looseRecord,
179
+ mac,
180
+ map,
181
+ merge,
182
+ meta,
183
+ nan,
184
+ nanoid,
185
+ nativeEnum,
186
+ never,
187
+ nonoptional,
188
+ nullable,
189
+ nullish,
190
+ number,
191
+ object,
192
+ omit,
193
+ optional,
194
+ parse,
195
+ parseAsync,
196
+ partial,
197
+ partialRecord,
198
+ pick,
199
+ pipe,
200
+ prefault,
201
+ prettifyError,
202
+ promise,
203
+ readonly,
204
+ record,
205
+ refine,
206
+ regexes_exports,
207
+ registry,
208
+ required,
209
+ safeDecode,
210
+ safeDecodeAsync,
211
+ safeEncode,
212
+ safeEncodeAsync,
213
+ safeExtend,
214
+ safeParse,
215
+ safeParseAsync,
216
+ set,
217
+ strictObject,
218
+ string,
219
+ stringFormat,
220
+ stringbool,
221
+ success,
222
+ superRefine,
223
+ symbol,
224
+ templateLiteral,
225
+ toJSONSchema,
226
+ transform,
227
+ treeifyError,
228
+ tuple,
229
+ uint32,
230
+ uint64,
231
+ ulid,
232
+ union,
233
+ unknown,
234
+ url,
235
+ util_exports,
236
+ uuid,
237
+ uuidv4,
238
+ uuidv6,
239
+ uuidv7,
240
+ xid,
241
+ xor
242
+ } from "./chunk-KC2WRBJB.js";
243
+ import "./chunk-NGS6K3I3.js";
244
+ import "./chunk-77SWBATH.js";
245
+ import "./chunk-7LGHVVIJ.js";
246
+ import {
247
+ __export
248
+ } from "./chunk-YPWSCLE3.js";
249
+
250
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/BodyDigest.js
251
+ var BodyDigest_exports = {};
252
+ __export(BodyDigest_exports, {
253
+ compute: () => compute,
254
+ verify: () => verify
255
+ });
256
+
257
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/internal/constantTimeEqual.js
258
+ function constantTimeEqual(a, b) {
259
+ const hashA = Hash_exports.sha256(Hex_exports.fromString(a));
260
+ const hashB = Hash_exports.sha256(Hex_exports.fromString(b));
261
+ let result = 0;
262
+ for (let i = 0; i < hashA.length; i++)
263
+ result |= hashA.charCodeAt(i) ^ hashB.charCodeAt(i);
264
+ return result === 0;
265
+ }
266
+
267
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/BodyDigest.js
268
+ function compute(body) {
269
+ const str = typeof body === "object" ? JSON.stringify(body) : body;
270
+ const bytes = Bytes_exports.fromString(str);
271
+ const hash2 = Hash_exports.sha256(bytes, { as: "Bytes" });
272
+ const base642 = Base64_exports.fromBytes(hash2);
273
+ return `sha-256=${base642}`;
274
+ }
275
+ function verify(digest, body) {
276
+ return constantTimeEqual(compute(body), digest);
277
+ }
278
+
279
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Challenge.js
280
+ var Challenge_exports = {};
281
+ __export(Challenge_exports, {
282
+ Schema: () => Schema,
283
+ deserialize: () => deserialize2,
284
+ deserializeList: () => deserializeList,
285
+ from: () => from2,
286
+ fromHeaders: () => fromHeaders,
287
+ fromHeadersList: () => fromHeadersList,
288
+ fromMethod: () => fromMethod2,
289
+ fromResponse: () => fromResponse,
290
+ fromResponseList: () => fromResponseList,
291
+ meta: () => meta2,
292
+ serialize: () => serialize2,
293
+ verify: () => verify2
294
+ });
295
+
296
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/PaymentRequest.js
297
+ var PaymentRequest_exports = {};
298
+ __export(PaymentRequest_exports, {
299
+ deserialize: () => deserialize,
300
+ from: () => from,
301
+ fromMethod: () => fromMethod,
302
+ serialize: () => serialize
303
+ });
304
+ function deserialize(encoded) {
305
+ const json2 = Base64_exports.toString(encoded);
306
+ return JSON.parse(json2);
307
+ }
308
+ function from(request) {
309
+ return request;
310
+ }
311
+ function fromMethod(method, request) {
312
+ return method.schema.request.parse(request);
313
+ }
314
+ function serialize(request) {
315
+ const json2 = Json_exports.canonicalize(request);
316
+ return Base64_exports.fromString(json2, { pad: false, url: true });
317
+ }
318
+
319
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/zod.js
320
+ var zod_exports = {};
321
+ __export(zod_exports, {
322
+ $brand: () => $brand,
323
+ $input: () => $input,
324
+ $output: () => $output,
325
+ NEVER: () => NEVER,
326
+ TimePrecision: () => TimePrecision,
327
+ ZodMiniAny: () => ZodMiniAny,
328
+ ZodMiniArray: () => ZodMiniArray,
329
+ ZodMiniBase64: () => ZodMiniBase64,
330
+ ZodMiniBase64URL: () => ZodMiniBase64URL,
331
+ ZodMiniBigInt: () => ZodMiniBigInt,
332
+ ZodMiniBigIntFormat: () => ZodMiniBigIntFormat,
333
+ ZodMiniBoolean: () => ZodMiniBoolean,
334
+ ZodMiniCIDRv4: () => ZodMiniCIDRv4,
335
+ ZodMiniCIDRv6: () => ZodMiniCIDRv6,
336
+ ZodMiniCUID: () => ZodMiniCUID,
337
+ ZodMiniCUID2: () => ZodMiniCUID2,
338
+ ZodMiniCatch: () => ZodMiniCatch,
339
+ ZodMiniCodec: () => ZodMiniCodec,
340
+ ZodMiniCustom: () => ZodMiniCustom,
341
+ ZodMiniCustomStringFormat: () => ZodMiniCustomStringFormat,
342
+ ZodMiniDate: () => ZodMiniDate,
343
+ ZodMiniDefault: () => ZodMiniDefault,
344
+ ZodMiniDiscriminatedUnion: () => ZodMiniDiscriminatedUnion,
345
+ ZodMiniE164: () => ZodMiniE164,
346
+ ZodMiniEmail: () => ZodMiniEmail,
347
+ ZodMiniEmoji: () => ZodMiniEmoji,
348
+ ZodMiniEnum: () => ZodMiniEnum,
349
+ ZodMiniExactOptional: () => ZodMiniExactOptional,
350
+ ZodMiniFile: () => ZodMiniFile,
351
+ ZodMiniFunction: () => ZodMiniFunction,
352
+ ZodMiniGUID: () => ZodMiniGUID,
353
+ ZodMiniIPv4: () => ZodMiniIPv4,
354
+ ZodMiniIPv6: () => ZodMiniIPv6,
355
+ ZodMiniISODate: () => ZodMiniISODate,
356
+ ZodMiniISODateTime: () => ZodMiniISODateTime,
357
+ ZodMiniISODuration: () => ZodMiniISODuration,
358
+ ZodMiniISOTime: () => ZodMiniISOTime,
359
+ ZodMiniIntersection: () => ZodMiniIntersection,
360
+ ZodMiniJWT: () => ZodMiniJWT,
361
+ ZodMiniKSUID: () => ZodMiniKSUID,
362
+ ZodMiniLazy: () => ZodMiniLazy,
363
+ ZodMiniLiteral: () => ZodMiniLiteral,
364
+ ZodMiniMAC: () => ZodMiniMAC,
365
+ ZodMiniMap: () => ZodMiniMap,
366
+ ZodMiniNaN: () => ZodMiniNaN,
367
+ ZodMiniNanoID: () => ZodMiniNanoID,
368
+ ZodMiniNever: () => ZodMiniNever,
369
+ ZodMiniNonOptional: () => ZodMiniNonOptional,
370
+ ZodMiniNull: () => ZodMiniNull,
371
+ ZodMiniNullable: () => ZodMiniNullable,
372
+ ZodMiniNumber: () => ZodMiniNumber,
373
+ ZodMiniNumberFormat: () => ZodMiniNumberFormat,
374
+ ZodMiniObject: () => ZodMiniObject,
375
+ ZodMiniOptional: () => ZodMiniOptional,
376
+ ZodMiniPipe: () => ZodMiniPipe,
377
+ ZodMiniPrefault: () => ZodMiniPrefault,
378
+ ZodMiniPromise: () => ZodMiniPromise,
379
+ ZodMiniReadonly: () => ZodMiniReadonly,
380
+ ZodMiniRecord: () => ZodMiniRecord,
381
+ ZodMiniSet: () => ZodMiniSet,
382
+ ZodMiniString: () => ZodMiniString,
383
+ ZodMiniStringFormat: () => ZodMiniStringFormat,
384
+ ZodMiniSuccess: () => ZodMiniSuccess,
385
+ ZodMiniSymbol: () => ZodMiniSymbol,
386
+ ZodMiniTemplateLiteral: () => ZodMiniTemplateLiteral,
387
+ ZodMiniTransform: () => ZodMiniTransform,
388
+ ZodMiniTuple: () => ZodMiniTuple,
389
+ ZodMiniType: () => ZodMiniType,
390
+ ZodMiniULID: () => ZodMiniULID,
391
+ ZodMiniURL: () => ZodMiniURL,
392
+ ZodMiniUUID: () => ZodMiniUUID,
393
+ ZodMiniUndefined: () => ZodMiniUndefined,
394
+ ZodMiniUnion: () => ZodMiniUnion,
395
+ ZodMiniUnknown: () => ZodMiniUnknown,
396
+ ZodMiniVoid: () => ZodMiniVoid,
397
+ ZodMiniXID: () => ZodMiniXID,
398
+ ZodMiniXor: () => ZodMiniXor,
399
+ _default: () => _default,
400
+ _function: () => _function,
401
+ address: () => address,
402
+ amount: () => amount,
403
+ any: () => any,
404
+ array: () => array,
405
+ base64: () => base64,
406
+ base64url: () => base64url,
407
+ bigint: () => bigint,
408
+ boolean: () => boolean,
409
+ catch: () => _catch,
410
+ catchall: () => catchall,
411
+ check: () => check,
412
+ cidrv4: () => cidrv4,
413
+ cidrv6: () => cidrv6,
414
+ clone: () => clone,
415
+ codec: () => codec,
416
+ coerce: () => coerce_exports,
417
+ config: () => config,
418
+ core: () => core_exports,
419
+ cuid: () => cuid,
420
+ cuid2: () => cuid2,
421
+ custom: () => custom,
422
+ date: () => date,
423
+ datetime: () => datetime,
424
+ decode: () => decode,
425
+ decodeAsync: () => decodeAsync,
426
+ describe: () => describe,
427
+ discriminatedUnion: () => discriminatedUnion,
428
+ e164: () => e164,
429
+ email: () => email,
430
+ emoji: () => emoji,
431
+ encode: () => encode,
432
+ encodeAsync: () => encodeAsync,
433
+ endsWith: () => _endsWith,
434
+ enum: () => _enum,
435
+ exactOptional: () => exactOptional,
436
+ extend: () => extend,
437
+ file: () => file,
438
+ flattenError: () => flattenError,
439
+ float32: () => float32,
440
+ float64: () => float64,
441
+ formatError: () => formatError,
442
+ function: () => _function,
443
+ globalRegistry: () => globalRegistry,
444
+ gt: () => _gt,
445
+ gte: () => _gte,
446
+ guid: () => guid,
447
+ hash: () => hash,
448
+ hex: () => hex,
449
+ hostname: () => hostname,
450
+ httpUrl: () => httpUrl,
451
+ includes: () => _includes,
452
+ instanceof: () => _instanceof,
453
+ int: () => int,
454
+ int32: () => int32,
455
+ int64: () => int64,
456
+ intersection: () => intersection,
457
+ invertCodec: () => invertCodec,
458
+ ipv4: () => ipv4,
459
+ ipv6: () => ipv6,
460
+ iso: () => iso_exports,
461
+ json: () => json,
462
+ jwt: () => jwt,
463
+ keyof: () => keyof,
464
+ ksuid: () => ksuid,
465
+ lazy: () => _lazy,
466
+ length: () => _length,
467
+ literal: () => literal,
468
+ locales: () => locales_exports,
469
+ looseObject: () => looseObject,
470
+ looseRecord: () => looseRecord,
471
+ lowercase: () => _lowercase,
472
+ lt: () => _lt,
473
+ lte: () => _lte,
474
+ mac: () => mac,
475
+ map: () => map,
476
+ maxLength: () => _maxLength,
477
+ maxSize: () => _maxSize,
478
+ maximum: () => _lte,
479
+ merge: () => merge,
480
+ meta: () => meta,
481
+ mime: () => _mime,
482
+ minLength: () => _minLength,
483
+ minSize: () => _minSize,
484
+ minimum: () => _gte,
485
+ multipleOf: () => _multipleOf,
486
+ nan: () => nan,
487
+ nanoid: () => nanoid,
488
+ nativeEnum: () => nativeEnum,
489
+ negative: () => _negative,
490
+ never: () => never,
491
+ nonnegative: () => _nonnegative,
492
+ nonoptional: () => nonoptional,
493
+ nonpositive: () => _nonpositive,
494
+ normalize: () => _normalize,
495
+ null: () => _null,
496
+ nullable: () => nullable,
497
+ nullish: () => nullish,
498
+ number: () => number,
499
+ object: () => object,
500
+ omit: () => omit,
501
+ optional: () => optional,
502
+ overwrite: () => _overwrite,
503
+ parse: () => parse,
504
+ parseAsync: () => parseAsync,
505
+ partial: () => partial,
506
+ partialRecord: () => partialRecord,
507
+ period: () => period,
508
+ pick: () => pick,
509
+ pipe: () => pipe,
510
+ positive: () => _positive,
511
+ prefault: () => prefault,
512
+ prettifyError: () => prettifyError,
513
+ promise: () => promise,
514
+ property: () => _property,
515
+ readonly: () => readonly,
516
+ record: () => record,
517
+ refine: () => refine,
518
+ regex: () => _regex,
519
+ regexes: () => regexes_exports,
520
+ registry: () => registry,
521
+ required: () => required,
522
+ safeDecode: () => safeDecode,
523
+ safeDecodeAsync: () => safeDecodeAsync,
524
+ safeEncode: () => safeEncode,
525
+ safeEncodeAsync: () => safeEncodeAsync,
526
+ safeExtend: () => safeExtend,
527
+ safeParse: () => safeParse,
528
+ safeParseAsync: () => safeParseAsync,
529
+ set: () => set,
530
+ signature: () => signature,
531
+ size: () => _size,
532
+ startsWith: () => _startsWith,
533
+ strictObject: () => strictObject,
534
+ string: () => string,
535
+ stringFormat: () => stringFormat,
536
+ stringbool: () => stringbool,
537
+ success: () => success,
538
+ superRefine: () => superRefine,
539
+ symbol: () => symbol,
540
+ templateLiteral: () => templateLiteral,
541
+ toJSONSchema: () => toJSONSchema,
542
+ toLowerCase: () => _toLowerCase,
543
+ toUpperCase: () => _toUpperCase,
544
+ transform: () => transform,
545
+ treeifyError: () => treeifyError,
546
+ trim: () => _trim,
547
+ tuple: () => tuple,
548
+ uint32: () => uint32,
549
+ uint64: () => uint64,
550
+ ulid: () => ulid,
551
+ undefined: () => _undefined,
552
+ union: () => union,
553
+ unknown: () => unknown,
554
+ unwrapOptional: () => unwrapOptional,
555
+ uppercase: () => _uppercase,
556
+ url: () => url,
557
+ util: () => util_exports,
558
+ uuid: () => uuid,
559
+ uuidv4: () => uuidv4,
560
+ uuidv6: () => uuidv6,
561
+ uuidv7: () => uuidv7,
562
+ void: () => _void,
563
+ xid: () => xid,
564
+ xor: () => xor,
565
+ z: () => external_exports
566
+ });
567
+ function amount() {
568
+ return external_exports.string().check(external_exports.regex(/^\d+(\.\d+)?$/, "Invalid amount"));
569
+ }
570
+ function datetime() {
571
+ return external_exports.string().check(external_exports.regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/, "Invalid ISO 8601 datetime"));
572
+ }
573
+ function address() {
574
+ return external_exports.string().check(external_exports.regex(/^0x[0-9a-fA-F]{40}$/, "Invalid address"));
575
+ }
576
+ function hash() {
577
+ return external_exports.string().check(external_exports.regex(/^0x[0-9a-fA-F]{64}$/, "Invalid hash"));
578
+ }
579
+ function period() {
580
+ return external_exports.string().check(external_exports.regex(/^(day|week|month|year|\d+)$/, "Invalid period"));
581
+ }
582
+ function signature() {
583
+ return external_exports.string().check(external_exports.regex(/^0x[0-9a-fA-F]+$/, "Invalid signature"));
584
+ }
585
+ function unwrapOptional(schema) {
586
+ if (schema._zod.def.type === "optional")
587
+ return schema._zod.def.innerType;
588
+ return schema;
589
+ }
590
+
591
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Challenge.js
592
+ var Schema = object({
593
+ /** Optional human-readable description of the payment. */
594
+ description: optional(string()),
595
+ /** Optional digest of the request body (format: "sha-256=base64hash"). */
596
+ digest: optional(string().check(_regex(/^sha-256=/, "Invalid digest format"))),
597
+ /** Optional expiration timestamp (ISO 8601). */
598
+ expires: optional(datetime()),
599
+ /** Unique challenge identifier (HMAC-bound). */
600
+ id: string(),
601
+ /** Intent type (e.g., "charge", "session"). */
602
+ intent: string(),
603
+ /** Payment method (e.g., "tempo", "stripe"). */
604
+ method: string(),
605
+ /** Optional server-defined correlation data. Flat string-to-string map; clients MUST NOT modify. */
606
+ opaque: optional(record(string(), string())),
607
+ /** Server realm (e.g., hostname). */
608
+ realm: string(),
609
+ /** Method-specific request data. */
610
+ request: record(string(), unknown())
611
+ });
612
+ function from2(parameters, options) {
613
+ void options;
614
+ const { description, digest, meta: meta3, method: methodName, intent, realm, request, secretKey } = parameters;
615
+ const expires = parameters.expires;
616
+ const id = secretKey ? computeId({ ...parameters, expires, ...meta3 && { opaque: meta3 } }, { secretKey }) : parameters.id;
617
+ return Schema.parse({
618
+ id,
619
+ realm,
620
+ method: methodName,
621
+ intent,
622
+ request,
623
+ ...description && { description },
624
+ ...digest && { digest },
625
+ ...expires && { expires },
626
+ ...meta3 && { opaque: meta3 }
627
+ });
628
+ }
629
+ function fromMethod2(method, parameters) {
630
+ const { name: methodName, intent } = method;
631
+ const { description, digest, expires, id, meta: meta3, realm, secretKey } = parameters;
632
+ const request = fromMethod(method, parameters.request);
633
+ return from2({
634
+ ...id ? { id } : { secretKey },
635
+ realm,
636
+ method: methodName,
637
+ intent,
638
+ request,
639
+ description,
640
+ digest,
641
+ expires,
642
+ meta: meta3
643
+ });
644
+ }
645
+ function serialize2(challenge) {
646
+ const parts = [
647
+ `id="${challenge.id}"`,
648
+ `realm="${challenge.realm}"`,
649
+ `method="${challenge.method}"`,
650
+ `intent="${challenge.intent}"`,
651
+ `request="${serialize(challenge.request)}"`
652
+ ];
653
+ if (challenge.description !== void 0)
654
+ parts.push(`description="${challenge.description}"`);
655
+ if (challenge.digest !== void 0)
656
+ parts.push(`digest="${challenge.digest}"`);
657
+ if (challenge.expires !== void 0)
658
+ parts.push(`expires="${challenge.expires}"`);
659
+ if (challenge.opaque !== void 0)
660
+ parts.push(`opaque="${serialize(challenge.opaque)}"`);
661
+ return `Payment ${parts.join(", ")}`;
662
+ }
663
+ function deserialize2(value, options) {
664
+ const params = extractPaymentAuthParams(value);
665
+ if (!params)
666
+ throw new Error("Missing Payment scheme.");
667
+ const result = parseAuthParams(params);
668
+ const { request, opaque, ...rest } = result;
669
+ if (!request)
670
+ throw new Error("Missing request parameter.");
671
+ if (rest.method && !/^[a-z][a-z0-9:_-]*$/.test(rest.method))
672
+ throw new Error(`Invalid method: "${rest.method}". Must be lowercase per spec.`);
673
+ return from2({
674
+ ...rest,
675
+ request: deserialize(request),
676
+ ...opaque && { meta: deserialize(opaque) }
677
+ }, options);
678
+ }
679
+ function extractPaymentAuthParams(header) {
680
+ const token = "Payment";
681
+ let inQuotes = false;
682
+ let escaped = false;
683
+ for (let i = 0; i < header.length; i++) {
684
+ const char = header[i];
685
+ if (inQuotes) {
686
+ if (escaped)
687
+ escaped = false;
688
+ else if (char === "\\")
689
+ escaped = true;
690
+ else if (char === '"')
691
+ inQuotes = false;
692
+ continue;
693
+ }
694
+ if (char === '"') {
695
+ inQuotes = true;
696
+ continue;
697
+ }
698
+ if (!startsWithSchemeToken(header, i, token))
699
+ continue;
700
+ const prefix = header.slice(0, i);
701
+ if (prefix.trim() && !prefix.trimEnd().endsWith(","))
702
+ continue;
703
+ let paramsStart = i + token.length;
704
+ while (paramsStart < header.length && /\s/.test(header[paramsStart] ?? ""))
705
+ paramsStart++;
706
+ return header.slice(paramsStart);
707
+ }
708
+ return null;
709
+ }
710
+ function parseAuthParams(input) {
711
+ const result = {};
712
+ let i = 0;
713
+ while (i < input.length) {
714
+ while (i < input.length && /[\s,]/.test(input[i] ?? ""))
715
+ i++;
716
+ if (i >= input.length)
717
+ break;
718
+ const keyStart = i;
719
+ while (i < input.length && /[A-Za-z0-9_-]/.test(input[i] ?? ""))
720
+ i++;
721
+ const key = input.slice(keyStart, i);
722
+ if (!key)
723
+ throw new Error("Malformed auth-param.");
724
+ while (i < input.length && /\s/.test(input[i] ?? ""))
725
+ i++;
726
+ if (input[i] !== "=")
727
+ break;
728
+ i++;
729
+ while (i < input.length && /\s/.test(input[i] ?? ""))
730
+ i++;
731
+ const [value, nextIndex] = readAuthParamValue(input, i);
732
+ i = nextIndex;
733
+ if (key in result)
734
+ throw new Error(`Duplicate parameter: ${key}`);
735
+ result[key] = value;
736
+ }
737
+ return result;
738
+ }
739
+ function readAuthParamValue(input, start) {
740
+ if (input[start] === '"')
741
+ return readQuotedAuthParamValue(input, start + 1);
742
+ let i = start;
743
+ while (i < input.length && input[i] !== ",")
744
+ i++;
745
+ return [input.slice(start, i).trim(), i];
746
+ }
747
+ function readQuotedAuthParamValue(input, start) {
748
+ let i = start;
749
+ let value = "";
750
+ let escaped = false;
751
+ while (i < input.length) {
752
+ const char = input[i];
753
+ i++;
754
+ if (escaped) {
755
+ value += char;
756
+ escaped = false;
757
+ continue;
758
+ }
759
+ if (char === "\\") {
760
+ escaped = true;
761
+ continue;
762
+ }
763
+ if (char === '"')
764
+ return [value, i];
765
+ value += char;
766
+ }
767
+ throw new Error("Unterminated quoted-string.");
768
+ }
769
+ function startsWithSchemeToken(value, index, token) {
770
+ if (!value.slice(index).toLowerCase().startsWith(token.toLowerCase()))
771
+ return false;
772
+ const next = value[index + token.length];
773
+ return Boolean(next && /\s/.test(next));
774
+ }
775
+ function fromHeaders(headers, options) {
776
+ const header = headers.get("WWW-Authenticate");
777
+ if (!header)
778
+ throw new Error("Missing WWW-Authenticate header.");
779
+ return deserialize2(header, options);
780
+ }
781
+ function fromResponse(response, options) {
782
+ if (response.status !== 402)
783
+ throw new Error("Response status is not 402.");
784
+ return fromHeaders(response.headers, options);
785
+ }
786
+ function fromResponseList(response, options) {
787
+ if (response.status !== 402)
788
+ throw new Error("Response status is not 402.");
789
+ return fromHeadersList(response.headers, options);
790
+ }
791
+ function fromHeadersList(headers, options) {
792
+ const header = headers.get("WWW-Authenticate");
793
+ if (!header)
794
+ throw new Error("Missing WWW-Authenticate header.");
795
+ return deserializeList(header, options);
796
+ }
797
+ function deserializeList(value, options) {
798
+ const starts = [];
799
+ for (const match of value.matchAll(/Payment\s+/gi)) {
800
+ starts.push(match.index);
801
+ }
802
+ if (starts.length === 0)
803
+ throw new Error("No Payment schemes found.");
804
+ return starts.map((start, i) => {
805
+ const end = i + 1 < starts.length ? starts[i + 1] : value.length;
806
+ const chunk = value.slice(start, end).replace(/,\s*$/, "");
807
+ return deserialize2(chunk, options);
808
+ });
809
+ }
810
+ function verify2(challenge, options) {
811
+ const expectedId = computeId(challenge, options);
812
+ return constantTimeEqual(challenge.id, expectedId);
813
+ }
814
+ function meta2(challenge) {
815
+ return challenge.opaque;
816
+ }
817
+ function computeId(challenge, options) {
818
+ const input = [
819
+ challenge.realm,
820
+ challenge.method,
821
+ challenge.intent,
822
+ serialize(challenge.request),
823
+ challenge.expires ?? "",
824
+ challenge.digest ?? "",
825
+ challenge.opaque ? serialize(challenge.opaque) : ""
826
+ ].join("|");
827
+ const key = Bytes_exports.fromString(options.secretKey);
828
+ const data = Bytes_exports.fromString(input);
829
+ const mac2 = Hash_exports.hmac256(key, data, { as: "Bytes" });
830
+ return Base64_exports.fromBytes(mac2, { url: true, pad: false });
831
+ }
832
+
833
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Credential.js
834
+ var Credential_exports = {};
835
+ __export(Credential_exports, {
836
+ deserialize: () => deserialize3,
837
+ extractPaymentScheme: () => extractPaymentScheme,
838
+ from: () => from3,
839
+ fromRequest: () => fromRequest,
840
+ serialize: () => serialize3
841
+ });
842
+ function deserialize3(value) {
843
+ const prefixMatch = value.match(/^Payment\s+(.+)$/i);
844
+ if (!prefixMatch?.[1])
845
+ throw new Error("Missing Payment scheme.");
846
+ try {
847
+ const json2 = Base64_exports.toString(prefixMatch[1]);
848
+ const parsed = JSON.parse(json2);
849
+ const challenge = Schema.parse({
850
+ ...parsed.challenge,
851
+ request: deserialize(parsed.challenge.request)
852
+ });
853
+ return {
854
+ challenge,
855
+ payload: parsed.payload,
856
+ ...parsed.source && { source: parsed.source }
857
+ };
858
+ } catch {
859
+ throw new Error("Invalid base64url or JSON.");
860
+ }
861
+ }
862
+ function from3(parameters) {
863
+ const { challenge, payload, source } = parameters;
864
+ return {
865
+ challenge,
866
+ payload,
867
+ ...source && { source }
868
+ };
869
+ }
870
+ function fromRequest(request) {
871
+ const header = request.headers.get("Authorization");
872
+ if (!header)
873
+ throw new Error("Missing Authorization header.");
874
+ const payment = extractPaymentScheme(header);
875
+ if (!payment)
876
+ throw new Error("Missing Payment scheme.");
877
+ return deserialize3(payment);
878
+ }
879
+ function serialize3(credential) {
880
+ const wire = {
881
+ challenge: {
882
+ ...credential.challenge,
883
+ request: serialize(credential.challenge.request)
884
+ },
885
+ payload: credential.payload,
886
+ ...credential.source && { source: credential.source }
887
+ };
888
+ const json2 = JSON.stringify(wire);
889
+ const encoded = Base64_exports.fromString(json2, { pad: false, url: true });
890
+ return `Payment ${encoded}`;
891
+ }
892
+ function extractPaymentScheme(header) {
893
+ const schemes = header.split(",").map((s) => s.trim());
894
+ return schemes.find((s) => /^Payment\s+/i.test(s)) ?? null;
895
+ }
896
+
897
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Errors.js
898
+ var Errors_exports = {};
899
+ __export(Errors_exports, {
900
+ AmountExceedsDepositError: () => AmountExceedsDepositError,
901
+ BadRequestError: () => BadRequestError,
902
+ ChannelClosedError: () => ChannelClosedError,
903
+ ChannelNotFoundError: () => ChannelNotFoundError,
904
+ DeltaTooSmallError: () => DeltaTooSmallError,
905
+ InsufficientBalanceError: () => InsufficientBalanceError,
906
+ InvalidChallengeError: () => InvalidChallengeError,
907
+ InvalidPayloadError: () => InvalidPayloadError,
908
+ InvalidSignatureError: () => InvalidSignatureError,
909
+ MalformedCredentialError: () => MalformedCredentialError,
910
+ PaymentActionRequiredError: () => PaymentActionRequiredError,
911
+ PaymentError: () => PaymentError,
912
+ PaymentExpiredError: () => PaymentExpiredError,
913
+ PaymentInsufficientError: () => PaymentInsufficientError,
914
+ PaymentMethodUnsupportedError: () => PaymentMethodUnsupportedError,
915
+ PaymentRequiredError: () => PaymentRequiredError,
916
+ SignerMismatchError: () => SignerMismatchError,
917
+ VerificationFailedError: () => VerificationFailedError
918
+ });
919
+ var PaymentError = class extends Error {
920
+ /** HTTP status code. */
921
+ status = 402;
922
+ /** Converts the error to RFC 9457 Problem Details format. */
923
+ toProblemDetails(challengeId) {
924
+ return {
925
+ type: this.type,
926
+ title: this.title,
927
+ status: this.status,
928
+ detail: this.message,
929
+ ...challengeId && { challengeId }
930
+ };
931
+ }
932
+ };
933
+ var MalformedCredentialError = class extends PaymentError {
934
+ name = "MalformedCredentialError";
935
+ title = "Malformed Credential";
936
+ status = 402;
937
+ type = "https://paymentauth.org/problems/malformed-credential";
938
+ constructor(options = {}) {
939
+ const { reason } = options;
940
+ super(reason ? `Credential is malformed: ${reason}.` : "Credential is malformed.");
941
+ }
942
+ };
943
+ var InvalidChallengeError = class extends PaymentError {
944
+ name = "InvalidChallengeError";
945
+ title = "Invalid Challenge";
946
+ status = 402;
947
+ type = "https://paymentauth.org/problems/invalid-challenge";
948
+ constructor(options = {}) {
949
+ const { id, reason } = options;
950
+ const idPart = id ? ` "${id}"` : "";
951
+ const reasonPart = reason ? `: ${reason}` : "";
952
+ super(`Challenge${idPart} is invalid${reasonPart}.`);
953
+ }
954
+ };
955
+ var VerificationFailedError = class extends PaymentError {
956
+ name = "VerificationFailedError";
957
+ title = "Verification Failed";
958
+ type = "https://paymentauth.org/problems/verification-failed";
959
+ constructor(options = {}) {
960
+ const { reason } = options;
961
+ super(reason ? `Payment verification failed: ${reason}.` : "Payment verification failed.");
962
+ }
963
+ };
964
+ var PaymentActionRequiredError = class extends PaymentError {
965
+ name = "PaymentActionRequiredError";
966
+ title = "Payment Action Required";
967
+ type = "https://paymentauth.org/problems/payment-action-required";
968
+ constructor(options = {}) {
969
+ const { reason } = options;
970
+ super(reason ? `Payment requires action: ${reason}.` : "Payment requires action.");
971
+ }
972
+ };
973
+ var PaymentExpiredError = class extends PaymentError {
974
+ name = "PaymentExpiredError";
975
+ title = "Payment Expired";
976
+ type = "https://paymentauth.org/problems/payment-expired";
977
+ constructor(options = {}) {
978
+ const { expires } = options;
979
+ super(expires ? `Payment expired at ${expires}.` : "Payment has expired.");
980
+ }
981
+ };
982
+ var PaymentRequiredError = class extends PaymentError {
983
+ name = "PaymentRequiredError";
984
+ title = "Payment Required";
985
+ type = "https://paymentauth.org/problems/payment-required";
986
+ constructor(options = {}) {
987
+ const { description } = options;
988
+ const parts = ["Payment is required"];
989
+ if (description)
990
+ parts.push(`(${description})`);
991
+ super(`${parts.join(" ")}.`);
992
+ }
993
+ };
994
+ var InvalidPayloadError = class extends PaymentError {
995
+ name = "InvalidPayloadError";
996
+ title = "Invalid Payload";
997
+ type = "https://paymentauth.org/problems/invalid-payload";
998
+ constructor(options = {}) {
999
+ const { reason } = options;
1000
+ super(reason ? `Credential payload is invalid: ${reason}.` : "Credential payload is invalid.");
1001
+ }
1002
+ };
1003
+ var BadRequestError = class extends PaymentError {
1004
+ name = "BadRequestError";
1005
+ title = "Bad Request";
1006
+ status = 400;
1007
+ type = "https://paymentauth.org/problems/bad-request";
1008
+ constructor(options = {}) {
1009
+ const { reason } = options;
1010
+ super(reason ? `Bad request: ${reason}.` : "Bad request.");
1011
+ }
1012
+ };
1013
+ var PaymentInsufficientError = class extends PaymentError {
1014
+ name = "PaymentInsufficientError";
1015
+ title = "Payment Insufficient";
1016
+ type = "https://paymentauth.org/problems/payment-insufficient";
1017
+ constructor(options = {}) {
1018
+ const { reason } = options;
1019
+ super(reason ? `Payment insufficient: ${reason}.` : "Payment amount is insufficient.");
1020
+ }
1021
+ };
1022
+ var PaymentMethodUnsupportedError = class extends PaymentError {
1023
+ name = "PaymentMethodUnsupportedError";
1024
+ title = "Method Unsupported";
1025
+ status = 400;
1026
+ type = "https://paymentauth.org/problems/method-unsupported";
1027
+ constructor(options = {}) {
1028
+ const { method } = options;
1029
+ super(method ? `Payment method "${method}" is not supported.` : "Payment method is not supported.");
1030
+ }
1031
+ };
1032
+ var InsufficientBalanceError = class extends PaymentError {
1033
+ name = "InsufficientBalanceError";
1034
+ title = "Insufficient Balance";
1035
+ status = 402;
1036
+ type = "https://paymentauth.org/problems/session/insufficient-balance";
1037
+ constructor(options = {}) {
1038
+ const { reason } = options;
1039
+ super(reason ? `Insufficient balance: ${reason}.` : "Insufficient balance.");
1040
+ }
1041
+ };
1042
+ var InvalidSignatureError = class extends PaymentError {
1043
+ name = "InvalidSignatureError";
1044
+ title = "Invalid Signature";
1045
+ status = 402;
1046
+ type = "https://paymentauth.org/problems/session/invalid-signature";
1047
+ constructor(options = {}) {
1048
+ const { reason } = options;
1049
+ super(reason ? `Invalid signature: ${reason}.` : "Invalid signature.");
1050
+ }
1051
+ };
1052
+ var SignerMismatchError = class extends PaymentError {
1053
+ name = "SignerMismatchError";
1054
+ title = "Signer Mismatch";
1055
+ status = 402;
1056
+ type = "https://paymentauth.org/problems/session/signer-mismatch";
1057
+ constructor(options = {}) {
1058
+ const { reason } = options;
1059
+ super(reason ? `Signer mismatch: ${reason}.` : "Signer is not authorized for this channel.");
1060
+ }
1061
+ };
1062
+ var AmountExceedsDepositError = class extends PaymentError {
1063
+ name = "AmountExceedsDepositError";
1064
+ title = "Amount Exceeds Deposit";
1065
+ status = 402;
1066
+ type = "https://paymentauth.org/problems/session/amount-exceeds-deposit";
1067
+ constructor(options = {}) {
1068
+ const { reason } = options;
1069
+ super(reason ? `Amount exceeds deposit: ${reason}.` : "Voucher amount exceeds channel deposit.");
1070
+ }
1071
+ };
1072
+ var DeltaTooSmallError = class extends PaymentError {
1073
+ name = "DeltaTooSmallError";
1074
+ title = "Delta Too Small";
1075
+ status = 402;
1076
+ type = "https://paymentauth.org/problems/session/delta-too-small";
1077
+ constructor(options = {}) {
1078
+ const { reason } = options;
1079
+ super(reason ? `Delta too small: ${reason}.` : "Amount increase below minimum voucher delta.");
1080
+ }
1081
+ };
1082
+ var ChannelNotFoundError = class extends PaymentError {
1083
+ name = "ChannelNotFoundError";
1084
+ title = "Channel Not Found";
1085
+ status = 410;
1086
+ type = "https://paymentauth.org/problems/session/channel-not-found";
1087
+ constructor(options = {}) {
1088
+ const { reason } = options;
1089
+ super(reason ? `Channel not found: ${reason}.` : "No channel with this ID exists.");
1090
+ }
1091
+ };
1092
+ var ChannelClosedError = class extends PaymentError {
1093
+ name = "ChannelClosedError";
1094
+ title = "Channel Closed";
1095
+ status = 410;
1096
+ type = "https://paymentauth.org/problems/session/channel-finalized";
1097
+ constructor(options = {}) {
1098
+ const { reason } = options;
1099
+ super(reason ? `Channel closed: ${reason}.` : "Channel is closed.");
1100
+ }
1101
+ };
1102
+
1103
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Expires.js
1104
+ var Expires_exports = {};
1105
+ __export(Expires_exports, {
1106
+ days: () => days,
1107
+ hours: () => hours,
1108
+ minutes: () => minutes,
1109
+ months: () => months,
1110
+ seconds: () => seconds,
1111
+ weeks: () => weeks,
1112
+ years: () => years
1113
+ });
1114
+ function days(n) {
1115
+ return new Date(Date.now() + n * 24 * 60 * 60 * 1e3).toISOString();
1116
+ }
1117
+ function hours(n) {
1118
+ return new Date(Date.now() + n * 60 * 60 * 1e3).toISOString();
1119
+ }
1120
+ function minutes(n) {
1121
+ return new Date(Date.now() + n * 60 * 1e3).toISOString();
1122
+ }
1123
+ function months(n) {
1124
+ return new Date(Date.now() + n * 30 * 24 * 60 * 60 * 1e3).toISOString();
1125
+ }
1126
+ function seconds(n) {
1127
+ return new Date(Date.now() + n * 1e3).toISOString();
1128
+ }
1129
+ function weeks(n) {
1130
+ return new Date(Date.now() + n * 7 * 24 * 60 * 60 * 1e3).toISOString();
1131
+ }
1132
+ function years(n) {
1133
+ return new Date(Date.now() + n * 365 * 24 * 60 * 60 * 1e3).toISOString();
1134
+ }
1135
+
1136
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Mcp.js
1137
+ var Mcp_exports = {};
1138
+ __export(Mcp_exports, {
1139
+ credentialMetaKey: () => credentialMetaKey,
1140
+ paymentRequiredCode: () => paymentRequiredCode,
1141
+ paymentVerificationFailedCode: () => paymentVerificationFailedCode,
1142
+ receiptMetaKey: () => receiptMetaKey
1143
+ });
1144
+ var paymentRequiredCode = -32042;
1145
+ var paymentVerificationFailedCode = -32043;
1146
+ var credentialMetaKey = "org.paymentauth/credential";
1147
+ var receiptMetaKey = "org.paymentauth/receipt";
1148
+
1149
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Method.js
1150
+ var Method_exports = {};
1151
+ __export(Method_exports, {
1152
+ from: () => from4,
1153
+ toClient: () => toClient,
1154
+ toServer: () => toServer
1155
+ });
1156
+ function from4(method) {
1157
+ return method;
1158
+ }
1159
+ function toClient(method, options) {
1160
+ const { context, createCredential } = options;
1161
+ return {
1162
+ ...method,
1163
+ context,
1164
+ createCredential
1165
+ };
1166
+ }
1167
+ function toServer(method, options) {
1168
+ const { defaults, request, respond, transport, verify: verify3 } = options;
1169
+ return {
1170
+ ...method,
1171
+ defaults,
1172
+ request,
1173
+ respond,
1174
+ transport,
1175
+ verify: verify3
1176
+ };
1177
+ }
1178
+
1179
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Receipt.js
1180
+ var Receipt_exports = {};
1181
+ __export(Receipt_exports, {
1182
+ Schema: () => Schema2,
1183
+ deserialize: () => deserialize4,
1184
+ from: () => from5,
1185
+ fromResponse: () => fromResponse2,
1186
+ serialize: () => serialize4
1187
+ });
1188
+ var Schema2 = object({
1189
+ /** Payment method used (e.g., "tempo", "stripe"). */
1190
+ method: string(),
1191
+ /** Method-specific reference (e.g., transaction hash). */
1192
+ reference: string(),
1193
+ /** Optional external reference ID echoed from the credential payload. */
1194
+ externalId: optional(string()),
1195
+ /** Payment status. Always "success" — failures use 402 + Problem Details. */
1196
+ status: literal("success"),
1197
+ /** RFC 3339 settlement timestamp. */
1198
+ timestamp: datetime()
1199
+ });
1200
+ function deserialize4(encoded) {
1201
+ const json2 = Base64_exports.toString(encoded);
1202
+ return from5(JSON.parse(json2));
1203
+ }
1204
+ function from5(parameters) {
1205
+ return Schema2.parse(parameters);
1206
+ }
1207
+ function serialize4(receipt) {
1208
+ const json2 = JSON.stringify(receipt);
1209
+ return Base64_exports.fromString(json2, { pad: false, url: true });
1210
+ }
1211
+ function fromResponse2(response) {
1212
+ const header = response.headers.get("Payment-Receipt");
1213
+ if (!header)
1214
+ throw new Error("Missing Payment-Receipt header.");
1215
+ return deserialize4(header);
1216
+ }
1217
+
1218
+ // ../../node_modules/.pnpm/mppx@0.4.9_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_openap_a5bd8709643e33148686c341f103678d/node_modules/mppx/dist/Store.js
1219
+ var Store_exports = {};
1220
+ __export(Store_exports, {
1221
+ cloudflare: () => cloudflare,
1222
+ from: () => from6,
1223
+ memory: () => memory,
1224
+ redis: () => redis,
1225
+ upstash: () => upstash
1226
+ });
1227
+ function from6(store) {
1228
+ return store;
1229
+ }
1230
+ function cloudflare(kv) {
1231
+ return from6({
1232
+ async get(key) {
1233
+ const raw = await kv.get(key);
1234
+ if (raw == null)
1235
+ return null;
1236
+ return Json_exports.parse(raw);
1237
+ },
1238
+ async put(key, value) {
1239
+ await kv.put(key, Json_exports.stringify(value));
1240
+ },
1241
+ async delete(key) {
1242
+ await kv.delete(key);
1243
+ }
1244
+ });
1245
+ }
1246
+ function memory() {
1247
+ const store = /* @__PURE__ */ new Map();
1248
+ return from6({
1249
+ async get(key) {
1250
+ const raw = store.get(key);
1251
+ if (raw === void 0)
1252
+ return null;
1253
+ return Json_exports.parse(raw);
1254
+ },
1255
+ async put(key, value) {
1256
+ store.set(key, Json_exports.stringify(value));
1257
+ },
1258
+ async delete(key) {
1259
+ store.delete(key);
1260
+ }
1261
+ });
1262
+ }
1263
+ function redis(client) {
1264
+ return from6({
1265
+ async get(key) {
1266
+ const raw = await client.get(key);
1267
+ if (raw == null)
1268
+ return null;
1269
+ return Json_exports.parse(raw);
1270
+ },
1271
+ async put(key, value) {
1272
+ await client.set(key, Json_exports.stringify(value));
1273
+ },
1274
+ async delete(key) {
1275
+ await client.del(key);
1276
+ }
1277
+ });
1278
+ }
1279
+ function upstash(redis2) {
1280
+ return from6({
1281
+ async get(key) {
1282
+ return await redis2.get(key);
1283
+ },
1284
+ async put(key, value) {
1285
+ await redis2.set(key, value);
1286
+ },
1287
+ async delete(key) {
1288
+ await redis2.del(key);
1289
+ }
1290
+ });
1291
+ }
1292
+ export {
1293
+ BodyDigest_exports as BodyDigest,
1294
+ Challenge_exports as Challenge,
1295
+ Credential_exports as Credential,
1296
+ Errors_exports as Errors,
1297
+ Expires_exports as Expires,
1298
+ Mcp_exports as Mcp,
1299
+ Method_exports as Method,
1300
+ PaymentRequest_exports as PaymentRequest,
1301
+ Receipt_exports as Receipt,
1302
+ Store_exports as Store,
1303
+ zod_exports as z
1304
+ };
1305
+ //# sourceMappingURL=dist-YCBO7GXC.js.map