pixelkiln 0.68.0 → 0.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -415,39 +415,30 @@ declare function requireBalance(provider: Provider): NonNullable<Provider["balan
415
415
  declare function formatCost(unit: CostUnit, amount: number): string;
416
416
 
417
417
  /**
418
- * PixelLab's per-joint keypoint, `{label, x, y, z_index}` (confirmed against
419
- * the live `animate_with_skeleton_v3` MCP tool schema, whose own example is
420
- * `{"label": "RIGHT KNEE", "x": 0.52, "y": 0.71, "z_index": 9}`). Field names
421
- * are snake_case here, breaking this codebase's usual camelCase convention —
422
- * deliberately: this is a serialized PixelLab API payload, not manifest
423
- * prose. The realistic authoring path is `pixelkiln estimate-skeleton` →
424
- * dump the response to disk unmodified → hand-tweak a few joints for
425
- * in-between frames. Renaming fields would make that a lossy round trip.
418
+ * PixelLab's per-joint keypoint, `{label, x, y, z_index}`, with `x`/`y` as
419
+ * fractions of the image (the MCP tool's own example is `{"label": "RIGHT
420
+ * KNEE", "x": 0.52, "y": 0.71, "z_index": 9}`). Field names are snake_case,
421
+ * breaking this codebase's usual camelCase convention, deliberately: this is
422
+ * a serialized PixelLab payload, and `pixelkiln estimate-skeleton` writes the
423
+ * response to disk as it came, so renaming would make that a lossy round trip.
426
424
  *
427
- * `label` is left a free string, not an enum of the 18 canonical joint
428
- * names: the exhaustive list and exact spelling of all 18 is not confirmed
429
- * anywhere this codebase can read from (only "RIGHT KNEE" is known, as an
430
- * example). Guessing the other 17 and getting one wrong would silently
431
- * reject a valid request. No client-side content validation of `label`
432
- * beyond requiring one — matching this codebase's existing precedent of
433
- * letting PixelLab's API reject what it rejects rather than gating on an
434
- * assumed vocabulary (no other PixelLab call in this codebase validates
435
- * field *content* client-side, only shape/range).
425
+ * `label` is one of the 18 names the OpenAPI document enumerates, so a typo
426
+ * fails when the manifest loads instead of after a paid call.
436
427
  */
437
428
  declare const SkeletonKeypointSchema: z.ZodObject<{
438
- label: z.ZodString;
429
+ label: z.ZodEnum<["NOSE", "NECK", "RIGHT SHOULDER", "RIGHT ELBOW", "RIGHT ARM", "LEFT SHOULDER", "LEFT ELBOW", "LEFT ARM", "RIGHT HIP", "RIGHT KNEE", "RIGHT LEG", "LEFT HIP", "LEFT KNEE", "LEFT LEG", "RIGHT EYE", "LEFT EYE", "RIGHT EAR", "LEFT EAR"]>;
439
430
  x: z.ZodNumber;
440
431
  y: z.ZodNumber;
441
432
  z_index: z.ZodNumber;
442
433
  depth: z.ZodOptional<z.ZodNumber>;
443
434
  }, "strict", z.ZodTypeAny, {
444
- label: string;
435
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
445
436
  x: number;
446
437
  y: number;
447
438
  z_index: number;
448
439
  depth?: number | undefined;
449
440
  }, {
450
- label: string;
441
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
451
442
  x: number;
452
443
  y: number;
453
444
  z_index: number;
@@ -460,54 +451,78 @@ type SkeletonKeypoint = z.infer<typeof SkeletonKeypointSchema>;
460
451
  * motion (3-15 frames, PixelLab's own documented ceiling).
461
452
  */
462
453
  declare const SkeletonSetSchema: z.ZodObject<{
463
- firstFrameKeypoints: z.ZodArray<z.ZodObject<{
464
- label: z.ZodString;
454
+ firstFrameKeypoints: z.ZodEffects<z.ZodArray<z.ZodObject<{
455
+ label: z.ZodEnum<["NOSE", "NECK", "RIGHT SHOULDER", "RIGHT ELBOW", "RIGHT ARM", "LEFT SHOULDER", "LEFT ELBOW", "LEFT ARM", "RIGHT HIP", "RIGHT KNEE", "RIGHT LEG", "LEFT HIP", "LEFT KNEE", "LEFT LEG", "RIGHT EYE", "LEFT EYE", "RIGHT EAR", "LEFT EAR"]>;
465
456
  x: z.ZodNumber;
466
457
  y: z.ZodNumber;
467
458
  z_index: z.ZodNumber;
468
459
  depth: z.ZodOptional<z.ZodNumber>;
469
460
  }, "strict", z.ZodTypeAny, {
470
- label: string;
461
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
471
462
  x: number;
472
463
  y: number;
473
464
  z_index: number;
474
465
  depth?: number | undefined;
475
466
  }, {
476
- label: string;
467
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
477
468
  x: number;
478
469
  y: number;
479
470
  z_index: number;
480
471
  depth?: number | undefined;
481
- }>, "many">;
482
- frames: z.ZodArray<z.ZodArray<z.ZodObject<{
483
- label: z.ZodString;
472
+ }>, "many">, {
473
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
474
+ x: number;
475
+ y: number;
476
+ z_index: number;
477
+ depth?: number | undefined;
478
+ }[], {
479
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
480
+ x: number;
481
+ y: number;
482
+ z_index: number;
483
+ depth?: number | undefined;
484
+ }[]>;
485
+ frames: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodObject<{
486
+ label: z.ZodEnum<["NOSE", "NECK", "RIGHT SHOULDER", "RIGHT ELBOW", "RIGHT ARM", "LEFT SHOULDER", "LEFT ELBOW", "LEFT ARM", "RIGHT HIP", "RIGHT KNEE", "RIGHT LEG", "LEFT HIP", "LEFT KNEE", "LEFT LEG", "RIGHT EYE", "LEFT EYE", "RIGHT EAR", "LEFT EAR"]>;
484
487
  x: z.ZodNumber;
485
488
  y: z.ZodNumber;
486
489
  z_index: z.ZodNumber;
487
490
  depth: z.ZodOptional<z.ZodNumber>;
488
491
  }, "strict", z.ZodTypeAny, {
489
- label: string;
492
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
490
493
  x: number;
491
494
  y: number;
492
495
  z_index: number;
493
496
  depth?: number | undefined;
494
497
  }, {
495
- label: string;
498
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
499
+ x: number;
500
+ y: number;
501
+ z_index: number;
502
+ depth?: number | undefined;
503
+ }>, "many">, {
504
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
505
+ x: number;
506
+ y: number;
507
+ z_index: number;
508
+ depth?: number | undefined;
509
+ }[], {
510
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
496
511
  x: number;
497
512
  y: number;
498
513
  z_index: number;
499
514
  depth?: number | undefined;
500
- }>, "many">, "many">;
515
+ }[]>, "many">;
501
516
  }, "strict", z.ZodTypeAny, {
502
517
  firstFrameKeypoints: {
503
- label: string;
518
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
504
519
  x: number;
505
520
  y: number;
506
521
  z_index: number;
507
522
  depth?: number | undefined;
508
523
  }[];
509
524
  frames: {
510
- label: string;
525
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
511
526
  x: number;
512
527
  y: number;
513
528
  z_index: number;
@@ -515,14 +530,14 @@ declare const SkeletonSetSchema: z.ZodObject<{
515
530
  }[][];
516
531
  }, {
517
532
  firstFrameKeypoints: {
518
- label: string;
533
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
519
534
  x: number;
520
535
  y: number;
521
536
  z_index: number;
522
537
  depth?: number | undefined;
523
538
  }[];
524
539
  frames: {
525
- label: string;
540
+ label: "NOSE" | "NECK" | "RIGHT SHOULDER" | "RIGHT ELBOW" | "RIGHT ARM" | "LEFT SHOULDER" | "LEFT ELBOW" | "LEFT ARM" | "RIGHT HIP" | "RIGHT KNEE" | "RIGHT LEG" | "LEFT HIP" | "LEFT KNEE" | "LEFT LEG" | "RIGHT EYE" | "LEFT EYE" | "RIGHT EAR" | "LEFT EAR";
526
541
  x: number;
527
542
  y: number;
528
543
  z_index: number;
@@ -937,11 +952,11 @@ declare const AssetBatchSchema: z.ZodObject<{
937
952
  /** 1-based slot in the batch (the leader is implicitly slot 0). Unique and contiguous among siblings. */
938
953
  index: z.ZodNumber;
939
954
  }, "strict", z.ZodTypeAny, {
940
- of: string;
941
955
  index: number;
942
- }, {
943
956
  of: string;
957
+ }, {
944
958
  index: number;
959
+ of: string;
945
960
  }>;
946
961
  type AssetBatch = z.infer<typeof AssetBatchSchema>;
947
962
  /** A pose or outfit of an existing character, applied to every direction. */
@@ -4258,11 +4273,11 @@ declare const AssetSchema: z.ZodEffects<z.ZodObject<{
4258
4273
  /** 1-based slot in the batch (the leader is implicitly slot 0). Unique and contiguous among siblings. */
4259
4274
  index: z.ZodNumber;
4260
4275
  }, "strict", z.ZodTypeAny, {
4261
- of: string;
4262
4276
  index: number;
4263
- }, {
4264
4277
  of: string;
4278
+ }, {
4265
4279
  index: number;
4280
+ of: string;
4266
4281
  }>>;
4267
4282
  /** `uiAsset` styles: precise shape regions the panel is composited from. Combine with `elements`; omit both for a default full-canvas panel. */
4268
4283
  pieces: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -4573,8 +4588,8 @@ declare const AssetSchema: z.ZodEffects<z.ZodObject<{
4573
4588
  } | undefined;
4574
4589
  remoteId?: string | undefined;
4575
4590
  batch?: {
4576
- of: string;
4577
4591
  index: number;
4592
+ of: string;
4578
4593
  } | undefined;
4579
4594
  pieces?: ({
4580
4595
  x: number;
@@ -4691,8 +4706,8 @@ declare const AssetSchema: z.ZodEffects<z.ZodObject<{
4691
4706
  } | undefined;
4692
4707
  remoteId?: string | undefined;
4693
4708
  batch?: {
4694
- of: string;
4695
4709
  index: number;
4710
+ of: string;
4696
4711
  } | undefined;
4697
4712
  pieces?: ({
4698
4713
  x: number;
@@ -4815,8 +4830,8 @@ declare const AssetSchema: z.ZodEffects<z.ZodObject<{
4815
4830
  } | undefined;
4816
4831
  remoteId?: string | undefined;
4817
4832
  batch?: {
4818
- of: string;
4819
4833
  index: number;
4834
+ of: string;
4820
4835
  } | undefined;
4821
4836
  pieces?: ({
4822
4837
  x: number;
@@ -4933,8 +4948,8 @@ declare const AssetSchema: z.ZodEffects<z.ZodObject<{
4933
4948
  } | undefined;
4934
4949
  remoteId?: string | undefined;
4935
4950
  batch?: {
4936
- of: string;
4937
4951
  index: number;
4952
+ of: string;
4938
4953
  } | undefined;
4939
4954
  pieces?: ({
4940
4955
  x: number;
@@ -6218,11 +6233,11 @@ declare const ManifestSchema: z.ZodObject<{
6218
6233
  /** 1-based slot in the batch (the leader is implicitly slot 0). Unique and contiguous among siblings. */
6219
6234
  index: z.ZodNumber;
6220
6235
  }, "strict", z.ZodTypeAny, {
6221
- of: string;
6222
6236
  index: number;
6223
- }, {
6224
6237
  of: string;
6238
+ }, {
6225
6239
  index: number;
6240
+ of: string;
6226
6241
  }>>;
6227
6242
  /** `uiAsset` styles: precise shape regions the panel is composited from. Combine with `elements`; omit both for a default full-canvas panel. */
6228
6243
  pieces: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -6533,8 +6548,8 @@ declare const ManifestSchema: z.ZodObject<{
6533
6548
  } | undefined;
6534
6549
  remoteId?: string | undefined;
6535
6550
  batch?: {
6536
- of: string;
6537
6551
  index: number;
6552
+ of: string;
6538
6553
  } | undefined;
6539
6554
  pieces?: ({
6540
6555
  x: number;
@@ -6651,8 +6666,8 @@ declare const ManifestSchema: z.ZodObject<{
6651
6666
  } | undefined;
6652
6667
  remoteId?: string | undefined;
6653
6668
  batch?: {
6654
- of: string;
6655
6669
  index: number;
6670
+ of: string;
6656
6671
  } | undefined;
6657
6672
  pieces?: ({
6658
6673
  x: number;
@@ -6775,8 +6790,8 @@ declare const ManifestSchema: z.ZodObject<{
6775
6790
  } | undefined;
6776
6791
  remoteId?: string | undefined;
6777
6792
  batch?: {
6778
- of: string;
6779
6793
  index: number;
6794
+ of: string;
6780
6795
  } | undefined;
6781
6796
  pieces?: ({
6782
6797
  x: number;
@@ -6893,8 +6908,8 @@ declare const ManifestSchema: z.ZodObject<{
6893
6908
  } | undefined;
6894
6909
  remoteId?: string | undefined;
6895
6910
  batch?: {
6896
- of: string;
6897
6911
  index: number;
6912
+ of: string;
6898
6913
  } | undefined;
6899
6914
  pieces?: ({
6900
6915
  x: number;
@@ -7105,8 +7120,8 @@ declare const ManifestSchema: z.ZodObject<{
7105
7120
  } | undefined;
7106
7121
  remoteId?: string | undefined;
7107
7122
  batch?: {
7108
- of: string;
7109
7123
  index: number;
7124
+ of: string;
7110
7125
  } | undefined;
7111
7126
  pieces?: ({
7112
7127
  x: number;
@@ -7312,8 +7327,8 @@ declare const ManifestSchema: z.ZodObject<{
7312
7327
  } | undefined;
7313
7328
  remoteId?: string | undefined;
7314
7329
  batch?: {
7315
- of: string;
7316
7330
  index: number;
7331
+ of: string;
7317
7332
  } | undefined;
7318
7333
  pieces?: ({
7319
7334
  x: number;
@@ -8911,11 +8926,11 @@ declare const ManifestInputSchema: z.ZodObject<{
8911
8926
  /** 1-based slot in the batch (the leader is implicitly slot 0). Unique and contiguous among siblings. */
8912
8927
  index: z.ZodNumber;
8913
8928
  }, "strict", z.ZodTypeAny, {
8914
- of: string;
8915
8929
  index: number;
8916
- }, {
8917
8930
  of: string;
8931
+ }, {
8918
8932
  index: number;
8933
+ of: string;
8919
8934
  }>>;
8920
8935
  /** `uiAsset` styles: precise shape regions the panel is composited from. Combine with `elements`; omit both for a default full-canvas panel. */
8921
8936
  pieces: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -9226,8 +9241,8 @@ declare const ManifestInputSchema: z.ZodObject<{
9226
9241
  } | undefined;
9227
9242
  remoteId?: string | undefined;
9228
9243
  batch?: {
9229
- of: string;
9230
9244
  index: number;
9245
+ of: string;
9231
9246
  } | undefined;
9232
9247
  pieces?: ({
9233
9248
  x: number;
@@ -9344,8 +9359,8 @@ declare const ManifestInputSchema: z.ZodObject<{
9344
9359
  } | undefined;
9345
9360
  remoteId?: string | undefined;
9346
9361
  batch?: {
9347
- of: string;
9348
9362
  index: number;
9363
+ of: string;
9349
9364
  } | undefined;
9350
9365
  pieces?: ({
9351
9366
  x: number;
@@ -9468,8 +9483,8 @@ declare const ManifestInputSchema: z.ZodObject<{
9468
9483
  } | undefined;
9469
9484
  remoteId?: string | undefined;
9470
9485
  batch?: {
9471
- of: string;
9472
9486
  index: number;
9487
+ of: string;
9473
9488
  } | undefined;
9474
9489
  pieces?: ({
9475
9490
  x: number;
@@ -9586,8 +9601,8 @@ declare const ManifestInputSchema: z.ZodObject<{
9586
9601
  } | undefined;
9587
9602
  remoteId?: string | undefined;
9588
9603
  batch?: {
9589
- of: string;
9590
9604
  index: number;
9605
+ of: string;
9591
9606
  } | undefined;
9592
9607
  pieces?: ({
9593
9608
  x: number;
@@ -9882,8 +9897,8 @@ declare const ManifestInputSchema: z.ZodObject<{
9882
9897
  } | undefined;
9883
9898
  remoteId?: string | undefined;
9884
9899
  batch?: {
9885
- of: string;
9886
9900
  index: number;
9901
+ of: string;
9887
9902
  } | undefined;
9888
9903
  pieces?: ({
9889
9904
  x: number;
@@ -10173,8 +10188,8 @@ declare const ManifestInputSchema: z.ZodObject<{
10173
10188
  } | undefined;
10174
10189
  remoteId?: string | undefined;
10175
10190
  batch?: {
10176
- of: string;
10177
10191
  index: number;
10192
+ of: string;
10178
10193
  } | undefined;
10179
10194
  pieces?: ({
10180
10195
  x: number;
package/dist/index.js CHANGED
@@ -1370,14 +1370,42 @@ function fetchWithRetry(request, opts = {}) {
1370
1370
 
1371
1371
  // src/skeleton.ts
1372
1372
  import { z as z2 } from "zod";
1373
+ var SKELETON_LABELS = [
1374
+ "NOSE",
1375
+ "NECK",
1376
+ "RIGHT SHOULDER",
1377
+ "RIGHT ELBOW",
1378
+ "RIGHT ARM",
1379
+ "LEFT SHOULDER",
1380
+ "LEFT ELBOW",
1381
+ "LEFT ARM",
1382
+ "RIGHT HIP",
1383
+ "RIGHT KNEE",
1384
+ "RIGHT LEG",
1385
+ "LEFT HIP",
1386
+ "LEFT KNEE",
1387
+ "LEFT LEG",
1388
+ "RIGHT EYE",
1389
+ "LEFT EYE",
1390
+ "RIGHT EAR",
1391
+ "LEFT EAR"
1392
+ ];
1373
1393
  var SkeletonKeypointSchema = z2.object({
1374
- label: z2.string().min(1),
1394
+ label: z2.enum(SKELETON_LABELS),
1375
1395
  x: z2.number().min(0).max(1),
1376
1396
  y: z2.number().min(0).max(1),
1377
1397
  z_index: z2.number(),
1378
1398
  depth: z2.number().optional()
1379
1399
  }).strict();
1380
- var SkeletonFrameSchema = z2.array(SkeletonKeypointSchema).length(18);
1400
+ var SkeletonFrameSchema = z2.array(SkeletonKeypointSchema).length(18).superRefine((frame, context) => {
1401
+ const seen = /* @__PURE__ */ new Set();
1402
+ for (const [index, joint] of frame.entries()) {
1403
+ if (seen.has(joint.label)) {
1404
+ context.addIssue({ code: z2.ZodIssueCode.custom, message: `"${joint.label}" appears twice`, path: [index, "label"] });
1405
+ }
1406
+ seen.add(joint.label);
1407
+ }
1408
+ });
1381
1409
  var SkeletonSetSchema = z2.object({
1382
1410
  firstFrameKeypoints: SkeletonFrameSchema,
1383
1411
  frames: z2.array(SkeletonFrameSchema).min(3).max(15)
@@ -2742,7 +2770,7 @@ var PixelLabClient = class {
2742
2770
  * account (see `EstimateSkeletonResponseSchema`'s own caveat).
2743
2771
  */
2744
2772
  async estimateSkeleton(args) {
2745
- const body = { image: args.image };
2773
+ const body = { image: { type: "base64", base64: args.image.base64, format: args.image.format } };
2746
2774
  const res = validateResponse(
2747
2775
  EstimateSkeletonResponseSchema,
2748
2776
  await this.request("/estimate-skeleton", { method: "POST", body: JSON.stringify(body) }),