@roll-agent/protocol 0.1.0 → 0.3.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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "jsonrpc": "2.0",
3
+ "id": "approval-rpc-1",
4
+ "result": {
5
+ "decision": "defer"
6
+ }
7
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "jsonrpc": "2.0",
3
+ "method": "runtime.event",
4
+ "params": {
5
+ "protocolVersion": "1.0",
6
+ "runtimeInstanceId": "00000000-0000-4000-8000-000000000001",
7
+ "sequence": 8,
8
+ "timestamp": "2026-07-29T12:00:00.000Z",
9
+ "threadId": "00000000-0000-4000-8000-000000000002",
10
+ "turnId": "00000000-0000-4000-8000-000000000003",
11
+ "event": {
12
+ "type": "approval.resolved",
13
+ "approvalId": "00000000-0000-4000-8000-000000000005",
14
+ "resolution": {
15
+ "status": "resolved",
16
+ "decision": "approve"
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "jsonrpc": "2.0",
3
+ "id": "approval-rpc-1",
4
+ "result": {
5
+ "decision": "reject",
6
+ "reason": "用户取消"
7
+ }
8
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "jsonrpc": "2.0",
3
+ "id": "approval-rpc-1",
4
+ "method": "approval.request",
5
+ "params": {
6
+ "threadId": "00000000-0000-4000-8000-000000000002",
7
+ "approval": {
8
+ "id": "00000000-0000-4000-8000-000000000005",
9
+ "turnId": "00000000-0000-4000-8000-000000000003",
10
+ "agentName": "browser-use-agent",
11
+ "toolName": "click",
12
+ "preview": {
13
+ "selector": "#submit",
14
+ "explanation": "提交当前表单,以完成用户要求的操作。"
15
+ },
16
+ "reason": "此操作会提交表单"
17
+ },
18
+ "expiresAt": "2026-07-29T12:10:00.000Z"
19
+ }
20
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "jsonrpc": "2.0",
3
+ "method": "runtime.event",
4
+ "params": {
5
+ "protocolVersion": "1.1",
6
+ "runtimeInstanceId": "00000000-0000-4000-8000-000000000001",
7
+ "sequence": 8,
8
+ "timestamp": "2026-07-29T12:00:00.000Z",
9
+ "threadId": "00000000-0000-4000-8000-000000000002",
10
+ "turnId": "00000000-0000-4000-8000-000000000003",
11
+ "event": {
12
+ "type": "approval.resolved",
13
+ "approvalId": "00000000-0000-4000-8000-000000000005",
14
+ "resolution": {
15
+ "status": "resolved",
16
+ "decision": "reject",
17
+ "reason": "用户取消"
18
+ }
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "jsonrpc": "2.0",
3
+ "method": "runtime.serverRequest.cancel",
4
+ "params": {
5
+ "serverRequestId": "approval-rpc-1",
6
+ "approvalId": "00000000-0000-4000-8000-000000000005",
7
+ "reason": "turn-cancelled"
8
+ }
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roll-agent/protocol",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,7 +29,9 @@
29
29
  "zod": "3.25.76"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/node": "^22.0.0"
32
+ "@types/node": "^22.0.0",
33
+ "ajv": "8.18.0",
34
+ "ajv-formats": "3.0.1"
33
35
  },
34
36
  "scripts": {
35
37
  "build": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/generate-schema.mjs",