@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/hello.json",
4
+ "title": "hello",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "type": {
9
+ "type": "string",
10
+ "const": "hello"
11
+ },
12
+ "protocolVersion": {
13
+ "type": "integer",
14
+ "exclusiveMinimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "role": {
18
+ "type": "string",
19
+ "enum": ["runner", "hub"]
20
+ },
21
+ "instanceId": {
22
+ "type": "string"
23
+ },
24
+ "agent": {
25
+ "type": "object",
26
+ "properties": {
27
+ "name": {
28
+ "type": "string"
29
+ },
30
+ "version": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "required": ["name"],
35
+ "additionalProperties": false
36
+ },
37
+ "capabilities": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "workflows": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "properties": {
48
+ "name": {
49
+ "type": "string",
50
+ "minLength": 1
51
+ },
52
+ "version": {
53
+ "type": "string"
54
+ },
55
+ "source": {
56
+ "oneOf": [
57
+ {
58
+ "type": "object",
59
+ "properties": {
60
+ "kind": {
61
+ "type": "string",
62
+ "const": "builtin"
63
+ }
64
+ },
65
+ "required": ["kind"],
66
+ "additionalProperties": false
67
+ },
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "kind": {
72
+ "type": "string",
73
+ "const": "marketplace-remote"
74
+ },
75
+ "ref": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "required": ["kind", "ref"],
80
+ "additionalProperties": false
81
+ },
82
+ {
83
+ "type": "object",
84
+ "properties": {
85
+ "kind": {
86
+ "type": "string",
87
+ "const": "marketplace-local"
88
+ },
89
+ "repoDir": {
90
+ "type": "string"
91
+ },
92
+ "workflowName": {
93
+ "type": "string"
94
+ }
95
+ },
96
+ "required": ["kind", "repoDir", "workflowName"],
97
+ "additionalProperties": false
98
+ },
99
+ {
100
+ "type": "object",
101
+ "properties": {
102
+ "kind": {
103
+ "type": "string",
104
+ "const": "filesystem"
105
+ },
106
+ "path": {
107
+ "type": "string"
108
+ }
109
+ },
110
+ "required": ["kind", "path"],
111
+ "additionalProperties": false
112
+ },
113
+ {
114
+ "type": "object",
115
+ "properties": {
116
+ "kind": {
117
+ "type": "string",
118
+ "const": "unknown"
119
+ }
120
+ },
121
+ "required": ["kind"],
122
+ "additionalProperties": false
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ "required": ["name", "source"],
128
+ "additionalProperties": false
129
+ }
130
+ }
131
+ },
132
+ "required": ["type", "protocolVersion"],
133
+ "additionalProperties": false
134
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/installed-workflow.json",
4
+ "title": "installed-workflow",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "name": {
9
+ "type": "string",
10
+ "minLength": 1
11
+ },
12
+ "version": {
13
+ "type": "string"
14
+ },
15
+ "source": {
16
+ "oneOf": [
17
+ {
18
+ "type": "object",
19
+ "properties": {
20
+ "kind": {
21
+ "type": "string",
22
+ "const": "builtin"
23
+ }
24
+ },
25
+ "required": ["kind"],
26
+ "additionalProperties": false
27
+ },
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "kind": {
32
+ "type": "string",
33
+ "const": "marketplace-remote"
34
+ },
35
+ "ref": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "required": ["kind", "ref"],
40
+ "additionalProperties": false
41
+ },
42
+ {
43
+ "type": "object",
44
+ "properties": {
45
+ "kind": {
46
+ "type": "string",
47
+ "const": "marketplace-local"
48
+ },
49
+ "repoDir": {
50
+ "type": "string"
51
+ },
52
+ "workflowName": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "required": ["kind", "repoDir", "workflowName"],
57
+ "additionalProperties": false
58
+ },
59
+ {
60
+ "type": "object",
61
+ "properties": {
62
+ "kind": {
63
+ "type": "string",
64
+ "const": "filesystem"
65
+ },
66
+ "path": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ "required": ["kind", "path"],
71
+ "additionalProperties": false
72
+ },
73
+ {
74
+ "type": "object",
75
+ "properties": {
76
+ "kind": {
77
+ "type": "string",
78
+ "const": "unknown"
79
+ }
80
+ },
81
+ "required": ["kind"],
82
+ "additionalProperties": false
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ "required": ["name", "source"],
88
+ "additionalProperties": false
89
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/interruption.json",
4
+ "title": "interruption",
5
+ "x-protocol-version": 1,
6
+ "oneOf": [
7
+ {
8
+ "type": "object",
9
+ "properties": {
10
+ "message": {
11
+ "type": "string"
12
+ },
13
+ "kind": {
14
+ "type": "string",
15
+ "const": "blocked"
16
+ },
17
+ "reason": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": ["message", "kind"],
22
+ "additionalProperties": false
23
+ },
24
+ {
25
+ "type": "object",
26
+ "properties": {
27
+ "message": {
28
+ "type": "string"
29
+ },
30
+ "kind": {
31
+ "type": "string",
32
+ "const": "question"
33
+ },
34
+ "requestId": {
35
+ "type": "string"
36
+ },
37
+ "question": {
38
+ "type": "string"
39
+ }
40
+ },
41
+ "required": ["message", "kind"],
42
+ "additionalProperties": false
43
+ },
44
+ {
45
+ "type": "object",
46
+ "properties": {
47
+ "message": {
48
+ "type": "string"
49
+ },
50
+ "kind": {
51
+ "type": "string",
52
+ "const": "hard_failure"
53
+ },
54
+ "code": {
55
+ "type": "string",
56
+ "enum": [
57
+ "auth",
58
+ "billing",
59
+ "invalid_request",
60
+ "model_not_found",
61
+ "unclassified"
62
+ ]
63
+ }
64
+ },
65
+ "required": ["message", "kind", "code"],
66
+ "additionalProperties": false
67
+ },
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "message": {
72
+ "type": "string"
73
+ },
74
+ "kind": {
75
+ "type": "string",
76
+ "const": "cap_exhausted"
77
+ },
78
+ "cap": {
79
+ "type": "string",
80
+ "enum": ["retry", "nudge", "iterations", "handover", "tokens"]
81
+ },
82
+ "limit": {
83
+ "type": "integer",
84
+ "exclusiveMinimum": 0,
85
+ "maximum": 9007199254740991
86
+ },
87
+ "resource": {
88
+ "type": "object",
89
+ "properties": {
90
+ "cause": {
91
+ "type": "string",
92
+ "enum": ["tokens", "iterations", "context", "restart"]
93
+ },
94
+ "limit": {
95
+ "type": "number",
96
+ "minimum": 0
97
+ },
98
+ "used": {
99
+ "type": "number",
100
+ "minimum": 0
101
+ },
102
+ "detail": {
103
+ "type": "string"
104
+ },
105
+ "checkpointPath": {
106
+ "type": "string"
107
+ },
108
+ "fresh": {
109
+ "type": "boolean"
110
+ }
111
+ },
112
+ "required": ["cause", "limit", "used", "fresh"],
113
+ "additionalProperties": false
114
+ }
115
+ },
116
+ "required": ["message", "kind", "cap"],
117
+ "additionalProperties": false
118
+ }
119
+ ]
120
+ }