@roll-agent/relay-protocol 0.4.2 → 0.5.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/README.md +4 -0
- package/dist/control.d.ts +31 -0
- package/dist/control.js +6 -0
- package/dist/index.d.ts +1893 -2
- package/dist/index.js +92 -2
- package/dist/schema/roll-relay-protocol-v1.3.schema.json +4606 -0
- package/fixtures/v1.3/invalid-approval-projection-raw-input-leak.json +19 -0
- package/fixtures/v1.3/invalid-authentication-local-only.json +12 -0
- package/fixtures/v1.3/invalid-context-recovery-notes.json +22 -0
- package/fixtures/v1.3/invalid-file-picker-local-only.json +12 -0
- package/fixtures/v1.3/invalid-interaction-cancelled-reason-leak.json +10 -0
- package/fixtures/v1.3/invalid-interaction-resolved-result-leak.json +18 -0
- package/fixtures/v1.3/invalid-legacy-approval-candidate.json +7 -0
- package/fixtures/v1.3/invalid-legacy-approval-respond.json +7 -0
- package/fixtures/v1.3/invalid-n-minus-one-device-connect.json +6 -0
- package/fixtures/v1.3/invalid-non-normal-sensitivity.json +21 -0
- package/fixtures/v1.3/invalid-runtime-event-tool-input-leak.json +22 -0
- package/fixtures/v1.3/invalid-runtime-event-tool-output-leak.json +21 -0
- package/fixtures/v1.3/invalid-user-input-projection-secret-leak.json +22 -0
- package/fixtures/v1.3/manifest.json +489 -0
- package/fixtures/v1.3/valid-context-recovery.json +21 -0
- package/fixtures/v1.3/valid-device-connect.json +6 -0
- package/fixtures/v1.3/valid-interaction-cancelled.json +9 -0
- package/fixtures/v1.3/valid-interaction-candidate-user-input.json +25 -0
- package/fixtures/v1.3/valid-interaction-request-approval.json +17 -0
- package/fixtures/v1.3/valid-interaction-request-user-input.json +40 -0
- package/fixtures/v1.3/valid-interaction-resolved.json +9 -0
- package/fixtures/v1.3/valid-runtime-ack.json +5 -0
- package/fixtures/v1.3/valid-runtime-encrypted-interaction.json +10 -0
- package/fixtures/v1.3/valid-runtime-event-runtime-n-minus-one.json +16 -0
- package/fixtures/v1.3/valid-runtime-event.json +16 -0
- package/fixtures/v1.3/valid-runtime-gap.json +7 -0
- package/fixtures/v1.3/valid-runtime-request.json +10 -0
- package/fixtures/v1.3/valid-runtime-response.json +8 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -165,3 +165,7 @@ Relay 不能为了获得 Wire Schema 而安装 `@roll-agent/companion`。
|
|
|
165
165
|
|
|
166
166
|
Relay `requestId`、逻辑 `interactionId`、Runtime JSON-RPC `id`、Runtime mutation
|
|
167
167
|
`requestId` 与 Relay `relaySequence` 是不同的类型和生命周期,不能互相复用。
|
|
168
|
+
|
|
169
|
+
### Wire 1.3 context recovery
|
|
170
|
+
|
|
171
|
+
Wire 1.3 adds bounded `contextRecovery` snapshots and `context.recovery.changed` timeline events. It retains 1.2 App output semantics. The 1.0/1.1/1.2 wire schemas remain frozen; downgrade maps recovery events to `capabilities.changed` while preserving Relay sequence continuity. This package does not upgrade a deployed cloud Relay service.
|
package/dist/control.d.ts
CHANGED
|
@@ -74,7 +74,28 @@ export declare const relaySessionReadyControlMessageSchemaV12: z.ZodReadonly<z.Z
|
|
|
74
74
|
}>;
|
|
75
75
|
relayProtocolVersion: z.ZodLiteral<"1.2">;
|
|
76
76
|
}, z.core.$strict>>;
|
|
77
|
+
export declare const relaySessionReadyControlMessageSchemaV13: z.ZodReadonly<z.ZodObject<{
|
|
78
|
+
type: z.ZodLiteral<"session.ready">;
|
|
79
|
+
controlVersion: z.ZodLiteral<"1.0">;
|
|
80
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
81
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
82
|
+
workspaceStatus: z.ZodEnum<{
|
|
83
|
+
online: "online";
|
|
84
|
+
offline: "offline";
|
|
85
|
+
}>;
|
|
86
|
+
relayProtocolVersion: z.ZodLiteral<"1.3">;
|
|
87
|
+
}, z.core.$strict>>;
|
|
77
88
|
export declare const relaySessionReadyControlMessageSchemaAny: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"session.ready">;
|
|
90
|
+
controlVersion: z.ZodLiteral<"1.0">;
|
|
91
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
92
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
93
|
+
workspaceStatus: z.ZodEnum<{
|
|
94
|
+
online: "online";
|
|
95
|
+
offline: "offline";
|
|
96
|
+
}>;
|
|
97
|
+
relayProtocolVersion: z.ZodLiteral<"1.3">;
|
|
98
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
78
99
|
type: z.ZodLiteral<"session.ready">;
|
|
79
100
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
80
101
|
relayProtocolVersion: z.ZodLiteral<"1.1">;
|
|
@@ -116,6 +137,16 @@ export declare const relaySessionErrorControlMessageSchema: z.ZodReadonly<z.ZodO
|
|
|
116
137
|
retryable: z.ZodBoolean;
|
|
117
138
|
}, z.core.$strict>>;
|
|
118
139
|
export declare const relayBrowserControlMessageSchemaAny: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"session.ready">;
|
|
141
|
+
controlVersion: z.ZodLiteral<"1.0">;
|
|
142
|
+
sessionId: z.core.$ZodBranded<z.ZodString, "RelayBrowserSessionId">;
|
|
143
|
+
workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
|
|
144
|
+
workspaceStatus: z.ZodEnum<{
|
|
145
|
+
online: "online";
|
|
146
|
+
offline: "offline";
|
|
147
|
+
}>;
|
|
148
|
+
relayProtocolVersion: z.ZodLiteral<"1.3">;
|
|
149
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
119
150
|
type: z.ZodLiteral<"session.ready">;
|
|
120
151
|
controlVersion: z.ZodLiteral<"1.0">;
|
|
121
152
|
relayProtocolVersion: z.ZodLiteral<"1.1">;
|
package/dist/control.js
CHANGED
|
@@ -78,7 +78,13 @@ export const relaySessionReadyControlMessageSchemaV12 = relaySessionReadyControl
|
|
|
78
78
|
})
|
|
79
79
|
.strict()
|
|
80
80
|
.readonly();
|
|
81
|
+
export const relaySessionReadyControlMessageSchemaV13 = relaySessionReadyControlMessageSchema.def.innerType
|
|
82
|
+
.extend({
|
|
83
|
+
relayProtocolVersion: z.literal("1.3"),
|
|
84
|
+
})
|
|
85
|
+
.readonly();
|
|
81
86
|
export const relaySessionReadyControlMessageSchemaAny = z.union([
|
|
87
|
+
relaySessionReadyControlMessageSchemaV13,
|
|
82
88
|
relaySessionReadyControlMessageSchema,
|
|
83
89
|
relaySessionReadyControlMessageSchemaV12,
|
|
84
90
|
]);
|