@drisp/protocol 0.6.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,134 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/phase-feed-event.json",
4
+ "title": "phase-feed-event",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "event_id": {
9
+ "type": "string"
10
+ },
11
+ "seq": {
12
+ "type": "integer",
13
+ "minimum": 0,
14
+ "maximum": 9007199254740991
15
+ },
16
+ "ts": {
17
+ "type": "number"
18
+ },
19
+ "session_id": {
20
+ "type": "string"
21
+ },
22
+ "run_id": {
23
+ "type": "string"
24
+ },
25
+ "prompt_id": {
26
+ "type": "string"
27
+ },
28
+ "effort_level": {
29
+ "type": "string"
30
+ },
31
+ "kind": {
32
+ "type": "string",
33
+ "const": "phase"
34
+ },
35
+ "level": {
36
+ "type": "string",
37
+ "enum": ["debug", "info", "warn", "error"]
38
+ },
39
+ "actor_id": {
40
+ "type": "string"
41
+ },
42
+ "cause": {
43
+ "type": "object",
44
+ "properties": {
45
+ "parent_event_id": {
46
+ "type": "string"
47
+ },
48
+ "hook_request_id": {
49
+ "type": "string"
50
+ },
51
+ "tool_use_id": {
52
+ "type": "string"
53
+ },
54
+ "transcript_path": {
55
+ "type": "string"
56
+ }
57
+ },
58
+ "additionalProperties": false
59
+ },
60
+ "title": {
61
+ "type": "string"
62
+ },
63
+ "body": {
64
+ "type": "string"
65
+ },
66
+ "ui": {
67
+ "type": "object",
68
+ "properties": {
69
+ "collapsed_default": {
70
+ "type": "boolean"
71
+ },
72
+ "pin": {
73
+ "type": "boolean"
74
+ },
75
+ "badge": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "additionalProperties": false
80
+ },
81
+ "display": {
82
+ "type": "object",
83
+ "properties": {
84
+ "title": {
85
+ "type": "string"
86
+ }
87
+ },
88
+ "additionalProperties": false
89
+ },
90
+ "data": {
91
+ "type": "object",
92
+ "properties": {
93
+ "runId": {
94
+ "type": "string"
95
+ },
96
+ "turn": {
97
+ "type": "integer",
98
+ "exclusiveMinimum": 0,
99
+ "maximum": 9007199254740991
100
+ },
101
+ "step": {
102
+ "type": "string",
103
+ "minLength": 1
104
+ },
105
+ "stepIndex": {
106
+ "type": "integer",
107
+ "exclusiveMinimum": 0,
108
+ "maximum": 9007199254740991
109
+ },
110
+ "stepTotal": {
111
+ "type": "integer",
112
+ "exclusiveMinimum": 0,
113
+ "maximum": 9007199254740991
114
+ }
115
+ },
116
+ "required": ["runId", "turn", "step"],
117
+ "additionalProperties": false
118
+ },
119
+ "raw": {}
120
+ },
121
+ "required": [
122
+ "event_id",
123
+ "seq",
124
+ "ts",
125
+ "session_id",
126
+ "run_id",
127
+ "kind",
128
+ "level",
129
+ "actor_id",
130
+ "title",
131
+ "data"
132
+ ],
133
+ "additionalProperties": {}
134
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/run-spec.json",
4
+ "title": "run-spec",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "prompt": {
9
+ "type": "string"
10
+ },
11
+ "athenaSessionId": {
12
+ "type": "string"
13
+ },
14
+ "adapterResumeSessionId": {
15
+ "type": "string"
16
+ },
17
+ "sessionId": {
18
+ "type": "string"
19
+ },
20
+ "projectDir": {
21
+ "type": "string"
22
+ },
23
+ "workflow": {
24
+ "type": "object",
25
+ "properties": {
26
+ "source": {
27
+ "type": "string"
28
+ },
29
+ "ref": {
30
+ "type": "string"
31
+ },
32
+ "version": {
33
+ "type": "string"
34
+ }
35
+ },
36
+ "additionalProperties": {}
37
+ },
38
+ "harness": {
39
+ "type": "string"
40
+ },
41
+ "env": {
42
+ "type": "object",
43
+ "propertyNames": {
44
+ "type": "string"
45
+ },
46
+ "additionalProperties": {
47
+ "type": "string"
48
+ }
49
+ },
50
+ "timeoutSec": {
51
+ "type": "number"
52
+ },
53
+ "callbackWsUrl": {
54
+ "type": "string"
55
+ },
56
+ "callbackToken": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "additionalProperties": {}
61
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/run-stream-event.json",
4
+ "title": "run-stream-event",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "runId": {
9
+ "type": "string"
10
+ },
11
+ "seq": {
12
+ "type": "integer",
13
+ "minimum": 0,
14
+ "maximum": 9007199254740991
15
+ },
16
+ "ts": {
17
+ "type": "number"
18
+ },
19
+ "kind": {
20
+ "type": "string"
21
+ },
22
+ "payload": {}
23
+ },
24
+ "required": ["runId", "seq", "ts", "kind"],
25
+ "additionalProperties": false
26
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/run.json",
4
+ "title": "run",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "runId": {
9
+ "type": "string"
10
+ },
11
+ "athenaSessionId": {
12
+ "type": "string"
13
+ },
14
+ "workflowName": {
15
+ "type": "string"
16
+ },
17
+ "goal": {
18
+ "type": "string"
19
+ },
20
+ "iteration": {
21
+ "type": "integer",
22
+ "minimum": 0,
23
+ "maximum": 9007199254740991
24
+ },
25
+ "maxIterations": {
26
+ "type": "integer",
27
+ "exclusiveMinimum": 0,
28
+ "maximum": 9007199254740991
29
+ },
30
+ "status": {
31
+ "type": "string",
32
+ "enum": [
33
+ "running",
34
+ "awaiting_attention",
35
+ "completed",
36
+ "blocked",
37
+ "exhausted",
38
+ "failed",
39
+ "cancelled"
40
+ ]
41
+ },
42
+ "stopReason": {
43
+ "type": "string"
44
+ },
45
+ "adapterSessionId": {
46
+ "type": "string"
47
+ },
48
+ "startedAt": {
49
+ "type": "number"
50
+ },
51
+ "endedAt": {
52
+ "type": "number"
53
+ }
54
+ },
55
+ "required": ["runId", "athenaSessionId", "iteration", "status", "startedAt"],
56
+ "additionalProperties": false
57
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/runtime-decision.json",
4
+ "title": "runtime-decision",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "type": {
9
+ "type": "string",
10
+ "enum": ["passthrough", "block", "json"]
11
+ },
12
+ "source": {
13
+ "type": "string",
14
+ "enum": ["user", "timeout", "rule"]
15
+ },
16
+ "intent": {
17
+ "oneOf": [
18
+ {
19
+ "type": "object",
20
+ "properties": {
21
+ "kind": {
22
+ "type": "string",
23
+ "const": "permission_allow"
24
+ }
25
+ },
26
+ "required": ["kind"],
27
+ "additionalProperties": false
28
+ },
29
+ {
30
+ "type": "object",
31
+ "properties": {
32
+ "kind": {
33
+ "type": "string",
34
+ "const": "permission_deny"
35
+ },
36
+ "reason": {
37
+ "type": "string"
38
+ }
39
+ },
40
+ "required": ["kind", "reason"],
41
+ "additionalProperties": false
42
+ },
43
+ {
44
+ "type": "object",
45
+ "properties": {
46
+ "kind": {
47
+ "type": "string",
48
+ "const": "question_answer"
49
+ },
50
+ "answers": {
51
+ "type": "object",
52
+ "propertyNames": {
53
+ "type": "string"
54
+ },
55
+ "additionalProperties": {
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ "required": ["kind", "answers"],
61
+ "additionalProperties": false
62
+ },
63
+ {
64
+ "type": "object",
65
+ "properties": {
66
+ "kind": {
67
+ "type": "string",
68
+ "const": "pre_tool_allow"
69
+ }
70
+ },
71
+ "required": ["kind"],
72
+ "additionalProperties": false
73
+ },
74
+ {
75
+ "type": "object",
76
+ "properties": {
77
+ "kind": {
78
+ "type": "string",
79
+ "const": "pre_tool_deny"
80
+ },
81
+ "reason": {
82
+ "type": "string"
83
+ }
84
+ },
85
+ "required": ["kind", "reason"],
86
+ "additionalProperties": false
87
+ },
88
+ {
89
+ "type": "object",
90
+ "properties": {
91
+ "kind": {
92
+ "type": "string",
93
+ "const": "stop_block"
94
+ },
95
+ "reason": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "required": ["kind", "reason"],
100
+ "additionalProperties": false
101
+ },
102
+ {
103
+ "type": "object",
104
+ "properties": {
105
+ "kind": {
106
+ "type": "string",
107
+ "const": "compact_block"
108
+ },
109
+ "reason": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "required": ["kind", "reason"],
114
+ "additionalProperties": false
115
+ }
116
+ ]
117
+ },
118
+ "reason": {
119
+ "type": "string"
120
+ },
121
+ "data": {}
122
+ },
123
+ "required": ["type", "source"],
124
+ "additionalProperties": false
125
+ }
@@ -0,0 +1,135 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/turn.json",
4
+ "title": "turn",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "runId": {
9
+ "type": "string"
10
+ },
11
+ "iteration": {
12
+ "type": "integer",
13
+ "exclusiveMinimum": 0,
14
+ "maximum": 9007199254740991
15
+ },
16
+ "continuation": {
17
+ "oneOf": [
18
+ {
19
+ "type": "object",
20
+ "properties": {
21
+ "mode": {
22
+ "type": "string",
23
+ "const": "fresh"
24
+ }
25
+ },
26
+ "required": ["mode"],
27
+ "additionalProperties": false
28
+ },
29
+ {
30
+ "type": "object",
31
+ "properties": {
32
+ "mode": {
33
+ "type": "string",
34
+ "const": "resume"
35
+ },
36
+ "handle": {
37
+ "type": "string"
38
+ }
39
+ },
40
+ "required": ["mode", "handle"],
41
+ "additionalProperties": false
42
+ },
43
+ {
44
+ "type": "object",
45
+ "properties": {
46
+ "mode": {
47
+ "type": "string",
48
+ "const": "reuse-current"
49
+ }
50
+ },
51
+ "required": ["mode"],
52
+ "additionalProperties": false
53
+ }
54
+ ]
55
+ },
56
+ "adapterSessionId": {
57
+ "type": "string"
58
+ },
59
+ "startedAt": {
60
+ "type": "number"
61
+ },
62
+ "endedAt": {
63
+ "type": "number"
64
+ },
65
+ "outcome": {
66
+ "oneOf": [
67
+ {
68
+ "type": "object",
69
+ "properties": {
70
+ "kind": {
71
+ "type": "string",
72
+ "const": "continue"
73
+ }
74
+ },
75
+ "required": ["kind"],
76
+ "additionalProperties": false
77
+ },
78
+ {
79
+ "type": "object",
80
+ "properties": {
81
+ "kind": {
82
+ "type": "string",
83
+ "const": "stop"
84
+ },
85
+ "status": {
86
+ "type": "string",
87
+ "enum": [
88
+ "running",
89
+ "awaiting_attention",
90
+ "completed",
91
+ "blocked",
92
+ "exhausted",
93
+ "failed",
94
+ "cancelled"
95
+ ]
96
+ },
97
+ "stopReason": {
98
+ "type": "string"
99
+ }
100
+ },
101
+ "required": ["kind", "status"],
102
+ "additionalProperties": false
103
+ },
104
+ {
105
+ "type": "object",
106
+ "properties": {
107
+ "kind": {
108
+ "type": "string",
109
+ "const": "suspend"
110
+ },
111
+ "status": {
112
+ "type": "string",
113
+ "enum": [
114
+ "running",
115
+ "awaiting_attention",
116
+ "completed",
117
+ "blocked",
118
+ "exhausted",
119
+ "failed",
120
+ "cancelled"
121
+ ]
122
+ },
123
+ "stopReason": {
124
+ "type": "string"
125
+ }
126
+ },
127
+ "required": ["kind", "status", "stopReason"],
128
+ "additionalProperties": false
129
+ }
130
+ ]
131
+ }
132
+ },
133
+ "required": ["runId", "iteration", "continuation", "startedAt"],
134
+ "additionalProperties": false
135
+ }