@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,343 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "OSStack FollowUpObligation",
4
+ "$comment": "Local ledger only; parsing does not authorize remote delivery. Runtime validates canonical repository, source binding, revisions and response byte budget.",
5
+ "type": "object",
6
+ "properties": {
7
+ "repo_path": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "maxLength": 4096
11
+ },
12
+ "default_tenant": {
13
+ "type": "boolean",
14
+ "const": true
15
+ },
16
+ "obligation_id": {
17
+ "type": "string",
18
+ "format": "uuid"
19
+ },
20
+ "source_session_id": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 256
24
+ },
25
+ "source_task_id": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "maxLength": 256
29
+ },
30
+ "source_run_id": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 256
34
+ },
35
+ "source_creation_version": {
36
+ "type": "integer",
37
+ "exclusiveMinimum": 0,
38
+ "maximum": 9007199254740990
39
+ },
40
+ "source_identity_digest": {
41
+ "type": "string",
42
+ "pattern": "^[a-f0-9]{64}$"
43
+ },
44
+ "actor": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 128
48
+ },
49
+ "promise": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "maxLength": 4096
53
+ },
54
+ "destination_ref": {
55
+ "type": "string",
56
+ "const": "local_operator"
57
+ },
58
+ "resolution_condition": {
59
+ "type": "string",
60
+ "enum": [
61
+ "manual",
62
+ "session_completed"
63
+ ]
64
+ },
65
+ "due_at": {
66
+ "anyOf": [
67
+ {
68
+ "type": "integer",
69
+ "minimum": 0,
70
+ "maximum": 8640000000000000
71
+ },
72
+ {
73
+ "type": "null"
74
+ }
75
+ ]
76
+ },
77
+ "state": {
78
+ "type": "string",
79
+ "enum": [
80
+ "open",
81
+ "drafted",
82
+ "fulfilled_local",
83
+ "waived"
84
+ ]
85
+ },
86
+ "revision": {
87
+ "type": "integer",
88
+ "exclusiveMinimum": 0,
89
+ "maximum": 9007199254740990
90
+ },
91
+ "created_at": {
92
+ "type": "integer",
93
+ "minimum": 0,
94
+ "maximum": 8640000000000000
95
+ },
96
+ "updated_at": {
97
+ "type": "integer",
98
+ "minimum": 0,
99
+ "maximum": 8640000000000000
100
+ },
101
+ "draft": {
102
+ "anyOf": [
103
+ {
104
+ "type": "object",
105
+ "properties": {
106
+ "text": {
107
+ "type": "string",
108
+ "minLength": 1,
109
+ "maxLength": 8192
110
+ },
111
+ "content_digest": {
112
+ "type": "string",
113
+ "pattern": "^[a-f0-9]{64}$"
114
+ },
115
+ "source": {
116
+ "anyOf": [
117
+ {
118
+ "type": "object",
119
+ "properties": {
120
+ "state": {
121
+ "type": "string",
122
+ "enum": [
123
+ "starting",
124
+ "running",
125
+ "awaiting_decision",
126
+ "idle",
127
+ "completed",
128
+ "failed",
129
+ "cancelled"
130
+ ]
131
+ },
132
+ "version": {
133
+ "type": "integer",
134
+ "exclusiveMinimum": 0,
135
+ "maximum": 9007199254740990
136
+ },
137
+ "updated_at": {
138
+ "type": "integer",
139
+ "minimum": 0,
140
+ "maximum": 8640000000000000
141
+ }
142
+ },
143
+ "required": [
144
+ "state",
145
+ "version",
146
+ "updated_at"
147
+ ],
148
+ "additionalProperties": false
149
+ },
150
+ {
151
+ "type": "null"
152
+ }
153
+ ]
154
+ },
155
+ "source_missing": {
156
+ "type": "boolean"
157
+ },
158
+ "created_at": {
159
+ "type": "integer",
160
+ "minimum": 0,
161
+ "maximum": 8640000000000000
162
+ },
163
+ "delivery_state": {
164
+ "type": "string",
165
+ "const": "unsent"
166
+ }
167
+ },
168
+ "required": [
169
+ "text",
170
+ "content_digest",
171
+ "source",
172
+ "source_missing",
173
+ "created_at",
174
+ "delivery_state"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ {
179
+ "type": "null"
180
+ }
181
+ ]
182
+ },
183
+ "resolution": {
184
+ "anyOf": [
185
+ {
186
+ "type": "object",
187
+ "properties": {
188
+ "mode": {
189
+ "type": "string",
190
+ "enum": [
191
+ "waive",
192
+ "condition"
193
+ ]
194
+ },
195
+ "actor": {
196
+ "type": "string",
197
+ "minLength": 1,
198
+ "maxLength": 128
199
+ },
200
+ "reason": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 1024
204
+ },
205
+ "source": {
206
+ "anyOf": [
207
+ {
208
+ "type": "object",
209
+ "properties": {
210
+ "state": {
211
+ "type": "string",
212
+ "enum": [
213
+ "starting",
214
+ "running",
215
+ "awaiting_decision",
216
+ "idle",
217
+ "completed",
218
+ "failed",
219
+ "cancelled"
220
+ ]
221
+ },
222
+ "version": {
223
+ "type": "integer",
224
+ "exclusiveMinimum": 0,
225
+ "maximum": 9007199254740990
226
+ },
227
+ "updated_at": {
228
+ "type": "integer",
229
+ "minimum": 0,
230
+ "maximum": 8640000000000000
231
+ }
232
+ },
233
+ "required": [
234
+ "state",
235
+ "version",
236
+ "updated_at"
237
+ ],
238
+ "additionalProperties": false
239
+ },
240
+ {
241
+ "type": "null"
242
+ }
243
+ ]
244
+ },
245
+ "resolved_at": {
246
+ "type": "integer",
247
+ "minimum": 0,
248
+ "maximum": 8640000000000000
249
+ },
250
+ "external_delivery": {
251
+ "type": "string",
252
+ "const": "unsupported"
253
+ }
254
+ },
255
+ "required": [
256
+ "mode",
257
+ "actor",
258
+ "reason",
259
+ "source",
260
+ "resolved_at",
261
+ "external_delivery"
262
+ ],
263
+ "additionalProperties": false
264
+ },
265
+ {
266
+ "type": "null"
267
+ }
268
+ ]
269
+ },
270
+ "source": {
271
+ "anyOf": [
272
+ {
273
+ "type": "object",
274
+ "properties": {
275
+ "state": {
276
+ "type": "string",
277
+ "enum": [
278
+ "starting",
279
+ "running",
280
+ "awaiting_decision",
281
+ "idle",
282
+ "completed",
283
+ "failed",
284
+ "cancelled"
285
+ ]
286
+ },
287
+ "version": {
288
+ "type": "integer",
289
+ "exclusiveMinimum": 0,
290
+ "maximum": 9007199254740990
291
+ },
292
+ "updated_at": {
293
+ "type": "integer",
294
+ "minimum": 0,
295
+ "maximum": 8640000000000000
296
+ }
297
+ },
298
+ "required": [
299
+ "state",
300
+ "version",
301
+ "updated_at"
302
+ ],
303
+ "additionalProperties": false
304
+ },
305
+ {
306
+ "type": "null"
307
+ }
308
+ ]
309
+ },
310
+ "source_missing": {
311
+ "type": "boolean"
312
+ },
313
+ "external_delivery": {
314
+ "type": "string",
315
+ "const": "unsupported"
316
+ }
317
+ },
318
+ "required": [
319
+ "repo_path",
320
+ "default_tenant",
321
+ "obligation_id",
322
+ "source_session_id",
323
+ "source_task_id",
324
+ "source_run_id",
325
+ "source_creation_version",
326
+ "source_identity_digest",
327
+ "actor",
328
+ "promise",
329
+ "destination_ref",
330
+ "resolution_condition",
331
+ "due_at",
332
+ "state",
333
+ "revision",
334
+ "created_at",
335
+ "updated_at",
336
+ "draft",
337
+ "resolution",
338
+ "source",
339
+ "source_missing",
340
+ "external_delivery"
341
+ ],
342
+ "additionalProperties": false
343
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "OSStack FollowUpResolveParams",
4
+ "$comment": "Local ledger only; parsing does not authorize remote delivery. Runtime validates canonical repository, source binding, revisions and response byte budget.",
5
+ "type": "object",
6
+ "properties": {
7
+ "repo_path": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "maxLength": 4096
11
+ },
12
+ "default_tenant": {
13
+ "type": "boolean",
14
+ "const": true
15
+ },
16
+ "obligation_id": {
17
+ "type": "string",
18
+ "format": "uuid"
19
+ },
20
+ "expected_revision": {
21
+ "type": "integer",
22
+ "exclusiveMinimum": 0,
23
+ "maximum": 9007199254740990
24
+ },
25
+ "actor": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "maxLength": 128
29
+ },
30
+ "reason": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 1024
34
+ },
35
+ "mode": {
36
+ "type": "string",
37
+ "enum": [
38
+ "waive",
39
+ "condition"
40
+ ]
41
+ }
42
+ },
43
+ "required": [
44
+ "repo_path",
45
+ "default_tenant",
46
+ "obligation_id",
47
+ "expected_revision",
48
+ "actor",
49
+ "reason",
50
+ "mode"
51
+ ],
52
+ "additionalProperties": false
53
+ }
@@ -0,0 +1,258 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "OSStack Frozen Delivery Contract v2",
4
+ "$comment": "Shape only. The host must recompute the canonical contract digest and bind it to the actual repository and accepted policy.",
5
+ "type": "object",
6
+ "properties": {
7
+ "contract": {
8
+ "type": "object",
9
+ "properties": {
10
+ "schema_version": {
11
+ "type": "number",
12
+ "const": 2
13
+ },
14
+ "contract_id": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "maxLength": 256
18
+ },
19
+ "parent_contract_id": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 256
23
+ },
24
+ "task_id": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 256
28
+ },
29
+ "canonical_repo": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "maxLength": 4096
33
+ },
34
+ "mode": {
35
+ "type": "string",
36
+ "enum": [
37
+ "scout",
38
+ "implement"
39
+ ]
40
+ },
41
+ "base_head": {
42
+ "type": "string",
43
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
44
+ },
45
+ "goal": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "maxLength": 16000
49
+ },
50
+ "required_checks": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "object",
54
+ "properties": {
55
+ "id": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 256
59
+ },
60
+ "registry_ref": {
61
+ "type": "string",
62
+ "pattern": "^sha256:[a-f0-9]{64}$"
63
+ }
64
+ },
65
+ "required": [
66
+ "id",
67
+ "registry_ref"
68
+ ],
69
+ "additionalProperties": false
70
+ },
71
+ "minItems": 1,
72
+ "maxItems": 100
73
+ },
74
+ "review_policy_ref": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "maxLength": 256
78
+ },
79
+ "requested_completion": {
80
+ "type": "string",
81
+ "enum": [
82
+ "local_verified",
83
+ "pr_opened",
84
+ "merged",
85
+ "deployed"
86
+ ]
87
+ },
88
+ "allowed_paths": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 4096
94
+ },
95
+ "minItems": 1,
96
+ "maxItems": 1000
97
+ },
98
+ "requested_actions": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "string",
102
+ "enum": [
103
+ "build",
104
+ "verify",
105
+ "commit",
106
+ "push",
107
+ "open_pr",
108
+ "merge",
109
+ "deploy:staging",
110
+ "deploy:production"
111
+ ]
112
+ },
113
+ "minItems": 1,
114
+ "maxItems": 8
115
+ },
116
+ "budget_ref": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 256
120
+ },
121
+ "policy_digest": {
122
+ "type": "string",
123
+ "pattern": "^[a-f0-9]{64}$"
124
+ },
125
+ "publication_scope": {
126
+ "anyOf": [
127
+ {
128
+ "type": "object",
129
+ "properties": {
130
+ "mode": {
131
+ "type": "string",
132
+ "const": "none"
133
+ }
134
+ },
135
+ "required": [
136
+ "mode"
137
+ ],
138
+ "additionalProperties": false
139
+ },
140
+ {
141
+ "type": "object",
142
+ "properties": {
143
+ "mode": {
144
+ "type": "string",
145
+ "enum": [
146
+ "push",
147
+ "draft_pr",
148
+ "review_pr"
149
+ ]
150
+ },
151
+ "hostname": {
152
+ "type": "string",
153
+ "const": "github.com"
154
+ },
155
+ "repository": {
156
+ "type": "string",
157
+ "pattern": "^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$"
158
+ },
159
+ "remote": {
160
+ "type": "string",
161
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
162
+ },
163
+ "base_ref": {
164
+ "type": "string",
165
+ "minLength": 1,
166
+ "maxLength": 255
167
+ },
168
+ "head_ref": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 255
172
+ }
173
+ },
174
+ "required": [
175
+ "mode",
176
+ "hostname",
177
+ "repository",
178
+ "remote",
179
+ "base_ref",
180
+ "head_ref"
181
+ ],
182
+ "additionalProperties": false
183
+ }
184
+ ]
185
+ },
186
+ "merge_authority": {
187
+ "anyOf": [
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "mode": {
192
+ "type": "string",
193
+ "const": "none"
194
+ }
195
+ },
196
+ "required": [
197
+ "mode"
198
+ ],
199
+ "additionalProperties": false
200
+ },
201
+ {
202
+ "type": "object",
203
+ "properties": {
204
+ "mode": {
205
+ "type": "string",
206
+ "const": "existing_guarded_policy"
207
+ },
208
+ "policy_ref": {
209
+ "type": "string",
210
+ "pattern": "^sha256:[a-f0-9]{64}$"
211
+ }
212
+ },
213
+ "required": [
214
+ "mode",
215
+ "policy_ref"
216
+ ],
217
+ "additionalProperties": false
218
+ }
219
+ ]
220
+ }
221
+ },
222
+ "required": [
223
+ "schema_version",
224
+ "contract_id",
225
+ "task_id",
226
+ "canonical_repo",
227
+ "mode",
228
+ "base_head",
229
+ "goal",
230
+ "required_checks",
231
+ "review_policy_ref",
232
+ "requested_completion",
233
+ "allowed_paths",
234
+ "requested_actions",
235
+ "budget_ref",
236
+ "policy_digest",
237
+ "publication_scope",
238
+ "merge_authority"
239
+ ],
240
+ "additionalProperties": false
241
+ },
242
+ "digest": {
243
+ "type": "string",
244
+ "pattern": "^[a-f0-9]{64}$"
245
+ },
246
+ "brief": {
247
+ "type": "string",
248
+ "minLength": 1,
249
+ "maxLength": 32000
250
+ }
251
+ },
252
+ "required": [
253
+ "contract",
254
+ "digest",
255
+ "brief"
256
+ ],
257
+ "additionalProperties": false
258
+ }