owlrunkit 0.18.3 → 0.19.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 (59) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +223 -52
  3. package/docs/architecture/OWLCODA_RUNKIT_0184_EXTERNAL_DELIVERY_INTAKE_PRODUCT_DECISION_20260812.md +209 -0
  4. package/docs/architecture/OWLCODA_RUNKIT_0190_CONSOLIDATED_DAILY_USE_PRODUCT_DECISION_20260812.md +97 -0
  5. package/docs/architecture/OWLCODA_RUNKIT_USAGE_MODE_SELECTION_PRODUCT_DECISION_20260811.md +8 -7
  6. package/docs/architecture/OWLCODA_RUN_KIT_CONTRACT_V0_2.md +57 -0
  7. package/integrations/codex/skills/owlcoda-runkit/SKILL.md +133 -77
  8. package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +3 -3
  9. package/integrations/codex/skills/owlcoda-runkit/references/contract-v0.2.md +57 -0
  10. package/package.json +1 -1
  11. package/packages/attest/README.md +9 -5
  12. package/packages/attest/consumer-surface-v2.json +263 -0
  13. package/packages/attest/distribution-manifest-v1.json +14 -1
  14. package/packages/attest/schemas/quick-verification-receipt-v3.schema.json +244 -0
  15. package/packages/attest/schemas/workspace-snapshot-v2.schema.json +114 -0
  16. package/packages/attest/src/dependency-environment.mjs +128 -0
  17. package/packages/attest/src/index.mjs +1 -0
  18. package/packages/attest/src/quick-receipt-contract.mjs +205 -12
  19. package/packages/attest/src/quick.mjs +45 -4
  20. package/packages/attest/src/workspace-snapshot.mjs +143 -7
  21. package/registry-release-policy-v1.json +5 -5
  22. package/sbom.spdx.json +5 -5
  23. package/scripts/runkit-contract/assurance-router.mjs +25 -6
  24. package/scripts/runkit-contract/core-contract.mjs +29 -1
  25. package/scripts/runkit-contract/efficiency-metrics.mjs +559 -0
  26. package/scripts/runkit-contract/evidence-store.mjs +130 -0
  27. package/scripts/runkit-contract/onboarding-bootstrap.mjs +685 -0
  28. package/scripts/runkit-contract/onboarding-doctor.mjs +3 -2
  29. package/scripts/runkit-contract/outcome-presentation.mjs +171 -0
  30. package/scripts/runkit-contract/profile-onboarding.mjs +285 -17
  31. package/scripts/runkit-contract/project-cli-resolver.mjs +29 -5
  32. package/scripts/runkit-contract/project-external-delivery.mjs +707 -0
  33. package/scripts/runkit-contract/quick-evidence-reuse.mjs +590 -0
  34. package/scripts/runkit-contract/quick-isolation.mjs +314 -0
  35. package/scripts/runkit-contract/quick-metrics.mjs +51 -3
  36. package/scripts/runkit-contract/quick-receipt.mjs +31 -1
  37. package/scripts/runkit-contract/quick-verify.mjs +217 -26
  38. package/scripts/runkit-contract/quick-workspace-snapshot.mjs +1 -0
  39. package/scripts/runkit-contract/runkit-bootstrap.mjs +7 -1
  40. package/scripts/runkit-contract/runkit-cli.mjs +602 -152
  41. package/scripts/runkit-contract/runtime-transition.mjs +478 -0
  42. package/scripts/runkit-contract/schemas/assurance-route-v2.schema.json +26 -0
  43. package/scripts/runkit-contract/schemas/efficiency-event-v1.schema.json +56 -0
  44. package/scripts/runkit-contract/schemas/efficiency-metrics-v1.schema.json +220 -0
  45. package/scripts/runkit-contract/schemas/external-runtime-report-v1.schema.json +125 -0
  46. package/scripts/runkit-contract/schemas/onboarding-bootstrap-plan-v1.schema.json +168 -0
  47. package/scripts/runkit-contract/schemas/onboarding-bootstrap-receipt-v1.schema.json +130 -0
  48. package/scripts/runkit-contract/schemas/outcome-summary-v1.schema.json +83 -0
  49. package/scripts/runkit-contract/schemas/profile-detection-v3.schema.json +170 -0
  50. package/scripts/runkit-contract/schemas/quick-evidence-reuse-plan-v1.schema.json +59 -0
  51. package/scripts/runkit-contract/schemas/quick-evidence-reuse-receipt-v1.schema.json +79 -0
  52. package/scripts/runkit-contract/schemas/runtime-transition-receipt-v1.schema.json +185 -0
  53. package/scripts/runkit-contract/schemas/team-project-event-v3.schema.json +146 -0
  54. package/scripts/runkit-contract/schemas/team-project-event-v4.schema.json +142 -0
  55. package/scripts/runkit-contract/schemas/team-project-status-v2.schema.json +85 -0
  56. package/scripts/runkit-contract/schemas/usage-mode-recommendation-v2.schema.json +136 -0
  57. package/scripts/runkit-contract/team-project.mjs +1172 -22
  58. package/scripts/runkit-contract/usage-mode.mjs +28 -7
  59. package/scripts/runkit-contract/verification-envelope.mjs +15 -18
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/outcome-summary-v1.json",
4
+ "title": "OwlCoda RunKit Outcome Summary V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "result",
10
+ "headline",
11
+ "proofLevel",
12
+ "acceptanceLevels",
13
+ "proven",
14
+ "notProven",
15
+ "nextAction",
16
+ "authorizationGranted"
17
+ ],
18
+ "properties": {
19
+ "schemaVersion": { "const": "OwlCodaRunKitOutcomeSummaryV1" },
20
+ "result": { "enum": ["pass", "fail", "invalidated", "indeterminate"] },
21
+ "headline": { "type": "string", "minLength": 1 },
22
+ "proofLevel": { "enum": ["captured_verification", "no_reusable_evidence"] },
23
+ "acceptanceLevels": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": [
27
+ "candidateIdentity",
28
+ "workspaceAttestation",
29
+ "verificationCommand",
30
+ "productExperience",
31
+ "deploymentRuntime",
32
+ "productionBusiness"
33
+ ],
34
+ "properties": {
35
+ "candidateIdentity": { "enum": ["bound", "invalidated", "not_proven"] },
36
+ "workspaceAttestation": { "enum": ["unchanged", "changed", "not_proven"] },
37
+ "verificationCommand": { "enum": ["passed", "failed", "invalidated", "not_proven"] },
38
+ "productExperience": { "const": "not_proven" },
39
+ "deploymentRuntime": {
40
+ "enum": [
41
+ "not_proven",
42
+ "reported_passed",
43
+ "reported_failed_recovered",
44
+ "reported_failed_unrecovered",
45
+ "reported_indeterminate"
46
+ ]
47
+ },
48
+ "productionBusiness": { "const": "not_proven" }
49
+ }
50
+ },
51
+ "proven": {
52
+ "type": "array",
53
+ "uniqueItems": true,
54
+ "items": { "type": "string", "minLength": 1 }
55
+ },
56
+ "notProven": {
57
+ "type": "array",
58
+ "minItems": 1,
59
+ "uniqueItems": true,
60
+ "items": { "type": "string", "minLength": 1 }
61
+ },
62
+ "nextAction": { "type": "string", "minLength": 1 },
63
+ "authorizationGranted": { "const": false }
64
+ },
65
+ "examples": [{
66
+ "schemaVersion": "OwlCodaRunKitOutcomeSummaryV1",
67
+ "result": "pass",
68
+ "headline": "The exact verification command passed for the bound source candidate.",
69
+ "proofLevel": "captured_verification",
70
+ "acceptanceLevels": {
71
+ "candidateIdentity": "bound",
72
+ "workspaceAttestation": "unchanged",
73
+ "verificationCommand": "passed",
74
+ "productExperience": "not_proven",
75
+ "deploymentRuntime": "not_proven",
76
+ "productionBusiness": "not_proven"
77
+ },
78
+ "proven": ["The exact verification command exited successfully."],
79
+ "notProven": ["Product or UX acceptance was not performed by Quick Verification."],
80
+ "nextAction": "consume_attestation",
81
+ "authorizationGranted": false
82
+ }]
83
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/profile-detection-v3.json",
4
+ "title": "OwlCoda RunKit Profile Detection V3",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "status", "dryRun", "writesPerformed", "confidence", "applyStatus", "issueCodes", "proposedProfiles", "candidates", "primaryProfileId", "inputManifest", "toolBinding", "currentProfilesSha256", "detectedScripts", "detectedWorkspaces", "changedPaths", "uncoveredChangedPaths", "uncoveredSourcePaths", "primaryBlockers", "minimalSuggestedProfile", "repairCommands", "authorizationGranted", "detectionSha256"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "OwlCodaRunKitProfileDetectionV3" },
10
+ "status": { "enum": ["profiles_detected", "profiles_insufficient"] },
11
+ "dryRun": { "const": true },
12
+ "writesPerformed": { "const": 0 },
13
+ "confidence": { "enum": ["high", "review_required"] },
14
+ "applyStatus": { "enum": ["ready_to_apply", "review_required", "profiles_already_exists"] },
15
+ "issueCodes": { "$ref": "#/$defs/strings" },
16
+ "proposedProfiles": { "$ref": "#/$defs/profiles" },
17
+ "candidates": { "type": "array", "items": { "$ref": "#/$defs/profile" } },
18
+ "primaryProfileId": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }] },
19
+ "inputManifest": { "type": "array", "items": { "$ref": "#/$defs/input" } },
20
+ "toolBinding": { "$ref": "#/$defs/tool" },
21
+ "currentProfilesSha256": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] },
22
+ "detectedScripts": { "$ref": "#/$defs/strings" },
23
+ "detectedWorkspaces": { "type": "array", "items": { "$ref": "#/$defs/workspace" } },
24
+ "changedPaths": { "$ref": "#/$defs/strings" },
25
+ "uncoveredChangedPaths": { "$ref": "#/$defs/strings" },
26
+ "uncoveredSourcePaths": { "$ref": "#/$defs/strings" },
27
+ "primaryBlockers": { "$ref": "#/$defs/strings" },
28
+ "minimalSuggestedProfile": {
29
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/profile" }]
30
+ },
31
+ "repairCommands": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["preview", "apply"],
35
+ "properties": {
36
+ "preview": { "type": "string", "minLength": 1 },
37
+ "apply": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }] }
38
+ }
39
+ },
40
+ "authorizationGranted": { "const": false },
41
+ "detectionSha256": { "$ref": "#/$defs/hash" }
42
+ },
43
+ "$defs": {
44
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
45
+ "strings": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
46
+ "command": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["id", "cwd", "executable", "argv"],
50
+ "properties": {
51
+ "id": { "type": "string", "minLength": 1 },
52
+ "cwd": { "type": "string", "minLength": 1 },
53
+ "executable": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }] },
54
+ "argv": { "type": "array", "minItems": 1, "items": { "type": "string" } }
55
+ }
56
+ },
57
+ "profile": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": ["id", "paths", "role", "primary", "requiresProfileIds", "commands"],
61
+ "properties": {
62
+ "id": { "type": "string", "minLength": 1 },
63
+ "paths": { "$ref": "#/$defs/strings" },
64
+ "role": { "enum": ["primary", "supporting"] },
65
+ "primary": { "type": "boolean" },
66
+ "requiresProfileIds": { "$ref": "#/$defs/strings" },
67
+ "commands": { "type": "array", "items": { "$ref": "#/$defs/command" } }
68
+ }
69
+ },
70
+ "profiles": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["schemaVersion", "profiles"],
74
+ "properties": {
75
+ "schemaVersion": { "const": "OwlCodaRunKitProfilesV1" },
76
+ "profiles": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/profile" } }
77
+ }
78
+ },
79
+ "input": {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": ["path", "sha256"],
83
+ "properties": {
84
+ "path": { "type": "string", "minLength": 1 },
85
+ "sha256": { "$ref": "#/$defs/hash" }
86
+ }
87
+ },
88
+ "tool": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["status", "confidence", "source", "packageManager", "executable", "argvPrefix", "version", "executableSha256", "launcherSha256"],
92
+ "properties": {
93
+ "status": { "enum": ["resolved", "invalid", "unavailable"] },
94
+ "confidence": { "enum": ["high", "review_required"] },
95
+ "source": { "type": "string", "minLength": 1 },
96
+ "packageManager": { "enum": ["npm", "pnpm", "yarn", "bun"] },
97
+ "executable": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }] },
98
+ "argvPrefix": { "type": "array", "items": { "type": "string", "minLength": 1 } },
99
+ "version": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }] },
100
+ "executableSha256": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] },
101
+ "launcherSha256": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/hash" }] }
102
+ }
103
+ },
104
+ "workspace": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["name", "path", "scripts"],
108
+ "properties": {
109
+ "name": { "type": "string", "minLength": 1 },
110
+ "path": { "type": "string", "minLength": 1 },
111
+ "scripts": { "$ref": "#/$defs/strings" }
112
+ }
113
+ }
114
+ },
115
+ "examples": [{
116
+ "schemaVersion": "OwlCodaRunKitProfileDetectionV3",
117
+ "status": "profiles_detected",
118
+ "dryRun": true,
119
+ "writesPerformed": 0,
120
+ "confidence": "high",
121
+ "applyStatus": "ready_to_apply",
122
+ "issueCodes": [],
123
+ "proposedProfiles": {
124
+ "schemaVersion": "OwlCodaRunKitProfilesV1",
125
+ "profiles": [{
126
+ "id": "node-quality",
127
+ "paths": ["package.json"],
128
+ "role": "primary",
129
+ "primary": true,
130
+ "requiresProfileIds": [],
131
+ "commands": [{ "id": "npm-test", "cwd": ".", "executable": "/usr/bin/node", "argv": ["/usr/lib/npm-cli.js", "run", "test"] }]
132
+ }]
133
+ },
134
+ "candidates": [{
135
+ "id": "node-quality",
136
+ "paths": ["package.json"],
137
+ "role": "primary",
138
+ "primary": true,
139
+ "requiresProfileIds": [],
140
+ "commands": [{ "id": "npm-test", "cwd": ".", "executable": "/usr/bin/node", "argv": ["/usr/lib/npm-cli.js", "run", "test"] }]
141
+ }],
142
+ "primaryProfileId": "node-quality",
143
+ "inputManifest": [{ "path": "package.json", "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }],
144
+ "toolBinding": {
145
+ "status": "resolved",
146
+ "confidence": "high",
147
+ "source": "project_lockfile",
148
+ "packageManager": "npm",
149
+ "executable": "/usr/bin/node",
150
+ "argvPrefix": ["/usr/lib/npm-cli.js"],
151
+ "version": "10.0.0",
152
+ "executableSha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
153
+ "launcherSha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
154
+ },
155
+ "currentProfilesSha256": null,
156
+ "detectedScripts": ["test"],
157
+ "detectedWorkspaces": [],
158
+ "changedPaths": [],
159
+ "uncoveredChangedPaths": [],
160
+ "uncoveredSourcePaths": [],
161
+ "primaryBlockers": [],
162
+ "minimalSuggestedProfile": null,
163
+ "repairCommands": {
164
+ "preview": "npx --no-install owlrunkit profiles detect --workspace . --dry-run",
165
+ "apply": "npx --no-install owlrunkit profiles detect --workspace . --apply"
166
+ },
167
+ "authorizationGranted": false,
168
+ "detectionSha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
169
+ }]
170
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/quick-evidence-reuse-plan-v1.schema.json",
4
+ "title": "OwlCoda Quick Evidence Reuse Plan V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "status",
10
+ "exitCode",
11
+ "ready",
12
+ "baseReceipt",
13
+ "allowedPaths",
14
+ "actualDeltaPaths",
15
+ "outOfScopePaths",
16
+ "unusedAllowedPaths",
17
+ "currentSourceFingerprint",
18
+ "issues",
19
+ "reuseReceiptPath",
20
+ "authorizationGranted"
21
+ ],
22
+ "properties": {
23
+ "schemaVersion": { "const": "OwlCodaQuickEvidenceReusePlanV1" },
24
+ "status": {
25
+ "enum": [
26
+ "quick_evidence_reuse_ready",
27
+ "quick_evidence_reuse_blocked",
28
+ "quick_evidence_reuse_not_needed"
29
+ ]
30
+ },
31
+ "exitCode": { "enum": [0, 2] },
32
+ "ready": { "type": "boolean" },
33
+ "baseReceipt": { "$ref": "#/$defs/baseReceipt" },
34
+ "allowedPaths": { "$ref": "#/$defs/paths" },
35
+ "actualDeltaPaths": { "$ref": "#/$defs/paths" },
36
+ "outOfScopePaths": { "$ref": "#/$defs/paths" },
37
+ "unusedAllowedPaths": { "$ref": "#/$defs/paths" },
38
+ "currentSourceFingerprint": { "$ref": "#/$defs/hash" },
39
+ "issues": { "type": "array", "items": { "type": "string" } },
40
+ "reuseReceiptPath": { "type": "null" },
41
+ "authorizationGranted": { "const": false }
42
+ },
43
+ "$defs": {
44
+ "hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
45
+ "paths": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
46
+ "baseReceipt": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["receiptId", "path", "sha256", "sourceFingerprint", "attestationIssueCodes"],
50
+ "properties": {
51
+ "receiptId": { "type": "string", "minLength": 1 },
52
+ "path": { "type": "string", "minLength": 1 },
53
+ "sha256": { "$ref": "#/$defs/hash" },
54
+ "sourceFingerprint": { "$ref": "#/$defs/hash" },
55
+ "attestationIssueCodes": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/quick-evidence-reuse-receipt-v1.schema.json",
4
+ "title": "OwlCoda Quick Evidence Reuse Receipt V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "reuseId",
10
+ "baseReceipt",
11
+ "delta",
12
+ "decision",
13
+ "reasonCodes",
14
+ "proven",
15
+ "notProven",
16
+ "createdAt",
17
+ "authorizationGranted",
18
+ "receiptSha256"
19
+ ],
20
+ "properties": {
21
+ "schemaVersion": { "const": "OwlCodaQuickEvidenceReuseReceiptV1" },
22
+ "reuseId": { "type": "string", "pattern": "^[A-Za-z0-9._-]+$" },
23
+ "baseReceipt": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["receiptId", "path", "sha256", "sourceFingerprint", "attestationIssueCodes"],
27
+ "properties": {
28
+ "receiptId": { "type": "string", "minLength": 1 },
29
+ "path": { "type": "string", "minLength": 1 },
30
+ "sha256": { "$ref": "#/$defs/hash" },
31
+ "sourceFingerprint": { "$ref": "#/$defs/hash" },
32
+ "attestationIssueCodes": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }
33
+ }
34
+ },
35
+ "delta": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": [
39
+ "allowedPaths",
40
+ "actualPaths",
41
+ "unusedAllowedPaths",
42
+ "currentSourceFingerprint",
43
+ "receiptId",
44
+ "receiptPath",
45
+ "receiptSha256",
46
+ "command"
47
+ ],
48
+ "properties": {
49
+ "allowedPaths": { "$ref": "#/$defs/paths" },
50
+ "actualPaths": { "$ref": "#/$defs/paths" },
51
+ "unusedAllowedPaths": { "$ref": "#/$defs/paths" },
52
+ "currentSourceFingerprint": { "$ref": "#/$defs/hash" },
53
+ "receiptId": { "type": "string", "minLength": 1 },
54
+ "receiptPath": { "type": "string", "minLength": 1 },
55
+ "receiptSha256": { "$ref": "#/$defs/hash" },
56
+ "command": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["executable", "argv"],
60
+ "properties": {
61
+ "executable": { "type": "string", "minLength": 1 },
62
+ "argv": { "type": "array", "items": { "type": "string" } }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "decision": { "enum": ["accepted", "rejected"] },
68
+ "reasonCodes": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
69
+ "proven": { "type": "array", "minItems": 2, "items": { "type": "string", "minLength": 1 } },
70
+ "notProven": { "type": "array", "minItems": 2, "items": { "type": "string", "minLength": 1 } },
71
+ "createdAt": { "type": "string", "format": "date-time" },
72
+ "authorizationGranted": { "const": false },
73
+ "receiptSha256": { "$ref": "#/$defs/hash" }
74
+ },
75
+ "$defs": {
76
+ "hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
77
+ "paths": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
78
+ }
79
+ }
@@ -0,0 +1,185 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/runtime-transition-receipt-v1.schema.json",
4
+ "title": "OwlCoda RunKit Runtime Transition Receipt V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "receiptId",
10
+ "quickReceipt",
11
+ "runtimeReport",
12
+ "reportingBasis",
13
+ "workspaceMutation",
14
+ "externalMutation",
15
+ "rollbackPerformed",
16
+ "finalExternalState",
17
+ "failedStage",
18
+ "lastPassedStage",
19
+ "rollbackOutcome",
20
+ "stages",
21
+ "recoveryEvidence",
22
+ "transitionDecision",
23
+ "proven",
24
+ "notProven",
25
+ "createdAt",
26
+ "authorizationGranted",
27
+ "receiptSha256"
28
+ ],
29
+ "properties": {
30
+ "schemaVersion": { "const": "OwlCodaRunKitRuntimeTransitionReceiptV1" },
31
+ "receiptId": { "$ref": "#/$defs/id" },
32
+ "quickReceipt": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["receiptId", "path", "sha256"],
36
+ "properties": {
37
+ "receiptId": { "$ref": "#/$defs/id" },
38
+ "path": { "$ref": "#/$defs/path" },
39
+ "sha256": { "$ref": "#/$defs/hash" }
40
+ }
41
+ },
42
+ "runtimeReport": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["path", "sha256", "sizeBytes"],
46
+ "properties": {
47
+ "path": { "$ref": "#/$defs/path" },
48
+ "sha256": { "$ref": "#/$defs/hash" },
49
+ "sizeBytes": { "type": "integer", "minimum": 0 }
50
+ }
51
+ },
52
+ "reportingBasis": { "const": "exact_command_report" },
53
+ "workspaceMutation": { "enum": ["changed", "unchanged"] },
54
+ "externalMutation": { "enum": ["changed", "unchanged", "unknown"] },
55
+ "rollbackPerformed": { "type": "boolean" },
56
+ "finalExternalState": { "$ref": "#/$defs/finalState" },
57
+ "failedStage": { "$ref": "#/$defs/nullableStageId" },
58
+ "lastPassedStage": { "$ref": "#/$defs/nullableStageId" },
59
+ "rollbackOutcome": { "enum": ["not_required", "succeeded", "failed", "unknown"] },
60
+ "stages": {
61
+ "type": "array",
62
+ "minItems": 1,
63
+ "maxItems": 128,
64
+ "items": { "$ref": "#/$defs/stage" }
65
+ },
66
+ "recoveryEvidence": {
67
+ "type": "array",
68
+ "maxItems": 128,
69
+ "items": { "$ref": "#/$defs/recoveryEvidence" }
70
+ },
71
+ "transitionDecision": {
72
+ "enum": [
73
+ "external_transition_passed",
74
+ "external_transition_failed_recovered",
75
+ "external_transition_failed_unrecovered",
76
+ "external_transition_indeterminate",
77
+ "external_transition_invalidated"
78
+ ]
79
+ },
80
+ "proven": {
81
+ "type": "array",
82
+ "minItems": 2,
83
+ "items": { "$ref": "#/$defs/summary" }
84
+ },
85
+ "notProven": {
86
+ "type": "array",
87
+ "minItems": 2,
88
+ "items": { "$ref": "#/$defs/summary" }
89
+ },
90
+ "createdAt": { "type": "string", "format": "date-time" },
91
+ "authorizationGranted": { "const": false },
92
+ "receiptSha256": { "$ref": "#/$defs/hash" }
93
+ },
94
+ "$defs": {
95
+ "hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
96
+ "hashOrNull": {
97
+ "oneOf": [
98
+ { "type": "null" },
99
+ { "$ref": "#/$defs/hash" }
100
+ ]
101
+ },
102
+ "id": {
103
+ "type": "string",
104
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
105
+ },
106
+ "stageId": { "$ref": "#/$defs/id" },
107
+ "nullableStageId": {
108
+ "oneOf": [
109
+ { "type": "null" },
110
+ { "$ref": "#/$defs/stageId" }
111
+ ]
112
+ },
113
+ "path": {
114
+ "type": "string",
115
+ "pattern": "^\\.owlcoda/runkit/quick/receipts/[^/]+/[^/]+$"
116
+ },
117
+ "reference": {
118
+ "type": "string",
119
+ "minLength": 1,
120
+ "maxLength": 1024,
121
+ "pattern": "^[^\\r\\n\\u0000]+$"
122
+ },
123
+ "summary": {
124
+ "type": "string",
125
+ "minLength": 1,
126
+ "maxLength": 2048,
127
+ "pattern": "^[^\\u0000]+$"
128
+ },
129
+ "finalState": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": ["status", "stateRef", "fingerprint", "summary"],
133
+ "properties": {
134
+ "status": { "enum": ["changed", "unchanged", "restored", "unknown"] },
135
+ "stateRef": { "$ref": "#/$defs/reference" },
136
+ "fingerprint": { "$ref": "#/$defs/hashOrNull" },
137
+ "summary": { "$ref": "#/$defs/summary" }
138
+ }
139
+ },
140
+ "stage": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["stageId", "status", "summary", "evidenceRefs"],
144
+ "properties": {
145
+ "stageId": { "$ref": "#/$defs/stageId" },
146
+ "status": { "enum": ["passed", "failed", "skipped"] },
147
+ "summary": { "$ref": "#/$defs/summary" },
148
+ "evidenceRefs": {
149
+ "type": "array",
150
+ "maxItems": 128,
151
+ "items": { "$ref": "#/$defs/reference" }
152
+ }
153
+ }
154
+ },
155
+ "capturedBefore": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": ["stageId", "stateRef", "fingerprint"],
159
+ "properties": {
160
+ "stageId": { "$ref": "#/$defs/stageId" },
161
+ "stateRef": { "$ref": "#/$defs/reference" },
162
+ "fingerprint": { "$ref": "#/$defs/hashOrNull" }
163
+ }
164
+ },
165
+ "restoresTo": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "required": ["stateRef", "fingerprint"],
169
+ "properties": {
170
+ "stateRef": { "$ref": "#/$defs/reference" },
171
+ "fingerprint": { "$ref": "#/$defs/hashOrNull" }
172
+ }
173
+ },
174
+ "recoveryEvidence": {
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": ["artifactRef", "capturedBefore", "restoresTo"],
178
+ "properties": {
179
+ "artifactRef": { "$ref": "#/$defs/reference" },
180
+ "capturedBefore": { "$ref": "#/$defs/capturedBefore" },
181
+ "restoresTo": { "$ref": "#/$defs/restoresTo" }
182
+ }
183
+ }
184
+ }
185
+ }