@fuzdev/fuz_app 0.168.0 → 0.169.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 (132) hide show
  1. package/dist/actions/CLAUDE.md +1 -1
  2. package/dist/actions/action_codegen.d.ts +9 -7
  3. package/dist/actions/action_codegen.d.ts.map +1 -1
  4. package/dist/actions/action_codegen.js +20 -15
  5. package/dist/actions/action_event_data.d.ts +16 -16
  6. package/dist/actions/heartbeat.d.ts +1 -1
  7. package/dist/auth/account_action_specs.d.ts +11 -11
  8. package/dist/auth/account_action_specs.js +1 -1
  9. package/dist/auth/account_route_schema.d.ts +18 -18
  10. package/dist/auth/account_route_schema.js +1 -1
  11. package/dist/auth/account_routes.js +1 -1
  12. package/dist/auth/account_schema.d.ts +38 -40
  13. package/dist/auth/account_schema.d.ts.map +1 -1
  14. package/dist/auth/account_schema.js +7 -8
  15. package/dist/auth/actor_lookup_action_specs.d.ts +7 -7
  16. package/dist/auth/actor_lookup_action_specs.js +1 -1
  17. package/dist/auth/actor_search_action_specs.d.ts +6 -6
  18. package/dist/auth/actor_search_action_specs.js +1 -1
  19. package/dist/auth/admin_action_specs.d.ts +166 -166
  20. package/dist/auth/admin_action_specs.js +1 -1
  21. package/dist/auth/app_settings_schema.d.ts +3 -3
  22. package/dist/auth/app_settings_schema.d.ts.map +1 -1
  23. package/dist/auth/app_settings_schema.js +1 -1
  24. package/dist/auth/audit_log_route_schema.d.ts +1 -1
  25. package/dist/auth/audit_log_route_schema.js +1 -1
  26. package/dist/auth/audit_log_schema.d.ts +61 -61
  27. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  28. package/dist/auth/audit_log_schema.js +1 -1
  29. package/dist/auth/bootstrap_route_schema.d.ts +4 -4
  30. package/dist/auth/bootstrap_route_schema.js +1 -1
  31. package/dist/auth/cell_action_specs.d.ts +424 -424
  32. package/dist/auth/cell_action_specs.js +1 -1
  33. package/dist/auth/cell_audit_action_specs.d.ts +14 -14
  34. package/dist/auth/cell_audit_action_specs.js +1 -1
  35. package/dist/auth/cell_audit_metadata.d.ts +8 -8
  36. package/dist/auth/cell_audit_metadata.js +1 -1
  37. package/dist/auth/cell_field_action_specs.d.ts +55 -55
  38. package/dist/auth/cell_field_action_specs.js +1 -1
  39. package/dist/auth/cell_field_audit_metadata.d.ts +4 -4
  40. package/dist/auth/cell_field_audit_metadata.js +1 -1
  41. package/dist/auth/cell_grant_action_specs.d.ts +61 -61
  42. package/dist/auth/cell_grant_action_specs.js +1 -1
  43. package/dist/auth/cell_grant_audit_metadata.d.ts +10 -10
  44. package/dist/auth/cell_grant_audit_metadata.js +1 -1
  45. package/dist/auth/cell_item_action_specs.d.ts +76 -76
  46. package/dist/auth/cell_item_action_specs.js +1 -1
  47. package/dist/auth/cell_item_audit_metadata.d.ts +5 -5
  48. package/dist/auth/cell_item_audit_metadata.js +1 -1
  49. package/dist/auth/invite_schema.d.ts +11 -11
  50. package/dist/auth/invite_schema.d.ts.map +1 -1
  51. package/dist/auth/invite_schema.js +1 -1
  52. package/dist/auth/name_schema.js +1 -1
  53. package/dist/auth/password.js +1 -1
  54. package/dist/auth/role_grant_offer_action_specs.d.ts +182 -182
  55. package/dist/auth/role_grant_offer_action_specs.js +1 -1
  56. package/dist/auth/role_grant_offer_notifications.d.ts +107 -107
  57. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  58. package/dist/auth/role_grant_offer_notifications.js +1 -1
  59. package/dist/auth/role_grant_offer_schema.d.ts +9 -9
  60. package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
  61. package/dist/auth/role_grant_offer_schema.js +1 -1
  62. package/dist/auth/self_service_role_action_specs.d.ts +2 -2
  63. package/dist/auth/self_service_role_action_specs.js +1 -1
  64. package/dist/auth/signup_route_schema.d.ts +2 -2
  65. package/dist/auth/signup_route_schema.js +1 -1
  66. package/dist/auth/token_scope.d.ts +8 -8
  67. package/dist/db/file_fact_url.d.ts +1 -1
  68. package/dist/http/CLAUDE.md +7 -7
  69. package/dist/http/auth_shape.d.ts +15 -32
  70. package/dist/http/auth_shape.d.ts.map +1 -1
  71. package/dist/http/auth_shape.js +31 -38
  72. package/dist/http/db_routes.d.ts +1 -1
  73. package/dist/http/db_routes.d.ts.map +1 -1
  74. package/dist/http/db_routes.js +1 -1
  75. package/dist/http/error_schemas.d.ts +18 -18
  76. package/dist/http/jsonrpc.d.ts +11 -11
  77. package/dist/http/schema_helpers.d.ts +2 -2
  78. package/dist/http/schema_helpers.d.ts.map +1 -1
  79. package/dist/http/schema_helpers.js +8 -7
  80. package/dist/primitive_schemas.d.ts +173 -115
  81. package/dist/primitive_schemas.d.ts.map +1 -1
  82. package/dist/primitive_schemas.js +134 -158
  83. package/dist/schema_issues.d.ts +10 -7
  84. package/dist/schema_issues.d.ts.map +1 -1
  85. package/dist/schema_issues.js +38 -8
  86. package/dist/server/serve_fact_route.js +1 -1
  87. package/dist/server/surface_route.js +1 -1
  88. package/dist/testing/CLAUDE.md +3 -3
  89. package/dist/testing/cross_backend/conformance_case.d.ts +96 -114
  90. package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
  91. package/dist/testing/cross_backend/conformance_case.js +0 -256
  92. package/dist/testing/cross_backend/fact_serving.js +1 -1
  93. package/dist/testing/cross_backend/setup.d.ts +1 -1
  94. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  95. package/dist/testing/cross_backend/setup.js +3 -4
  96. package/dist/testing/cross_backend/testing_origin_check.d.ts +8 -8
  97. package/dist/testing/cross_backend/testing_reset_actions.d.ts +608 -201
  98. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  99. package/dist/testing/cross_backend/testing_reset_actions.js +46 -55
  100. package/dist/testing/cross_backend/ws_outbound_overflow.d.ts.map +1 -1
  101. package/dist/testing/cross_backend/ws_outbound_overflow.js +35 -0
  102. package/dist/testing/rpc_helpers.d.ts +1 -1
  103. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  104. package/dist/testing/rpc_helpers.js +0 -1
  105. package/dist/testing/schema_generators.js +1 -13
  106. package/dist/testing/schema_introspect.d.ts +438 -78
  107. package/dist/testing/schema_introspect.d.ts.map +1 -1
  108. package/dist/testing/schema_introspect.js +26 -26
  109. package/dist/testing/transports/bootstrap.d.ts +1 -1
  110. package/dist/testing/transports/bootstrap.d.ts.map +1 -1
  111. package/dist/testing/transports/bootstrap.js +1 -1
  112. package/dist/ui/BootstrapForm.svelte +1 -2
  113. package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
  114. package/dist/ui/SignupForm.svelte +1 -2
  115. package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
  116. package/dist/ui/admin_accounts_state.svelte.d.ts +5 -5
  117. package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
  118. package/dist/ui/admin_invites_state.svelte.d.ts +1 -1
  119. package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
  120. package/dist/ui/admin_sessions_state.svelte.d.ts +2 -2
  121. package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
  122. package/dist/ui/role_grant_offers_state.svelte.d.ts +1 -1
  123. package/dist/zod.d.ts +18 -3
  124. package/dist/zod.d.ts.map +1 -1
  125. package/dist/zod.js +26 -3
  126. package/dist/zod_schemas.d.ts +100 -0
  127. package/dist/zod_schemas.d.ts.map +1 -0
  128. package/dist/zod_schemas.js +157 -0
  129. package/package.json +5 -5
  130. package/dist/primitive_schemas_fuz.d.ts +0 -178
  131. package/dist/primitive_schemas_fuz.d.ts.map +0 -1
  132. package/dist/primitive_schemas_fuz.js +0 -149
@@ -33,36 +33,28 @@
33
33
  *
34
34
  * @module
35
35
  */
36
- import { z } from 'zod';
37
36
  import { is_schema, one_of, parse } from '@fuzdev/fuz_schema/schema.ts';
38
37
  import { get_schema_entries } from '@fuzdev/fuz_schema/introspect.ts';
39
- import { Uuid } from '../primitive_schemas.js';
40
- import { ACTING_ACTOR_DESCRIPTION, ActingActor as ActingActorFuz } from '../primitive_schemas_fuz.js';
38
+ import { ActingActor } from '../primitive_schemas.js';
41
39
  import { zod_unwrap_to_object } from '../zod.js';
42
40
  /**
43
- * `acting` field shared by every input that needs the caller's acting actor.
44
- * Declaring `acting: ActingActor` on a route or action input signals to the
45
- * dispatcher's authorization phase to resolve an actor against the
46
- * authenticated account: it runs `resolve_acting_actor`, builds the
47
- * actor-bound `RequestContext`, and loads role_grants before auth guards fire.
48
- *
49
- * Resolution rules: omitted + 1 actor → use it; omitted + multiple actors →
50
- * `actor_required` with the available list; supplied + on the account → use
51
- * it; supplied + foreign actor → `actor_not_on_account`.
52
- *
53
- * Account-grain routes — input doesn't declare `acting` and auth doesn't
54
- * require role_grants — skip resolution entirely; their `RequestContext.actor`
55
- * is `null` and the audit envelope's `actor_id` stays null.
56
- *
57
- * Lives next to `RouteAuth` because the two are paired by registry-time
58
- * invariant 2: `auth.actor !== 'none'` ⟺ input (or query, on REST GETs)
59
- * declares `acting?: ActingActor`. Keeping the contract in one module
60
- * removes the http/ → auth/ import that an earlier split forced.
41
+ * The Zod `ActingActor` forms `input_schema_declares_acting` matches by
42
+ * reference: `ZodActingActor`, registered when `zod_schemas.ts` loads, so
43
+ * this module never imports Zod at runtime. A Zod input holding it has loaded
44
+ * that module, so it is registered before any spec reaches the check.
45
+ */
46
+ const zod_acting_actors = new WeakSet();
47
+ /**
48
+ * Register a Zod schema as the Zod form of `ActingActor`, which
49
+ * `input_schema_declares_acting` then finds by reference. `zod_schemas.ts`
50
+ * registers `ZodActingActor`, its one caller.
61
51
  *
62
- * A fuz_schema input declares the twin in `primitive_schemas_fuz.ts`, which
63
- * the dispatcher finds the same way.
52
+ * @param schema - the Zod `ActingActor`
53
+ * @internal
64
54
  */
65
- export const ActingActor = Uuid.optional().meta({ description: ACTING_ACTOR_DESCRIPTION });
55
+ export const register_zod_acting_actor = (schema) => {
56
+ zod_acting_actors.add(schema);
57
+ };
66
58
  /**
67
59
  * Read an `acting` selector out of an unvalidated value.
68
60
  *
@@ -83,17 +75,17 @@ export const ActingActor = Uuid.optional().meta({ description: ACTING_ACTOR_DESC
83
75
  * an input schema behind it, so there a malformed selector is final (the
84
76
  * status route answers account-only).
85
77
  *
86
- * The grammar is the fuz_schema twin's, which is the Zod `ActingActor`'s and
87
- * the Rust spine's, so every value reads as the Zod `ActingActor` would, the
88
- * max UUID in any case included. The id comes back lowercased. A route
89
- * declaring `acting` on its Zod `query` schema doesn't read it here: that
90
- * schema runs ahead of the authorization phase, with the same grammar.
78
+ * The grammar is `ActingActor`'s, which is `ZodActingActor`'s and the Rust
79
+ * spine's, so every value reads as either would, the max UUID in any case
80
+ * included. The id comes back lowercased. A route declaring `acting` on its
81
+ * `query` schema doesn't read it here: that schema runs ahead of the
82
+ * authorization phase, with the same grammar.
91
83
  *
92
84
  * @param value - the raw `acting` field, from params / query / body
93
85
  * @returns the actor id, or `undefined` when absent or malformed
94
86
  */
95
87
  export const parse_acting = (value) => {
96
- const parsed = parse(ActingActorFuz, value);
88
+ const parsed = parse(ActingActor, value);
97
89
  return parsed.ok ? parsed.value : undefined;
98
90
  };
99
91
  /**
@@ -230,10 +222,10 @@ export const assert_route_auth_invariants = (auth, context) => {
230
222
  /**
231
223
  * Whether a schema declares the canonical `acting?: ActingActor` field.
232
224
  * Reference-equality on the exported `ActingActor` schema of the input's
233
- * library — the Zod one here, the fuz_schema twin in
234
- * `primitive_schemas_fuz.ts` — so consumer schemas with unrelated `acting`
235
- * fields don't trip this check, nor does either twin in the other library's
236
- * object.
225
+ * library — `ActingActor` (`primitive_schemas.ts`) in a fuz_schema object,
226
+ * `ZodActingActor` (`zod_schemas.ts`) in a Zod one — so consumer schemas with
227
+ * unrelated `acting` fields don't trip this check, nor does either form in
228
+ * the other library's object.
237
229
  *
238
230
  * Peels through Zod wrappers (`optional`, `nullable`, `default`,
239
231
  * `transform`, `pipe`, `prefault`) via `zod_unwrap_to_object` so a spec
@@ -248,11 +240,12 @@ export const assert_route_auth_invariants = (auth, context) => {
248
240
  */
249
241
  export const input_schema_declares_acting = (schema) => {
250
242
  if (is_schema(schema))
251
- return get_schema_entries(schema)?.acting === ActingActorFuz;
243
+ return get_schema_entries(schema)?.acting === ActingActor;
252
244
  const obj = zod_unwrap_to_object(schema);
253
245
  if (!obj)
254
246
  return false;
255
- return obj.shape.acting === ActingActor;
247
+ const acting = obj.shape.acting;
248
+ return acting !== undefined && zod_acting_actors.has(acting);
256
249
  };
257
250
  /**
258
251
  * Registry-time biconditional check: `auth.actor !== 'none' ⟺ some
@@ -281,7 +274,7 @@ export const assert_route_auth_acting_biconditional = (auth, slots, context) =>
281
274
  return;
282
275
  const slot_phrase = slots.query !== undefined ? 'input or query schema' : 'input schema';
283
276
  if (wants_actor) {
284
- throw new Error(`${context}: auth.actor === '${auth.actor}' requires the ${slot_phrase} to declare 'acting?: ActingActor', the Zod one or its fuz_schema twin (registry-time invariant 2)`);
277
+ throw new Error(`${context}: auth.actor === '${auth.actor}' requires the ${slot_phrase} to declare 'acting?: ActingActor' (or ZodActingActor in a Zod schema) (registry-time invariant 2)`);
285
278
  }
286
- throw new Error(`${context}: ${slot_phrase} declares 'acting?: ActingActor' (Zod or fuz_schema) but auth.actor === 'none' (registry-time invariant 2)`);
279
+ throw new Error(`${context}: ${slot_phrase} declares 'acting?: ActingActor' (or ZodActingActor) but auth.actor === 'none' (registry-time invariant 2)`);
287
280
  };
@@ -10,7 +10,7 @@
10
10
  * @module
11
11
  */
12
12
  import type { Logger } from '@fuzdev/fuz_util/log.ts';
13
- import type { Uuid } from '../primitive_schemas.js';
13
+ import { type Uuid } from '../primitive_schemas.js';
14
14
  import type { Db, DbType } from '../db/db.js';
15
15
  import { type RouteSpec } from './route_spec.js';
16
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"db_routes.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/db_routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAsBtD,O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,oBAAoB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC7C;AA2CD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GACjC,MAAM,WAAW,EACjB,SAAS,cAAc,KACrB,KAAK,CAAC,SAAS,CA8VjB,CAAC"}
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { meta } from '@fuzdev/fuz_schema/meta.ts';
13
13
  import { array, boolean, integer, literal, loose_object, max_value, min_value, nullable, number, object, pipe, record, regex, safe_integer, string, transform, unknown, with_default } from '@fuzdev/fuz_schema/schema.ts';
14
- import { ActingActor } from '../primitive_schemas_fuz.js';
14
+ import { ActingActor } from '../primitive_schemas.js';
15
15
  import { define_route, get_route_params, get_route_query } from './route_spec.js';
16
16
  import { route_fail, route_ok } from './route_result.js';
17
17
  import { REST_DATABASE_CONNECTION_FAILED, REST_FOREIGN_KEY_VIOLATION, REST_ROW_NOT_FOUND, REST_TABLE_NO_PRIMARY_KEY, REST_TABLE_NOT_DELETABLE, REST_TABLE_NOT_FOUND } from './error_schemas.js';
@@ -279,40 +279,40 @@ export declare const dedupe_rest_errors: (defs: Iterable<RestErrorDef>) => Array
279
279
  export declare const to_error_schemas: (defs: Iterable<RestErrorDef>) => ErrorSchemas;
280
280
  export declare const REST_INVALID_REQUEST_BODY: RestErrorDef<400, "invalid_request_body", {
281
281
  readonly issues: Schema<({
282
+ kind: string;
282
283
  message: string;
283
284
  path: (string | number)[];
284
285
  expected: string;
285
- kind: string;
286
286
  received: string;
287
287
  } & Record<string, unknown>)[] | undefined, ({
288
+ kind: string;
288
289
  message: string;
289
290
  path: (string | number)[];
290
291
  expected: string;
291
- kind: string;
292
292
  received: string;
293
293
  } & Record<string, unknown>)[] | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<Schema<({
294
+ kind: string;
294
295
  message: string;
295
296
  path: (string | number)[];
296
297
  expected: string;
297
- kind: string;
298
298
  received: string;
299
299
  } & Record<string, unknown>)[], ({
300
+ kind: string;
300
301
  message: string;
301
302
  path: (string | number)[];
302
303
  expected: string;
303
- kind: string;
304
304
  received: string;
305
305
  } & Record<string, unknown>)[], "array", Schema<{
306
+ kind: string;
306
307
  message: string;
307
308
  path: (string | number)[];
308
309
  expected: string;
309
- kind: string;
310
310
  received: string;
311
311
  } & Record<string, unknown>, {
312
+ kind: string;
312
313
  message: string;
313
314
  path: (string | number)[];
314
315
  expected: string;
315
- kind: string;
316
316
  received: string;
317
317
  } & Record<string, unknown>, "loose_object", {
318
318
  kind: Schema<string, string, "string", undefined>;
@@ -325,40 +325,40 @@ export declare const REST_INVALID_REQUEST_BODY: RestErrorDef<400, "invalid_reque
325
325
  export declare const REST_INVALID_JSON_BODY: RestErrorDef<400, "invalid_json_body", Record<never, never>>;
326
326
  export declare const REST_INVALID_ROUTE_PARAMS: RestErrorDef<400, "invalid_route_params", {
327
327
  readonly issues: Schema<({
328
+ kind: string;
328
329
  message: string;
329
330
  path: (string | number)[];
330
331
  expected: string;
331
- kind: string;
332
332
  received: string;
333
333
  } & Record<string, unknown>)[] | undefined, ({
334
+ kind: string;
334
335
  message: string;
335
336
  path: (string | number)[];
336
337
  expected: string;
337
- kind: string;
338
338
  received: string;
339
339
  } & Record<string, unknown>)[] | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<Schema<({
340
+ kind: string;
340
341
  message: string;
341
342
  path: (string | number)[];
342
343
  expected: string;
343
- kind: string;
344
344
  received: string;
345
345
  } & Record<string, unknown>)[], ({
346
+ kind: string;
346
347
  message: string;
347
348
  path: (string | number)[];
348
349
  expected: string;
349
- kind: string;
350
350
  received: string;
351
351
  } & Record<string, unknown>)[], "array", Schema<{
352
+ kind: string;
352
353
  message: string;
353
354
  path: (string | number)[];
354
355
  expected: string;
355
- kind: string;
356
356
  received: string;
357
357
  } & Record<string, unknown>, {
358
+ kind: string;
358
359
  message: string;
359
360
  path: (string | number)[];
360
361
  expected: string;
361
- kind: string;
362
362
  received: string;
363
363
  } & Record<string, unknown>, "loose_object", {
364
364
  kind: Schema<string, string, "string", undefined>;
@@ -370,40 +370,40 @@ export declare const REST_INVALID_ROUTE_PARAMS: RestErrorDef<400, "invalid_route
370
370
  }>;
371
371
  export declare const REST_INVALID_QUERY_PARAMS: RestErrorDef<400, "invalid_query_params", {
372
372
  readonly issues: Schema<({
373
+ kind: string;
373
374
  message: string;
374
375
  path: (string | number)[];
375
376
  expected: string;
376
- kind: string;
377
377
  received: string;
378
378
  } & Record<string, unknown>)[] | undefined, ({
379
+ kind: string;
379
380
  message: string;
380
381
  path: (string | number)[];
381
382
  expected: string;
382
- kind: string;
383
383
  received: string;
384
384
  } & Record<string, unknown>)[] | undefined, "optional", import("@fuzdev/fuz_schema/schema.ts").SchemaWrapperDef<Schema<({
385
+ kind: string;
385
386
  message: string;
386
387
  path: (string | number)[];
387
388
  expected: string;
388
- kind: string;
389
389
  received: string;
390
390
  } & Record<string, unknown>)[], ({
391
+ kind: string;
391
392
  message: string;
392
393
  path: (string | number)[];
393
394
  expected: string;
394
- kind: string;
395
395
  received: string;
396
396
  } & Record<string, unknown>)[], "array", Schema<{
397
+ kind: string;
397
398
  message: string;
398
399
  path: (string | number)[];
399
400
  expected: string;
400
- kind: string;
401
401
  received: string;
402
402
  } & Record<string, unknown>, {
403
+ kind: string;
403
404
  message: string;
404
405
  path: (string | number)[];
405
406
  expected: string;
406
- kind: string;
407
407
  received: string;
408
408
  } & Record<string, unknown>, "loose_object", {
409
409
  kind: Schema<string, string, "string", undefined>;
@@ -103,7 +103,7 @@ export declare const JSONRPC_SERVER_ERROR_END = -32099;
103
103
  * A server-defined error code, an integer in the -32000 to -32099 range (the
104
104
  * Rust spine's codes are `i32`s).
105
105
  */
106
- export declare const JsonrpcServerErrorCode: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
106
+ export declare const JsonrpcServerErrorCode: import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
107
107
  readonly '~types'?: {
108
108
  readonly input: number;
109
109
  readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
@@ -114,7 +114,7 @@ export type JsonrpcServerErrorCode = Infer<typeof JsonrpcServerErrorCode>;
114
114
  * A valid JSON-RPC error code — one of the standard codes or a
115
115
  * server-defined code in the -32000 to -32099 range.
116
116
  */
117
- export declare const JsonrpcErrorCode: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
117
+ export declare const JsonrpcErrorCode: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
118
118
  readonly '~types'?: {
119
119
  readonly input: number;
120
120
  readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
@@ -140,7 +140,7 @@ export declare const JsonrpcErrorObject: import("@fuzdev/fuz_schema/schema.ts").
140
140
  code: number;
141
141
  data?: unknown;
142
142
  } & Record<string, unknown>, "loose_object", {
143
- code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
143
+ code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
144
144
  readonly '~types'?: {
145
145
  readonly input: number;
146
146
  readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
@@ -152,20 +152,20 @@ export declare const JsonrpcErrorObject: import("@fuzdev/fuz_schema/schema.ts").
152
152
  export type JsonrpcErrorObject = Infer<typeof JsonrpcErrorObject>;
153
153
  /** A response that indicates an error occurred. */
154
154
  export declare const JsonrpcErrorResponse: import("@fuzdev/fuz_schema/schema.ts").Schema<{
155
+ id: string | number | null;
155
156
  error: {
156
157
  message: string;
157
158
  code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
158
159
  data?: unknown;
159
160
  } & Record<string, unknown>;
160
- id: string | number | null;
161
161
  jsonrpc: "2.0";
162
162
  } & Record<string, unknown>, {
163
+ id: string | number | null;
163
164
  error: {
164
165
  message: string;
165
166
  code: number;
166
167
  data?: unknown;
167
168
  } & Record<string, unknown>;
168
- id: string | number | null;
169
169
  jsonrpc: "2.0";
170
170
  } & Record<string, unknown>, "loose_object", {
171
171
  jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
@@ -179,7 +179,7 @@ export declare const JsonrpcErrorResponse: import("@fuzdev/fuz_schema/schema.ts"
179
179
  code: number;
180
180
  data?: unknown;
181
181
  } & Record<string, unknown>, "loose_object", {
182
- code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
182
+ code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
183
183
  readonly '~types'?: {
184
184
  readonly input: number;
185
185
  readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
@@ -196,24 +196,24 @@ export declare const JsonrpcResponseOrError: import("@fuzdev/fuz_schema/schema.t
196
196
  jsonrpc: "2.0";
197
197
  result: unknown;
198
198
  } & Record<string, unknown>) | ({
199
+ id: string | number | null;
199
200
  error: {
200
201
  message: string;
201
202
  code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
202
203
  data?: unknown;
203
204
  } & Record<string, unknown>;
204
- id: string | number | null;
205
205
  jsonrpc: "2.0";
206
206
  } & Record<string, unknown>), ({
207
207
  id: string | number;
208
208
  jsonrpc: "2.0";
209
209
  result: unknown;
210
210
  } & Record<string, unknown>) | ({
211
+ id: string | number | null;
211
212
  error: {
212
213
  message: string;
213
214
  code: number;
214
215
  data?: unknown;
215
216
  } & Record<string, unknown>;
216
- id: string | number | null;
217
217
  jsonrpc: "2.0";
218
218
  } & Record<string, unknown>), "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<{
219
219
  id: string | number;
@@ -228,20 +228,20 @@ export declare const JsonrpcResponseOrError: import("@fuzdev/fuz_schema/schema.t
228
228
  id: import("@fuzdev/fuz_schema/schema.ts").Schema<string | number, string | number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<string, string, "string", undefined>, import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>]>;
229
229
  result: import("@fuzdev/fuz_schema/schema.ts").Schema<unknown, unknown, "unknown", undefined>;
230
230
  }>, import("@fuzdev/fuz_schema/schema.ts").Schema<{
231
+ id: string | number | null;
231
232
  error: {
232
233
  message: string;
233
234
  code: -32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">;
234
235
  data?: unknown;
235
236
  } & Record<string, unknown>;
236
- id: string | number | null;
237
237
  jsonrpc: "2.0";
238
238
  } & Record<string, unknown>, {
239
+ id: string | number | null;
239
240
  error: {
240
241
  message: string;
241
242
  code: number;
242
243
  data?: unknown;
243
244
  } & Record<string, unknown>;
244
- id: string | number | null;
245
245
  jsonrpc: "2.0";
246
246
  } & Record<string, unknown>, "loose_object", {
247
247
  jsonrpc: import("@fuzdev/fuz_schema/schema.ts").Schema<"2.0", "2.0", "literal", "2.0">;
@@ -255,7 +255,7 @@ export declare const JsonrpcResponseOrError: import("@fuzdev/fuz_schema/schema.t
255
255
  code: number;
256
256
  data?: unknown;
257
257
  } & Record<string, unknown>, "loose_object", {
258
- code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case">)[]> & {
258
+ code: import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603 | import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "union", readonly [import("@fuzdev/fuz_schema/schema.ts").Schema<-32700 | -32600 | -32601 | -32602 | -32603, -32700 | -32600 | -32601 | -32602 | -32603, "one_of", readonly [-32700, -32600, -32601, -32602, -32603]>, import("@fuzdev/fuz_schema/schema.ts").Schema<import("@fuzdev/fuz_schema/schema.ts").Branded<number, "JsonrpcServerErrorCode">, number, "pipe", readonly (import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"string"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"number"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"bigint"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"boolean"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"regex"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"pipe"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"unknown"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"literal"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"one_of"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"optional"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"nullable"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"with_default_fn"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"lazy"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"loose_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"strip_object"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"object_with_rest"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"record"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"array"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"union"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"variant"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_length"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"min_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"max_value"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"safe_integer"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"uuid"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"iso_datetime"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"to_lower_case"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"check"> | import("@fuzdev/fuz_schema/schema.ts").SchemaOfKind<"transform">)[]> & {
259
259
  readonly '~types'?: {
260
260
  readonly input: number;
261
261
  readonly first: import("@fuzdev/fuz_schema/schema.ts").Schema<number, number, "number", undefined>;
@@ -179,8 +179,8 @@ export interface SchemaToSurfaceOptions {
179
179
  *
180
180
  * Returns `null` for a null schema (`is_null_schema`) and a void schema
181
181
  * (`is_void_schema`), in either library: no body, no params. Any other
182
- * schema is written with its library's emitter (`to_json_schema` for fuz_schema, `z.toJSONSchema`
183
- * for Zod) on the side `options.io` names. A part JSON Schema can't say (a
182
+ * schema is written with its library's emitter (`to_json_schema` for fuz_schema, the schema's own
183
+ * `.toJSONSchema()` for Zod) on the side `options.io` names. A part JSON Schema can't say (a
184
184
  * transform on the output side, a `z.custom()`, a fuz_schema `check`) is left
185
185
  * out or written as `{}` (a `pipe(string, check(…))` writes as
186
186
  * `{type: 'string'}`), and `options.on_unrepresentable` hears the library's
@@ -1 +1 @@
1
- {"version":3,"file":"schema_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/schema_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,OAAO,EAIN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,gBAAgB,KAAG,OAEc,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,gBAAgB,KAAG,OAEmB,CAAC;AAE9E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,GAAI,YAAY,OAAO,KAAG,OAUpD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,gBAAgB,EAAE,YAAY,OAAO,KAAG,OACP,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,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ts';
12
11
  import { is_schema } from '@fuzdev/fuz_schema/schema.ts';
13
12
  import { unwrap_schema } from '@fuzdev/fuz_schema/introspect.ts';
14
13
  import { to_json_schema } from '@fuzdev/fuz_schema/json_schema.ts';
15
14
  import { assert_validation_schema, parse_any, unknown_key_targets } from '../schema_issues.js';
15
+ import { zod_has_trait } from '../zod.js';
16
16
  /**
17
17
  * Check if a schema is exactly `z.null()`, or a `@fuzdev/fuz_schema`
18
18
  * `literal(null)`.
@@ -21,7 +21,7 @@ import { assert_validation_schema, parse_any, unknown_key_targets } from '../sch
21
21
  * positives from `z.nullable(z.string())` or similar schemas that accept
22
22
  * null but also accept other values.
23
23
  */
24
- export const is_null_schema = (schema) => schema instanceof z.ZodNull ||
24
+ export const is_null_schema = (schema) => zod_has_trait(schema, 'ZodNull') ||
25
25
  (is_schema(schema) && schema.kind === 'literal' && schema.def === null);
26
26
  /**
27
27
  * Check if a schema is exactly `z.void()`, or a `@fuzdev/fuz_schema`
@@ -35,7 +35,7 @@ export const is_null_schema = (schema) => schema instanceof z.ZodNull ||
35
35
  * `undefined`, so an optional schema is not void. `z.undefined()` is not
36
36
  * void either.
37
37
  */
38
- export const is_void_schema = (schema) => schema instanceof z.ZodVoid ||
38
+ export const is_void_schema = (schema) => zod_has_trait(schema, 'ZodVoid') ||
39
39
  (is_schema(schema) && schema.kind === 'literal' && schema.def === undefined);
40
40
  /**
41
41
  * Normalize the raw `params` of a void input (`is_void_schema`): an absent
@@ -312,7 +312,8 @@ const get_at_path = (value, path) => {
312
312
  */
313
313
  export const is_strict_object_schema = (schema) => is_schema(schema)
314
314
  ? fuz_schema_untransformed_head(schema)?.kind === 'object'
315
- : schema instanceof z.ZodObject && schema.def.catchall instanceof z.ZodNever;
315
+ : zod_has_trait(schema, 'ZodObject') &&
316
+ zod_has_trait(schema.def.catchall, 'ZodNever');
316
317
  // the schema a value reaches first through every `pipe` it starts with, or
317
318
  // `null` when any of those pipes has a `transform` stage
318
319
  const fuz_schema_untransformed_head = (schema) => {
@@ -338,8 +339,8 @@ const fuz_schema_untransformed_head = (schema) => {
338
339
  *
339
340
  * Returns `null` for a null schema (`is_null_schema`) and a void schema
340
341
  * (`is_void_schema`), in either library: no body, no params. Any other
341
- * schema is written with its library's emitter (`to_json_schema` for fuz_schema, `z.toJSONSchema`
342
- * for Zod) on the side `options.io` names. A part JSON Schema can't say (a
342
+ * schema is written with its library's emitter (`to_json_schema` for fuz_schema, the schema's own
343
+ * `.toJSONSchema()` for Zod) on the side `options.io` names. A part JSON Schema can't say (a
343
344
  * transform on the output side, a `z.custom()`, a fuz_schema `check`) is left
344
345
  * out or written as `{}` (a `pipe(string, check(…))` writes as
345
346
  * `{type: 'string'}`), and `options.on_unrepresentable` hears the library's
@@ -369,7 +370,7 @@ export const schema_to_surface = (schema, options) => {
369
370
  const io = options?.io ?? 'output';
370
371
  const write = (unrepresentable) => strip_json_schema_noise(is_schema(schema)
371
372
  ? to_json_schema(schema, { io, unrepresentable })
372
- : z.toJSONSchema(schema, { io, unrepresentable }));
373
+ : schema.toJSONSchema({ io, unrepresentable }));
373
374
  const fail = (message, cause) => new Error(`${options?.source ?? 'schema'}: ${message}`, { cause });
374
375
  let gap;
375
376
  try {