ws-spec-kit 0.1.0-beta.2 → 0.1.0-beta.3

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 (53) hide show
  1. package/dist/adapters/connectors/git-native.d.ts +4 -1
  2. package/dist/adapters/connectors/git-native.js +87 -23
  3. package/dist/adapters/connectors/git-native.js.map +1 -1
  4. package/dist/adapters/connectors/github-cli.d.ts +1 -0
  5. package/dist/adapters/connectors/github-cli.js +1 -0
  6. package/dist/adapters/connectors/github-cli.js.map +1 -1
  7. package/dist/adapters/connectors/gitlab-cli.d.ts +1 -0
  8. package/dist/adapters/connectors/gitlab-cli.js +1 -0
  9. package/dist/adapters/connectors/gitlab-cli.js.map +1 -1
  10. package/dist/adapters/connectors/lark-cli.d.ts +1 -0
  11. package/dist/adapters/connectors/lark-cli.js +2 -0
  12. package/dist/adapters/connectors/lark-cli.js.map +1 -1
  13. package/dist/adapters/process/spawn-json.d.ts +2 -1
  14. package/dist/adapters/process/spawn-json.js +13 -0
  15. package/dist/adapters/process/spawn-json.js.map +1 -1
  16. package/dist/adapters/skills/install.js +76 -13
  17. package/dist/adapters/skills/install.js.map +1 -1
  18. package/dist/application/acquire.js +20 -5
  19. package/dist/application/acquire.js.map +1 -1
  20. package/dist/application/artifact.js +4 -1
  21. package/dist/application/artifact.js.map +1 -1
  22. package/dist/application/decide.js +39 -6
  23. package/dist/application/decide.js.map +1 -1
  24. package/dist/application/external-action.d.ts +3 -0
  25. package/dist/application/external-action.js +220 -54
  26. package/dist/application/external-action.js.map +1 -1
  27. package/dist/engine/approvals.d.ts +36 -3
  28. package/dist/engine/approvals.js +86 -4
  29. package/dist/engine/approvals.js.map +1 -1
  30. package/dist/engine/external-effects/authorization.d.ts +3 -0
  31. package/dist/engine/external-effects/authorization.js +8 -0
  32. package/dist/engine/external-effects/authorization.js.map +1 -1
  33. package/dist/protocol/application.d.ts +25 -4
  34. package/dist/protocol/public-contract.d.ts +3 -3
  35. package/dist/protocol/public-contract.js +4 -3
  36. package/dist/protocol/public-contract.js.map +1 -1
  37. package/dist/protocol/work-package.d.ts +15 -2
  38. package/dist/registry/connectors/external-executor.js +5 -4
  39. package/dist/registry/connectors/external-executor.js.map +1 -1
  40. package/dist/registry/connectors/secret-detector.d.ts +1 -0
  41. package/dist/registry/connectors/secret-detector.js +14 -1
  42. package/dist/registry/connectors/secret-detector.js.map +1 -1
  43. package/dist/schemas/definitions.d.ts +1 -1
  44. package/dist/schemas/definitions.js +211 -5
  45. package/dist/schemas/definitions.js.map +1 -1
  46. package/dist/storage/control-plane.d.ts +1 -0
  47. package/dist/storage/control-plane.js.map +1 -1
  48. package/dist/storage/events.d.ts +1 -1
  49. package/dist/storage/events.js.map +1 -1
  50. package/package.json +2 -2
  51. package/schemas/builtin-agent-action-v2.schema.json +867 -0
  52. package/schemas/builtin-application-decision-input-v2.schema.json +381 -0
  53. package/schemas/builtin-work-package-v2.schema.json +293 -0
@@ -0,0 +1,381 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "builtin.application-decision-input.v2",
4
+ "oneOf": [
5
+ {
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "kind",
10
+ "root",
11
+ "workItemId",
12
+ "requestId",
13
+ "decision",
14
+ "expectedDigest",
15
+ "actor"
16
+ ],
17
+ "properties": {
18
+ "kind": {
19
+ "const": "approval"
20
+ },
21
+ "root": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "workItemId": {
26
+ "type": "string",
27
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
28
+ },
29
+ "requestId": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "decision": {
34
+ "const": "approved"
35
+ },
36
+ "expectedDigest": {
37
+ "type": "string",
38
+ "pattern": "^sha256:.+$"
39
+ },
40
+ "actor": {
41
+ "type": "string",
42
+ "minLength": 1
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": [
50
+ "kind",
51
+ "root",
52
+ "workItemId",
53
+ "requestId",
54
+ "decision",
55
+ "expectedDigest",
56
+ "actor"
57
+ ],
58
+ "properties": {
59
+ "kind": {
60
+ "const": "approval"
61
+ },
62
+ "root": {
63
+ "type": "string",
64
+ "minLength": 1
65
+ },
66
+ "workItemId": {
67
+ "type": "string",
68
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
69
+ },
70
+ "requestId": {
71
+ "type": "string",
72
+ "minLength": 1
73
+ },
74
+ "decision": {
75
+ "const": "rejected"
76
+ },
77
+ "expectedDigest": {
78
+ "type": "string",
79
+ "pattern": "^sha256:.+$"
80
+ },
81
+ "actor": {
82
+ "type": "string",
83
+ "minLength": 1
84
+ },
85
+ "feedback": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "rejectionToken": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ }
93
+ },
94
+ "dependentRequired": {
95
+ "rejectionToken": [
96
+ "feedback"
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": [
104
+ "kind",
105
+ "root",
106
+ "workItemId",
107
+ "requestId",
108
+ "decision",
109
+ "expectedDigest",
110
+ "actor",
111
+ "feedback"
112
+ ],
113
+ "properties": {
114
+ "kind": {
115
+ "const": "approval"
116
+ },
117
+ "root": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "workItemId": {
122
+ "type": "string",
123
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
124
+ },
125
+ "requestId": {
126
+ "type": "string",
127
+ "minLength": 1
128
+ },
129
+ "decision": {
130
+ "const": "confirm_rejection"
131
+ },
132
+ "expectedDigest": {
133
+ "type": "string",
134
+ "pattern": "^sha256:.+$"
135
+ },
136
+ "actor": {
137
+ "type": "string",
138
+ "minLength": 1
139
+ },
140
+ "feedback": {
141
+ "type": "string",
142
+ "minLength": 1
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "type": "object",
148
+ "additionalProperties": false,
149
+ "required": [
150
+ "kind",
151
+ "root",
152
+ "requestId",
153
+ "decision",
154
+ "expectedPackageDigest",
155
+ "expectedCapabilityDigest",
156
+ "actor"
157
+ ],
158
+ "properties": {
159
+ "kind": {
160
+ "const": "workflow_trust"
161
+ },
162
+ "root": {
163
+ "type": "string",
164
+ "minLength": 1
165
+ },
166
+ "requestId": {
167
+ "type": "string",
168
+ "minLength": 1
169
+ },
170
+ "decision": {
171
+ "enum": [
172
+ "trusted",
173
+ "rejected"
174
+ ]
175
+ },
176
+ "expectedPackageDigest": {
177
+ "type": "string",
178
+ "pattern": "^sha256:.+$"
179
+ },
180
+ "expectedCapabilityDigest": {
181
+ "type": "string",
182
+ "pattern": "^sha256:.+$"
183
+ },
184
+ "actor": {
185
+ "type": "string",
186
+ "minLength": 1
187
+ }
188
+ }
189
+ },
190
+ {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": [
194
+ "kind",
195
+ "root",
196
+ "workItemId",
197
+ "requestId",
198
+ "decision",
199
+ "expectedDigest",
200
+ "actor"
201
+ ],
202
+ "properties": {
203
+ "kind": {
204
+ "const": "external_action"
205
+ },
206
+ "root": {
207
+ "type": "string",
208
+ "minLength": 1
209
+ },
210
+ "workItemId": {
211
+ "type": "string",
212
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
213
+ },
214
+ "requestId": {
215
+ "type": "string",
216
+ "minLength": 1
217
+ },
218
+ "decision": {
219
+ "enum": [
220
+ "approved",
221
+ "rejected"
222
+ ]
223
+ },
224
+ "expectedDigest": {
225
+ "type": "string",
226
+ "pattern": "^sha256:.+$"
227
+ },
228
+ "actor": {
229
+ "type": "string",
230
+ "minLength": 1
231
+ }
232
+ }
233
+ },
234
+ {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "required": [
238
+ "kind",
239
+ "root",
240
+ "workItemId",
241
+ "requestId",
242
+ "decision",
243
+ "expectedDigest",
244
+ "actor"
245
+ ],
246
+ "properties": {
247
+ "kind": {
248
+ "const": "external_reconciliation"
249
+ },
250
+ "root": {
251
+ "type": "string",
252
+ "minLength": 1
253
+ },
254
+ "workItemId": {
255
+ "type": "string",
256
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
257
+ },
258
+ "requestId": {
259
+ "type": "string",
260
+ "minLength": 1
261
+ },
262
+ "decision": {
263
+ "const": "reconcile"
264
+ },
265
+ "expectedDigest": {
266
+ "type": "string",
267
+ "pattern": "^sha256:[a-f0-9]{64}$"
268
+ },
269
+ "actor": {
270
+ "type": "string",
271
+ "minLength": 1
272
+ }
273
+ }
274
+ },
275
+ {
276
+ "type": "object",
277
+ "additionalProperties": false,
278
+ "required": [
279
+ "kind",
280
+ "root",
281
+ "workItemId",
282
+ "requestId",
283
+ "decision",
284
+ "expectedDigest",
285
+ "evidence",
286
+ "actor"
287
+ ],
288
+ "properties": {
289
+ "kind": {
290
+ "const": "external_reconciliation"
291
+ },
292
+ "root": {
293
+ "type": "string",
294
+ "minLength": 1
295
+ },
296
+ "workItemId": {
297
+ "type": "string",
298
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
299
+ },
300
+ "requestId": {
301
+ "type": "string",
302
+ "minLength": 1
303
+ },
304
+ "decision": {
305
+ "const": "mark_failed"
306
+ },
307
+ "expectedDigest": {
308
+ "type": "string",
309
+ "pattern": "^sha256:[a-f0-9]{64}$"
310
+ },
311
+ "evidence": {
312
+ "type": "string",
313
+ "minLength": 1,
314
+ "maxLength": 2048
315
+ },
316
+ "actor": {
317
+ "type": "string",
318
+ "minLength": 1
319
+ }
320
+ }
321
+ },
322
+ {
323
+ "type": "object",
324
+ "additionalProperties": false,
325
+ "required": [
326
+ "kind",
327
+ "root",
328
+ "workItemId",
329
+ "requestId",
330
+ "decision",
331
+ "expectedDigest",
332
+ "externalStableId",
333
+ "contentDigest",
334
+ "evidence",
335
+ "actor"
336
+ ],
337
+ "properties": {
338
+ "kind": {
339
+ "const": "external_reconciliation"
340
+ },
341
+ "root": {
342
+ "type": "string",
343
+ "minLength": 1
344
+ },
345
+ "workItemId": {
346
+ "type": "string",
347
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
348
+ },
349
+ "requestId": {
350
+ "type": "string",
351
+ "minLength": 1
352
+ },
353
+ "decision": {
354
+ "const": "adopt_verified"
355
+ },
356
+ "expectedDigest": {
357
+ "type": "string",
358
+ "pattern": "^sha256:[a-f0-9]{64}$"
359
+ },
360
+ "externalStableId": {
361
+ "type": "string",
362
+ "minLength": 1,
363
+ "maxLength": 2048
364
+ },
365
+ "contentDigest": {
366
+ "type": "string",
367
+ "pattern": "^sha256:[a-f0-9]{64}$"
368
+ },
369
+ "evidence": {
370
+ "type": "string",
371
+ "minLength": 1,
372
+ "maxLength": 2048
373
+ },
374
+ "actor": {
375
+ "type": "string",
376
+ "minLength": 1
377
+ }
378
+ }
379
+ }
380
+ ]
381
+ }
@@ -0,0 +1,293 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "builtin.work-package.v2",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "version",
8
+ "workItemId",
9
+ "stepId",
10
+ "attemptId",
11
+ "workspace",
12
+ "lease",
13
+ "objective",
14
+ "revisionRequest",
15
+ "skills",
16
+ "artifacts",
17
+ "constraints",
18
+ "requiredOutputs",
19
+ "gates",
20
+ "resultSchema"
21
+ ],
22
+ "properties": {
23
+ "version": {
24
+ "const": 2
25
+ },
26
+ "workItemId": {
27
+ "type": "string",
28
+ "pattern": "^WSS-[A-Za-z0-9-]+$"
29
+ },
30
+ "stepId": {
31
+ "type": "string",
32
+ "pattern": "^[a-z][a-z0-9-]{0,62}(?::[1-9][0-9]*:[a-z][a-z0-9-]{0,62})?$"
33
+ },
34
+ "attemptId": {
35
+ "type": "string",
36
+ "pattern": "^attempt-.+$"
37
+ },
38
+ "workspace": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": [
42
+ "mode",
43
+ "materialized"
44
+ ],
45
+ "properties": {
46
+ "mode": {
47
+ "enum": [
48
+ "read-only",
49
+ "isolated-worktree"
50
+ ]
51
+ },
52
+ "materialized": {
53
+ "type": "boolean"
54
+ }
55
+ }
56
+ },
57
+ "lease": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": [
61
+ "token",
62
+ "expiresAt"
63
+ ],
64
+ "properties": {
65
+ "token": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "expiresAt": {
70
+ "type": "string",
71
+ "format": "date-time"
72
+ }
73
+ }
74
+ },
75
+ "objective": {
76
+ "type": "string",
77
+ "minLength": 1
78
+ },
79
+ "revisionRequest": {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": [
83
+ "approvalRequestId",
84
+ "feedback"
85
+ ],
86
+ "properties": {
87
+ "approvalRequestId": {
88
+ "type": "string",
89
+ "minLength": 1
90
+ },
91
+ "feedback": {
92
+ "type": "string",
93
+ "minLength": 1
94
+ }
95
+ }
96
+ },
97
+ "artifactLevel": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "skills": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": [
107
+ "ref",
108
+ "version",
109
+ "digest",
110
+ "description"
111
+ ],
112
+ "properties": {
113
+ "ref": {
114
+ "type": "string",
115
+ "minLength": 1
116
+ },
117
+ "version": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "digest": {
122
+ "type": "string",
123
+ "pattern": "^sha256:.+$"
124
+ },
125
+ "description": {
126
+ "type": "string",
127
+ "minLength": 1
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "artifacts": {
133
+ "type": "array",
134
+ "items": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "artifactType",
139
+ "schemaVersion"
140
+ ],
141
+ "properties": {
142
+ "artifactType": {
143
+ "type": "string",
144
+ "pattern": "^[a-z][a-z0-9-]{0,62}$"
145
+ },
146
+ "outputId": {
147
+ "type": "string",
148
+ "pattern": "^[a-z][a-z0-9-]{0,62}$"
149
+ },
150
+ "artifactId": {
151
+ "type": "string",
152
+ "minLength": 1,
153
+ "maxLength": 128
154
+ },
155
+ "schemaVersion": {
156
+ "type": "integer",
157
+ "minimum": 1
158
+ },
159
+ "path": {
160
+ "type": "string"
161
+ },
162
+ "revision": {
163
+ "type": "integer",
164
+ "minimum": 1
165
+ },
166
+ "contentHash": {
167
+ "type": "string",
168
+ "pattern": "^sha256:.+$"
169
+ },
170
+ "mediaType": {
171
+ "type": "string"
172
+ },
173
+ "contentLevel": {
174
+ "type": "string",
175
+ "minLength": 1
176
+ }
177
+ }
178
+ }
179
+ },
180
+ "constraints": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "required": [
184
+ "allowedPaths",
185
+ "forbiddenActions"
186
+ ],
187
+ "properties": {
188
+ "allowedPaths": {
189
+ "type": "array",
190
+ "items": {
191
+ "type": "string"
192
+ },
193
+ "uniqueItems": true
194
+ },
195
+ "forbiddenActions": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "string"
199
+ },
200
+ "uniqueItems": true
201
+ }
202
+ }
203
+ },
204
+ "requiredOutputs": {
205
+ "type": "array",
206
+ "items": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "required": [
210
+ "artifactType",
211
+ "schemaVersion"
212
+ ],
213
+ "properties": {
214
+ "artifactType": {
215
+ "type": "string",
216
+ "pattern": "^[a-z][a-z0-9-]{0,62}$"
217
+ },
218
+ "outputId": {
219
+ "type": "string",
220
+ "pattern": "^[a-z][a-z0-9-]{0,62}$"
221
+ },
222
+ "schemaVersion": {
223
+ "type": "integer",
224
+ "minimum": 1
225
+ },
226
+ "contentLevel": {
227
+ "type": "string",
228
+ "minLength": 1
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "artifactAuthoring": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "required": [
237
+ "version",
238
+ "maxContentBytes",
239
+ "draftRoots"
240
+ ],
241
+ "properties": {
242
+ "version": {
243
+ "const": 1
244
+ },
245
+ "maxContentBytes": {
246
+ "type": "integer",
247
+ "minimum": 1,
248
+ "maximum": 1048576
249
+ },
250
+ "draftRoots": {
251
+ "type": "array",
252
+ "minItems": 1,
253
+ "uniqueItems": true,
254
+ "items": {
255
+ "type": "string",
256
+ "minLength": 1
257
+ }
258
+ }
259
+ }
260
+ },
261
+ "gates": {
262
+ "type": "array",
263
+ "items": {
264
+ "type": "object",
265
+ "additionalProperties": false,
266
+ "required": [
267
+ "id",
268
+ "evidence",
269
+ "required"
270
+ ],
271
+ "properties": {
272
+ "id": {
273
+ "type": "string",
274
+ "pattern": "^[a-z][a-z0-9.-]{0,62}$"
275
+ },
276
+ "evidence": {
277
+ "enum": [
278
+ "trusted",
279
+ "attested",
280
+ "reported"
281
+ ]
282
+ },
283
+ "required": {
284
+ "type": "boolean"
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "resultSchema": {
290
+ "const": "builtin.submit-result.v1"
291
+ }
292
+ }
293
+ }