@6reduk/workspace-pipeline 0.1.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.
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/docs/collaboration.md +59 -0
- package/docs/config-fields.md +65 -0
- package/docs/contracts.md +149 -0
- package/docs/doctor.md +165 -0
- package/docs/launch.md +50 -0
- package/docs/lifecycle-cli.md +141 -0
- package/docs/lifecycle.md +42 -0
- package/docs/migrations/unity.md +288 -0
- package/docs/native-provider-format.md +149 -0
- package/docs/provider-bundles.md +81 -0
- package/docs/provider-resources.md +37 -0
- package/docs/release.md +25 -0
- package/docs/remove.md +70 -0
- package/docs/repair.md +80 -0
- package/docs/repositories.md +209 -0
- package/docs/repository-manual-recovery.md +102 -0
- package/docs/repository-observations.md +29 -0
- package/docs/repository-recovery.md +204 -0
- package/docs/repository-retention.md +46 -0
- package/docs/repository-transport-budgets.md +26 -0
- package/docs/retention.md +237 -0
- package/docs/source.md +50 -0
- package/docs/switch.md +412 -0
- package/package.json +39 -0
- package/schemas/common.schema.json +251 -0
- package/schemas/inventory.schema.json +15 -0
- package/schemas/operation.schema.json +286 -0
- package/schemas/pipeline.schema.json +317 -0
- package/schemas/state.schema.json +302 -0
- package/schemas/workspace.schema.json +67 -0
- package/src/cli.js +7 -0
- package/src/commands/adopt.js +2 -0
- package/src/commands/bootstrap-recovery.js +90 -0
- package/src/commands/dispatch.js +394 -0
- package/src/commands/init.js +84 -0
- package/src/commands/launch.js +69 -0
- package/src/commands/migration-apply.js +53 -0
- package/src/commands/migration.js +50 -0
- package/src/commands/repositories.js +61 -0
- package/src/commands/repository-abandon.js +16 -0
- package/src/commands/repository-ancestors.js +21 -0
- package/src/commands/repository-locks.js +77 -0
- package/src/contracts/parse.js +57 -0
- package/src/contracts/semantic.js +240 -0
- package/src/contracts/validate.js +21 -0
- package/src/launch/grok.js +20 -0
- package/src/migrations/legacy-unity-begin.js +35 -0
- package/src/migrations/legacy-unity-compensate.js +82 -0
- package/src/migrations/legacy-unity-deactivate.js +60 -0
- package/src/migrations/legacy-unity-deactivation-resume-apply.js +62 -0
- package/src/migrations/legacy-unity-deactivation-resume.js +81 -0
- package/src/migrations/legacy-unity-finalize.js +88 -0
- package/src/migrations/legacy-unity-install-recovery.js +76 -0
- package/src/migrations/legacy-unity-install-resume.js +60 -0
- package/src/migrations/legacy-unity-install.js +88 -0
- package/src/migrations/legacy-unity-lease.js +136 -0
- package/src/migrations/legacy-unity-preflight.js +67 -0
- package/src/migrations/legacy-unity-preview.js +91 -0
- package/src/migrations/legacy-unity-resume-apply.js +39 -0
- package/src/migrations/legacy-unity-resume.js +41 -0
- package/src/migrations/legacy-unity-resumed-evidence.js +88 -0
- package/src/migrations/legacy-unity.js +99 -0
- package/src/operations/apply.js +576 -0
- package/src/operations/backup.js +94 -0
- package/src/operations/bootstrap-lock.js +87 -0
- package/src/operations/bootstrap-owner-retirement.js +121 -0
- package/src/operations/bundle-update.js +54 -0
- package/src/operations/config-fields.js +24 -0
- package/src/operations/continuation-lifecycle.js +77 -0
- package/src/operations/doctor.js +214 -0
- package/src/operations/history.js +170 -0
- package/src/operations/installer-identity.js +49 -0
- package/src/operations/journal.js +142 -0
- package/src/operations/lifecycle.js +133 -0
- package/src/operations/lineage-guard.js +20 -0
- package/src/operations/lock.js +109 -0
- package/src/operations/maintenance.js +62 -0
- package/src/operations/migration-pending.js +22 -0
- package/src/operations/ownership.js +122 -0
- package/src/operations/plan.js +278 -0
- package/src/operations/reconciliation.js +112 -0
- package/src/operations/recovery-lease.js +66 -0
- package/src/operations/remove.js +140 -0
- package/src/operations/repair.js +188 -0
- package/src/operations/repository-abandon.js +192 -0
- package/src/operations/repository-ancestors.js +158 -0
- package/src/operations/repository-apply.js +122 -0
- package/src/operations/repository-authorization.js +48 -0
- package/src/operations/repository-bootstrap-continuation.js +190 -0
- package/src/operations/repository-bootstrap-reconcile.js +106 -0
- package/src/operations/repository-bootstrap-recover.js +114 -0
- package/src/operations/repository-bootstrap.js +82 -0
- package/src/operations/repository-clone.js +63 -0
- package/src/operations/repository-history.js +108 -0
- package/src/operations/repository-inputs.js +41 -0
- package/src/operations/repository-journal.js +127 -0
- package/src/operations/repository-lock-reconcile.js +401 -0
- package/src/operations/repository-pending.js +29 -0
- package/src/operations/repository-reconcile.js +182 -0
- package/src/operations/repository-resumption-approvals.js +77 -0
- package/src/operations/repository-retention-apply.js +75 -0
- package/src/operations/repository-retention.js +137 -0
- package/src/operations/repository-workspace.js +78 -0
- package/src/operations/retention-apply.js +133 -0
- package/src/operations/retention-combined-scan.js +30 -0
- package/src/operations/retention-combined.js +41 -0
- package/src/operations/retention-policy.js +65 -0
- package/src/operations/retention-receipts.js +126 -0
- package/src/operations/retention-scan.js +86 -0
- package/src/operations/retention.js +56 -0
- package/src/operations/state.js +210 -0
- package/src/operations/switch-activate.js +64 -0
- package/src/operations/switch-backups.js +29 -0
- package/src/operations/switch-continuation-journal.js +94 -0
- package/src/operations/switch-continuation-pending.js +60 -0
- package/src/operations/switch-continuation-records.js +109 -0
- package/src/operations/switch-continuation-recovery.js +91 -0
- package/src/operations/switch-continuation-runtime.js +135 -0
- package/src/operations/switch-continuation-store.js +120 -0
- package/src/operations/switch-continuation.js +76 -0
- package/src/operations/switch-execute.js +68 -0
- package/src/operations/switch-inspect.js +45 -0
- package/src/operations/switch-journal-store.js +109 -0
- package/src/operations/switch-journal.js +71 -0
- package/src/operations/switch-lifecycle.js +72 -0
- package/src/operations/switch-pending.js +43 -0
- package/src/operations/switch-preflight.js +73 -0
- package/src/operations/switch-prepare.js +75 -0
- package/src/operations/switch-records.js +60 -0
- package/src/operations/switch-recovery-store.js +74 -0
- package/src/operations/switch.js +52 -0
- package/src/operations/toml-fields.js +133 -0
- package/src/providers/bundles.js +42 -0
- package/src/providers/common-entry.js +16 -0
- package/src/providers/grok.js +26 -0
- package/src/providers/interface.js +25 -0
- package/src/providers/kimi.js +26 -0
- package/src/providers/native.js +155 -0
- package/src/providers/registry.js +10 -0
- package/src/providers/shared.js +51 -0
- package/src/providers/source.js +30 -0
- package/src/source/git.js +303 -0
- package/src/source/inventory.js +87 -0
- package/src/source/repository-budget.js +18 -0
- package/src/source/snapshot.js +37 -0
- package/src/workspace/paths.js +54 -0
- package/src/workspace/profiles.js +8 -0
- package/src/workspace/repositories.js +57 -0
- package/src/workspace/repository-inventory.js +77 -0
- package/src/workspace/repository-observation.js +38 -0
- package/src/workspace/repository-preflight.js +129 -0
- package/src/workspace/repository-preview.js +196 -0
- package/src/workspace/repository-tree.js +57 -0
- package/src/workspace/reserved.js +11 -0
- package/src/workspace/resolve.js +53 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"bundles": {"$ref": "common.schema.json#/$defs/bundles"},
|
|
6
|
+
"schemaVersion": {
|
|
7
|
+
"const": 1
|
|
8
|
+
},
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}(?![\\s\\S])"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))*)?(?![\\s\\S])"
|
|
16
|
+
},
|
|
17
|
+
"resources": {
|
|
18
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
19
|
+
},
|
|
20
|
+
"providers": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"minProperties": 1,
|
|
23
|
+
"properties": {
|
|
24
|
+
"codex": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"skills": {
|
|
28
|
+
"anyOf": [
|
|
29
|
+
{
|
|
30
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "null"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"agents": {
|
|
38
|
+
"anyOf": [
|
|
39
|
+
{
|
|
40
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "null"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"mcp": {
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "null"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"entryInstructions": {
|
|
58
|
+
"anyOf": [
|
|
59
|
+
{
|
|
60
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "null"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"requires": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"uniqueItems": true,
|
|
70
|
+
"items": {
|
|
71
|
+
"enum": [
|
|
72
|
+
"skills",
|
|
73
|
+
"agents",
|
|
74
|
+
"mcp",
|
|
75
|
+
"entry-instructions",
|
|
76
|
+
"compatibility-isolation"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": [
|
|
82
|
+
"skills",
|
|
83
|
+
"agents",
|
|
84
|
+
"mcp",
|
|
85
|
+
"entryInstructions",
|
|
86
|
+
"requires"
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": false
|
|
89
|
+
},
|
|
90
|
+
"claude": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"skills": {
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{
|
|
96
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "null"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"agents": {
|
|
104
|
+
"anyOf": [
|
|
105
|
+
{
|
|
106
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "null"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"mcp": {
|
|
114
|
+
"anyOf": [
|
|
115
|
+
{
|
|
116
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "null"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"entryInstructions": {
|
|
124
|
+
"anyOf": [
|
|
125
|
+
{
|
|
126
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "null"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"requires": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"uniqueItems": true,
|
|
136
|
+
"items": {
|
|
137
|
+
"enum": [
|
|
138
|
+
"skills",
|
|
139
|
+
"agents",
|
|
140
|
+
"mcp",
|
|
141
|
+
"entry-instructions",
|
|
142
|
+
"compatibility-isolation"
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": [
|
|
148
|
+
"skills",
|
|
149
|
+
"agents",
|
|
150
|
+
"mcp",
|
|
151
|
+
"entryInstructions",
|
|
152
|
+
"requires"
|
|
153
|
+
],
|
|
154
|
+
"additionalProperties": false
|
|
155
|
+
},
|
|
156
|
+
"kimi": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"properties": {
|
|
159
|
+
"skills": {
|
|
160
|
+
"anyOf": [
|
|
161
|
+
{
|
|
162
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"type": "null"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"agents": {
|
|
170
|
+
"anyOf": [
|
|
171
|
+
{
|
|
172
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "null"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"mcp": {
|
|
180
|
+
"anyOf": [
|
|
181
|
+
{
|
|
182
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "null"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"entryInstructions": {
|
|
190
|
+
"anyOf": [
|
|
191
|
+
{
|
|
192
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "null"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"requires": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"uniqueItems": true,
|
|
202
|
+
"items": {
|
|
203
|
+
"enum": [
|
|
204
|
+
"skills",
|
|
205
|
+
"agents",
|
|
206
|
+
"mcp",
|
|
207
|
+
"entry-instructions",
|
|
208
|
+
"compatibility-isolation"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": [
|
|
214
|
+
"skills",
|
|
215
|
+
"agents",
|
|
216
|
+
"mcp",
|
|
217
|
+
"entryInstructions",
|
|
218
|
+
"requires"
|
|
219
|
+
],
|
|
220
|
+
"additionalProperties": false
|
|
221
|
+
},
|
|
222
|
+
"grok": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"properties": {
|
|
225
|
+
"skills": {
|
|
226
|
+
"anyOf": [
|
|
227
|
+
{
|
|
228
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "null"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
"agents": {
|
|
236
|
+
"anyOf": [
|
|
237
|
+
{
|
|
238
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"type": "null"
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
"mcp": {
|
|
246
|
+
"anyOf": [
|
|
247
|
+
{
|
|
248
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"type": "null"
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"entryInstructions": {
|
|
256
|
+
"anyOf": [
|
|
257
|
+
{
|
|
258
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "null"
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
"requires": {
|
|
266
|
+
"type": "array",
|
|
267
|
+
"uniqueItems": true,
|
|
268
|
+
"items": {
|
|
269
|
+
"enum": [
|
|
270
|
+
"skills",
|
|
271
|
+
"agents",
|
|
272
|
+
"mcp",
|
|
273
|
+
"entry-instructions",
|
|
274
|
+
"compatibility-isolation"
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"required": [
|
|
280
|
+
"skills",
|
|
281
|
+
"agents",
|
|
282
|
+
"mcp",
|
|
283
|
+
"entryInstructions",
|
|
284
|
+
"requires"
|
|
285
|
+
],
|
|
286
|
+
"additionalProperties": false
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"additionalProperties": false
|
|
290
|
+
},
|
|
291
|
+
"workspaceProfiles": {
|
|
292
|
+
"type": "object",
|
|
293
|
+
"propertyNames": {
|
|
294
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}(?![\\s\\S])"
|
|
295
|
+
},
|
|
296
|
+
"additionalProperties": {
|
|
297
|
+
"$ref": "common.schema.json#/$defs/layout"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"agentsDocument": {
|
|
301
|
+
"$ref": "common.schema.json#/$defs/agentsDocument"
|
|
302
|
+
},
|
|
303
|
+
"inventory": {
|
|
304
|
+
"$ref": "common.schema.json#/$defs/relativePath"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"required": [
|
|
308
|
+
"schemaVersion",
|
|
309
|
+
"id",
|
|
310
|
+
"version",
|
|
311
|
+
"resources",
|
|
312
|
+
"providers",
|
|
313
|
+
"agentsDocument",
|
|
314
|
+
"inventory"
|
|
315
|
+
],
|
|
316
|
+
"additionalProperties": false
|
|
317
|
+
}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"activation": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["recovery", "recoveryHash", "journalHead"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"recovery": {"type": "string", "pattern": "^\\.pipeline/transactions/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/recovery\\.json(?![\\s\\S])"},
|
|
11
|
+
"recoveryHash": {"$ref": "#/$defs/digest"},
|
|
12
|
+
"journalHead": {
|
|
13
|
+
"type": "object", "additionalProperties": false, "required": ["sequence", "hash"],
|
|
14
|
+
"properties": {"sequence": {"type": "integer", "minimum": 1, "maximum": 20001}, "hash": {"$ref": "#/$defs/digest"}}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"schemaVersion": {
|
|
19
|
+
"const": 1
|
|
20
|
+
},
|
|
21
|
+
"workspace": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 1024
|
|
25
|
+
},
|
|
26
|
+
"status": {
|
|
27
|
+
"enum": [
|
|
28
|
+
"ready",
|
|
29
|
+
"not-installed",
|
|
30
|
+
"drift",
|
|
31
|
+
"conflict",
|
|
32
|
+
"unsupported",
|
|
33
|
+
"needs-reconciliation"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"runtime": {
|
|
37
|
+
"enum": [
|
|
38
|
+
"not-run",
|
|
39
|
+
"pass",
|
|
40
|
+
"fail"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"active": {
|
|
44
|
+
"anyOf": [
|
|
45
|
+
{
|
|
46
|
+
"$ref": "#/$defs/deployment"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "null"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"pending": {
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "null"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": [
|
|
66
|
+
"schemaVersion",
|
|
67
|
+
"workspace",
|
|
68
|
+
"status",
|
|
69
|
+
"runtime",
|
|
70
|
+
"active",
|
|
71
|
+
"pending"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"$defs": {
|
|
75
|
+
"digest": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
78
|
+
},
|
|
79
|
+
"relative": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"maxLength": 240,
|
|
82
|
+
"pattern": "^(?!/)[A-Za-z0-9_.-][A-Za-z0-9_. /-]*(?![\\s\\S])"
|
|
83
|
+
},
|
|
84
|
+
"origin": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"path": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1,
|
|
90
|
+
"maxLength": 1024
|
|
91
|
+
},
|
|
92
|
+
"base": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1,
|
|
95
|
+
"maxLength": 1024
|
|
96
|
+
},
|
|
97
|
+
"digest": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
100
|
+
},
|
|
101
|
+
"resolvedSource": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1,
|
|
104
|
+
"maxLength": 1024
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"path",
|
|
109
|
+
"base",
|
|
110
|
+
"digest",
|
|
111
|
+
"resolvedSource"
|
|
112
|
+
],
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
},
|
|
115
|
+
"snapshot": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"source": {
|
|
119
|
+
"$ref": "common.schema.json#/$defs/gitSource"
|
|
120
|
+
},
|
|
121
|
+
"commit": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})(?![\\s\\S])"
|
|
124
|
+
},
|
|
125
|
+
"path": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"maxLength": 240,
|
|
128
|
+
"pattern": "^(?!/)[A-Za-z0-9_.-][A-Za-z0-9_. /-]*(?![\\s\\S])"
|
|
129
|
+
},
|
|
130
|
+
"digest": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
133
|
+
},
|
|
134
|
+
"inventoryDigest": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
137
|
+
},
|
|
138
|
+
"origin": {
|
|
139
|
+
"$ref": "#/$defs/origin"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"source",
|
|
144
|
+
"commit",
|
|
145
|
+
"path",
|
|
146
|
+
"digest",
|
|
147
|
+
"inventoryDigest",
|
|
148
|
+
"origin"
|
|
149
|
+
],
|
|
150
|
+
"additionalProperties": false
|
|
151
|
+
},
|
|
152
|
+
"ownership": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"path": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"maxLength": 240,
|
|
158
|
+
"pattern": "^(?!/)[A-Za-z0-9_.-][A-Za-z0-9_. /-]*(?![\\s\\S])"
|
|
159
|
+
},
|
|
160
|
+
"kind": {
|
|
161
|
+
"enum": [
|
|
162
|
+
"file",
|
|
163
|
+
"field"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"pointer": {
|
|
167
|
+
"anyOf": [
|
|
168
|
+
{
|
|
169
|
+
"type": "string",
|
|
170
|
+
"pattern": "^(?:/(?:[^~/]|~[01])*)+(?![\\s\\S])",
|
|
171
|
+
"maxLength": 1024
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "null"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"owner": {
|
|
179
|
+
"enum": [
|
|
180
|
+
"shared",
|
|
181
|
+
"codex",
|
|
182
|
+
"claude",
|
|
183
|
+
"kimi",
|
|
184
|
+
"grok"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"beforeHash": {
|
|
188
|
+
"anyOf": [
|
|
189
|
+
{
|
|
190
|
+
"type": "string",
|
|
191
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "null"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"managedHash": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
201
|
+
},
|
|
202
|
+
"backup": {
|
|
203
|
+
"anyOf": [
|
|
204
|
+
{
|
|
205
|
+
"type": "string",
|
|
206
|
+
"maxLength": 240,
|
|
207
|
+
"pattern": "^(?!/)[A-Za-z0-9_.-][A-Za-z0-9_. /-]*(?![\\s\\S])"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"type": "null"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"required": [
|
|
216
|
+
"path",
|
|
217
|
+
"kind",
|
|
218
|
+
"pointer",
|
|
219
|
+
"owner",
|
|
220
|
+
"beforeHash",
|
|
221
|
+
"managedHash",
|
|
222
|
+
"backup"
|
|
223
|
+
],
|
|
224
|
+
"additionalProperties": false
|
|
225
|
+
},
|
|
226
|
+
"deployment": {
|
|
227
|
+
"type": "object",
|
|
228
|
+
"properties": {
|
|
229
|
+
"bundles": {"$ref": "common.schema.json#/$defs/bundles"},
|
|
230
|
+
"id": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"minLength": 1,
|
|
233
|
+
"maxLength": 1024
|
|
234
|
+
},
|
|
235
|
+
"pipelineId": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}(?![\\s\\S])"
|
|
238
|
+
},
|
|
239
|
+
"version": {
|
|
240
|
+
"$ref": "pipeline.schema.json#/properties/version"
|
|
241
|
+
},
|
|
242
|
+
"snapshot": {
|
|
243
|
+
"$ref": "#/$defs/snapshot"
|
|
244
|
+
},
|
|
245
|
+
"layout": {
|
|
246
|
+
"$ref": "common.schema.json#/$defs/layout"
|
|
247
|
+
},
|
|
248
|
+
"providers": {
|
|
249
|
+
"type": "array",
|
|
250
|
+
"items": {
|
|
251
|
+
"enum": [
|
|
252
|
+
"codex",
|
|
253
|
+
"claude",
|
|
254
|
+
"kimi",
|
|
255
|
+
"grok"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"minItems": 1,
|
|
259
|
+
"uniqueItems": true
|
|
260
|
+
},
|
|
261
|
+
"agentsDocument": {
|
|
262
|
+
"$ref": "common.schema.json#/$defs/agentsDocument"
|
|
263
|
+
},
|
|
264
|
+
"adapterVersions": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"minProperties": 1,
|
|
267
|
+
"propertyNames": {
|
|
268
|
+
"enum": [
|
|
269
|
+
"codex",
|
|
270
|
+
"claude",
|
|
271
|
+
"kimi",
|
|
272
|
+
"grok"
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
"additionalProperties": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"minLength": 1,
|
|
278
|
+
"maxLength": 1024
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"owned": {
|
|
282
|
+
"type": "array",
|
|
283
|
+
"maxItems": 10000,
|
|
284
|
+
"items": {
|
|
285
|
+
"$ref": "#/$defs/ownership"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"required": [
|
|
290
|
+
"id",
|
|
291
|
+
"pipelineId",
|
|
292
|
+
"version",
|
|
293
|
+
"snapshot",
|
|
294
|
+
"layout",
|
|
295
|
+
"providers",
|
|
296
|
+
"adapterVersions",
|
|
297
|
+
"owned"
|
|
298
|
+
],
|
|
299
|
+
"additionalProperties": false
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"bundles": {"$ref": "common.schema.json#/$defs/bundleIds"},
|
|
6
|
+
"schemaVersion": {
|
|
7
|
+
"const": 1
|
|
8
|
+
},
|
|
9
|
+
"pipeline": {
|
|
10
|
+
"$ref": "common.schema.json#/$defs/gitSource"
|
|
11
|
+
},
|
|
12
|
+
"providers": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 0,
|
|
15
|
+
"uniqueItems": true,
|
|
16
|
+
"items": {
|
|
17
|
+
"enum": [
|
|
18
|
+
"codex",
|
|
19
|
+
"claude",
|
|
20
|
+
"kimi",
|
|
21
|
+
"grok"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"layout": {
|
|
26
|
+
"$ref": "common.schema.json#/$defs/layout"
|
|
27
|
+
},
|
|
28
|
+
"profile": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}(?![\\s\\S])"
|
|
31
|
+
},
|
|
32
|
+
"agentsDocument": {
|
|
33
|
+
"$ref": "common.schema.json#/$defs/agentsDocument"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"schemaVersion",
|
|
38
|
+
"pipeline"
|
|
39
|
+
],
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{"required": ["providers"], "properties": {"providers": {"minItems": 1}}},
|
|
43
|
+
{"required": ["bundles"]}
|
|
44
|
+
],
|
|
45
|
+
"oneOf": [
|
|
46
|
+
{
|
|
47
|
+
"required": [
|
|
48
|
+
"layout"
|
|
49
|
+
],
|
|
50
|
+
"not": {
|
|
51
|
+
"required": [
|
|
52
|
+
"profile"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"required": [
|
|
58
|
+
"profile"
|
|
59
|
+
],
|
|
60
|
+
"not": {
|
|
61
|
+
"required": [
|
|
62
|
+
"layout"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
package/src/cli.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {runCli} from './commands/dispatch.js';
|
|
3
|
+
import {providerRegistry} from './providers/registry.js';
|
|
4
|
+
const write=stream=>text=>new Promise((resolve,reject)=>stream.write(text,error=>error?reject(error):resolve()));
|
|
5
|
+
// Prevent an unhandled pipe error; write callbacks report delivery failures.
|
|
6
|
+
process.stdout.on('error',()=>{});process.stderr.on('error',()=>{});
|
|
7
|
+
process.exitCode=await runCli(process.argv.slice(2),{stdout:write(process.stdout),stderr:write(process.stderr),registry:providerRegistry});
|