@glassly/cloud-protocol 0.3.6-dev.853 → 0.3.7-beta.860

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glassly/cloud-protocol",
3
- "version": "0.3.6-dev.853",
3
+ "version": "0.3.7-beta.860",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "exports": {
@@ -15,7 +15,7 @@
15
15
  "test": "bun test"
16
16
  },
17
17
  "dependencies": {
18
- "zod": "^3.24.1"
18
+ "zod": "^4.6.7"
19
19
  },
20
20
  "publishConfig": {
21
21
  "access": "public"
package/src/camera.ts CHANGED
@@ -70,12 +70,8 @@ export function normalizePhotoCompress(
70
70
  }
71
71
 
72
72
  export const photoOptionsSchema = z.object({
73
- size: photoSizeInputSchema
74
- .optional()
75
- .transform((value) => (value === undefined ? undefined : normalizePhotoSizeTier(value))),
76
- compress: photoCompressInputSchema
77
- .optional()
78
- .transform((value) => (value === undefined ? undefined : normalizePhotoCompress(value))),
73
+ size: photoSizeInputSchema.transform(normalizePhotoSizeTier).optional(),
74
+ compress: photoCompressInputSchema.transform(normalizePhotoCompress).optional(),
79
75
  saveToGallery: z.boolean().optional(),
80
76
  sound: z.boolean().optional(),
81
77
  });
@@ -136,8 +132,8 @@ export type StreamOptions = z.infer<typeof streamOptionsSchema>;
136
132
  */
137
133
  export const managedStreamSchema = z.object({
138
134
  streamId: z.string(),
139
- ingest: z.record(z.unknown()),
140
- playback: z.record(z.unknown()),
135
+ ingest: z.record(z.string(), z.unknown()),
136
+ playback: z.record(z.string(), z.unknown()),
141
137
  });
142
138
  export type ManagedStream = z.infer<typeof managedStreamSchema>;
143
139
 
package/src/envelope.ts CHANGED
@@ -15,7 +15,7 @@ export const PROTOCOL_MAJOR = 2 as const;
15
15
  *
16
16
  * const connectionAck = envelope("connection.ack", connectionAckPayloadSchema)
17
17
  */
18
- export function envelope<Type extends string, Payload extends z.ZodTypeAny>(
18
+ export function envelope<Type extends string, Payload extends z.ZodType>(
19
19
  type: Type,
20
20
  payload: Payload,
21
21
  ) {
package/src/llm.ts CHANGED
@@ -60,7 +60,7 @@ export const llmToolSchema = z.object({
60
60
  name: z.string().min(1),
61
61
  description: z.string(),
62
62
  /** JSON Schema for the tool's arguments, lowercase-dialect. */
63
- inputSchema: z.record(z.unknown()),
63
+ inputSchema: z.record(z.string(), z.unknown()),
64
64
  });
65
65
  export type LlmTool = z.infer<typeof llmToolSchema>;
66
66
 
@@ -73,7 +73,7 @@ export const llmToolCallSchema = z.object({
73
73
  */
74
74
  id: z.string(),
75
75
  name: z.string(),
76
- input: z.record(z.unknown()),
76
+ input: z.record(z.string(), z.unknown()),
77
77
  });
78
78
  export type LlmToolCall = z.infer<typeof llmToolCallSchema>;
79
79