@fungi.computer/darkroom 0.11.34 → 0.11.36

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.
@@ -5,49 +5,53 @@ import { pendingSchema } from "@fungi.computer/agar/backend-definition";
5
5
  import { mediaFailureSchema } from "./browser-failure.js";
6
6
  import { mediaGenerationSettingsSchema } from "./index.js";
7
7
  /** A labelled estimate for one explicitly described generation, never a receipt. */
8
- export const mediaModelPriceEstimateSchema = z.strictObject({
8
+ export const mediaModelPriceEstimateSchema = /* @__PURE__ */ z.strictObject({
9
9
  /** Quotes are indicative; the admitted generation owns its charge. */
10
- kind: z.literal("estimate"),
10
+ kind: /* @__PURE__ */ z.literal("estimate"),
11
11
  /** Unmetered hosts pay provider cost; funded hosts apply their billing policy. */
12
- basis: z.enum({
12
+ basis: /* @__PURE__ */ z.enum({
13
13
  /** Provider cost before the host's billing policy. */
14
14
  "provider-cost": "provider-cost",
15
15
  /** Team charge estimate after the host's billing policy. */
16
16
  "team-price": "team-price",
17
17
  }),
18
18
  /** Milliunits of a cent, at the quoted settings. */
19
- costMilliunits: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
19
+ costMilliunits: /* @__PURE__ */ z
20
+ .number()
21
+ .int()
22
+ .nonnegative()
23
+ .max(Number.MAX_SAFE_INTEGER),
20
24
  /** Defaults, a one-character prompt and no references; varying these changes cost. */
21
25
  settings: mediaGenerationSettingsSchema,
22
26
  });
23
27
  /** Host catalog projection; provider metadata remains owned by the sole catalog. */
24
- export const mediaCatalogModelSchema = mediaModelSchema
28
+ export const mediaCatalogModelSchema = /* @__PURE__ */ mediaModelSchema
25
29
  .unwrap()
26
30
  .extend({
27
31
  /** Optional host estimate with explicit assumptions and funding basis. */
28
- priceEstimate: mediaModelPriceEstimateSchema.optional(),
32
+ priceEstimate: /* @__PURE__ */ mediaModelPriceEstimateSchema.optional(),
29
33
  })
30
34
  .readonly();
31
35
  /** Bounded catalog decoded by the App media broker before host filtering. */
32
- export const mediaModelsSchema = z.lazy(() => z.array(mediaCatalogModelSchema).max(listMediaModels().length));
36
+ export const mediaModelsSchema = /* @__PURE__ */ z.lazy(() => z.array(mediaCatalogModelSchema).max(listMediaModels().length));
33
37
  /** An absolute output path on the Computer admitted by the App host. */
34
- export const destinationSchema = z.strictObject({
38
+ export const destinationSchema = /* @__PURE__ */ z.strictObject({
35
39
  /** Computer admitted by the host. */
36
- computerId: z.string().min(1).max(256),
40
+ computerId: /* @__PURE__ */ z.string().min(1).max(256),
37
41
  /** Absolute Computer output path. */
38
- path: z.string().startsWith("/").max(1_024),
42
+ path: /* @__PURE__ */ z.string().startsWith("/").max(1_024),
39
43
  });
40
44
  /** Completed App generation output, with its admitted Computer destination. */
41
- export const appMediaGenerationResultSchema = mediaResultSchema
45
+ export const appMediaGenerationResultSchema = /* @__PURE__ */ mediaResultSchema
42
46
  .omit({ path: true })
43
47
  .extend({
44
48
  /** Admitted Computer and absolute output path. */
45
49
  destination: destinationSchema,
46
50
  });
47
51
  /** Authority refusals emitted by Media admission before a host call. */
48
- export const appMediaAdmissionErrorSchema = z.strictObject({
52
+ export const appMediaAdmissionErrorSchema = /* @__PURE__ */ z.strictObject({
49
53
  /** Existing admission refusal code. */
50
- error: z.enum({
54
+ error: /* @__PURE__ */ z.enum({
51
55
  /** The captured App selection or attachment changed. */
52
56
  revoked: "revoked",
53
57
  /** The caller does not hold this Media grant. */
@@ -59,7 +63,7 @@ export const appMediaAdmissionErrorSchema = z.strictObject({
59
63
  }),
60
64
  });
61
65
  /** Attachment budget refusal emitted by the Media reservation owner. */
62
- export const appMediaBudgetRefusalSchema = z.lazy(() => z.strictObject({
66
+ export const appMediaBudgetRefusalSchema = /* @__PURE__ */ z.lazy(() => z.strictObject({
63
67
  /** The attachment's operation budget refused this request. */
64
68
  error: z.literal("attachment_budget_exceeded"),
65
69
  /** Media reservations use the Media budget, not exec or write. */
@@ -68,14 +72,15 @@ export const appMediaBudgetRefusalSchema = z.lazy(() => z.strictObject({
68
72
  retryAfterMs: z.number(),
69
73
  }));
70
74
  /** Existing Media admission refusals, without an admitted selector or callable. */
71
- export const appMediaAdmissionRefusalSchema = z.union([
75
+ export const appMediaAdmissionRefusalSchema = /* @__PURE__ */ z.union([
72
76
  appMediaAdmissionErrorSchema,
73
77
  appMediaBudgetRefusalSchema,
74
78
  ]);
75
79
  /** Admission errors plus invalid/oversized inputs emitted directly by the broker. */
76
- export const appMediaBrokerErrorSchema = appMediaAdmissionErrorSchema.extend({
80
+ export const appMediaBrokerErrorSchema =
81
+ /* @__PURE__ */ appMediaAdmissionErrorSchema.extend({
77
82
  /** Existing broker refusal code. */
78
- error: z.enum({
83
+ error: /* @__PURE__ */ z.enum({
79
84
  ...appMediaAdmissionErrorSchema.shape.error.enum,
80
85
  /** The broker refused the input representation or selection. */
81
86
  invalid: "invalid",
@@ -84,14 +89,14 @@ export const appMediaBrokerErrorSchema = appMediaAdmissionErrorSchema.extend({
84
89
  }),
85
90
  });
86
91
  /** Missing-library refusal decoded and returned by the App media broker. */
87
- export const agentAppMediaLibraryFailureSchema = z.lazy(() => z.strictObject({
92
+ export const agentAppMediaLibraryFailureSchema = /* @__PURE__ */ z.lazy(() => z.strictObject({
88
93
  /** The calling Installation's library is unavailable. */
89
94
  error: z.literal("library_unavailable"),
90
95
  /** Existing library-owner presentation copy. */
91
96
  message: z.string().max(4096),
92
97
  }));
93
98
  /** Broker projection of an HTTP failure: code becomes error and error becomes message. */
94
- export const appMediaBrokerFailureSchema = z.strictObject({
99
+ export const appMediaBrokerFailureSchema = /* @__PURE__ */ z.strictObject({
95
100
  /** Original typed HTTP failure code. */
96
101
  error: mediaFailureSchema.shape.code,
97
102
  /** Original HTTP failure presentation copy. */
@@ -104,19 +109,19 @@ export const appMediaBrokerFailureSchema = z.strictObject({
104
109
  provider: mediaFailureSchema.shape.provider,
105
110
  });
106
111
  /** Refusal payloads emitted by the App media broker, separate from transport errors. */
107
- export const appMediaRefusalSchema = z.union([
112
+ export const appMediaRefusalSchema = /* @__PURE__ */ z.union([
108
113
  appMediaBrokerErrorSchema,
109
114
  appMediaBudgetRefusalSchema,
110
115
  agentAppMediaLibraryFailureSchema,
111
116
  appMediaBrokerFailureSchema,
112
117
  ]);
113
118
  /** Model-list payload or an existing broker refusal. */
114
- export const appMediaModelsOutcomeSchema = z.union([
119
+ export const appMediaModelsOutcomeSchema = /* @__PURE__ */ z.union([
115
120
  mediaModelsSchema,
116
121
  appMediaRefusalSchema,
117
122
  ]);
118
123
  /** Completed generation, Agar polling result, or an existing broker refusal. */
119
- export const appMediaGenerationOutcomeSchema = z.union([
124
+ export const appMediaGenerationOutcomeSchema = /* @__PURE__ */ z.union([
120
125
  appMediaGenerationResultSchema,
121
126
  pendingSchema,
122
127
  appMediaRefusalSchema,
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ export const MIN_VIEW_DIMENSION = 256;
11
11
  /** Maximum long-edge size accepted by an image viewer, in pixels. */
12
12
  export const MAX_VIEW_DIMENSION = 512;
13
13
  /** Decode a viewer long-edge size within the supported pixel bounds. */
14
- export const viewDimensionSchema = z.lazy(() => z.number().int().min(MIN_VIEW_DIMENSION).max(MAX_VIEW_DIMENSION));
14
+ export const viewDimensionSchema = /* @__PURE__ */ z.lazy(() => z.number().int().min(MIN_VIEW_DIMENSION).max(MAX_VIEW_DIMENSION));
15
15
  /** Reference images in one video request: every verified video model's catalog value. */
16
16
  const MAX_VIDEO_REFERENCE_COUNT = 4;
17
17
  /** Maximum decoded bytes per reference image. */
@@ -48,54 +48,56 @@ const normalizeReference = (value) => {
48
48
  /** Schema ceiling for audio reference lists; each model's own `audioReferences.max` is enforced after parsing. */
49
49
  export const MAX_AUDIO_REFERENCE_COUNT = 10;
50
50
  /** Structural wire grammar for one Media generation request. */
51
- export const mediaGenerationSettingsSchema = z
51
+ export const mediaGenerationSettingsSchema = /* @__PURE__ */ z
52
52
  .object({
53
53
  /** Provider catalog model identifier. */
54
- model: z.string().min(1).max(256),
54
+ model: /* @__PURE__ */ z.string().min(1).max(256),
55
55
  /** Generation prompt; each model's `maxPromptLength` is enforced on top of this ceiling. */
56
- prompt: z.string().min(1).max(MAX_MEDIA_PROMPT_LENGTH),
56
+ prompt: /* @__PURE__ */ z.string().min(1).max(MAX_MEDIA_PROMPT_LENGTH),
57
57
  /** Requested image width or nominal video selector; absent for audio. */
58
- width: z.number().int().min(1).max(5_040).optional(),
58
+ width: /* @__PURE__ */ z.number().int().min(1).max(5_040).optional(),
59
59
  /** Requested image height or nominal video selector; absent for audio. */
60
- height: z.number().int().min(1).max(5_040).optional(),
60
+ height: /* @__PURE__ */ z.number().int().min(1).max(5_040).optional(),
61
61
  /** Model-specific inference step count. */
62
- steps: z.number().int().optional(),
62
+ steps: /* @__PURE__ */ z.number().int().optional(),
63
63
  /** Prompt guidance; models without a catalog guidance range refuse it. */
64
- guidance: z.number().optional(),
64
+ guidance: /* @__PURE__ */ z.number().optional(),
65
65
  /** Requested video or music length in whole seconds. */
66
- durationSeconds: z.number().int().optional(),
66
+ durationSeconds: /* @__PURE__ */ z.number().int().optional(),
67
67
  /** Upscale only: the output size in megapixels, one of the model's offered sizes. */
68
- targetMegapixels: z.number().int().optional(),
68
+ targetMegapixels: /* @__PURE__ */ z.number().int().optional(),
69
69
  /** Speech models only: a premade voice from the catalog; the default when omitted. */
70
- voiceId: z.string().min(1).max(64).optional(),
70
+ voiceId: /* @__PURE__ */ z.string().min(1).max(64).optional(),
71
71
  /** Video resolution; must match the nominal width/height selector. */
72
- resolution: mediaVideoResolutionSchema.optional(),
72
+ resolution: /* @__PURE__ */ mediaVideoResolutionSchema.optional(),
73
73
  /** Video aspect; must match the nominal width/height selector. */
74
- aspectRatio: mediaVideoAspectRatioSchema.optional(),
74
+ aspectRatio: /* @__PURE__ */ mediaVideoAspectRatioSchema.optional(),
75
75
  /** Video audio selection. */
76
- generateAudio: z.boolean().optional(),
76
+ generateAudio: /* @__PURE__ */ z.boolean().optional(),
77
77
  /** Host-authorized reference images. */
78
- references: z
79
- .array(z
78
+ references: /* @__PURE__ */ z
79
+ .array(
80
+ /* @__PURE__ */ z
80
81
  .object({
81
82
  /** Host-admitted destination or reference identity. */
82
- computerId: z.string().min(1).max(256),
83
+ computerId: /* @__PURE__ */ z.string().min(1).max(256),
83
84
  /** Fixed destination or reference file path. */
84
- path: z.string().min(1).max(4_096),
85
+ path: /* @__PURE__ */ z.string().min(1).max(4_096),
85
86
  /** Video-only reference role. */
86
- role: mediaVideoReferenceRoleSchema.optional(),
87
+ role: /* @__PURE__ */ mediaVideoReferenceRoleSchema.optional(),
87
88
  })
88
89
  .strict())
89
90
  .max(MAX_REFERENCE_COUNT)
90
91
  .optional(),
91
92
  /** Host-authorized reference audio clips; only a model declaring `audioReferences` takes them. */
92
- audioReferences: z
93
- .array(z
93
+ audioReferences: /* @__PURE__ */ z
94
+ .array(
95
+ /* @__PURE__ */ z
94
96
  .object({
95
97
  /** Host-admitted destination or reference identity. */
96
- computerId: z.string().min(1).max(256),
98
+ computerId: /* @__PURE__ */ z.string().min(1).max(256),
97
99
  /** Fixed reference file path. */
98
- path: z.string().min(1).max(4_096),
100
+ path: /* @__PURE__ */ z.string().min(1).max(4_096),
99
101
  })
100
102
  .strict())
101
103
  .max(MAX_AUDIO_REFERENCE_COUNT)
@@ -103,29 +105,32 @@ export const mediaGenerationSettingsSchema = z
103
105
  })
104
106
  .strict();
105
107
  /** A reference may select another Computer; identity never grants access. */
106
- export const mediaGenerationSelectionSchema = mediaGenerationSettingsSchema.extend({
108
+ export const mediaGenerationSelectionSchema =
109
+ /* @__PURE__ */ mediaGenerationSettingsSchema.extend({
107
110
  /** Host-authorized reference images. */
108
- references: z
109
- .array(z
111
+ references: /* @__PURE__ */ z
112
+ .array(
113
+ /* @__PURE__ */ z
110
114
  .object({
111
115
  /** Omit for the selected Computer; the host authorizes every named Computer. */
112
- computerId: z.string().min(1).max(256).optional(),
116
+ computerId: /* @__PURE__ */ z.string().min(1).max(256).optional(),
113
117
  /** Fixed destination or reference file path. */
114
- path: z.string().min(1).max(4_096),
118
+ path: /* @__PURE__ */ z.string().min(1).max(4_096),
115
119
  /** Video-only reference role. */
116
- role: mediaVideoReferenceRoleSchema.optional(),
120
+ role: /* @__PURE__ */ mediaVideoReferenceRoleSchema.optional(),
117
121
  })
118
122
  .strict())
119
123
  .max(MAX_REFERENCE_COUNT)
120
124
  .optional(),
121
125
  /** Host-authorized reference audio clips. */
122
- audioReferences: z
123
- .array(z
126
+ audioReferences: /* @__PURE__ */ z
127
+ .array(
128
+ /* @__PURE__ */ z
124
129
  .object({
125
130
  /** Omit for the selected Computer; the host authorizes every named Computer. */
126
- computerId: z.string().min(1).max(256).optional(),
131
+ computerId: /* @__PURE__ */ z.string().min(1).max(256).optional(),
127
132
  /** Fixed reference file path. */
128
- path: z.string().min(1).max(4_096),
133
+ path: /* @__PURE__ */ z.string().min(1).max(4_096),
129
134
  })
130
135
  .strict())
131
136
  .max(MAX_AUDIO_REFERENCE_COUNT)
@@ -338,19 +343,19 @@ function normalizeAudioSettings(model, audio, prompt, input) {
338
343
  return Object.freeze(normalized);
339
344
  }
340
345
  /** Path-only video reference; the host supplies authority and reads its bytes. */
341
- export const mediaVideoReferenceSchema = z.lazy(() => z.strictObject({
346
+ export const mediaVideoReferenceSchema = /* @__PURE__ */ z.lazy(() => z.strictObject({
342
347
  /** Selected image path, trimmed and nonblank after validation. */
343
348
  path: z.string().min(1).max(4_096),
344
349
  /** Explicit first frame, last frame, or reference-image role. */
345
350
  role: mediaVideoReferenceRoleSchema,
346
351
  }));
347
352
  /** Path-only audio reference; the host supplies authority and reads its bytes. */
348
- export const mediaAudioReferenceSelectionSchema = z.lazy(() => z.strictObject({
353
+ export const mediaAudioReferenceSelectionSchema = /* @__PURE__ */ z.lazy(() => z.strictObject({
349
354
  /** Selected audio file path, trimmed and nonblank after validation. */
350
355
  path: z.string().min(1).max(4_096),
351
356
  }));
352
357
  /** Neutral video selection; model-specific combinations are checked by validateMediaVideoSelection. */
353
- export const mediaVideoSelectionSchema = z.lazy(() => z.strictObject({
358
+ export const mediaVideoSelectionSchema = /* @__PURE__ */ z.lazy(() => z.strictObject({
354
359
  /** Verified catalog model identifier. */
355
360
  model: mediaVideoModelIdSchema,
356
361
  /** Trimmed prompt; the selected model's `maxPromptLength` is enforced on top of this ceiling. */
@@ -379,9 +384,9 @@ export const mediaVideoSelectionSchema = z.lazy(() => z.strictObject({
379
384
  * The same selection for a host's own catalogue: the model is any id that
380
385
  * catalogue lists, checked by `validateMediaVideoSelection`.
381
386
  */
382
- const catalogueVideoSelectionSchema = mediaVideoSelectionSchema
387
+ const catalogueVideoSelectionSchema = /* @__PURE__ */ mediaVideoSelectionSchema
383
388
  .unwrap()
384
- .extend({ model: z.string().min(1).max(256) });
389
+ .extend({ model: /* @__PURE__ */ z.string().min(1).max(256) });
385
390
  /** Validate supported model/size/duration/reference combinations before authority or billing admission. */
386
391
  export function validateMediaVideoSelection(raw, catalogue = mediaModels) {
387
392
  const parsed = catalogueVideoSelectionSchema.safeParse(raw);
@@ -452,7 +457,7 @@ function normalizeTransformSettings(model, transform, prompt, input, normalize)
452
457
  return Object.freeze(settings);
453
458
  }
454
459
  /** Neutral audio selection: speech takes a voice, music a length; model-specific limits are checked by validateMediaGenerationSettings. */
455
- export const mediaAudioSelectionSchema = z.lazy(() => z.strictObject({
460
+ export const mediaAudioSelectionSchema = /* @__PURE__ */ z.lazy(() => z.strictObject({
456
461
  /** Verified catalog audio model identifier. */
457
462
  model: mediaAudioModelIdSchema,
458
463
  /** Text to speak, or a description of the music; the model's `maxPromptLength` is enforced on top of this ceiling. */
@@ -462,7 +467,12 @@ export const mediaAudioSelectionSchema = z.lazy(() => z.strictObject({
462
467
  /** Music only: whole seconds, 3 through 600; 30 when omitted. */
463
468
  durationSeconds: z.number().int().min(3).max(600).optional(),
464
469
  }));
465
- const imageFormats = new Set(["png", "jpeg", "gif", "webp"]);
470
+ const imageFormats = /* @__PURE__ */ new Set([
471
+ "png",
472
+ "jpeg",
473
+ "gif",
474
+ "webp",
475
+ ]);
466
476
  /**
467
477
  * Refuse a source image the operation cannot take, with plain copy, before any
468
478
  * paid call: an unsupported encoding, a source over Botanical's size bounds,
@@ -564,7 +574,7 @@ export const buildProviderInput = (settings, references = []) => {
564
574
  body,
565
575
  });
566
576
  };
567
- const providerEntrySchema = z.lazy(() => z
577
+ const providerEntrySchema = /* @__PURE__ */ z.lazy(() => z
568
578
  .object({
569
579
  /** Base64-encoded image data. */
570
580
  base64: z.string().optional(),
@@ -577,7 +587,7 @@ const providerEntrySchema = z.lazy(() => z
577
587
  .optional(),
578
588
  })
579
589
  .strict());
580
- const providerEnvelopeSchema = z.lazy(() => z.union([
590
+ const providerEnvelopeSchema = /* @__PURE__ */ z.lazy(() => z.union([
581
591
  z.object({
582
592
  /** Encoded provider image. */
583
593
  image: z.string().min(1),
@@ -592,7 +602,7 @@ const providerEnvelopeSchema = z.lazy(() => z.union([
592
602
  }),
593
603
  ]));
594
604
  /** Decode the Workers AI binding's raw output at the provider boundary. */
595
- export const mediaProviderWireSchema = z.lazy(() => z.union([
605
+ export const mediaProviderWireSchema = /* @__PURE__ */ z.lazy(() => z.union([
596
606
  providerEnvelopeSchema,
597
607
  z.instanceof(Uint8Array),
598
608
  z.instanceof(Response),
@@ -8,27 +8,28 @@ export { mediaResultSchema } from "./media-operation-contract.js";
8
8
  import { mediaFailureSchema } from "./browser-failure.js";
9
9
  import { appMediaBrokerFailureSchema, appMediaGenerationResultSchema, mediaModelsSchema, } from "./app-media-contracts.js";
10
10
  /** The App owns its folder; the host owns Computer identity and the output filename. */
11
- const mediaBindingLibraryPathSchema = z
11
+ const mediaBindingLibraryPathSchema = /* @__PURE__ */ z
12
12
  .string()
13
- .refine(Schema.is(mediaLibraryPathSchema), "Select an absolute library folder");
13
+ .refine(
14
+ /* @__PURE__ */ Schema.is(mediaLibraryPathSchema), "Select an absolute library folder");
14
15
  /** Image settings and path references crossing a scoped MEDIA binding. */
15
- export const mediaImageBindingInputSchema = z.strictObject({
16
+ export const mediaImageBindingInputSchema = /* @__PURE__ */ z.strictObject({
16
17
  /** Select image generation rather than video. */
17
- kind: z.literal("image"),
18
+ kind: /* @__PURE__ */ z.literal("image"),
18
19
  /** Attempt identity retained through polling and replay. */
19
20
  requestId: mediaRequestIdSchema,
20
21
  /** App-owned absolute folder; the host supplies Computer authority. */
21
22
  libraryPath: mediaBindingLibraryPathSchema,
22
23
  /** Image model selection, references and inference settings. */
23
- settings: mediaGenerationSelectionSchema
24
+ settings: /* @__PURE__ */ mediaGenerationSelectionSchema
24
25
  .omit({ durationSeconds: true, voiceId: true, audioReferences: true })
25
26
  .extend({
26
27
  /** Output width in pixels; an image always names its size. */
27
- width: z.number().int().min(1).max(5_040),
28
+ width: /* @__PURE__ */ z.number().int().min(1).max(5_040),
28
29
  /** Output height in pixels; an image always names its size. */
29
- height: z.number().int().min(1).max(5_040),
30
+ height: /* @__PURE__ */ z.number().int().min(1).max(5_040),
30
31
  /** Optional inference-step count for models that support it. */
31
- steps: z
32
+ steps: /* @__PURE__ */ z
32
33
  .number()
33
34
  .int()
34
35
  .nonnegative()
@@ -37,12 +38,12 @@ export const mediaImageBindingInputSchema = z.strictObject({
37
38
  })
38
39
  .refine((settings) => getGatewayModel(settings.model)?.kind === "image", "Select an image model from listModels"),
39
40
  /** Requested image encoding, validated against the selected model. */
40
- outputFormat: mediaRequestedImageFormatSchema.optional(),
41
+ outputFormat: /* @__PURE__ */ mediaRequestedImageFormatSchema.optional(),
41
42
  });
42
43
  /** Video settings and path references crossing the same scoped binding. */
43
- export const mediaVideoBindingInputSchema = z.strictObject({
44
+ export const mediaVideoBindingInputSchema = /* @__PURE__ */ z.strictObject({
44
45
  /** Select video generation rather than an image. */
45
- kind: z.literal("video"),
46
+ kind: /* @__PURE__ */ z.literal("video"),
46
47
  /** Attempt identity retained through polling and replay. */
47
48
  requestId: mediaRequestIdSchema,
48
49
  /** App-owned absolute folder; the host supplies Computer authority. */
@@ -51,9 +52,9 @@ export const mediaVideoBindingInputSchema = z.strictObject({
51
52
  settings: mediaVideoSelectionSchema,
52
53
  });
53
54
  /** Speech or music settings crossing the same scoped binding; audio takes no references. */
54
- export const mediaAudioBindingInputSchema = z.strictObject({
55
+ export const mediaAudioBindingInputSchema = /* @__PURE__ */ z.strictObject({
55
56
  /** Select speech or music generation. */
56
- kind: z.literal("audio"),
57
+ kind: /* @__PURE__ */ z.literal("audio"),
57
58
  /** Attempt identity retained through polling and replay. */
58
59
  requestId: mediaRequestIdSchema,
59
60
  /** App-owned absolute folder; the host supplies Computer authority. */
@@ -62,28 +63,29 @@ export const mediaAudioBindingInputSchema = z.strictObject({
62
63
  settings: mediaAudioSelectionSchema,
63
64
  });
64
65
  /** One generation identity, including the App-owned folder captured for replay. */
65
- export const mediaBindingGenerationSchema = z.discriminatedUnion("kind", [
66
+ export const mediaBindingGenerationSchema =
67
+ /* @__PURE__ */ z.discriminatedUnion("kind", [
66
68
  mediaImageBindingInputSchema,
67
69
  mediaVideoBindingInputSchema,
68
70
  mediaAudioBindingInputSchema,
69
71
  ]);
70
72
  /** Maintained MEDIA grammar; reference selectors carry no Computer authority. */
71
- export const mediaBindingCallSchema = z.discriminatedUnion("operation", [
72
- z.strictObject({
73
+ export const mediaBindingCallSchema = /* @__PURE__ */ z.discriminatedUnion("operation", [
74
+ /* @__PURE__ */ z.strictObject({
73
75
  /** Read the model catalog without dispatching generation. */
74
- operation: z.literal("models"),
76
+ operation: /* @__PURE__ */ z.literal("models"),
75
77
  /** Catalog reads carry no guest authority or generation settings. */
76
- input: z.strictObject({}),
78
+ input: /* @__PURE__ */ z.strictObject({}),
77
79
  }),
78
- z.strictObject({
80
+ /* @__PURE__ */ z.strictObject({
79
81
  /** Execute or poll one admitted generation identity. */
80
- operation: z.literal("generate"),
82
+ operation: /* @__PURE__ */ z.literal("generate"),
81
83
  /** The App's captured generation selection and library folder. */
82
84
  input: mediaBindingGenerationSchema,
83
85
  }),
84
86
  ]);
85
87
  /** Background-generation reply emitted by the durable service. */
86
- export const mediaPendingSchema = z.lazy(() => z.strictObject({
88
+ export const mediaPendingSchema = /* @__PURE__ */ z.lazy(() => z.strictObject({
87
89
  /** Background work has been accepted but is not yet delivered. */
88
90
  status: z.literal("pending"),
89
91
  /** Host-supplied delay before polling the same attempt again. */