@roll-agent/relay-protocol 0.3.2 → 0.4.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/dist/control.d.ts +73 -0
- package/dist/control.js +18 -0
- package/dist/index.d.ts +2088 -120
- package/dist/index.js +184 -4
- package/dist/schema/roll-relay-protocol-v1.2.schema.json +4436 -0
- package/fixtures/v1.2/invalid-approval-projection-raw-input-leak.json +19 -0
- package/fixtures/v1.2/invalid-authentication-local-only.json +12 -0
- package/fixtures/v1.2/invalid-file-picker-local-only.json +12 -0
- package/fixtures/v1.2/invalid-interaction-cancelled-reason-leak.json +10 -0
- package/fixtures/v1.2/invalid-interaction-resolved-result-leak.json +18 -0
- package/fixtures/v1.2/invalid-legacy-approval-candidate.json +7 -0
- package/fixtures/v1.2/invalid-legacy-approval-respond.json +7 -0
- package/fixtures/v1.2/invalid-n-minus-one-device-connect.json +6 -0
- package/fixtures/v1.2/invalid-non-normal-sensitivity.json +21 -0
- package/fixtures/v1.2/invalid-runtime-event-tool-input-leak.json +22 -0
- package/fixtures/v1.2/invalid-runtime-event-tool-output-leak.json +21 -0
- package/fixtures/v1.2/invalid-user-input-projection-secret-leak.json +22 -0
- package/fixtures/v1.2/manifest.json +479 -0
- package/fixtures/v1.2/valid-device-connect.json +6 -0
- package/fixtures/v1.2/valid-interaction-cancelled.json +9 -0
- package/fixtures/v1.2/valid-interaction-candidate-user-input.json +25 -0
- package/fixtures/v1.2/valid-interaction-request-approval.json +17 -0
- package/fixtures/v1.2/valid-interaction-request-user-input.json +40 -0
- package/fixtures/v1.2/valid-interaction-resolved.json +9 -0
- package/fixtures/v1.2/valid-runtime-ack.json +5 -0
- package/fixtures/v1.2/valid-runtime-encrypted-interaction.json +10 -0
- package/fixtures/v1.2/valid-runtime-event-runtime-n-minus-one.json +16 -0
- package/fixtures/v1.2/valid-runtime-event.json +16 -0
- package/fixtures/v1.2/valid-runtime-gap.json +7 -0
- package/fixtures/v1.2/valid-runtime-request.json +10 -0
- package/fixtures/v1.2/valid-runtime-response.json +8 -0
- package/package.json +5 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "interaction.cancelled",
|
|
3
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
4
|
+
"relaySequence": 6,
|
|
5
|
+
"interactionId": "00000000-0000-4000-8000-000000000511",
|
|
6
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
7
|
+
"turnId": "00000000-0000-4000-8000-000000000503",
|
|
8
|
+
"method": "approval.request"
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "runtime.request",
|
|
3
|
+
"requestId": "00000000-0000-4000-8000-000000000509",
|
|
4
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
5
|
+
"method": "interaction.candidate",
|
|
6
|
+
"params": {
|
|
7
|
+
"interactionId": "00000000-0000-4000-8000-000000000511",
|
|
8
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
9
|
+
"turnId": "00000000-0000-4000-8000-000000000503",
|
|
10
|
+
"method": "userInput.request",
|
|
11
|
+
"candidate": {
|
|
12
|
+
"status": "submitted",
|
|
13
|
+
"values": [
|
|
14
|
+
{
|
|
15
|
+
"id": "region",
|
|
16
|
+
"value": "north"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "workspace",
|
|
20
|
+
"value": "target-workspace"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "interaction.request",
|
|
3
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
4
|
+
"relaySequence": 3,
|
|
5
|
+
"interactionId": "00000000-0000-4000-8000-000000000511",
|
|
6
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
7
|
+
"turnId": "00000000-0000-4000-8000-000000000503",
|
|
8
|
+
"expiresAt": "2026-08-04T00:05:00.000Z",
|
|
9
|
+
"sensitivity": "normal",
|
|
10
|
+
"method": "approval.request",
|
|
11
|
+
"projection": {
|
|
12
|
+
"approvalId": "00000000-0000-4000-8000-000000000504",
|
|
13
|
+
"agentName": "workspace-agent",
|
|
14
|
+
"toolName": "deploy",
|
|
15
|
+
"explanation": "部署前需要确认。"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "interaction.request",
|
|
3
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
4
|
+
"relaySequence": 4,
|
|
5
|
+
"interactionId": "00000000-0000-4000-8000-000000000511",
|
|
6
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
7
|
+
"turnId": "00000000-0000-4000-8000-000000000503",
|
|
8
|
+
"expiresAt": "2026-08-04T00:05:00.000Z",
|
|
9
|
+
"sensitivity": "normal",
|
|
10
|
+
"method": "userInput.request",
|
|
11
|
+
"projection": {
|
|
12
|
+
"title": "部署配置",
|
|
13
|
+
"controls": [
|
|
14
|
+
{
|
|
15
|
+
"id": "region",
|
|
16
|
+
"type": "choice",
|
|
17
|
+
"label": "部署区域",
|
|
18
|
+
"required": true,
|
|
19
|
+
"multiple": false,
|
|
20
|
+
"options": [
|
|
21
|
+
{
|
|
22
|
+
"id": "north",
|
|
23
|
+
"label": "北区"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "south",
|
|
27
|
+
"label": "南区"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "workspace",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"label": "目标 Workspace",
|
|
35
|
+
"required": true,
|
|
36
|
+
"maxLength": 100
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "interaction.resolved",
|
|
3
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
4
|
+
"relaySequence": 5,
|
|
5
|
+
"interactionId": "00000000-0000-4000-8000-000000000511",
|
|
6
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
7
|
+
"turnId": "00000000-0000-4000-8000-000000000503",
|
|
8
|
+
"method": "userInput.request"
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "runtime.encrypted",
|
|
3
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
4
|
+
"envelopeId": "00000000-0000-4000-8000-000000000508",
|
|
5
|
+
"payloadKind": "interaction",
|
|
6
|
+
"relaySequence": 2,
|
|
7
|
+
"algorithm": "example-aead",
|
|
8
|
+
"nonce": "opaque-nonce",
|
|
9
|
+
"ciphertext": "opaque-ciphertext"
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "runtime.event",
|
|
3
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
4
|
+
"relaySequence": 1,
|
|
5
|
+
"event": {
|
|
6
|
+
"protocolVersion": "1.0",
|
|
7
|
+
"runtimeInstanceId": "00000000-0000-4000-8000-000000000501",
|
|
8
|
+
"sequence": 1,
|
|
9
|
+
"timestamp": "2026-08-04T00:00:01.000Z",
|
|
10
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
11
|
+
"turnId": "00000000-0000-4000-8000-000000000503",
|
|
12
|
+
"event": {
|
|
13
|
+
"type": "turn.completed"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "runtime.event",
|
|
3
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
4
|
+
"relaySequence": 0,
|
|
5
|
+
"event": {
|
|
6
|
+
"protocolVersion": "1.1",
|
|
7
|
+
"runtimeInstanceId": "00000000-0000-4000-8000-000000000501",
|
|
8
|
+
"sequence": 0,
|
|
9
|
+
"timestamp": "2026-08-04T00:00:00.000Z",
|
|
10
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
11
|
+
"turnId": "00000000-0000-4000-8000-000000000503",
|
|
12
|
+
"event": {
|
|
13
|
+
"type": "turn.completed"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "runtime.request",
|
|
3
|
+
"requestId": "00000000-0000-4000-8000-000000000505",
|
|
4
|
+
"workspaceId": "00000000-0000-4000-8000-000000000507",
|
|
5
|
+
"method": "thread.snapshot",
|
|
6
|
+
"params": {
|
|
7
|
+
"threadId": "00000000-0000-4000-8000-000000000502",
|
|
8
|
+
"limit": 100
|
|
9
|
+
}
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roll-agent/relay-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"./schema": "./dist/schema/roll-relay-protocol-v1.schema.json",
|
|
34
34
|
"./schema/v1.0": "./dist/schema/roll-relay-protocol-v1.schema.json",
|
|
35
35
|
"./schema/v1.1": "./dist/schema/roll-relay-protocol-v1.1.schema.json",
|
|
36
|
-
"./fixtures/*": "./fixtures/*"
|
|
36
|
+
"./fixtures/*": "./fixtures/*",
|
|
37
|
+
"./schema/v1.2": "./dist/schema/roll-relay-protocol-v1.2.schema.json"
|
|
37
38
|
},
|
|
38
39
|
"publishConfig": {
|
|
39
40
|
"access": "public"
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
"node": ">=22.6.0"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
50
|
+
"@roll-agent/protocol": "0.7.0",
|
|
51
|
+
"zod": "3.25.76"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@types/node": "^22.0.0",
|