@osstack/protocol 0.15.0 → 0.22.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 (73) hide show
  1. package/dist/attention.d.ts +863 -0
  2. package/dist/attention.d.ts.map +1 -0
  3. package/dist/attention.js +112 -0
  4. package/dist/attention.js.map +1 -0
  5. package/dist/autonomy.d.ts +14 -14
  6. package/dist/delivery-contract.d.ts +734 -0
  7. package/dist/delivery-contract.d.ts.map +1 -0
  8. package/dist/delivery-contract.js +111 -0
  9. package/dist/delivery-contract.js.map +1 -0
  10. package/dist/envelope.d.ts +42 -42
  11. package/dist/event.d.ts +4 -4
  12. package/dist/follow-up-delivery.d.ts +1831 -0
  13. package/dist/follow-up-delivery.d.ts.map +1 -0
  14. package/dist/follow-up-delivery.js +174 -0
  15. package/dist/follow-up-delivery.js.map +1 -0
  16. package/dist/follow-up.d.ts +1100 -0
  17. package/dist/follow-up.d.ts.map +1 -0
  18. package/dist/follow-up.js +28 -0
  19. package/dist/follow-up.js.map +1 -0
  20. package/dist/generate.d.ts +1 -0
  21. package/dist/generate.d.ts.map +1 -1
  22. package/dist/generate.js +61 -1
  23. package/dist/generate.js.map +1 -1
  24. package/dist/graph-checkpoint.d.ts +409 -0
  25. package/dist/graph-checkpoint.d.ts.map +1 -0
  26. package/dist/graph-checkpoint.js +91 -0
  27. package/dist/graph-checkpoint.js.map +1 -0
  28. package/dist/graph-worker.d.ts +1663 -0
  29. package/dist/graph-worker.d.ts.map +1 -0
  30. package/dist/graph-worker.js +152 -0
  31. package/dist/graph-worker.js.map +1 -0
  32. package/dist/graph.d.ts +13169 -0
  33. package/dist/graph.d.ts.map +1 -0
  34. package/dist/graph.js +427 -0
  35. package/dist/graph.js.map +1 -0
  36. package/dist/index.d.ts +11 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +11 -2
  39. package/dist/index.js.map +1 -1
  40. package/dist/policy.d.ts +10 -10
  41. package/dist/run.d.ts +4 -4
  42. package/dist/session-continuation-grant.d.ts +414 -0
  43. package/dist/session-continuation-grant.d.ts.map +1 -0
  44. package/dist/session-continuation-grant.js +59 -0
  45. package/dist/session-continuation-grant.js.map +1 -0
  46. package/dist/session-continuation.d.ts +129 -0
  47. package/dist/session-continuation.d.ts.map +1 -0
  48. package/dist/session-continuation.js +30 -0
  49. package/dist/session-continuation.js.map +1 -0
  50. package/dist/task.d.ts +2 -2
  51. package/package.json +11 -10
  52. package/schemas/attention-inbox.schema.json +271 -0
  53. package/schemas/attention-status.schema.json +434 -0
  54. package/schemas/continuation-grant-body.schema.json +189 -0
  55. package/schemas/continuation-output-check.schema.json +65 -0
  56. package/schemas/delivery-contract-v2.schema.json +238 -0
  57. package/schemas/delivery-verification-receipt-v2.schema.json +223 -0
  58. package/schemas/follow-up-create-params.schema.json +78 -0
  59. package/schemas/follow-up-draft-params.schema.json +39 -0
  60. package/schemas/follow-up-list-params.schema.json +42 -0
  61. package/schemas/follow-up-list-result.schema.json +241 -0
  62. package/schemas/follow-up-mutation-result.schema.json +361 -0
  63. package/schemas/follow-up-obligation.schema.json +343 -0
  64. package/schemas/follow-up-resolve-params.schema.json +53 -0
  65. package/schemas/frozen-delivery-contract-v2.schema.json +258 -0
  66. package/schemas/graph-checkpoint-request.schema.json +222 -0
  67. package/schemas/graph-checkpoint-response.schema.json +258 -0
  68. package/schemas/graph-worker.schema.json +546 -0
  69. package/schemas/graph.schema.json +1798 -0
  70. package/schemas/session-continuation-request.schema.json +62 -0
  71. package/schemas/session-decision.schema.json +107 -0
  72. package/schemas/signed-continuation-grant.schema.json +209 -0
  73. package/LICENSE +0 -21
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Osstack Session Continuation Request",
4
+ "$comment": "Agent-reported request only. Evidence references must be independently verified and this object never authorizes an action.",
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "number",
9
+ "const": 1
10
+ },
11
+ "gate_kind": {
12
+ "type": "string",
13
+ "enum": [
14
+ "phase_continue",
15
+ "task_authorization",
16
+ "risk_approval",
17
+ "external_input"
18
+ ]
19
+ },
20
+ "phase": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 256
24
+ },
25
+ "next_action": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "maxLength": 1000
29
+ },
30
+ "evidence_refs": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "properties": {
35
+ "evidence_id": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "maxLength": 256
39
+ },
40
+ "sha256": {
41
+ "type": "string",
42
+ "pattern": "^[a-f0-9]{64}$"
43
+ }
44
+ },
45
+ "required": [
46
+ "evidence_id",
47
+ "sha256"
48
+ ],
49
+ "additionalProperties": false
50
+ },
51
+ "maxItems": 32
52
+ }
53
+ },
54
+ "required": [
55
+ "version",
56
+ "gate_kind",
57
+ "phase",
58
+ "next_action",
59
+ "evidence_refs"
60
+ ],
61
+ "additionalProperties": false
62
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Osstack Session Decision Request",
4
+ "$comment": "Choice ID uniqueness is additionally enforced by Zod. The optional continuation is an untrusted request, not an approval.",
5
+ "type": "object",
6
+ "properties": {
7
+ "decision_id": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "maxLength": 256
11
+ },
12
+ "question": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 1000
16
+ },
17
+ "choices": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
22
+ "choice_id": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "maxLength": 256
26
+ },
27
+ "label": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "maxLength": 160
31
+ }
32
+ },
33
+ "required": [
34
+ "choice_id",
35
+ "label"
36
+ ],
37
+ "additionalProperties": false
38
+ },
39
+ "maxItems": 8
40
+ },
41
+ "continuation": {
42
+ "type": "object",
43
+ "properties": {
44
+ "version": {
45
+ "type": "number",
46
+ "const": 1
47
+ },
48
+ "gate_kind": {
49
+ "type": "string",
50
+ "enum": [
51
+ "phase_continue",
52
+ "task_authorization",
53
+ "risk_approval",
54
+ "external_input"
55
+ ]
56
+ },
57
+ "phase": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "maxLength": 256
61
+ },
62
+ "next_action": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "maxLength": 1000
66
+ },
67
+ "evidence_refs": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "properties": {
72
+ "evidence_id": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "maxLength": 256
76
+ },
77
+ "sha256": {
78
+ "type": "string",
79
+ "pattern": "^[a-f0-9]{64}$"
80
+ }
81
+ },
82
+ "required": [
83
+ "evidence_id",
84
+ "sha256"
85
+ ],
86
+ "additionalProperties": false
87
+ },
88
+ "maxItems": 32
89
+ }
90
+ },
91
+ "required": [
92
+ "version",
93
+ "gate_kind",
94
+ "phase",
95
+ "next_action",
96
+ "evidence_refs"
97
+ ],
98
+ "additionalProperties": false
99
+ }
100
+ },
101
+ "required": [
102
+ "decision_id",
103
+ "question",
104
+ "choices"
105
+ ],
106
+ "additionalProperties": false
107
+ }
@@ -0,0 +1,209 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Osstack Signed Session Continuation Grant",
4
+ "$comment": "Ed25519 signs UTF-8 canonical JSON of the strictly parsed body (defaults included, object keys sorted, array order preserved). Zod additionally rejects NUL in repo_path and whitespace-only instructions without rewriting their contents. Signature and trusted-key verification are required at runtime. This grant carries no R3 or GitHub approval authority.",
5
+ "type": "object",
6
+ "properties": {
7
+ "body": {
8
+ "type": "object",
9
+ "properties": {
10
+ "version": {
11
+ "type": "number",
12
+ "const": 1
13
+ },
14
+ "grant_id": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "maxLength": 256
18
+ },
19
+ "session_id": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 256
23
+ },
24
+ "runtime_id": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 256
28
+ },
29
+ "runtime_policy_sha256": {
30
+ "type": "string",
31
+ "pattern": "^[a-f0-9]{64}$"
32
+ },
33
+ "repo_path": {
34
+ "type": "string",
35
+ "maxLength": 4096,
36
+ "pattern": "^(?:\\/|[A-Za-z]:[\\\\/]|\\\\\\\\[^\\\\/]+[\\\\/][^\\\\/]+(?:[\\\\/]|$))"
37
+ },
38
+ "initial_turn_id": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 256
42
+ },
43
+ "initial_version": {
44
+ "type": "integer",
45
+ "minimum": 1
46
+ },
47
+ "issued_at": {
48
+ "type": "string",
49
+ "format": "date-time"
50
+ },
51
+ "expires_at": {
52
+ "type": "string",
53
+ "format": "date-time"
54
+ },
55
+ "max_resumes": {
56
+ "type": "integer",
57
+ "minimum": 1,
58
+ "maximum": 32
59
+ },
60
+ "max_checks": {
61
+ "type": "integer",
62
+ "minimum": 1,
63
+ "maximum": 64
64
+ },
65
+ "turn_timeout_ms": {
66
+ "type": "integer",
67
+ "minimum": 100,
68
+ "maximum": 300000
69
+ },
70
+ "steps": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "properties": {
75
+ "phase": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "maxLength": 256
79
+ },
80
+ "instruction": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "maxLength": 16000
84
+ },
85
+ "checks": {
86
+ "type": "array",
87
+ "items": {
88
+ "anyOf": [
89
+ {
90
+ "type": "object",
91
+ "properties": {
92
+ "kind": {
93
+ "type": "string",
94
+ "const": "text_equals"
95
+ },
96
+ "expected": {
97
+ "type": "string",
98
+ "maxLength": 4000
99
+ }
100
+ },
101
+ "required": [
102
+ "kind",
103
+ "expected"
104
+ ],
105
+ "additionalProperties": false
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "kind": {
111
+ "type": "string",
112
+ "const": "json_value_equals"
113
+ },
114
+ "path": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string",
118
+ "maxLength": 256
119
+ },
120
+ "maxItems": 8
121
+ },
122
+ "expected": {
123
+ "anyOf": [
124
+ {
125
+ "type": "null"
126
+ },
127
+ {
128
+ "type": "string",
129
+ "maxLength": 4000
130
+ },
131
+ {
132
+ "type": "number"
133
+ },
134
+ {
135
+ "type": "boolean"
136
+ }
137
+ ]
138
+ }
139
+ },
140
+ "required": [
141
+ "kind",
142
+ "path",
143
+ "expected"
144
+ ],
145
+ "additionalProperties": false
146
+ }
147
+ ]
148
+ },
149
+ "minItems": 1,
150
+ "maxItems": 16
151
+ },
152
+ "retry_instruction": {
153
+ "type": "string",
154
+ "minLength": 1,
155
+ "maxLength": 16000
156
+ },
157
+ "max_retries": {
158
+ "type": "integer",
159
+ "minimum": 0,
160
+ "maximum": 3,
161
+ "default": 0
162
+ }
163
+ },
164
+ "required": [
165
+ "phase",
166
+ "instruction",
167
+ "checks"
168
+ ],
169
+ "additionalProperties": false
170
+ },
171
+ "minItems": 1,
172
+ "maxItems": 16
173
+ }
174
+ },
175
+ "required": [
176
+ "version",
177
+ "grant_id",
178
+ "session_id",
179
+ "runtime_id",
180
+ "runtime_policy_sha256",
181
+ "repo_path",
182
+ "initial_turn_id",
183
+ "initial_version",
184
+ "issued_at",
185
+ "expires_at",
186
+ "max_resumes",
187
+ "max_checks",
188
+ "turn_timeout_ms",
189
+ "steps"
190
+ ],
191
+ "additionalProperties": false
192
+ },
193
+ "key_id": {
194
+ "type": "string",
195
+ "minLength": 1,
196
+ "maxLength": 256
197
+ },
198
+ "signature": {
199
+ "type": "string",
200
+ "pattern": "^[A-Za-z0-9+/]{85}[AQgw]==$"
201
+ }
202
+ },
203
+ "required": [
204
+ "body",
205
+ "key_id",
206
+ "signature"
207
+ ],
208
+ "additionalProperties": false
209
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Osborn
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.