@arbol-ai/maximus 7.2.0 → 7.3.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.
Files changed (79) hide show
  1. package/config/oxfmt.mjs +1 -0
  2. package/config/oxlint.mjs +1 -0
  3. package/dist/analytics/analytics.d.ts +2 -4
  4. package/dist/analytics/analytics.js +3 -4
  5. package/dist/body.d.ts +1 -1
  6. package/dist/body.js +2 -2
  7. package/dist/chunks/{body-BcMbreNd.js → body-6LichrQm.js} +1 -2
  8. package/dist/chunks/{correlation-gaiEoMBr.js → correlation-BEkcFFGT.js} +1 -2
  9. package/dist/chunks/{execution-qfZuMSIu.js → execution-B-yy4C7N.js} +14 -23
  10. package/dist/chunks/{json-Dwni3u4c.js → json-Bu4BLT25.js} +2 -3
  11. package/dist/chunks/prepare-project-zi106pWF.js +146 -0
  12. package/dist/chunks/{record-D2H3cg8S.js → record-DY-lX9w1.js} +2 -4
  13. package/dist/chunks/runtime-BPnaa-NK.js +223 -0
  14. package/dist/chunks/{schemas-q-51wBMQ.js → schemas-CzTvbXb6.js} +6 -11
  15. package/dist/chunks/{src-Bqznd6Dd.js → src-DPSpGNnT.js} +13 -20
  16. package/dist/chunks/{telemetry-DvZgrzZn.js → telemetry-BTwB68m5.js} +2 -4
  17. package/dist/chunks/{types-BCPe0fok.d.ts → types-BWxDd3tY.d.ts} +105 -51
  18. package/dist/chunks/{validation-DWxKk1Js.js → validation-r-sgmsqb.js} +3 -6
  19. package/dist/client/client.d.ts +1 -3
  20. package/dist/client/client.js +7 -11
  21. package/dist/diagnostics.d.ts +1 -3
  22. package/dist/diagnostics.js +2 -2
  23. package/dist/errors.d.ts +1 -1
  24. package/dist/errors.js +3 -4
  25. package/dist/http-paths.d.ts +1 -1
  26. package/dist/http-paths.js +1 -2
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +7 -7
  29. package/dist/internals.d.ts +1 -1
  30. package/dist/internals.js +2 -2
  31. package/dist/mcp/index.d.ts +2 -4
  32. package/dist/mcp/index.js +5 -7
  33. package/dist/postgres/index.d.ts +0 -4
  34. package/dist/postgres/index.js +2 -4
  35. package/dist/project/index.d.ts +24 -0
  36. package/dist/project/index.js +82 -0
  37. package/dist/projection.d.ts +1 -3
  38. package/dist/projection.js +1 -2
  39. package/dist/schemas.d.ts +1 -1
  40. package/dist/schemas.js +2 -2
  41. package/dist/standard-failures.d.ts +1 -3
  42. package/dist/standard-failures.js +1 -2
  43. package/dist/tooling/cli.js +41 -24
  44. package/dist/tooling/testing.d.ts +1 -3
  45. package/dist/tooling/testing.js +1 -2
  46. package/dist/tooling/vite.d.ts +3 -0
  47. package/dist/tooling/vite.js +44 -0
  48. package/dist/webhooks.d.ts +2 -4
  49. package/dist/webhooks.js +1 -2
  50. package/dist/workers/runtime.d.ts +2 -112
  51. package/dist/workers/runtime.js +1 -226
  52. package/package.json +19 -6
  53. package/skills/maximus/SKILL.md +1 -1
  54. package/skills/maximus/references/building-a-service.md +9 -0
  55. package/templates/project/.agents/skills/project/SKILL.md.template +17 -0
  56. package/templates/project/.github/workflows/ci.yml.template +36 -0
  57. package/templates/project/.gitignore.template +10 -0
  58. package/templates/project/CLAUDE.md.template +34 -0
  59. package/templates/project/README.md.template +47 -0
  60. package/templates/project/cloudflare.config.ts.template +24 -0
  61. package/templates/project/package.json.template +38 -0
  62. package/templates/project/pages/index.ts.template +11 -0
  63. package/templates/project/routes/v1/greeting.ts.template +22 -0
  64. package/templates/project/src/app.ts.template +2 -0
  65. package/templates/project/src/application.ts.template +26 -0
  66. package/templates/project/src/index.ts.template +3 -0
  67. package/templates/project/src/worker.ts.template +6 -0
  68. package/templates/project/tsconfig.json.template +30 -0
  69. package/templates/project/vite.config.ts.template +11 -0
  70. package/templates/service/.github/workflows/ci.yml.template +1 -1
  71. package/templates/service/.gitignore.template +1 -0
  72. package/templates/service/CLAUDE.md.template +2 -0
  73. package/templates/service/README.md.template +7 -7
  74. package/templates/service/package.json.template +14 -9
  75. package/templates/service/tests/contract.test.ts.template +1 -1
  76. package/templates/service/vite.config.ts.template +8 -2
  77. package/templates/service/vitest.config.ts.template +1 -1
  78. package/templates/service/oxfmt.config.ts.template +0 -1
  79. package/templates/service/oxlint.config.ts.template +0 -1
@@ -1,7 +1,7 @@
1
- import { a as decodeIssues, n as decodeSchema, o as SchemaValidationError, s as defaultSchema, u as inputSchema } from "./validation-DWxKk1Js.js";
1
+ import { a as decodeIssues, n as decodeSchema, o as SchemaValidationError, s as defaultSchema, u as inputSchema } from "./validation-r-sgmsqb.js";
2
2
  import { Kind, Type, Type as Type$1, Type as t } from "@sinclair/typebox";
3
3
 
4
- //#region src/schema-reader.ts
4
+ // src/schema-reader.ts
5
5
  /**
6
6
  * Reads untrusted data — a stored record, a provider or model answer — through its schema's owner
7
7
  * semantics: defaults applied, normalizers run before their checks, unknown keys of a strip object
@@ -29,8 +29,7 @@ function readSchema(schema, input) {
29
29
  return checked.data;
30
30
  }
31
31
 
32
- //#endregion
33
- //#region src/attachment-schema.ts
32
+ // src/attachment-schema.ts
34
33
  /** Runtime-free descriptor for a validated HTTP attachment, never a JSON or RPC value. */
35
34
  /** The output of an operation that answers with a file (`http.response: 'attachment'`). */
36
35
  const AttachmentOutputSchema = Type.Unsafe({
@@ -40,8 +39,7 @@ const AttachmentOutputSchema = Type.Unsafe({
40
39
  description: "Authenticated attachment bytes with validated media type, filename and exact length."
41
40
  });
42
41
 
43
- //#endregion
44
- //#region src/pagination.ts
42
+ // src/pagination.ts
45
43
  /**
46
44
  * The one list contract: bidirectional keyset pagination. A list takes the query fields `cursor`,
47
45
  * `direction` and `limit` and answers `{ object: 'list', data, pageInfo }`. The cursor is opaque to
@@ -103,8 +101,7 @@ function Page(item, options) {
103
101
  });
104
102
  }
105
103
 
106
- //#endregion
107
- //#region src/common-schemas.ts
104
+ // src/common-schemas.ts
108
105
  /**
109
106
  * Values and objects that services publish alike, each named by its `$id`: an OpenAPI document carries
110
107
  * it once as `#/components/schemas/<name>`, and every SDK generated from those documents has one type
@@ -186,8 +183,7 @@ const PostalAddressSchema = Type.Object({
186
183
  additionalProperties: false
187
184
  });
188
185
 
189
- //#endregion
190
- //#region src/schemas.ts
186
+ // src/schemas.ts
191
187
  /**
192
188
  * `@arbol-ai/maximus/schemas`: the browser-safe schema vocabulary: TypeBox (`t`), its types, the validators
193
189
  * and the shared identifier schemas, with nothing that needs a Worker runtime. A contract module that
@@ -212,5 +208,4 @@ const UuidSchema = Type.String({
212
208
  pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
213
209
  });
214
210
 
215
- //#endregion
216
211
  export { pageLimit as _, t as a, readSchema as b, HexColorSchema as c, PhoneNumberSchema as d, PostalAddressSchema as f, PageQueryFields as g, PageInfoSchema as h, UuidSchema as i, HttpsUrlSchema as l, Page as m, OrganizationIdSchema as n, DeletedObjectSchema as o, SignedUrlSchema as p, Type$1 as r, EmailAddressSchema as s, EmptyInputSchema as t, NamedReferenceSchema as u, AttachmentOutputSchema as v, checkSchema as y };
@@ -1,14 +1,14 @@
1
1
  import { FailureSchema, standardErrors } from "../errors.js";
2
- import { r as readBodyText } from "./body-BcMbreNd.js";
3
- import { t as isRecord } from "./record-D2H3cg8S.js";
4
- import { C as operationMatchesScopes, D as pathParameterSchemas, O as attachmentResponse, S as operationBodyLimit, T as operationScopes, _ as STANDARD_CODES, b as mcpOpenWorld, c as tokenEndpoints, d as err, h as DEFAULT_MAX_BODY_BYTES, i as createTokenAuthorization, k as binaryBody, l as tokenIssuer, m as sha256Hex, n as defineApp, p as ok, s as tokenAudiences, t as executeOperation, u as usesOwnBearer, v as composeOperations, w as operationOutputLimit, y as isPublicOperation } from "./execution-qfZuMSIu.js";
2
+ import { r as readBodyText } from "./body-6LichrQm.js";
3
+ import { t as isRecord } from "./record-DY-lX9w1.js";
4
+ import { C as operationMatchesScopes, D as pathParameterSchemas, O as attachmentResponse, S as operationBodyLimit, T as operationScopes, _ as STANDARD_CODES, b as mcpOpenWorld, c as tokenEndpoints, d as err, h as DEFAULT_MAX_BODY_BYTES, i as createTokenAuthorization, k as binaryBody, l as tokenIssuer, m as sha256Hex, n as defineApp, p as ok, s as tokenAudiences, t as executeOperation, u as usesOwnBearer, v as composeOperations, w as operationOutputLimit, y as isPublicOperation } from "./execution-B-yy4C7N.js";
5
5
  import { createHttpRouteResolver, operationPathParameters } from "../http-paths.js";
6
- import { a as telemetryEnabled, i as reportUnexpected, n as recordAdmission, r as recordExecution, s as withTelemetry } from "./telemetry-DvZgrzZn.js";
7
- import { n as mediaType } from "./json-Dwni3u4c.js";
6
+ import { a as telemetryEnabled, i as reportUnexpected, n as recordAdmission, r as recordExecution, s as withTelemetry } from "./telemetry-BTwB68m5.js";
7
+ import { n as mediaType } from "./json-Bu4BLT25.js";
8
8
  import { Type, Type as Type$1, Type as t } from "@sinclair/typebox";
9
9
  import { stringify } from "yaml";
10
10
 
11
- //#region src/builder.ts
11
+ // src/builder.ts
12
12
  /** Immutable builders let independent resource modules share inferred context without overwriting routes. */
13
13
  var ApplicationBuilder = class ApplicationBuilder {
14
14
  /**
@@ -105,8 +105,7 @@ function maximus(configuration) {
105
105
  });
106
106
  }
107
107
 
108
- //#endregion
109
- //#region src/oauth.ts
108
+ // src/oauth.ts
110
109
  /** A scope token as RFC 6749 defines it: printable ASCII without spaces, quotes or backslashes. */
111
110
  const SCOPE = /^[\u0021\u0023-\u005B\u005D-\u007E]+$/;
112
111
  /** Whether a value is an HTTPS URL without credentials or a fragment, and, for an issuer, without a query. */
@@ -131,8 +130,7 @@ function protectedResourceMetadata(resource, env) {
131
130
  };
132
131
  }
133
132
 
134
- //#endregion
135
- //#region src/internal/http-layout.ts
133
+ // src/internal/http-layout.ts
136
134
  /** The paths an application answers itself, below its base path: discovery and liveness. */
137
135
  const NATIVE_PATHS = [
138
136
  "/",
@@ -242,8 +240,7 @@ function composition(paths, operations, transports, hooks) {
242
240
  };
243
241
  }
244
242
 
245
- //#endregion
246
- //#region src/internal/http-query.ts
243
+ // src/internal/http-query.ts
247
244
  /**
248
245
  * The typed GET query codec: which input fields travel in the query string, and how each value is read as
249
246
  * its kind.
@@ -315,8 +312,7 @@ function queryInput(kinds, params) {
315
312
  return input;
316
313
  }
317
314
 
318
- //#endregion
319
- //#region src/schema-bundle.ts
315
+ // src/schema-bundle.ts
320
316
  /**
321
317
  * Schema bundling: named schemas (`$id`) become shared components for an OpenAPI document, or are written
322
318
  * in place for a reader without components, such as an MCP tool listing.
@@ -475,8 +471,7 @@ function standaloneSchema(value) {
475
471
  };
476
472
  }
477
473
 
478
- //#endregion
479
- //#region src/openapi.ts
474
+ // src/openapi.ts
480
475
  /**
481
476
  * An application's OpenAPI 3.1 document, as its origin serves it: paths, response envelopes, failures by
482
477
  * status, security schemes, and the `x-*` extensions that carry what OpenAPI cannot say (scopes, effects,
@@ -770,8 +765,7 @@ function securitySchemes(tokens, scopes) {
770
765
  };
771
766
  }
772
767
 
773
- //#endregion
774
- //#region src/http.ts
768
+ // src/http.ts
775
769
  /**
776
770
  * The native HTTP handler: one `fetch` function that serves an application's operations, its
777
771
  * discovery documents (OpenAPI, OAuth protected-resource metadata, liveness), its transports (MCP),
@@ -1167,5 +1161,4 @@ function operationInput(route, request, url, bodyText) {
1167
1161
  });
1168
1162
  }
1169
1163
 
1170
- //#endregion
1171
- export { canonical as a, maximus as c, createOpenApi as i, t as n, standaloneSchema as o, createHttpHandler as r, protectedResourceMetadata as s, Type$1 as t };
1164
+ export { canonical as a, nativePaths as c, maximus as d, createOpenApi as i, ownsPrefix as l, t as n, standaloneSchema as o, createHttpHandler as r, VERSIONED_PATH as s, Type$1 as t, protectedResourceMetadata as u };
@@ -1,6 +1,6 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
2
 
3
- //#region src/internal/diagnostics.ts
3
+ // src/internal/diagnostics.ts
4
4
  /**
5
5
  * Safe error descriptions for diagnostics: an error's known names, its causes' names, its issue count and
6
6
  * its stack locations, never a message.
@@ -85,8 +85,7 @@ function createDiagnostics(errorNames = []) {
85
85
  };
86
86
  }
87
87
 
88
- //#endregion
89
- //#region src/telemetry.ts
88
+ // src/telemetry.ts
90
89
  /**
91
90
  * Telemetry: invocation-local diagnostics kept in AsyncLocalStorage, safe native log events, and observers
92
91
  * that receive execution and admission observations as background work.
@@ -216,5 +215,4 @@ function recordExecution(manifest, env, background, invocation) {
216
215
  for (const observer of manifest.telemetry?.observers ?? []) if (observer.execution) deliver(background, event.principal.requestId, () => observer.execution?.(event, env));
217
216
  }
218
217
 
219
- //#endregion
220
218
  export { telemetryEnabled as a, createDiagnostics as c, reportUnexpected as i, recordAdmission as n, withDiagnostics as o, recordExecution as r, withTelemetry as s, diagnosticsEnabled as t };
@@ -1,5 +1,5 @@
1
1
  import { Kind, OptionalKind, Static, Static as Static$1, Static as Static$2, StaticDecode, TArray, TLiteral, TObject, TOptional, TProperties, TRecord, TSchema, TSchema as TSchema$1, TSchema as TSchema$2, TString, TTransform, TTuple, TUnion, TUnsafe, TransformKind, Type as Type$1, Type as Type$2, Type as t, Type as t$1 } from "@sinclair/typebox";
2
- //#region src/attachment-schema.d.ts
2
+ import { DurableObject, WorkerEntrypoint } from "cloudflare:workers";
3
3
  /** A file an HTTP operation answers with: its bytes, media type, filename and exact length. */
4
4
  interface Attachment {
5
5
  /** The file's bytes, as a buffer or an unlocked stream. */
@@ -13,8 +13,6 @@ interface Attachment {
13
13
  }
14
14
  /** The output of an operation that answers with a file (`http.response: 'attachment'`). */
15
15
  declare const AttachmentOutputSchema: import("@sinclair/typebox").TUnsafe<Attachment>;
16
- //#endregion
17
- //#region src/internal/correlation.d.ts
18
16
  /**
19
17
  * Request correlation: request ids (a UUID, or a ray id from a trusted Cloudflare edge), W3C `traceparent`
20
18
  * parsing, and the correlation that durable work persists.
@@ -57,8 +55,6 @@ interface DurableCorrelation {
57
55
  * `traceparent`.
58
56
  */
59
57
  declare function durableCorrelation(requestId: string, originTraceParent?: string): DurableCorrelation;
60
- //#endregion
61
- //#region src/errors.d.ts
62
58
  /** The `data` of a failure whose code declares none: an empty object. */
63
59
  interface FailureData {}
64
60
  /**
@@ -269,8 +265,6 @@ declare function resultSchema<O extends TSchema, F extends TSchema>(value: O, er
269
265
  ok: TLiteral<false>;
270
266
  error: F;
271
267
  }>]>;
272
- //#endregion
273
- //#region src/result.d.ts
274
268
  /** Explicit operation outcome. Transports keep their own status and protocol envelope. */
275
269
  interface Success<T> {
276
270
  /** Always `true`, which marks a success. */
@@ -299,15 +293,11 @@ declare function err<E>(error: E): FailureResult<E>;
299
293
  * its value, or a failure with a well-formed error. Anything else is not an answer at all.
300
294
  */
301
295
  declare function isResult(value: unknown): value is Result<unknown, Failure>;
302
- //#endregion
303
- //#region src/binary.d.ts
304
296
  /** The raw body of an operation declared with `http.body: 'bytes'`, read on demand. */
305
297
  interface BinaryBody {
306
298
  /** Read once within this operation's byte limit, after the owner admits the target resource. */
307
299
  read: () => Promise<Result<Uint8Array<ArrayBuffer>, Failure>>;
308
300
  }
309
- //#endregion
310
- //#region src/schema-types.d.ts
311
301
  /** Opaque owner codecs already carry their decoded static type; only native transforms need traversal. */
312
302
  type HasNativeTransform<S extends TSchema> = typeof TransformKind extends keyof S ? true : string extends S[typeof Kind] ? false : S extends TObject<infer P> ? true extends { [K in keyof P]: HasNativeTransform<P[K]>; }[keyof P] ? true : false : S extends TArray<infer I> ? HasNativeTransform<I> : S extends TUnion<infer U> | TTuple<infer U> ? HasNativeTransform<U[number]> : S extends TRecord<TSchema, infer V> ? HasNativeTransform<V> : false;
313
303
  /**
@@ -315,8 +305,6 @@ type HasNativeTransform<S extends TSchema> = typeof TransformKind extends keyof
315
305
  * codecs; a schema without native transforms already has exactly its decoded `Static` type.
316
306
  */
317
307
  type StaticDecode$1<S extends TSchema> = true extends HasNativeTransform<S> ? StaticDecode<S> : Static<S>;
318
- //#endregion
319
- //#region src/scopes.d.ts
320
308
  /**
321
309
  * Scope names and matching: the namespaced form every scope takes, and whether granted scopes admit a
322
310
  * request.
@@ -328,8 +316,6 @@ type ScopeMatch = 'any' | 'all';
328
316
  * An empty requirement admits nobody.
329
317
  */
330
318
  declare function matchesScopes(required: readonly string[], granted: readonly string[], match?: ScopeMatch): boolean;
331
- //#endregion
332
- //#region src/oauth.d.ts
333
319
  /**
334
320
  * OAuth protected-resource metadata (RFC 9728): the resources an application publishes and the document
335
321
  * that describes each one.
@@ -350,8 +336,6 @@ declare function protectedResourceMetadata<E>(resource: OAuthResource<E>, env: E
350
336
  bearer_methods_supported: string[];
351
337
  scopes_supported: string[];
352
338
  };
353
- //#endregion
354
- //#region src/tokens.d.ts
355
339
  /**
356
340
  * Who calls, as every operation receives it: the actor, its kind, its verified organization and the request
357
341
  * id.
@@ -545,8 +529,6 @@ declare function createTokenVerifier<E>(policy: TokenPolicy<E>): (token: string)
545
529
  * that it carries the required scope. Refusals are `UNAUTHORIZED` or `FORBIDDEN` failures, never exceptions.
546
530
  */
547
531
  declare function createTokenAuthorization<E>(policy: TokenPolicy<E>, given?: (token: string) => Promise<unknown>): (request: Request, scope: string | readonly string[], context?: TokenResolutionContext<E>, scopeMatch?: ScopeMatch) => Promise<Result<TokenPrincipal, Failure>>;
548
- //#endregion
549
- //#region src/telemetry.d.ts
550
532
  /** Where background work goes: the runtime's `waitUntil`, such as a Worker's ExecutionContext. */
551
533
  interface BackgroundContext {
552
534
  /**
@@ -684,8 +666,6 @@ declare function recordExecution<E>(manifest: {
684
666
  started: number;
685
667
  result: Result<unknown, Failure>;
686
668
  }): void;
687
- //#endregion
688
- //#region src/manifest.d.ts
689
669
  /** Transport-verified authority, separate from the unchanged ordinary RPC principal. */
690
670
  interface InvocationAuthority {
691
671
  /** The transport whose admission verified the token, such as `http` or `mcp`. */
@@ -993,8 +973,6 @@ interface AppManifest<Env, C, Ops extends Record<string, OperationShape>> {
993
973
  /** The MCP server's instructions, guides and skills; setting it requires the MCP transport. */
994
974
  mcp?: McpConfiguration;
995
975
  }
996
- //#endregion
997
- //#region src/builder.d.ts
998
976
  /**
999
977
  * What `maximus()` takes: the application without its operations, context and middleware, which the builder
1000
978
  * adds.
@@ -1064,8 +1042,6 @@ declare class ApplicationBuilder<E, C, Ops extends Record<string, OperationShape
1064
1042
  * compose resource modules that share this base, then `.build()`.
1065
1043
  */
1066
1044
  declare function maximus<E>(configuration: ApplicationConfiguration<E>): ApplicationBuilder<E, Invocation<E>, Record<never, never>>;
1067
- //#endregion
1068
- //#region src/validation.d.ts
1069
1045
  /**
1070
1046
  * Checks a value against a schema without decoding it: the value when it matches, else an `INVALID_INPUT`
1071
1047
  * failure without issues. Use `decodeInput` for input with defaults and codecs.
@@ -1118,8 +1094,6 @@ declare function decodeInput<Schema extends TSchema>(schema: Schema, input: unkn
1118
1094
  };
1119
1095
  };
1120
1096
  };
1121
- //#endregion
1122
- //#region src/input-schemas.d.ts
1123
1097
  /** Type-only: the key under which a codec's schema type carries its wire type. No schema object has it. */
1124
1098
  declare const WIRE: unique symbol;
1125
1099
  /**
@@ -1234,8 +1208,6 @@ declare function inputSchema<S extends TSchema>(schema: S, options?: {
1234
1208
  }): TTransform<TUnsafe<SchemaInput<S>>, StaticDecode$1<S>>;
1235
1209
  /** The same, reading another wire shape `wire` and decoding it into `schema`'s canonical type. */
1236
1210
  declare function inputSchema<S extends TSchema, W extends TSchema>(schema: S, wire: W): TTransform<W, StaticDecode$1<S>>;
1237
- //#endregion
1238
- //#region src/schema-reader.d.ts
1239
1211
  /**
1240
1212
  * What `checkSchema` answers: the decoded data, `StaticDecode<S>` (which is `Static<S>` unless `S` holds a
1241
1213
  * TypeBox transform), or the error that lists every issue.
@@ -1257,8 +1229,6 @@ type Checked<S extends TSchema> = {
1257
1229
  declare function checkSchema<S extends TSchema>(schema: S, input: unknown): Checked<S>;
1258
1230
  /** `checkSchema`, throwing its SchemaValidationError on refusal. */
1259
1231
  declare function readSchema<S extends TSchema>(schema: S, input: unknown): StaticDecode$1<S>;
1260
- //#endregion
1261
- //#region src/pagination.d.ts
1262
1232
  /**
1263
1233
  * How to reach a list's neighboring pages: whether they exist and their opaque cursors, named `PageInfo`.
1264
1234
  */
@@ -1315,8 +1285,6 @@ interface Page<Item> {
1315
1285
  declare function Page<Item extends TSchema>(item: Item, options: {
1316
1286
  $id: string;
1317
1287
  }): TPage<Item>;
1318
- //#endregion
1319
- //#region src/common-schemas.d.ts
1320
1288
  /** An email address of at most 254 characters, named `EmailAddress`. */
1321
1289
  declare const EmailAddressSchema: TString;
1322
1290
  /** A phone number in E.164 format, named `PhoneNumber`. */
@@ -1357,8 +1325,6 @@ declare const PostalAddressSchema: import("@sinclair/typebox").TObject<{
1357
1325
  }>;
1358
1326
  /** A postal address, shaped as FHIR `Address`. */
1359
1327
  type PostalAddress = Static<typeof PostalAddressSchema>;
1360
- //#endregion
1361
- //#region src/schemas.d.ts
1362
1328
  /** The input of an operation that takes none: an empty strict object. */
1363
1329
  declare const EmptyInputSchema: import("@sinclair/typebox").TObject<{}>;
1364
1330
  /**
@@ -1369,8 +1335,6 @@ declare const EmptyInputSchema: import("@sinclair/typebox").TObject<{}>;
1369
1335
  declare const OrganizationIdSchema: import("@sinclair/typebox").TString;
1370
1336
  /** A lowercase RFC 9562 UUID of version 1 to 8, named `Uuid`. */
1371
1337
  declare const UuidSchema: import("@sinclair/typebox").TString;
1372
- //#endregion
1373
- //#region src/http.d.ts
1374
1338
  /**
1375
1339
  * What a transport receives for one admitted request: the request and its id, the verified caller, the
1376
1340
  * application, the operations it may serve, the OpenAPI document, and `invoke`, which runs an operation
@@ -1519,8 +1483,6 @@ interface HttpOptions<E = unknown> {
1519
1483
  * such as MCP, plain routes and mounts. Construction refuses a path two of them would claim.
1520
1484
  */
1521
1485
  declare function createHttpHandler<E, C, O extends Record<string, OperationShape>>(manifest: AppManifest<E, C, O>, hooks?: HttpOptions<E>): (request: Request, env: E, background?: BackgroundContext) => Promise<Response>;
1522
- //#endregion
1523
- //#region src/http-paths.d.ts
1524
1486
  /**
1525
1487
  * `@arbol-ai/maximus/http-paths`: versioned route templates, path parameter decoding, and the router that
1526
1488
  * matches a request to exactly one operation.
@@ -1560,8 +1522,6 @@ declare function createHttpRouteResolver<D extends HttpRouteDefinition>(definiti
1560
1522
  /** Used only at construction to prevent a transport from bypassing item-route authorization. */
1561
1523
  ownsPath(path: string): boolean;
1562
1524
  };
1563
- //#endregion
1564
- //#region src/internal/body.d.ts
1565
1525
  /** Closed decoding vocabulary used by bounded transport readers. */
1566
1526
  declare const HTTP_BODY_FAILURES: readonly ['too_large', 'invalid_length', 'invalid_json', 'invalid_utf8', 'unexpected_content_type', 'aborted', 'read_failed'];
1567
1527
  /** Why a body could not be read. */
@@ -1592,8 +1552,6 @@ declare function readBodyBytes(source: BodySource, options: BodyReadOptions): Pr
1592
1552
  declare function readBodyText(source: BodySource, options: BodyReadOptions & {
1593
1553
  fatalUtf8?: boolean;
1594
1554
  }): Promise<Result<string, HttpBodyFailure>>;
1595
- //#endregion
1596
- //#region src/internal/json.d.ts
1597
1555
  /** `application/json`, or a structured `+json` type such as `application/problem+json`. */
1598
1556
  declare function isJsonMediaType(value: string | null): boolean;
1599
1557
  /** Decode bounded JSON into unknown for the owner's input/output validator. */
@@ -1609,8 +1567,6 @@ declare function readJsonResponse(response: Response, options: {
1609
1567
  }): Promise<Result<unknown, HttpBodyFailure>>;
1610
1568
  /** Bounded Retry-After hint only. A hint never makes repeating a mutation safe. */
1611
1569
  declare function retryAfterSeconds(value: string | null, nowMs: number, maximum?: number): number | undefined;
1612
- //#endregion
1613
- //#region src/openapi.d.ts
1614
1570
  /**
1615
1571
  * The document the origin serves at `/openapi.json`: every public operation that declares an HTTP route,
1616
1572
  * never an internal one. Each operation also carries its scopes, effect, limits in force, MCP tool hints
@@ -1624,17 +1580,115 @@ declare function createOpenApi<E, C, O extends Record<string, OperationShape>>(m
1624
1580
  /** Adapter-owned operation metadata; schemas in extensions share the document's components. */
1625
1581
  operationExtensions?: (name: string, operation: OperationShape) => Record<`x-${string}`, unknown>;
1626
1582
  }): Record<string, unknown>;
1627
- //#endregion
1628
- //#region src/execution.d.ts
1629
1583
  /**
1630
1584
  * The execution path every transport shares: checks that the caller may run the operation, decodes the input,
1631
1585
  * prepares the context, runs the middleware and the handler, then checks the result against the declared
1632
1586
  * output and failures. An unexpected error becomes `INTERNAL_ERROR` and is reported, never thrown.
1633
1587
  */
1634
1588
  declare function executeOperation<E, C, O extends Record<string, OperationShape>>(manifest: AppManifest<E, C, O>, operation: OperationShape, env: E, principal: Principal, input: unknown, authority?: InvocationAuthority, background?: BackgroundContext, body?: BinaryBody): Promise<Result<unknown, Failure>>;
1635
- //#endregion
1636
- //#region src/define-app.d.ts
1637
1589
  /** Checks the application, then hands it back unchanged. */
1638
1590
  declare function defineApp<Env, C>(): <const Ops extends Record<string, OperationShape>>(manifest: AppManifest<Env, C, Ops>) => AppManifest<Env, C, Ops>;
1639
- //#endregion
1640
- export { PageQueryFields as $, withDiagnostics as $t, EmptyInputSchema as A, FailureData as An, Exposure as At, HexColorSchema as B, parseTraceParent as Bn, isPublicOperation as Bt, operationPathParameters as C, isResult as Cn, decodeSchema as Ct, RouteContext as D, ErrorDefinition as Dn, ApplicationConfiguration as Dt, HttpTransport as E, ErrorCatalog as En, ApplicationBuilder as Et, UuidSchema as F, DurableCorrelation as Fn, McpSkill as Ft, PostalAddress as G, BackgroundContext as Gt, NamedReference as H, AttachmentOutputSchema as Hn, operationMatchesScopes as Ht, t$1 as I, TraceParent as In, OperationMiddleware as It, SignedUrlSchema as J, TelemetryConfig as Jt, PostalAddressSchema as K, ExecutionObservation as Kt, DeletedObject as L, createRequestId as Ln, OperationScope as Lt, Static$2 as M, defineErrors as Mn, InvocationAuthority as Mt, TSchema$2 as N, resultSchema as Nn, McpConfiguration as Nt, TransportContext as O, ErrorFactory as On, maximus as Ot, Type$2 as P, standardErrors as Pn, McpGuide as Pt, PageQuery as Q, telemetryEnabled as Qt, DeletedObjectSchema as R, durableCorrelation as Rn, OperationShape as Rt, isPathParameterValue as S, err as Sn, decodeInput as St, HttpRoute as T, DefinedErrors as Tn, parseSchema as Tt, NamedReferenceSchema as U, operationScopes as Ut, HttpsUrlSchema as V, Attachment as Vn, operation as Vt, PhoneNumberSchema as W, AdmissionObservation as Wt, PageInfo as X, recordExecution as Xt, Page as Y, diagnosticsEnabled as Yt, PageInfoSchema as Z, reportUnexpected as Zt, HttpRouteDefinition as _, StaticDecode$1 as _n, strictObject as _t, Type$1 as a, TokenDevelopment as an, SchemaInput as at, decodePathParameter as b, Result as bn, urlSchema as bt, isJsonMediaType as c, TokenResolutionContext as cn, defaultSchema as ct, retryAfterSeconds as d, createTokenVerifier as dn, inspectSchema as dt, Principal as en, TPage as et, BodyReadOptions as f, projectToken as fn, literalUnion as ft, readBodyText as g, matchesScopes as gn, refineSchema as gt, readBodyBytes as h, ScopeMatch as hn, pipeSchema as ht, TSchema$1 as i, TokenClient as in, readSchema as it, OrganizationIdSchema as j, FailureSchema as jn, Invocation as jt, createHttpHandler as k, Failure as kn, AppManifest as kt, readJsonBody as l, TokenScheme as ln, extendObject as lt, HttpBodyFailureReason as m, protectedResourceMetadata as mn, normalizeSchema as mt, executeOperation as n, TokenAlgorithm as nn, Checked as nt, t as o, TokenPolicy as on, SchemaIssue as ot, HttpBodyFailure as p, OAuthResource as pn, looseObject as pt, SignedUrl as q, Observer as qt, Static$1 as r, TokenClaims as rn, checkSchema as rt, createOpenApi as s, TokenPrincipal as sn, SchemaValidationError as st, defineApp as t, PrincipalSchema as tn, pageLimit as tt, readJsonResponse as u, createTokenAuthorization as un, inputSchema as ut, HttpRouteMatch as v, BinaryBody as vn, stripObject as vt, HttpOptions as w, ok as wn, parseInput as wt, isInputHeaderName as x, Success as xn, InputIssue as xt, createHttpRouteResolver as y, FailureResult as yn, transformSchema as yt, EmailAddressSchema as z, isRequestId as zn, composeOperations as zt };
1591
+ /** A Workers static-assets binding; product stores and secrets never satisfy this capability. */
1592
+ interface AssetBinding {
1593
+ /** Answers a request with the uploaded build file at its URL path. */
1594
+ fetch: (request: Request) => Promise<Response>;
1595
+ }
1596
+ /** The names of the env bindings that are asset bindings. */
1597
+ type AssetBindingName<E> = { [K in keyof E]-?: E[K] extends AssetBinding ? K : never; }[keyof E] & string;
1598
+ /** Explicit assets policy. Unknown paths never receive the SPA shell. */
1599
+ interface WorkerAssetsOptions<E> {
1600
+ /** Environment binding whose fetch method serves the uploaded build files. */
1601
+ binding: AssetBindingName<E>;
1602
+ /** Known SPA routes. Stateless expressions may admit product-owned detail routes. */
1603
+ pages?: {
1604
+ paths: readonly string[];
1605
+ patterns?: readonly RegExp[];
1606
+ /** Build shell fetched for admitted pages; defaults to /index.html. */
1607
+ shell?: string;
1608
+ };
1609
+ /** Named build files that must revalidate, such as manifests and service workers. */
1610
+ files?: readonly string[];
1611
+ /** Slash-delimited namespaces containing content-hashed, immutable build files. */
1612
+ immutablePrefixes?: readonly string[];
1613
+ /** Product browser policy, including CSP. Native content type and cache policy remain authoritative. */
1614
+ headers?: HeadersInit | ((request: Request, env: E) => HeadersInit);
1615
+ /**
1616
+ * Development under Vite (the Cloudflare Vite plugin), whose dev server stands behind the binding:
1617
+ * a GET the Worker does not serve as a page, file or immutable asset (Vite's client, modules and
1618
+ * sources) is forwarded to it as it came. Pass `import.meta.env.DEV`, which a production build sets to
1619
+ * false: a deployed Worker must never forward unknown paths.
1620
+ */
1621
+ development?: boolean;
1622
+ }
1623
+ /** Typed organization credential preparation for one derived operation group. */
1624
+ declare function credentials<Schema extends TSchema$1>(options: {
1625
+ principal: Principal;
1626
+ accounts: {
1627
+ getByName: (name: string) => {
1628
+ readCredential: (organizationId: string) => Promise<Result<unknown, Failure>>;
1629
+ };
1630
+ };
1631
+ schema: Schema;
1632
+ }): Promise<Result<{
1633
+ credential: Static$1<Schema>;
1634
+ }, Failure>>;
1635
+ /**
1636
+ * The RPC methods of a Worker's entrypoint: one per operation that declares `rpc`, taking the caller's
1637
+ * principal and the input and answering a Result.
1638
+ */
1639
+ type RpcMethods<Ops extends Record<string, OperationShape>> = { [K in keyof Ops as Ops[K] extends {
1640
+ rpc: true | {
1641
+ callers: readonly string[];
1642
+ };
1643
+ } ? K : never]: (principal: Principal, input: Static$1<Ops[K]['input']>) => Promise<Result<Static$1<Ops[K]['output']>, Failure>>; };
1644
+ /**
1645
+ * What `createWorker` returns: the default export's handler, the named entrypoint for Worker RPC, and
1646
+ * wrappers that run your own entrypoints and Durable Objects inside the application's diagnostics.
1647
+ */
1648
+ interface WorkerRuntime<E, O extends Record<string, OperationShape>> {
1649
+ /** The Worker's default export: `fetch` for HTTP, plus the other `handlers` given to `createWorker`. */
1650
+ handler: ExportedHandler<E>;
1651
+ /**
1652
+ * A `WorkerEntrypoint` class with one method per operation that declares `rpc`; export it by name for
1653
+ * Service Bindings to call.
1654
+ */
1655
+ entrypoint: new (ctx: ExecutionContext, env: E) => WorkerEntrypoint<E> & RpcMethods<O>;
1656
+ /**
1657
+ * Wraps your own `WorkerEntrypoint` class so its methods run inside the application's diagnostics; it keeps
1658
+ * its methods and type.
1659
+ */
1660
+ service: <D extends new (ctx: ExecutionContext, env: E) => WorkerEntrypoint<E>>(implementation: D) => D;
1661
+ /**
1662
+ * Wraps a Durable Object class so its methods run inside the application's diagnostics; it keeps its
1663
+ * methods and type.
1664
+ */
1665
+ durableObject: <T extends DurableObject<E>, D extends new (state: DurableObject['ctx'], env: E) => T>(implementation: D) => D;
1666
+ }
1667
+ /**
1668
+ * What `createWorker` takes besides the application: the Worker's other handlers, its transports, the HTTP
1669
+ * handler's options, its static assets and its plain routes.
1670
+ */
1671
+ interface WorkerOptions<E> {
1672
+ /** The Worker's other handlers (`scheduled`, `queue`, …), merged into the default export. */
1673
+ handlers?: Omit<ExportedHandler<E>, 'fetch'>;
1674
+ /** Protocol transports served beside the operations, such as `mcp()`. */
1675
+ transports?: HttpOptions<E>['transports'];
1676
+ /** Native HTTP mounting, product admission and static/protocol composition. */
1677
+ http?: Omit<HttpOptions<E>, 'transports' | 'routes' | 'annotate'>;
1678
+ /** Explicit build files and SPA page admission, served through the native HTTP fallback. */
1679
+ assets?: WorkerAssetsOptions<E>;
1680
+ /**
1681
+ * Plain routes outside token admission (provider webhooks, signed links,
1682
+ * OAuth callbacks), by exact path. Each handler verifies its own signature
1683
+ * or token before reading the request. They run inside the same handler,
1684
+ * so diagnostics cover them too.
1685
+ */
1686
+ routes?: Readonly<Record<string, HttpRoute<E>>>;
1687
+ }
1688
+ /**
1689
+ * Turns an application into a Cloudflare Worker: `handler` (export it as default) serves HTTP and the other
1690
+ * handlers you pass; `entrypoint` (export it by name) serves every operation that declares `rpc` to the
1691
+ * Workers whose Service Binding names an allowed `caller`.
1692
+ */
1693
+ declare function createWorker<E, C, O extends Record<string, OperationShape>>(application: AppManifest<E, C, O>, options?: WorkerOptions<E>): WorkerRuntime<E, O>;
1694
+ export { SignedUrl as $, Observer as $t, HttpOptions as A, ok as An, parseInput as At, Type$2 as B, standardErrors as Bn, McpGuide as Bt, HttpRouteDefinition as C, StaticDecode$1 as Cn, strictObject as Ct, isInputHeaderName as D, Success as Dn, InputIssue as Dt, decodePathParameter as E, Result as En, urlSchema as Et, createHttpHandler as F, Failure as Fn, AppManifest as Ft, EmailAddressSchema as G, isRequestId as Gn, composeOperations as Gt, t$1 as H, TraceParent as Hn, OperationMiddleware as Ht, EmptyInputSchema as I, FailureData as In, Exposure as It, NamedReference as J, AttachmentOutputSchema as Jn, operationMatchesScopes as Jt, HexColorSchema as K, parseTraceParent as Kn, isPublicOperation as Kt, OrganizationIdSchema as L, FailureSchema as Ln, Invocation as Lt, HttpTransport as M, ErrorCatalog as Mn, ApplicationBuilder as Mt, RouteContext as N, ErrorDefinition as Nn, ApplicationConfiguration as Nt, isPathParameterValue as O, err as On, decodeInput as Ot, TransportContext as P, ErrorFactory as Pn, maximus as Pt, PostalAddressSchema as Q, ExecutionObservation as Qt, Static$2 as R, defineErrors as Rn, InvocationAuthority as Rt, readBodyText as S, matchesScopes as Sn, refineSchema as St, createHttpRouteResolver as T, FailureResult as Tn, transformSchema as Tt, DeletedObject as U, createRequestId as Un, OperationScope as Ut, UuidSchema as V, DurableCorrelation as Vn, McpSkill as Vt, DeletedObjectSchema as W, durableCorrelation as Wn, OperationShape as Wt, PhoneNumberSchema as X, AdmissionObservation as Xt, NamedReferenceSchema as Y, operationScopes as Yt, PostalAddress as Z, BackgroundContext as Zt, retryAfterSeconds as _, createTokenVerifier as _n, inspectSchema as _t, credentials as a, withDiagnostics as an, PageQueryFields as at, HttpBodyFailureReason as b, protectedResourceMetadata as bn, normalizeSchema as bt, executeOperation as c, TokenAlgorithm as cn, Checked as ct, Type$1 as d, TokenDevelopment as dn, SchemaInput as dt, TelemetryConfig as en, SignedUrlSchema as et, t as f, TokenPolicy as fn, SchemaIssue as ft, readJsonResponse as g, createTokenAuthorization as gn, inputSchema as gt, readJsonBody as h, TokenScheme as hn, extendObject as ht, createWorker as i, telemetryEnabled as in, PageQuery as it, HttpRoute as j, DefinedErrors as jn, parseSchema as jt, operationPathParameters as k, isResult as kn, decodeSchema as kt, Static$1 as l, TokenClaims as ln, checkSchema as lt, isJsonMediaType as m, TokenResolutionContext as mn, defaultSchema as mt, WorkerOptions as n, recordExecution as nn, PageInfo as nt, WorkerAssetsOptions as o, Principal as on, TPage as ot, createOpenApi as p, TokenPrincipal as pn, SchemaValidationError as pt, HttpsUrlSchema as q, Attachment as qn, operation as qt, WorkerRuntime as r, reportUnexpected as rn, PageInfoSchema as rt, defineApp as s, PrincipalSchema as sn, pageLimit as st, RpcMethods as t, diagnosticsEnabled as tn, Page as tt, TSchema$1 as u, TokenClient as un, readSchema as ut, BodyReadOptions as v, projectToken as vn, literalUnion as vt, HttpRouteMatch as w, BinaryBody as wn, stripObject as wt, readBodyBytes as x, ScopeMatch as xn, pipeSchema as xt, HttpBodyFailure as y, OAuthResource as yn, looseObject as yt, TSchema$2 as z, resultSchema as zn, McpConfiguration as zt };
@@ -2,7 +2,7 @@ import { FormatRegistry, Kind, TransformKind, Type } from "@sinclair/typebox";
2
2
  import { AssertError, HasTransform, TransformDecode, TransformDecodeError, Value } from "@sinclair/typebox/value";
3
3
  import { fullFormats } from "ajv-formats/dist/formats.js";
4
4
 
5
- //#region src/input-schemas.ts
5
+ // src/input-schemas.ts
6
6
  /**
7
7
  * Owner codecs on TypeBox schemas: defaults, normalizers, transforms, inspections, refinements, pipes and
8
8
  * unknown-key stripping. `inputSchema()` compiles them into one input schema, so the wire is checked as
@@ -232,8 +232,7 @@ function inputSchema(schema, source) {
232
232
  }).Encode((value) => value);
233
233
  }
234
234
 
235
- //#endregion
236
- //#region src/internal/decode-issues.ts
235
+ // src/internal/decode-issues.ts
237
236
  /**
238
237
  * Turns a failed TypeBox decode into field issues whose paths start at the input's root, as the
239
238
  * INVALID_INPUT failure carries them.
@@ -282,8 +281,7 @@ function jsonPointer(path) {
282
281
  return path.map((part) => `/${String(part).replaceAll("~", "~0").replaceAll("/", "~1")}`).join("");
283
282
  }
284
283
 
285
- //#endregion
286
- //#region src/validation.ts
284
+ // src/validation.ts
287
285
  /**
288
286
  * Schema validation: the check-only and the decoding validators, the guard that admits only bounded plain
289
287
  * JSON, and the RFC format validators registered once with TypeBox.
@@ -378,5 +376,4 @@ function decodeInput(schema, input) {
378
376
  }
379
377
  }
380
378
 
381
- //#endregion
382
379
  export { strictObject as _, decodeIssues as a, urlSchema as b, extendObject as c, inspectSchema as d, literalUnion as f, refineSchema as g, pipeSchema as h, parseSchema as i, hasUncompiledCodecs as l, normalizeSchema as m, decodeSchema as n, SchemaValidationError as o, looseObject as p, parseInput as r, defaultSchema as s, decodeInput as t, inputSchema as u, stripObject as v, transformSchema as y };
@@ -1,5 +1,4 @@
1
- import { Rt as OperationShape, kn as Failure, r as Static } from "../chunks/types-BCPe0fok.js";
2
- //#region src/client/client.d.ts
1
+ import { Fn as Failure, Wt as OperationShape, l as Static } from "../chunks/types-BWxDd3tY.js";
3
2
  /** What every HTTP operation answers: its data on success, its failure otherwise, and the request id. */
4
3
  export type Envelope<T> = {
5
4
  success: true;
@@ -127,5 +126,4 @@ export declare function createClient<M extends ClientManifest>(origin: string, t
127
126
  export declare function createClient<M extends ClientManifest>(origin: string, token: string | (() => Promise<string>), options?: ClientOptions & {
128
127
  response?: 'envelope';
129
128
  }): AppClientContract<M>;
130
- //#endregion
131
129
  export {};
@@ -1,10 +1,10 @@
1
- import { r as isRequestId } from "../chunks/correlation-gaiEoMBr.js";
1
+ import { r as isRequestId } from "../chunks/correlation-BEkcFFGT.js";
2
2
  import { standardErrors } from "../errors.js";
3
- import { n as exactLength, t as isRecord } from "../chunks/record-D2H3cg8S.js";
3
+ import { n as exactLength, t as isRecord } from "../chunks/record-DY-lX9w1.js";
4
4
  import { isInputHeaderName, isPathParameterValue, operationPathParameters } from "../http-paths.js";
5
- import { i as readJsonResponse } from "../chunks/json-Dwni3u4c.js";
5
+ import { i as readJsonResponse } from "../chunks/json-Bu4BLT25.js";
6
6
 
7
- //#region src/client/attachment-response.ts
7
+ // src/client/attachment-response.ts
8
8
  /**
9
9
  * An attachment as the typed client hands it out: a Response whose body is held to the length its headers
10
10
  * declare.
@@ -25,8 +25,7 @@ function boundedAttachment(response, maxBytes) {
25
25
  });
26
26
  }
27
27
 
28
- //#endregion
29
- //#region src/client/operation-abort.ts
28
+ // src/client/operation-abort.ts
30
29
  /**
31
30
  * Lets a client call stop waiting when its caller aborts, without cancelling the work it waited for.
32
31
  */
@@ -49,8 +48,7 @@ async function awaitWithSignal(pending, signal) {
49
48
  }
50
49
  }
51
50
 
52
- //#endregion
53
- //#region src/client/response-envelope.ts
51
+ // src/client/response-envelope.ts
54
52
  /**
55
53
  * Reads an operation's response envelope as the typed client receives it, checking its shape and its
56
54
  * status before any data or failure reaches the caller.
@@ -101,8 +99,7 @@ async function readOperationEnvelope(response, options) {
101
99
  }
102
100
  }
103
101
 
104
- //#endregion
105
- //#region src/client/client.ts
102
+ // src/client/client.ts
106
103
  /**
107
104
  * `@arbol-ai/maximus/client`: the typed HTTP client. Its methods are inferred from the application's type
108
105
  * alone, and its routes come from the service's live OpenAPI document.
@@ -321,5 +318,4 @@ function createClient(origin, token, options = {}) {
321
318
  } });
322
319
  }
323
320
 
324
- //#endregion
325
321
  export { createClient };
@@ -1,5 +1,4 @@
1
- import { $t as withDiagnostics, Bn as parseTraceParent, Fn as DurableCorrelation, Gt as BackgroundContext, In as TraceParent, Jt as TelemetryConfig, Kt as ExecutionObservation, Ln as createRequestId, Qt as telemetryEnabled, Rn as durableCorrelation, Xt as recordExecution, Yt as diagnosticsEnabled, Zt as reportUnexpected, qt as Observer, zn as isRequestId } from "./chunks/types-BCPe0fok.js";
2
- //#region src/internal/diagnostics.d.ts
1
+ import { $t as Observer, Gn as isRequestId, Hn as TraceParent, Kn as parseTraceParent, Qt as ExecutionObservation, Un as createRequestId, Vn as DurableCorrelation, Wn as durableCorrelation, Zt as BackgroundContext, an as withDiagnostics, en as TelemetryConfig, in as telemetryEnabled, nn as recordExecution, rn as reportUnexpected, tn as diagnosticsEnabled } from "./chunks/types-BWxDd3tY.js";
3
2
  /**
4
3
  * What diagnostics may say about an error: its name, its causes' names, its issue count and its stack
5
4
  * locations.
@@ -37,5 +36,4 @@ export declare function createDiagnostics(errorNames?: readonly string[]): {
37
36
  safeErrorName: (error: unknown) => string;
38
37
  describeError: (error: unknown) => ErrorDescription;
39
38
  };
40
- //#endregion
41
39
  export { type BackgroundContext, type DurableCorrelation, type ErrorDescription, type ExecutionObservation, type Observer, type TelemetryConfig, type TraceParent, createRequestId, diagnosticsEnabled, durableCorrelation, isRequestId, parseTraceParent, recordExecution, reportUnexpected, telemetryEnabled, withDiagnostics };
@@ -1,4 +1,4 @@
1
- import { i as parseTraceParent, n as durableCorrelation, r as isRequestId, t as createRequestId } from "./chunks/correlation-gaiEoMBr.js";
2
- import { a as telemetryEnabled, c as createDiagnostics, i as reportUnexpected, o as withDiagnostics, r as recordExecution, t as diagnosticsEnabled } from "./chunks/telemetry-DvZgrzZn.js";
1
+ import { i as parseTraceParent, n as durableCorrelation, r as isRequestId, t as createRequestId } from "./chunks/correlation-BEkcFFGT.js";
2
+ import { a as telemetryEnabled, c as createDiagnostics, i as reportUnexpected, o as withDiagnostics, r as recordExecution, t as diagnosticsEnabled } from "./chunks/telemetry-BTwB68m5.js";
3
3
 
4
4
  export { createDiagnostics, createRequestId, diagnosticsEnabled, durableCorrelation, isRequestId, parseTraceParent, recordExecution, reportUnexpected, telemetryEnabled, withDiagnostics };
package/dist/errors.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { An as FailureData, Dn as ErrorDefinition, En as ErrorCatalog, Mn as defineErrors, Nn as resultSchema, On as ErrorFactory, Pn as standardErrors, Tn as DefinedErrors, jn as FailureSchema, kn as Failure, zn as isRequestId } from "./chunks/types-BCPe0fok.js";
1
+ import { Bn as standardErrors, Fn as Failure, Gn as isRequestId, In as FailureData, Ln as FailureSchema, Mn as ErrorCatalog, Nn as ErrorDefinition, Pn as ErrorFactory, Rn as defineErrors, jn as DefinedErrors, zn as resultSchema } from "./chunks/types-BWxDd3tY.js";
2
2
  export { DefinedErrors, ErrorCatalog, ErrorDefinition, ErrorFactory, Failure, FailureData, FailureSchema, defineErrors, isRequestId, resultSchema, standardErrors };
package/dist/errors.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { STANDARD_FAILURES } from "./standard-failures.js";
2
- import { i as parseSchema } from "./chunks/validation-DWxKk1Js.js";
3
- import { r as isRequestId } from "./chunks/correlation-gaiEoMBr.js";
2
+ import { i as parseSchema } from "./chunks/validation-r-sgmsqb.js";
3
+ import { r as isRequestId } from "./chunks/correlation-BEkcFFGT.js";
4
4
  import { Type } from "@sinclair/typebox";
5
5
  import { Value } from "@sinclair/typebox/value";
6
6
 
7
- //#region src/errors.ts
7
+ // src/errors.ts
8
8
  /**
9
9
  * `@arbol-ai/maximus/errors`: error catalogs. `defineErrors` joins the standard failures and an
10
10
  * application's own into one catalog whose factories build each failure and whose schema validates every
@@ -124,5 +124,4 @@ function resultSchema(value, error) {
124
124
  }, { additionalProperties: false })]);
125
125
  }
126
126
 
127
- //#endregion
128
127
  export { FailureSchema, defineErrors, isRequestId, resultSchema, standardErrors };