@roll-agent/relay-protocol 0.5.0 → 0.5.2
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/control.d.ts +27 -27
- package/dist/control.js +2 -1
- package/dist/index.d.ts +1020 -1020
- package/dist/index.js +6 -6
- package/package.json +3 -3
package/dist/control.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const relayClientErrorCodeSchema: z.ZodEnum<{
|
|
|
36
36
|
RATE_LIMITED: "RATE_LIMITED";
|
|
37
37
|
RELAY_INTERNAL_ERROR: "RELAY_INTERNAL_ERROR";
|
|
38
38
|
}>;
|
|
39
|
-
export declare const relayBrowserSessionIdSchema: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
39
|
+
export declare const relayBrowserSessionIdSchema: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
40
40
|
export declare const relaySessionDescriptorSchema: z.ZodReadonly<z.ZodObject<{
|
|
41
41
|
connectUrl: z.ZodString;
|
|
42
42
|
expiresAt: z.ZodString;
|
|
@@ -56,8 +56,8 @@ export declare const relaySessionReadyControlMessageSchema: z.ZodReadonly<z.ZodO
|
|
|
56
56
|
type: z.ZodLiteral<"session.ready">;
|
|
57
57
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
58
58
|
relayProtocolVersion: z.ZodLiteral<"1.1">;
|
|
59
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
60
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
59
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
60
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
61
61
|
workspaceStatus: z.ZodEnum<{
|
|
62
62
|
online: "online";
|
|
63
63
|
offline: "offline";
|
|
@@ -66,8 +66,8 @@ export declare const relaySessionReadyControlMessageSchema: z.ZodReadonly<z.ZodO
|
|
|
66
66
|
export declare const relaySessionReadyControlMessageSchemaV12: z.ZodReadonly<z.ZodObject<{
|
|
67
67
|
type: z.ZodLiteral<"session.ready">;
|
|
68
68
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
69
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
70
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
69
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
70
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
71
71
|
workspaceStatus: z.ZodEnum<{
|
|
72
72
|
online: "online";
|
|
73
73
|
offline: "offline";
|
|
@@ -77,8 +77,8 @@ export declare const relaySessionReadyControlMessageSchemaV12: z.ZodReadonly<z.Z
|
|
|
77
77
|
export declare const relaySessionReadyControlMessageSchemaV13: z.ZodReadonly<z.ZodObject<{
|
|
78
78
|
type: z.ZodLiteral<"session.ready">;
|
|
79
79
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
80
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
81
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
80
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
81
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
82
82
|
workspaceStatus: z.ZodEnum<{
|
|
83
83
|
online: "online";
|
|
84
84
|
offline: "offline";
|
|
@@ -88,8 +88,8 @@ export declare const relaySessionReadyControlMessageSchemaV13: z.ZodReadonly<z.Z
|
|
|
88
88
|
export declare const relaySessionReadyControlMessageSchemaAny: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
89
89
|
type: z.ZodLiteral<"session.ready">;
|
|
90
90
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
91
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
92
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
91
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
92
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
93
93
|
workspaceStatus: z.ZodEnum<{
|
|
94
94
|
online: "online";
|
|
95
95
|
offline: "offline";
|
|
@@ -99,8 +99,8 @@ export declare const relaySessionReadyControlMessageSchemaAny: z.ZodUnion<readon
|
|
|
99
99
|
type: z.ZodLiteral<"session.ready">;
|
|
100
100
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
101
101
|
relayProtocolVersion: z.ZodLiteral<"1.1">;
|
|
102
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
103
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
102
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
103
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
104
104
|
workspaceStatus: z.ZodEnum<{
|
|
105
105
|
online: "online";
|
|
106
106
|
offline: "offline";
|
|
@@ -108,8 +108,8 @@ export declare const relaySessionReadyControlMessageSchemaAny: z.ZodUnion<readon
|
|
|
108
108
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
109
109
|
type: z.ZodLiteral<"session.ready">;
|
|
110
110
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
111
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
112
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
111
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
112
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
113
113
|
workspaceStatus: z.ZodEnum<{
|
|
114
114
|
online: "online";
|
|
115
115
|
offline: "offline";
|
|
@@ -118,7 +118,7 @@ export declare const relaySessionReadyControlMessageSchemaAny: z.ZodUnion<readon
|
|
|
118
118
|
}, z.core.$strict>>]>;
|
|
119
119
|
export declare const relayWorkspaceStatusControlMessageSchema: z.ZodReadonly<z.ZodObject<{
|
|
120
120
|
type: z.ZodLiteral<"workspace.status">;
|
|
121
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
121
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
122
122
|
status: z.ZodEnum<{
|
|
123
123
|
online: "online";
|
|
124
124
|
offline: "offline";
|
|
@@ -139,8 +139,8 @@ export declare const relaySessionErrorControlMessageSchema: z.ZodReadonly<z.ZodO
|
|
|
139
139
|
export declare const relayBrowserControlMessageSchemaAny: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
140
140
|
type: z.ZodLiteral<"session.ready">;
|
|
141
141
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
142
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
143
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
142
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
143
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
144
144
|
workspaceStatus: z.ZodEnum<{
|
|
145
145
|
online: "online";
|
|
146
146
|
offline: "offline";
|
|
@@ -150,8 +150,8 @@ export declare const relayBrowserControlMessageSchemaAny: z.ZodUnion<readonly [z
|
|
|
150
150
|
type: z.ZodLiteral<"session.ready">;
|
|
151
151
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
152
152
|
relayProtocolVersion: z.ZodLiteral<"1.1">;
|
|
153
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
154
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
153
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
154
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
155
155
|
workspaceStatus: z.ZodEnum<{
|
|
156
156
|
online: "online";
|
|
157
157
|
offline: "offline";
|
|
@@ -159,8 +159,8 @@ export declare const relayBrowserControlMessageSchemaAny: z.ZodUnion<readonly [z
|
|
|
159
159
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
160
160
|
type: z.ZodLiteral<"session.ready">;
|
|
161
161
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
162
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
163
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
162
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
163
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
164
164
|
workspaceStatus: z.ZodEnum<{
|
|
165
165
|
online: "online";
|
|
166
166
|
offline: "offline";
|
|
@@ -168,7 +168,7 @@ export declare const relayBrowserControlMessageSchemaAny: z.ZodUnion<readonly [z
|
|
|
168
168
|
relayProtocolVersion: z.ZodLiteral<"1.2">;
|
|
169
169
|
}, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
|
|
170
170
|
type: z.ZodLiteral<"workspace.status">;
|
|
171
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
171
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
172
172
|
status: z.ZodEnum<{
|
|
173
173
|
online: "online";
|
|
174
174
|
offline: "offline";
|
|
@@ -189,15 +189,15 @@ export declare const relayBrowserControlMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
189
189
|
type: z.ZodLiteral<"session.ready">;
|
|
190
190
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
191
191
|
relayProtocolVersion: z.ZodLiteral<"1.1">;
|
|
192
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
193
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
192
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
193
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
194
194
|
workspaceStatus: z.ZodEnum<{
|
|
195
195
|
online: "online";
|
|
196
196
|
offline: "offline";
|
|
197
197
|
}>;
|
|
198
198
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
199
199
|
type: z.ZodLiteral<"workspace.status">;
|
|
200
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
200
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
201
201
|
status: z.ZodEnum<{
|
|
202
202
|
online: "online";
|
|
203
203
|
offline: "offline";
|
|
@@ -213,14 +213,14 @@ export declare const relayBrowserControlMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
213
213
|
RELAY_INTERNAL_ERROR: "RELAY_INTERNAL_ERROR";
|
|
214
214
|
}>;
|
|
215
215
|
retryable: z.ZodBoolean;
|
|
216
|
-
}, z.core.$strict>>]>;
|
|
216
|
+
}, z.core.$strict>>], "type">;
|
|
217
217
|
/** Browser WebSocket connections must validate their first received frame with this schema. */
|
|
218
218
|
export declare const relayBrowserFirstControlFrameSchema: z.ZodReadonly<z.ZodObject<{
|
|
219
219
|
type: z.ZodLiteral<"session.ready">;
|
|
220
220
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
221
221
|
relayProtocolVersion: z.ZodLiteral<"1.1">;
|
|
222
|
-
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
223
|
-
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
222
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId", "out">;
|
|
223
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId", "out">;
|
|
224
224
|
workspaceStatus: z.ZodEnum<{
|
|
225
225
|
online: "online";
|
|
226
226
|
offline: "offline";
|
package/dist/control.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
+
import { timestampSchema } from "@roll-agent/protocol";
|
|
2
3
|
import { RELAY_MESSAGE_TYPES_V11, workspaceIdSchema } from "./index.js";
|
|
3
4
|
export const RELAY_CONTROL_VERSION = "1.0";
|
|
4
5
|
export const RELAY_BROWSER_PROTOCOL_VERSION = "1.1";
|
|
@@ -45,7 +46,7 @@ const secureWebSocketUrlSchema = z
|
|
|
45
46
|
export const relaySessionDescriptorSchema = z
|
|
46
47
|
.object({
|
|
47
48
|
connectUrl: secureWebSocketUrlSchema,
|
|
48
|
-
expiresAt:
|
|
49
|
+
expiresAt: timestampSchema,
|
|
49
50
|
})
|
|
50
51
|
.strict()
|
|
51
52
|
.readonly();
|