@camstack/types 1.2.179 → 1.2.180

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.
@@ -17,6 +17,7 @@ export declare const NativeCropBboxSchema: z.ZodObject<{
17
17
  export declare const NativeCropResultSchema: z.ZodObject<{
18
18
  bytes: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
19
19
  jpeg: z.ZodOptional<z.ZodString>;
20
+ jpegBytes: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
20
21
  width: z.ZodNumber;
21
22
  height: z.ZodNumber;
22
23
  tier: z.ZodOptional<z.ZodEnum<{
@@ -80,7 +81,8 @@ export declare const ParkTrackFrameResultSchema: z.ZodDiscriminatedUnion<[z.ZodO
80
81
  export type ParkTrackFrameResult = z.infer<typeof ParkTrackFrameResultSchema>;
81
82
  /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
82
83
  export declare const ParkedTrackFrameSchema: z.ZodObject<{
83
- jpeg: z.ZodString;
84
+ jpeg: z.ZodOptional<z.ZodString>;
85
+ jpegBytes: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
84
86
  width: z.ZodNumber;
85
87
  height: z.ZodNumber;
86
88
  timestamp: z.ZodNumber;
@@ -804,10 +806,12 @@ export declare const pipelineRunnerCapability: {
804
806
  h: z.ZodNumber;
805
807
  }, z.core.$strip>;
806
808
  maxWidth: z.ZodOptional<z.ZodNumber>;
809
+ acceptJpegBytes: z.ZodOptional<z.ZodBoolean>;
807
810
  encodeJpeg: z.ZodOptional<z.ZodBoolean>;
808
811
  }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
809
812
  bytes: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
810
813
  jpeg: z.ZodOptional<z.ZodString>;
814
+ jpegBytes: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
811
815
  width: z.ZodNumber;
812
816
  height: z.ZodNumber;
813
817
  tier: z.ZodOptional<z.ZodEnum<{
@@ -1072,8 +1076,10 @@ export declare const pipelineRunnerCapability: {
1072
1076
  keyFrame: "keyFrame";
1073
1077
  thumbnail: "thumbnail";
1074
1078
  }>;
1079
+ acceptJpegBytes: z.ZodOptional<z.ZodBoolean>;
1075
1080
  }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
1076
- jpeg: z.ZodString;
1081
+ jpeg: z.ZodOptional<z.ZodString>;
1082
+ jpegBytes: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
1077
1083
  width: z.ZodNumber;
1078
1084
  height: z.ZodNumber;
1079
1085
  timestamp: z.ZodNumber;
package/dist/index.js CHANGED
@@ -21271,6 +21271,14 @@ var NativeCropResultSchema = zod.z.object({
21271
21271
  * set `encodeJpeg: true`; `bytes` is then absent.
21272
21272
  */
21273
21273
  jpeg: zod.z.string().optional(),
21274
+ /**
21275
+ * The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
21276
+ * `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
21277
+ * `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
21278
+ * `bytes` above has crossed this boundary as a `Uint8Array` all along — so
21279
+ * base64 was buying nothing but a multi-megabyte string in the relay's heap.
21280
+ */
21281
+ jpegBytes: zod.z.instanceof(Uint8Array).optional(),
21274
21282
  width: zod.z.number().int().positive(),
21275
21283
  height: zod.z.number().int().positive(),
21276
21284
  /**
@@ -21337,7 +21345,14 @@ var ParkTrackFrameResultSchema = zod.z.discriminatedUnion("parked", [zod.z.objec
21337
21345
  })]);
21338
21346
  /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21339
21347
  var ParkedTrackFrameSchema = zod.z.object({
21340
- jpeg: zod.z.string(),
21348
+ /**
21349
+ * Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
21350
+ * `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
21351
+ * Exactly one of the two is present.
21352
+ */
21353
+ jpeg: zod.z.string().optional(),
21354
+ /** The same JPEG as bytes, for a caller that declared it reads them (D462). */
21355
+ jpegBytes: zod.z.instanceof(Uint8Array).optional(),
21341
21356
  width: zod.z.number().int().positive(),
21342
21357
  height: zod.z.number().int().positive(),
21343
21358
  /** The frame instant the parcel shows (the caller's clock, echoed back). */
@@ -22176,6 +22191,13 @@ var pipelineRunnerCapability = {
22176
22191
  bbox: NativeCropBboxSchema,
22177
22192
  maxWidth: zod.z.number().int().positive().optional(),
22178
22193
  /**
22194
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22195
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22196
+ * wire — never assume consent: a pre-D462 caller parses the field as
22197
+ * base64 and bytes would decode to garbage rather than fail.
22198
+ */
22199
+ acceptJpegBytes: zod.z.boolean().optional(),
22200
+ /**
22179
22201
  * When `true`, the runner encodes the resolved crop to JPEG ON THE
22180
22202
  * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
22181
22203
  * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
@@ -22348,7 +22370,14 @@ var pipelineRunnerCapability = {
22348
22370
  getParkedTrackFrame: require_sleep.method(zod.z.object({
22349
22371
  deviceId: zod.z.number(),
22350
22372
  trackId: zod.z.string(),
22351
- kind: ParkedFrameKindSchema
22373
+ kind: ParkedFrameKindSchema,
22374
+ /**
22375
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22376
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22377
+ * wire — never assume consent: a pre-D462 caller parses the field as
22378
+ * base64 and bytes would decode to garbage rather than fail.
22379
+ */
22380
+ acceptJpegBytes: zod.z.boolean().optional()
22352
22381
  }), ParkedTrackFrameSchema.nullable()),
22353
22382
  /**
22354
22383
  * Drop every parcel of a track — the hub closed it. Idempotent. A track
package/dist/index.mjs CHANGED
@@ -21270,6 +21270,14 @@ var NativeCropResultSchema = z.object({
21270
21270
  * set `encodeJpeg: true`; `bytes` is then absent.
21271
21271
  */
21272
21272
  jpeg: z.string().optional(),
21273
+ /**
21274
+ * The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
21275
+ * `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
21276
+ * `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
21277
+ * `bytes` above has crossed this boundary as a `Uint8Array` all along — so
21278
+ * base64 was buying nothing but a multi-megabyte string in the relay's heap.
21279
+ */
21280
+ jpegBytes: z.instanceof(Uint8Array).optional(),
21273
21281
  width: z.number().int().positive(),
21274
21282
  height: z.number().int().positive(),
21275
21283
  /**
@@ -21336,7 +21344,14 @@ var ParkTrackFrameResultSchema = z.discriminatedUnion("parked", [z.object({
21336
21344
  })]);
21337
21345
  /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21338
21346
  var ParkedTrackFrameSchema = z.object({
21339
- jpeg: z.string(),
21347
+ /**
21348
+ * Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
21349
+ * `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
21350
+ * Exactly one of the two is present.
21351
+ */
21352
+ jpeg: z.string().optional(),
21353
+ /** The same JPEG as bytes, for a caller that declared it reads them (D462). */
21354
+ jpegBytes: z.instanceof(Uint8Array).optional(),
21340
21355
  width: z.number().int().positive(),
21341
21356
  height: z.number().int().positive(),
21342
21357
  /** The frame instant the parcel shows (the caller's clock, echoed back). */
@@ -22175,6 +22190,13 @@ var pipelineRunnerCapability = {
22175
22190
  bbox: NativeCropBboxSchema,
22176
22191
  maxWidth: z.number().int().positive().optional(),
22177
22192
  /**
22193
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22194
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22195
+ * wire — never assume consent: a pre-D462 caller parses the field as
22196
+ * base64 and bytes would decode to garbage rather than fail.
22197
+ */
22198
+ acceptJpegBytes: z.boolean().optional(),
22199
+ /**
22178
22200
  * When `true`, the runner encodes the resolved crop to JPEG ON THE
22179
22201
  * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
22180
22202
  * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
@@ -22347,7 +22369,14 @@ var pipelineRunnerCapability = {
22347
22369
  getParkedTrackFrame: method(z.object({
22348
22370
  deviceId: z.number(),
22349
22371
  trackId: z.string(),
22350
- kind: ParkedFrameKindSchema
22372
+ kind: ParkedFrameKindSchema,
22373
+ /**
22374
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22375
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22376
+ * wire — never assume consent: a pre-D462 caller parses the field as
22377
+ * base64 and bytes would decode to garbage rather than fail.
22378
+ */
22379
+ acceptJpegBytes: z.boolean().optional()
22351
22380
  }), ParkedTrackFrameSchema.nullable()),
22352
22381
  /**
22353
22382
  * Drop every parcel of a track — the hub closed it. Idempotent. A track
@@ -272,6 +272,8 @@ export interface IPipelineRunnerProvider {
272
272
  readonly deviceId: number;
273
273
  readonly trackId: string;
274
274
  readonly kind: import('../capabilities/pipeline-runner.cap.js').ParkedFrameKind;
275
+ /** The caller reads bytes: answer in `jpegBytes`, not base64 (D462). */
276
+ readonly acceptJpegBytes?: boolean;
275
277
  }): Promise<import('../capabilities/pipeline-runner.cap.js').ParkedTrackFrame | null>;
276
278
  /** Drop every parcel of a closed track. Idempotent. */
277
279
  releaseParkedTrackFrames(input: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.179",
3
+ "version": "1.2.180",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",