@myagentroam/protocol 0.13.13 → 0.13.15

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.
@@ -1,5 +1,21 @@
1
1
  import { z } from 'zod';
2
2
  export declare const remoteDesktopModeSchema: z.ZodEnum<["VIEW", "CONTROL"]>;
3
+ export declare const remoteDesktopDescribeInputSchema: z.ZodEffects<z.ZodObject<{
4
+ displayId: z.ZodOptional<z.ZodString>;
5
+ desktopGeneration: z.ZodOptional<z.ZodString>;
6
+ }, "strict", z.ZodTypeAny, {
7
+ displayId?: string | undefined;
8
+ desktopGeneration?: string | undefined;
9
+ }, {
10
+ displayId?: string | undefined;
11
+ desktopGeneration?: string | undefined;
12
+ }>, {
13
+ displayId?: string | undefined;
14
+ desktopGeneration?: string | undefined;
15
+ }, {
16
+ displayId?: string | undefined;
17
+ desktopGeneration?: string | undefined;
18
+ }>;
3
19
  /**
4
20
  * The adapter supplies [a,b,c,d,tx,ty], mapping x'=a*x+c*y+tx and
5
21
  * y'=b*x+d*y+ty; the browser must not infer it from devicePixelRatio.
@@ -7,6 +23,19 @@ export declare const remoteDesktopModeSchema: z.ZodEnum<["VIEW", "CONTROL"]>;
7
23
  export declare const remoteDesktopDescriptionSchema: z.ZodEffects<z.ZodObject<{
8
24
  desktopGeneration: z.ZodString;
9
25
  topologyRevision: z.ZodNumber;
26
+ selectableDisplays: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
+ displayId: z.ZodString;
28
+ name: z.ZodString;
29
+ primary: z.ZodBoolean;
30
+ }, "strict", z.ZodTypeAny, {
31
+ name: string;
32
+ displayId: string;
33
+ primary: boolean;
34
+ }, {
35
+ name: string;
36
+ displayId: string;
37
+ primary: boolean;
38
+ }>, "many">>;
10
39
  framebuffer: z.ZodObject<{
11
40
  width: z.ZodNumber;
12
41
  height: z.ZodNumber;
@@ -114,6 +143,11 @@ export declare const remoteDesktopDescriptionSchema: z.ZodEffects<z.ZodObject<{
114
143
  };
115
144
  nativeToFramebuffer: [number, number, number, number, number, number];
116
145
  }[];
146
+ selectableDisplays?: {
147
+ name: string;
148
+ displayId: string;
149
+ primary: boolean;
150
+ }[] | undefined;
117
151
  }, {
118
152
  desktopGeneration: string;
119
153
  topologyRevision: number;
@@ -139,6 +173,11 @@ export declare const remoteDesktopDescriptionSchema: z.ZodEffects<z.ZodObject<{
139
173
  };
140
174
  nativeToFramebuffer: [number, number, number, number, number, number];
141
175
  }[];
176
+ selectableDisplays?: {
177
+ name: string;
178
+ displayId: string;
179
+ primary: boolean;
180
+ }[] | undefined;
142
181
  }>, {
143
182
  desktopGeneration: string;
144
183
  topologyRevision: number;
@@ -164,6 +203,11 @@ export declare const remoteDesktopDescriptionSchema: z.ZodEffects<z.ZodObject<{
164
203
  };
165
204
  nativeToFramebuffer: [number, number, number, number, number, number];
166
205
  }[];
206
+ selectableDisplays?: {
207
+ name: string;
208
+ displayId: string;
209
+ primary: boolean;
210
+ }[] | undefined;
167
211
  }, {
168
212
  desktopGeneration: string;
169
213
  topologyRevision: number;
@@ -189,6 +233,11 @@ export declare const remoteDesktopDescriptionSchema: z.ZodEffects<z.ZodObject<{
189
233
  };
190
234
  nativeToFramebuffer: [number, number, number, number, number, number];
191
235
  }[];
236
+ selectableDisplays?: {
237
+ name: string;
238
+ displayId: string;
239
+ primary: boolean;
240
+ }[] | undefined;
192
241
  }>;
193
242
  export type RemoteDesktopDescription = z.infer<typeof remoteDesktopDescriptionSchema>;
194
243
  export declare const remoteDesktopCapabilitySchema: z.ZodDiscriminatedUnion<"available", [z.ZodObject<{
@@ -11,6 +11,10 @@ const code = z.string().regex(/^[A-Z][A-Z0-9_]{0,127}$/u);
11
11
  const grant = z.string().min(32).max(4096);
12
12
  const fingerprint = z.string().regex(/^sha-256(?: [A-F0-9]{2}(?::[A-F0-9]{2}){31})$/u);
13
13
  export const remoteDesktopModeSchema = z.enum(['VIEW', 'CONTROL']);
14
+ export const remoteDesktopDescribeInputSchema = z
15
+ .object({ displayId: id.optional(), desktopGeneration: id.optional() })
16
+ .strict()
17
+ .refine((value) => value.displayId === undefined || value.desktopGeneration === undefined);
14
18
  const nativeCoordinate = z.number().finite().min(-0x80000000).max(0x7fffffff);
15
19
  const dimension = z.number().int().positive().max(65535);
16
20
  const nativeRectangle = z
@@ -38,6 +42,11 @@ export const remoteDesktopDescriptionSchema = z
38
42
  .object({
39
43
  desktopGeneration: id,
40
44
  topologyRevision: revision,
45
+ selectableDisplays: z
46
+ .array(z.object({ displayId: id, name: z.string().min(1).max(256), primary: z.boolean() }).strict())
47
+ .min(1)
48
+ .max(64)
49
+ .optional(),
41
50
  framebuffer: z.object({ width: dimension, height: dimension }).strict(),
42
51
  displays: z
43
52
  .array(z
@@ -111,6 +120,18 @@ export const remoteDesktopDescriptionSchema = z
111
120
  path: ['displays'],
112
121
  message: 'Exactly one primary display is required'
113
122
  });
123
+ if (description.selectableDisplays) {
124
+ const catalog = description.selectableDisplays;
125
+ if (description.displays.length !== 1 ||
126
+ !catalog.some((display) => display.displayId === description.displays[0]?.displayId) ||
127
+ new Set(catalog.map((display) => display.displayId)).size !== catalog.length ||
128
+ catalog.filter((display) => display.primary).length !== 1)
129
+ context.addIssue({
130
+ code: z.ZodIssueCode.custom,
131
+ path: ['selectableDisplays'],
132
+ message: 'Invalid capture display catalog'
133
+ });
134
+ }
114
135
  });
115
136
  export const remoteDesktopCapabilitySchema = z.discriminatedUnion('available', [
116
137
  z
@@ -135,7 +156,7 @@ export const remoteDesktopCapabilitySchema = z.discriminatedUnion('available', [
135
156
  .array(z.enum(['DIRECT', 'RELAY']))
136
157
  .min(1)
137
158
  .max(2)
138
- .refine((items) => new Set(items).size === items.length),
159
+ .refine((items) => new Set(items).size === items.length)
139
160
  })
140
161
  .strict()
141
162
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.13.13",
3
+ "version": "0.13.15",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/myagentroam/mar.git",