@osstack/protocol 0.10.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.
Files changed (58) hide show
  1. package/dist/approval.d.ts +102 -0
  2. package/dist/approval.d.ts.map +1 -0
  3. package/dist/approval.js +52 -0
  4. package/dist/approval.js.map +1 -0
  5. package/dist/envelope.d.ts +882 -0
  6. package/dist/envelope.d.ts.map +1 -0
  7. package/dist/envelope.js +210 -0
  8. package/dist/envelope.js.map +1 -0
  9. package/dist/event.d.ts +36 -0
  10. package/dist/event.d.ts.map +1 -0
  11. package/dist/event.js +28 -0
  12. package/dist/event.js.map +1 -0
  13. package/dist/evidence.d.ts +51 -0
  14. package/dist/evidence.d.ts.map +1 -0
  15. package/dist/evidence.js +34 -0
  16. package/dist/evidence.js.map +1 -0
  17. package/dist/generate.d.ts +16 -0
  18. package/dist/generate.d.ts.map +1 -0
  19. package/dist/generate.js +60 -0
  20. package/dist/generate.js.map +1 -0
  21. package/dist/index.d.ts +9 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +16 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/policy.d.ts +284 -0
  26. package/dist/policy.d.ts.map +1 -0
  27. package/dist/policy.js +58 -0
  28. package/dist/policy.js.map +1 -0
  29. package/dist/protocol.test.d.ts +2 -0
  30. package/dist/protocol.test.d.ts.map +1 -0
  31. package/dist/protocol.test.js +251 -0
  32. package/dist/protocol.test.js.map +1 -0
  33. package/dist/run.d.ts +34 -0
  34. package/dist/run.d.ts.map +1 -0
  35. package/dist/run.js +25 -0
  36. package/dist/run.js.map +1 -0
  37. package/dist/schemas.test.d.ts +2 -0
  38. package/dist/schemas.test.d.ts.map +1 -0
  39. package/dist/schemas.test.js +34 -0
  40. package/dist/schemas.test.js.map +1 -0
  41. package/dist/task.d.ts +40 -0
  42. package/dist/task.d.ts.map +1 -0
  43. package/dist/task.js +40 -0
  44. package/dist/task.js.map +1 -0
  45. package/dist/version.d.ts +11 -0
  46. package/dist/version.d.ts.map +1 -0
  47. package/dist/version.js +18 -0
  48. package/dist/version.js.map +1 -0
  49. package/package.json +38 -0
  50. package/schemas/agent-command-result.schema.json +163 -0
  51. package/schemas/agent-command.schema.json +69 -0
  52. package/schemas/approval-decision.schema.json +49 -0
  53. package/schemas/approval-request.schema.json +38 -0
  54. package/schemas/event-envelope.schema.json +48 -0
  55. package/schemas/evidence-ref.schema.json +34 -0
  56. package/schemas/policy-decision.schema.json +166 -0
  57. package/schemas/run-summary.schema.json +50 -0
  58. package/schemas/task.schema.json +51 -0
@@ -0,0 +1,166 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Osstack Protocol Policy Decision",
4
+ "type": "object",
5
+ "properties": {
6
+ "winner": {
7
+ "anyOf": [
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "candidate": {
12
+ "type": "object",
13
+ "properties": {
14
+ "agent_id": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "cost_tier": {
19
+ "type": "string",
20
+ "enum": [
21
+ "low",
22
+ "mid",
23
+ "high"
24
+ ]
25
+ },
26
+ "capabilities": {
27
+ "type": "array",
28
+ "items": {}
29
+ }
30
+ },
31
+ "required": [
32
+ "agent_id",
33
+ "cost_tier",
34
+ "capabilities"
35
+ ],
36
+ "additionalProperties": false
37
+ },
38
+ "total": {
39
+ "type": "number"
40
+ },
41
+ "breakdown": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "object",
45
+ "properties": {
46
+ "rule_id": {
47
+ "type": "string"
48
+ },
49
+ "value": {
50
+ "type": "number"
51
+ },
52
+ "reason": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "required": [
57
+ "rule_id",
58
+ "value",
59
+ "reason"
60
+ ],
61
+ "additionalProperties": false
62
+ }
63
+ }
64
+ },
65
+ "required": [
66
+ "candidate",
67
+ "total",
68
+ "breakdown"
69
+ ],
70
+ "additionalProperties": false
71
+ },
72
+ {
73
+ "type": "null"
74
+ }
75
+ ]
76
+ },
77
+ "ranked": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "object",
81
+ "properties": {
82
+ "candidate": {
83
+ "type": "object",
84
+ "properties": {
85
+ "agent_id": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "cost_tier": {
90
+ "type": "string",
91
+ "enum": [
92
+ "low",
93
+ "mid",
94
+ "high"
95
+ ]
96
+ },
97
+ "capabilities": {
98
+ "type": "array",
99
+ "items": {}
100
+ }
101
+ },
102
+ "required": [
103
+ "agent_id",
104
+ "cost_tier",
105
+ "capabilities"
106
+ ],
107
+ "additionalProperties": false
108
+ },
109
+ "total": {
110
+ "type": "number"
111
+ },
112
+ "breakdown": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "object",
116
+ "properties": {
117
+ "rule_id": {
118
+ "type": "string"
119
+ },
120
+ "value": {
121
+ "type": "number"
122
+ },
123
+ "reason": {
124
+ "type": "string"
125
+ }
126
+ },
127
+ "required": [
128
+ "rule_id",
129
+ "value",
130
+ "reason"
131
+ ],
132
+ "additionalProperties": false
133
+ }
134
+ }
135
+ },
136
+ "required": [
137
+ "candidate",
138
+ "total",
139
+ "breakdown"
140
+ ],
141
+ "additionalProperties": false
142
+ }
143
+ },
144
+ "handoff": {
145
+ "type": "object",
146
+ "properties": {
147
+ "triggered": {
148
+ "type": "boolean"
149
+ },
150
+ "reason": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ "required": [
155
+ "triggered"
156
+ ],
157
+ "additionalProperties": false
158
+ }
159
+ },
160
+ "required": [
161
+ "winner",
162
+ "ranked",
163
+ "handoff"
164
+ ],
165
+ "additionalProperties": false
166
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Osstack Protocol Run Summary",
4
+ "type": "object",
5
+ "properties": {
6
+ "run_id": {
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "task_id": {
11
+ "type": "string",
12
+ "minLength": 1
13
+ },
14
+ "agent_id": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "outcome": {
19
+ "type": "string",
20
+ "enum": [
21
+ "completed",
22
+ "failed",
23
+ "cancelled"
24
+ ]
25
+ },
26
+ "started_at": {
27
+ "type": "string",
28
+ "format": "date-time"
29
+ },
30
+ "completed_at": {
31
+ "type": "string",
32
+ "format": "date-time"
33
+ },
34
+ "duration_ms": {
35
+ "type": "integer",
36
+ "minimum": 0
37
+ },
38
+ "summary": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "required": [
43
+ "run_id",
44
+ "task_id",
45
+ "agent_id",
46
+ "outcome",
47
+ "started_at"
48
+ ],
49
+ "additionalProperties": false
50
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Osstack Protocol Task",
4
+ "type": "object",
5
+ "properties": {
6
+ "task_id": {
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "capability": {
11
+ "type": "string",
12
+ "minLength": 1
13
+ },
14
+ "prompt": {
15
+ "type": "string",
16
+ "minLength": 1
17
+ },
18
+ "source": {
19
+ "type": "string",
20
+ "enum": [
21
+ "git_diff",
22
+ "gh_issue",
23
+ "github_branch",
24
+ "ci_log",
25
+ "task_queue",
26
+ "manual"
27
+ ]
28
+ },
29
+ "priority": {
30
+ "type": "number",
31
+ "minimum": 0,
32
+ "maximum": 100,
33
+ "default": 50
34
+ },
35
+ "context": {
36
+ "type": "object",
37
+ "additionalProperties": {}
38
+ },
39
+ "evaluation": {
40
+ "type": "array",
41
+ "items": {}
42
+ }
43
+ },
44
+ "required": [
45
+ "task_id",
46
+ "capability",
47
+ "prompt",
48
+ "source"
49
+ ],
50
+ "additionalProperties": false
51
+ }