owlrunkit 0.15.0 → 0.16.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/CHANGELOG.md +100 -0
- package/README.md +274 -66
- package/integrations/codex/skills/owlcoda-runkit/SKILL.md +223 -117
- package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +3 -3
- package/integrations/codex/skills/owlcoda-runkit/assets/templates/ready-for-commit-request.json +2 -2
- package/package.json +2 -2
- package/packages/attest/distribution-manifest-v1.json +10 -0
- package/packages/attest/src/quick.mjs +10 -0
- package/registry-release-policy-v1.json +8 -2
- package/sbom.spdx.json +5 -5
- package/scripts/runkit-contract/assurance-router.mjs +119 -0
- package/scripts/runkit-contract/core-contract.mjs +250 -115
- package/scripts/runkit-contract/core-successor.mjs +2043 -0
- package/scripts/runkit-contract/deployment-workflow.mjs +2040 -0
- package/scripts/runkit-contract/finalize.mjs +242 -21
- package/scripts/runkit-contract/fleet-discovery.mjs +456 -0
- package/scripts/runkit-contract/formal-workflow.mjs +850 -0
- package/scripts/runkit-contract/human-status.mjs +553 -0
- package/scripts/runkit-contract/inspect-presentation.mjs +25 -8
- package/scripts/runkit-contract/install-codex-skill.mjs +73 -30
- package/scripts/runkit-contract/lease-lifecycle.mjs +8 -2
- package/scripts/runkit-contract/lifecycle-orchestration.mjs +135 -12
- package/scripts/runkit-contract/onboarding-doctor.mjs +43 -90
- package/scripts/runkit-contract/owner-authority-trust.mjs +230 -0
- package/scripts/runkit-contract/owner-deployment-decision.mjs +385 -0
- package/scripts/runkit-contract/profile-onboarding.mjs +841 -13
- package/scripts/runkit-contract/project-cli-resolver.mjs +701 -0
- package/scripts/runkit-contract/project-control-parser.mjs +830 -0
- package/scripts/runkit-contract/project-control-state.mjs +28 -0
- package/scripts/runkit-contract/provenance-common.mjs +19 -2
- package/scripts/runkit-contract/ready-for-commit.mjs +330 -18
- package/scripts/runkit-contract/remote-deployment.mjs +1596 -0
- package/scripts/runkit-contract/remote-process-adapter.mjs +177 -0
- package/scripts/runkit-contract/runkit-bootstrap.mjs +131 -0
- package/scripts/runkit-contract/runkit-cli.mjs +1097 -21
- package/scripts/runkit-contract/schemas/assurance-route-v1.schema.json +26 -0
- package/scripts/runkit-contract/schemas/core-successor-batch-receipt-v1.schema.json +126 -0
- package/scripts/runkit-contract/schemas/core-successor-plan-v1.schema.json +155 -0
- package/scripts/runkit-contract/schemas/core-successor-project-success-receipt-v1.schema.json +72 -0
- package/scripts/runkit-contract/schemas/deployment-execute-request-v1.schema.json +63 -0
- package/scripts/runkit-contract/schemas/deployment-lineage-v1.schema.json +292 -0
- package/scripts/runkit-contract/schemas/deployment-prepare-receipt-v1.schema.json +140 -0
- package/scripts/runkit-contract/schemas/fleet-discovery-v1.schema.json +31 -0
- package/scripts/runkit-contract/schemas/fleet-manifest-v1.schema.json +20 -0
- package/scripts/runkit-contract/schemas/fleet-root-registry-v1.schema.json +34 -0
- package/scripts/runkit-contract/schemas/human-status-v1.schema.json +102 -0
- package/scripts/runkit-contract/schemas/owner-authority-trust-v1.schema.json +66 -0
- package/scripts/runkit-contract/schemas/owner-deployment-authority-v1.schema.json +46 -0
- package/scripts/runkit-contract/schemas/owner-deployment-authority-v2.schema.json +94 -0
- package/scripts/runkit-contract/schemas/owner-deployment-decision-v1.schema.json +102 -0
- package/scripts/runkit-contract/schemas/owner-migration-authority-v1.schema.json +33 -0
- package/scripts/runkit-contract/schemas/owner-migration-authority-v2.schema.json +67 -0
- package/scripts/runkit-contract/schemas/profile-apply-receipt-v1.schema.json +32 -0
- package/scripts/runkit-contract/schemas/profile-detection-v2.schema.json +145 -0
- package/scripts/runkit-contract/schemas/ready-for-commit-v2.schema.json +37 -0
- package/scripts/runkit-contract/schemas/remote-deployment-manifest-v1.schema.json +379 -0
- package/scripts/runkit-contract/schemas/remote-deployment-result-v1.schema.json +153 -0
- package/scripts/runkit-contract/schemas/remote-deployment-stage-journal-v1.schema.json +183 -0
- package/scripts/runkit-contract/schemas/remote-target-v1.schema.json +32 -0
- package/scripts/runkit-contract/schemas/source-candidate-v2.schema.json +152 -0
- package/scripts/runkit-contract/schemas/verification-receipt-v2.schema.json +13 -0
- package/scripts/runkit-contract/snapshot.mjs +1 -1
- package/scripts/runkit-contract/source-candidate.mjs +1382 -0
- package/scripts/runkit-contract/ssh-remote-adapter.mjs +1184 -0
- package/scripts/runkit-contract/sync-core016-release-identity.mjs +161 -0
- package/scripts/runkit-contract/templates/assurance-request.json +13 -0
- package/scripts/runkit-contract/templates/core-successor-owner-authority.json +15 -0
- package/scripts/runkit-contract/templates/deployment-execute-request.json +39 -0
- package/scripts/runkit-contract/templates/deployment-owner-authority.json +23 -0
- package/scripts/runkit-contract/templates/deployment-owner-decision.json +26 -0
- package/scripts/runkit-contract/templates/fleet-manifest.json +8 -0
- package/scripts/runkit-contract/templates/fleet-root-registry.json +8 -0
- package/scripts/runkit-contract/templates/owner-authority-trust.json +16 -0
- package/scripts/runkit-contract/templates/ready-for-commit-request.json +2 -2
- package/scripts/runkit-contract/templates/remote-deployment-manifest.json +108 -0
- package/scripts/runkit-contract/verification-receipt-gate.mjs +28 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://owlcoda.dev/schemas/runkit/remote-deployment-manifest-v1.json",
|
|
4
|
+
"title": "OwlCoda RunKit Remote Deployment Manifest V1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "deploymentId", "deploymentLineageSha256", "mode", "target", "adapter", "credentialRef", "artifact", "upload", "priorDeployment", "expectedRemoteFiles", "deletionAllowlist"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "OwlCodaRunKitRemoteDeploymentManifestV1" },
|
|
10
|
+
"deploymentId": { "$ref": "#/$defs/id" },
|
|
11
|
+
"deploymentLineageSha256": {
|
|
12
|
+
"oneOf": [
|
|
13
|
+
{ "type": "null" },
|
|
14
|
+
{ "$ref": "#/$defs/hash" }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"mode": { "enum": ["first", "update"] },
|
|
18
|
+
"ownerDecision": { "$ref": "#/$defs/ownerDecisionBinding" },
|
|
19
|
+
"serviceActivation": { "type": "boolean" },
|
|
20
|
+
"baselineCut": { "type": "boolean" },
|
|
21
|
+
"target": { "$ref": "#/$defs/target" },
|
|
22
|
+
"adapter": { "$ref": "#/$defs/adapter" },
|
|
23
|
+
"credentialRef": { "type": "string", "pattern": "^(?:agent|keychain|vault):[A-Za-z0-9][A-Za-z0-9._/-]*$" },
|
|
24
|
+
"artifact": { "$ref": "#/$defs/artifact" },
|
|
25
|
+
"upload": { "$ref": "#/$defs/upload" },
|
|
26
|
+
"priorDeployment": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/prior" }] },
|
|
27
|
+
"expectedRemoteFiles": { "type": "array", "items": { "$ref": "#/$defs/remoteFile" } },
|
|
28
|
+
"deletionAllowlist": { "type": "array", "items": { "$ref": "#/$defs/deletion" } }
|
|
29
|
+
},
|
|
30
|
+
"$defs": {
|
|
31
|
+
"id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$" },
|
|
32
|
+
"hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
33
|
+
"ownerDecisionBinding": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["decisionId", "decisionVersion", "decisionSha256", "deploymentMode", "existingProjectAssets", "legacyRollbackAllowed", "dataAuthority", "serviceActivationAuthorized", "baselineCutAuthorized", "destructiveScope"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"decisionId": { "$ref": "#/$defs/id" },
|
|
39
|
+
"decisionVersion": { "type": "integer", "minimum": 1 },
|
|
40
|
+
"decisionSha256": { "$ref": "#/$defs/hash" },
|
|
41
|
+
"deploymentMode": { "enum": ["clean_install", "in_place_update"] },
|
|
42
|
+
"existingProjectAssets": { "enum": ["preserve", "replace", "remove"] },
|
|
43
|
+
"legacyRollbackAllowed": { "type": "boolean" },
|
|
44
|
+
"dataAuthority": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["mode", "sourceRef"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"mode": { "enum": ["preserve_existing", "replace_from_artifact", "initialize_new"] },
|
|
50
|
+
"sourceRef": { "type": "string", "minLength": 1 }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"serviceActivationAuthorized": { "type": "boolean" },
|
|
54
|
+
"baselineCutAuthorized": { "type": "boolean" },
|
|
55
|
+
"destructiveScope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"target": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["schemaVersion", "targetId", "environment", "host", "port", "user", "hostKeySha256", "machineIdentitySha256"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"schemaVersion": { "const": "OwlCodaRunKitRemoteTargetV1" },
|
|
64
|
+
"targetId": { "$ref": "#/$defs/id" },
|
|
65
|
+
"environment": { "$ref": "#/$defs/id" },
|
|
66
|
+
"host": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?|[0-9A-Fa-f:]+)$"
|
|
69
|
+
},
|
|
70
|
+
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
|
71
|
+
"user": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9._-]*$" },
|
|
72
|
+
"hostKeySha256": { "$ref": "#/$defs/hash" },
|
|
73
|
+
"machineIdentitySha256": { "$ref": "#/$defs/hash" }
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"adapter": {
|
|
77
|
+
"oneOf": [
|
|
78
|
+
{ "$ref": "#/$defs/legacyProcessAdapter" },
|
|
79
|
+
{ "$ref": "#/$defs/processAdapter" },
|
|
80
|
+
{ "$ref": "#/$defs/builtinSshAdapter" }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"legacyProcessAdapter": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": ["adapterId", "version", "executable", "sha256"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"adapterId": { "$ref": "#/$defs/id" },
|
|
89
|
+
"version": { "type": "string", "minLength": 1 },
|
|
90
|
+
"executable": { "type": "string", "pattern": "^/" },
|
|
91
|
+
"sha256": { "$ref": "#/$defs/hash" }
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"processAdapter": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["kind", "adapterId", "version", "executable", "sha256"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"kind": { "const": "process" },
|
|
100
|
+
"adapterId": { "$ref": "#/$defs/id" },
|
|
101
|
+
"version": { "type": "string", "minLength": 1 },
|
|
102
|
+
"executable": { "type": "string", "pattern": "^/" },
|
|
103
|
+
"sha256": { "$ref": "#/$defs/hash" }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"builtinSshAdapter": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["kind", "adapterId", "version", "executable", "sha256", "knownHostsPath", "sshExecutable", "sshExecutableSha256", "remoteHelper", "authentication", "stageContracts"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"kind": { "const": "builtin_ssh" },
|
|
112
|
+
"adapterId": { "const": "builtin-ssh-v1" },
|
|
113
|
+
"version": { "const": "1.0.0" },
|
|
114
|
+
"executable": { "type": "string", "pattern": "^/" },
|
|
115
|
+
"sha256": { "$ref": "#/$defs/hash" },
|
|
116
|
+
"knownHostsPath": { "type": "string", "pattern": "^/" },
|
|
117
|
+
"sshExecutable": { "type": "string", "pattern": "^/" },
|
|
118
|
+
"sshExecutableSha256": { "$ref": "#/$defs/hash" },
|
|
119
|
+
"remoteHelper": { "$ref": "#/$defs/remoteHelper" },
|
|
120
|
+
"authentication": { "$ref": "#/$defs/sshAuthentication" },
|
|
121
|
+
"stageContracts": { "$ref": "#/$defs/sshStageContracts" }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"remoteHelper": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": ["path", "protocol", "version", "capabilities"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"path": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"pattern": "^/(?:[A-Za-z0-9._@%+=,-]+/)*owlrunkit-remote-helper$"
|
|
132
|
+
},
|
|
133
|
+
"protocol": { "const": "OwlCodaRunKitSshRemoteHelperV1" },
|
|
134
|
+
"version": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
137
|
+
},
|
|
138
|
+
"capabilities": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"prefixItems": [
|
|
141
|
+
{ "const": "execute" },
|
|
142
|
+
{ "const": "reconcile" }
|
|
143
|
+
],
|
|
144
|
+
"items": false,
|
|
145
|
+
"minItems": 2,
|
|
146
|
+
"maxItems": 2
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"sshAuthentication": {
|
|
151
|
+
"oneOf": [
|
|
152
|
+
{
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"required": ["mode", "identityFile"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"mode": { "const": "agent" },
|
|
158
|
+
"identityFile": { "type": "null" }
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"required": ["mode", "identityFile"],
|
|
165
|
+
"properties": {
|
|
166
|
+
"mode": { "const": "identity_file" },
|
|
167
|
+
"identityFile": { "$ref": "#/$defs/localFileBinding" }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"localFileBinding": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"additionalProperties": false,
|
|
175
|
+
"required": ["path", "sha256"],
|
|
176
|
+
"properties": {
|
|
177
|
+
"path": { "type": "string", "pattern": "^/" },
|
|
178
|
+
"sha256": { "$ref": "#/$defs/hash" }
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"sshStageContracts": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"additionalProperties": false,
|
|
184
|
+
"required": ["install", "systemd", "nginx", "smoke"],
|
|
185
|
+
"properties": {
|
|
186
|
+
"install": { "$ref": "#/$defs/installContract" },
|
|
187
|
+
"systemd": { "$ref": "#/$defs/systemdContract" },
|
|
188
|
+
"nginx": { "$ref": "#/$defs/nginxContract" },
|
|
189
|
+
"smoke": { "$ref": "#/$defs/smokeContract" }
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"installContract": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"required": ["archiveFormat", "releaseRoot", "currentSymlink"],
|
|
196
|
+
"properties": {
|
|
197
|
+
"archiveFormat": { "const": "tar_gzip" },
|
|
198
|
+
"releaseRoot": { "$ref": "#/$defs/remotePath" },
|
|
199
|
+
"currentSymlink": { "$ref": "#/$defs/remotePath" }
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"managedFile": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"required": ["sourcePath", "destinationPath", "sha256"],
|
|
206
|
+
"properties": {
|
|
207
|
+
"sourcePath": { "type": "string", "minLength": 1 },
|
|
208
|
+
"destinationPath": { "$ref": "#/$defs/remotePath" },
|
|
209
|
+
"sha256": { "$ref": "#/$defs/hash" }
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"systemdContract": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"additionalProperties": false,
|
|
215
|
+
"required": ["unitName", "unitFile", "daemonReload", "enable", "restart"],
|
|
216
|
+
"properties": {
|
|
217
|
+
"unitName": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.@-]*\\.service$" },
|
|
218
|
+
"unitFile": { "$ref": "#/$defs/managedFile" },
|
|
219
|
+
"daemonReload": { "type": "boolean" },
|
|
220
|
+
"enable": { "type": "boolean" },
|
|
221
|
+
"restart": { "type": "boolean" }
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"nginxContract": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"required": ["siteName", "configFile", "enabledLinkPath", "configTest", "reload"],
|
|
228
|
+
"properties": {
|
|
229
|
+
"siteName": { "$ref": "#/$defs/id" },
|
|
230
|
+
"configFile": { "$ref": "#/$defs/managedFile" },
|
|
231
|
+
"enabledLinkPath": { "$ref": "#/$defs/remotePath" },
|
|
232
|
+
"configTest": { "type": "boolean" },
|
|
233
|
+
"reload": { "type": "boolean" }
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"smokeContract": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"additionalProperties": false,
|
|
239
|
+
"required": ["checks"],
|
|
240
|
+
"properties": {
|
|
241
|
+
"checks": {
|
|
242
|
+
"type": "array",
|
|
243
|
+
"minItems": 1,
|
|
244
|
+
"items": { "$ref": "#/$defs/smokeCheck" }
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"smokeCheck": {
|
|
249
|
+
"oneOf": [
|
|
250
|
+
{
|
|
251
|
+
"type": "object",
|
|
252
|
+
"additionalProperties": false,
|
|
253
|
+
"required": ["checkId", "kind", "unitName"],
|
|
254
|
+
"properties": {
|
|
255
|
+
"checkId": { "$ref": "#/$defs/id" },
|
|
256
|
+
"kind": { "const": "systemd_active" },
|
|
257
|
+
"unitName": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.@-]*\\.service$" }
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "object",
|
|
262
|
+
"additionalProperties": false,
|
|
263
|
+
"required": ["checkId", "kind", "url", "expectedStatus"],
|
|
264
|
+
"properties": {
|
|
265
|
+
"checkId": { "$ref": "#/$defs/id" },
|
|
266
|
+
"kind": { "const": "http" },
|
|
267
|
+
"url": { "type": "string", "pattern": "^http://(?:127\\.0\\.0\\.1|localhost|\\[::1\\])(?::[0-9]+)?/" },
|
|
268
|
+
"expectedStatus": { "type": "integer", "minimum": 100, "maximum": 599 }
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"remotePath": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"pattern": "^/(?:[A-Za-z0-9._@%+=,-]+/)*[A-Za-z0-9._@%+=,-]+$"
|
|
276
|
+
},
|
|
277
|
+
"artifact": {
|
|
278
|
+
"type": "object",
|
|
279
|
+
"additionalProperties": false,
|
|
280
|
+
"required": ["path", "sha256", "size", "mediaType"],
|
|
281
|
+
"properties": {
|
|
282
|
+
"path": { "type": "string", "minLength": 1 },
|
|
283
|
+
"sha256": { "$ref": "#/$defs/hash" },
|
|
284
|
+
"size": { "type": "integer", "minimum": 0 },
|
|
285
|
+
"mediaType": { "type": "string", "pattern": "^[A-Za-z0-9.+-]+/[A-Za-z0-9.+-]+$" }
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"upload": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"additionalProperties": false,
|
|
291
|
+
"required": ["remotePath", "createOnly"],
|
|
292
|
+
"properties": {
|
|
293
|
+
"remotePath": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"pattern": "^/(?:[A-Za-z0-9._@%+=,-]+/)*[A-Za-z0-9._@%+=,-]+$"
|
|
296
|
+
},
|
|
297
|
+
"createOnly": { "const": true }
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"prior": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"additionalProperties": false,
|
|
303
|
+
"required": ["receiptSha256", "artifactSha256"],
|
|
304
|
+
"properties": { "receiptSha256": { "$ref": "#/$defs/hash" }, "artifactSha256": { "$ref": "#/$defs/hash" } }
|
|
305
|
+
},
|
|
306
|
+
"remoteFile": {
|
|
307
|
+
"type": "object",
|
|
308
|
+
"additionalProperties": false,
|
|
309
|
+
"required": ["path", "sha256"],
|
|
310
|
+
"properties": {
|
|
311
|
+
"path": {
|
|
312
|
+
"type": "string",
|
|
313
|
+
"pattern": "^/(?:[A-Za-z0-9._@%+=,-]+/)*[A-Za-z0-9._@%+=,-]+$"
|
|
314
|
+
},
|
|
315
|
+
"sha256": { "$ref": "#/$defs/hash" }
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"deletion": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"additionalProperties": false,
|
|
321
|
+
"required": ["path", "priorSha256"],
|
|
322
|
+
"properties": {
|
|
323
|
+
"path": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"pattern": "^/(?:[A-Za-z0-9._@%+=,-]+/)*[A-Za-z0-9._@%+=,-]+$"
|
|
326
|
+
},
|
|
327
|
+
"priorSha256": { "$ref": "#/$defs/hash" }
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"examples": [{
|
|
332
|
+
"schemaVersion": "OwlCodaRunKitRemoteDeploymentManifestV1",
|
|
333
|
+
"deploymentId": "deploy-001",
|
|
334
|
+
"deploymentLineageSha256": null,
|
|
335
|
+
"mode": "first",
|
|
336
|
+
"target": { "schemaVersion": "OwlCodaRunKitRemoteTargetV1", "targetId": "vm-01", "environment": "production", "host": "deploy.example.invalid", "port": 22, "user": "deploy", "hostKeySha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "machineIdentitySha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" },
|
|
337
|
+
"adapter": {
|
|
338
|
+
"kind": "builtin_ssh",
|
|
339
|
+
"adapterId": "builtin-ssh-v1",
|
|
340
|
+
"version": "1.0.0",
|
|
341
|
+
"executable": "/absolute/path/to/owlrunkit/scripts/runkit-contract/ssh-remote-adapter.mjs",
|
|
342
|
+
"sha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
|
|
343
|
+
"knownHostsPath": "/absolute/path/to/project/deploy/known_hosts",
|
|
344
|
+
"sshExecutable": "/usr/bin/ssh",
|
|
345
|
+
"sshExecutableSha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
|
346
|
+
"remoteHelper": {
|
|
347
|
+
"path": "/usr/local/libexec/owlrunkit-remote-helper",
|
|
348
|
+
"protocol": "OwlCodaRunKitSshRemoteHelperV1",
|
|
349
|
+
"version": "1.0.0",
|
|
350
|
+
"capabilities": ["execute", "reconcile"]
|
|
351
|
+
},
|
|
352
|
+
"authentication": { "mode": "agent", "identityFile": null },
|
|
353
|
+
"stageContracts": {
|
|
354
|
+
"install": { "archiveFormat": "tar_gzip", "releaseRoot": "/opt/owlapp/releases", "currentSymlink": "/opt/owlapp/current" },
|
|
355
|
+
"systemd": {
|
|
356
|
+
"unitName": "owlapp.service",
|
|
357
|
+
"unitFile": { "sourcePath": "deploy/owlapp.service", "destinationPath": "/etc/systemd/system/owlapp.service", "sha256": "1111111111111111111111111111111111111111111111111111111111111111" },
|
|
358
|
+
"daemonReload": true,
|
|
359
|
+
"enable": true,
|
|
360
|
+
"restart": true
|
|
361
|
+
},
|
|
362
|
+
"nginx": {
|
|
363
|
+
"siteName": "owlapp",
|
|
364
|
+
"configFile": { "sourcePath": "deploy/owlapp.nginx.conf", "destinationPath": "/etc/nginx/sites-available/owlapp.conf", "sha256": "2222222222222222222222222222222222222222222222222222222222222222" },
|
|
365
|
+
"enabledLinkPath": "/etc/nginx/sites-enabled/owlapp.conf",
|
|
366
|
+
"configTest": true,
|
|
367
|
+
"reload": true
|
|
368
|
+
},
|
|
369
|
+
"smoke": { "checks": [{ "checkId": "service-active", "kind": "systemd_active", "unitName": "owlapp.service" }] }
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"credentialRef": "agent:owlcoda/deploy",
|
|
373
|
+
"artifact": { "path": "dist/release.tgz", "sha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "size": 1234, "mediaType": "application/gzip" },
|
|
374
|
+
"upload": { "remotePath": "/srv/releases/release.tgz", "createOnly": true },
|
|
375
|
+
"priorDeployment": null,
|
|
376
|
+
"expectedRemoteFiles": [],
|
|
377
|
+
"deletionAllowlist": []
|
|
378
|
+
}]
|
|
379
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://owlcoda.dev/schemas/runkit/remote-deployment-result-v1.json",
|
|
4
|
+
"title": "OwlCoda RunKit Remote Deployment Result V1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "deploymentId", "deploymentLineageSha256", "mode", "target", "adapter", "artifact", "status", "completedStages", "stoppedAtStage", "stageReceipts", "deletionAllowlistSha256", "authorizationGranted", "resultSha256"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "OwlCodaRunKitRemoteDeploymentResultV1" },
|
|
10
|
+
"deploymentId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"deploymentLineageSha256": { "$ref": "#/$defs/hash" },
|
|
12
|
+
"mode": { "enum": ["first", "update"] },
|
|
13
|
+
"target": { "$ref": "#/$defs/target" },
|
|
14
|
+
"adapter": { "$ref": "#/$defs/adapter" },
|
|
15
|
+
"artifact": { "$ref": "#/$defs/artifact" },
|
|
16
|
+
"status": { "enum": ["deployed", "failed", "reconciliation_required"] },
|
|
17
|
+
"completedStages": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/stage" } },
|
|
18
|
+
"stoppedAtStage": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/stage" }] },
|
|
19
|
+
"failureCode": { "type": "string", "minLength": 1 },
|
|
20
|
+
"stageReceipts": { "type": "array", "items": { "$ref": "#/$defs/stageReceipt" } },
|
|
21
|
+
"deletionAllowlistSha256": { "$ref": "#/$defs/hash" },
|
|
22
|
+
"authorizationGranted": { "const": false },
|
|
23
|
+
"resultSha256": { "$ref": "#/$defs/hash" }
|
|
24
|
+
},
|
|
25
|
+
"$defs": {
|
|
26
|
+
"hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
27
|
+
"stage": { "enum": ["identity_preflight", "upload", "verify_remote_hashes", "install", "service", "proxy", "smoke"] },
|
|
28
|
+
"target": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["schemaVersion", "targetId", "environment", "host", "port", "user", "hostKeySha256", "machineIdentitySha256"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"schemaVersion": { "const": "OwlCodaRunKitRemoteTargetV1" },
|
|
34
|
+
"targetId": { "type": "string", "minLength": 1 },
|
|
35
|
+
"environment": { "type": "string", "minLength": 1 },
|
|
36
|
+
"host": { "type": "string", "minLength": 1 },
|
|
37
|
+
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
|
38
|
+
"user": { "type": "string", "minLength": 1 },
|
|
39
|
+
"hostKeySha256": { "$ref": "#/$defs/hash" },
|
|
40
|
+
"machineIdentitySha256": { "$ref": "#/$defs/hash" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"adapter": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["adapterId", "version", "executable", "sha256"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"adapterId": { "type": "string", "minLength": 1 },
|
|
49
|
+
"version": { "type": "string", "minLength": 1 },
|
|
50
|
+
"executable": { "type": "string", "pattern": "^/" },
|
|
51
|
+
"sha256": { "$ref": "#/$defs/hash" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"artifact": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": ["path", "sha256", "size", "mediaType"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"path": { "type": "string", "minLength": 1 },
|
|
60
|
+
"sha256": { "$ref": "#/$defs/hash" },
|
|
61
|
+
"size": { "type": "integer", "minimum": 0 },
|
|
62
|
+
"mediaType": { "type": "string", "minLength": 1 }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"stageReceipt": {
|
|
66
|
+
"oneOf": [
|
|
67
|
+
{
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["stage", "status", "failureCode"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"stage": { "$ref": "#/$defs/stage" },
|
|
73
|
+
"status": { "const": "failed" },
|
|
74
|
+
"failureCode": { "type": "string", "minLength": 1 },
|
|
75
|
+
"evidenceSha256": { "$ref": "#/$defs/hash" }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"required": ["stage", "status", "hostKeySha256", "machineIdentitySha256"],
|
|
82
|
+
"properties": {
|
|
83
|
+
"stage": { "const": "identity_preflight" },
|
|
84
|
+
"status": { "const": "passed" },
|
|
85
|
+
"hostKeySha256": { "$ref": "#/$defs/hash" },
|
|
86
|
+
"machineIdentitySha256": { "$ref": "#/$defs/hash" },
|
|
87
|
+
"remoteHelper": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": ["path", "protocol", "version", "capabilities"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"path": { "type": "string", "pattern": "^/" },
|
|
93
|
+
"protocol": { "const": "OwlCodaRunKitSshRemoteHelperV1" },
|
|
94
|
+
"version": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
97
|
+
},
|
|
98
|
+
"capabilities": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"prefixItems": [
|
|
101
|
+
{ "const": "execute" },
|
|
102
|
+
{ "const": "reconcile" }
|
|
103
|
+
],
|
|
104
|
+
"items": false,
|
|
105
|
+
"minItems": 2,
|
|
106
|
+
"maxItems": 2
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": ["stage", "status", "remotePath", "sha256", "size"],
|
|
116
|
+
"properties": {
|
|
117
|
+
"stage": { "enum": ["upload", "verify_remote_hashes"] },
|
|
118
|
+
"status": { "enum": ["created", "already_present", "passed"] },
|
|
119
|
+
"remotePath": { "type": "string", "pattern": "^/" },
|
|
120
|
+
"sha256": { "$ref": "#/$defs/hash" },
|
|
121
|
+
"size": { "type": "integer", "minimum": 0 }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": ["stage", "status", "evidenceSha256"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"stage": { "enum": ["install", "service", "proxy", "smoke"] },
|
|
130
|
+
"status": { "const": "passed" },
|
|
131
|
+
"evidenceSha256": { "$ref": "#/$defs/hash" }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"examples": [{
|
|
138
|
+
"schemaVersion": "OwlCodaRunKitRemoteDeploymentResultV1",
|
|
139
|
+
"deploymentId": "deploy-001",
|
|
140
|
+
"deploymentLineageSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
141
|
+
"mode": "first",
|
|
142
|
+
"target": { "schemaVersion": "OwlCodaRunKitRemoteTargetV1", "targetId": "vm-01", "environment": "production", "host": "deploy.example.invalid", "port": 22, "user": "deploy", "hostKeySha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", "machineIdentitySha256": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" },
|
|
143
|
+
"adapter": { "adapterId": "ssh-json", "version": "1.0.0", "executable": "/usr/local/bin/owlrunkit-ssh", "sha256": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" },
|
|
144
|
+
"artifact": { "path": "dist/release.tgz", "sha256": "1111111111111111111111111111111111111111111111111111111111111111", "size": 1234, "mediaType": "application/gzip" },
|
|
145
|
+
"status": "deployed",
|
|
146
|
+
"completedStages": ["identity_preflight", "upload", "verify_remote_hashes", "install", "service", "proxy", "smoke"],
|
|
147
|
+
"stoppedAtStage": null,
|
|
148
|
+
"stageReceipts": [],
|
|
149
|
+
"deletionAllowlistSha256": "2222222222222222222222222222222222222222222222222222222222222222",
|
|
150
|
+
"authorizationGranted": false,
|
|
151
|
+
"resultSha256": "3333333333333333333333333333333333333333333333333333333333333333"
|
|
152
|
+
}]
|
|
153
|
+
}
|