owlrunkit 0.13.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 (128) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +674 -0
  3. package/NOTICE.md +137 -0
  4. package/README.md +44 -0
  5. package/SOURCE.md +10 -0
  6. package/docs/architecture/OWLCODA_RUN_KIT_CONTRACT_V0_1.md +160 -0
  7. package/docs/architecture/OWLCODA_RUN_KIT_CONTRACT_V0_2.md +459 -0
  8. package/integrations/codex/skills/owlcoda-runkit/SKILL.md +408 -0
  9. package/integrations/codex/skills/owlcoda-runkit/agents/openai.yaml +4 -0
  10. package/integrations/codex/skills/owlcoda-runkit/assets/templates/agents-snippet.md +7 -0
  11. package/integrations/codex/skills/owlcoda-runkit/assets/templates/config.json +10 -0
  12. package/integrations/codex/skills/owlcoda-runkit/assets/templates/coverage-adopt-request.json +26 -0
  13. package/integrations/codex/skills/owlcoda-runkit/assets/templates/execution-delivery-packet.json +13 -0
  14. package/integrations/codex/skills/owlcoda-runkit/assets/templates/finalize-request.json +18 -0
  15. package/integrations/codex/skills/owlcoda-runkit/assets/templates/goal-contract.json +11 -0
  16. package/integrations/codex/skills/owlcoda-runkit/assets/templates/profiles.json +9 -0
  17. package/integrations/codex/skills/owlcoda-runkit/assets/templates/ready-for-commit-request.json +11 -0
  18. package/integrations/codex/skills/owlcoda-runkit/assets/templates/resource-preflight-request.json +56 -0
  19. package/integrations/codex/skills/owlcoda-runkit/assets/templates/resume-request.json +10 -0
  20. package/integrations/codex/skills/owlcoda-runkit/assets/templates/snapshot-request.json +23 -0
  21. package/integrations/codex/skills/owlcoda-runkit/assets/templates/verification-context.json +15 -0
  22. package/integrations/codex/skills/owlcoda-runkit/assets/templates/verification-receipt.json +11 -0
  23. package/integrations/codex/skills/owlcoda-runkit/assets/templates/verify-plan-request.json +31 -0
  24. package/integrations/codex/skills/owlcoda-runkit/assets/templates/visual-smoke-request.json +32 -0
  25. package/integrations/codex/skills/owlcoda-runkit/assets/templates/worker-lease.json +7 -0
  26. package/package.json +24 -0
  27. package/packages/attest/LICENSE +674 -0
  28. package/packages/attest/README.md +63 -0
  29. package/packages/attest/cli/owlcoda-attest.mjs +155 -0
  30. package/packages/attest/consumer-surface-v1.json +255 -0
  31. package/packages/attest/distribution-manifest-v1.json +104 -0
  32. package/packages/attest/fixtures/bad/accepted-authority-leak.json +7 -0
  33. package/packages/attest/fixtures/bad/accepted-failed-receipt.json +7 -0
  34. package/packages/attest/fixtures/bad/active-context-binding-mismatch.json +7 -0
  35. package/packages/attest/fixtures/bad/active-source-binding-mismatch.json +7 -0
  36. package/packages/attest/fixtures/bad/context-fingerprint-mismatch.json +7 -0
  37. package/packages/attest/fixtures/bad/duplicate-object-key.json +8 -0
  38. package/packages/attest/fixtures/bad/multiple-active-leaves.json +10 -0
  39. package/packages/attest/fixtures/bad/orphan-replacement.json +7 -0
  40. package/packages/attest/fixtures/bad/root-shape-extra-property.json +8 -0
  41. package/packages/attest/fixtures/bad/source-fingerprint-mismatch.json +7 -0
  42. package/packages/attest/fixtures/good/accepted-replacement-chain.json +59 -0
  43. package/packages/attest/fixtures/good/blocked-single-leaf.json +9 -0
  44. package/packages/attest/fixtures/index.json +90 -0
  45. package/packages/attest/sbom.spdx.json +33 -0
  46. package/packages/attest/schemas/attestation-ref-v1.schema.json +44 -0
  47. package/packages/attest/schemas/attestation-result-v1.schema.json +163 -0
  48. package/packages/attest/schemas/offline-attestation-bundle-v1.schema.json +30 -0
  49. package/packages/attest/schemas/public-verification-bundle-v1.schema.json +74 -0
  50. package/packages/attest/schemas/quick-verification-receipt-v1.schema.json +219 -0
  51. package/packages/attest/schemas/workspace-snapshot-v1.schema.json +135 -0
  52. package/packages/attest/src/canonical.mjs +12 -0
  53. package/packages/attest/src/formal.mjs +762 -0
  54. package/packages/attest/src/index.mjs +113 -0
  55. package/packages/attest/src/offline-bundle.mjs +108 -0
  56. package/packages/attest/src/quick-receipt-contract.mjs +156 -0
  57. package/packages/attest/src/quick.mjs +274 -0
  58. package/packages/attest/src/reference-contract.mjs +64 -0
  59. package/packages/attest/src/reference.mjs +131 -0
  60. package/packages/attest/src/workspace-snapshot.mjs +171 -0
  61. package/registry-release-policy-v1.json +34 -0
  62. package/sbom.spdx.json +39 -0
  63. package/scripts/runkit-contract/acceptance-evidence.mjs +103 -0
  64. package/scripts/runkit-contract/core-contract.mjs +392 -0
  65. package/scripts/runkit-contract/coverage-adoption.mjs +414 -0
  66. package/scripts/runkit-contract/delivery-create.mjs +252 -0
  67. package/scripts/runkit-contract/delivery-selection.mjs +31 -0
  68. package/scripts/runkit-contract/finalize.mjs +790 -0
  69. package/scripts/runkit-contract/inspect-presentation.mjs +183 -0
  70. package/scripts/runkit-contract/install-codex-skill.mjs +239 -0
  71. package/scripts/runkit-contract/lease-lifecycle.mjs +324 -0
  72. package/scripts/runkit-contract/lifecycle-orchestration.mjs +415 -0
  73. package/scripts/runkit-contract/offline-store.mjs +248 -0
  74. package/scripts/runkit-contract/profile-impact.mjs +223 -0
  75. package/scripts/runkit-contract/provenance-common.mjs +153 -0
  76. package/scripts/runkit-contract/quick-attest.mjs +4 -0
  77. package/scripts/runkit-contract/quick-canonical.mjs +41 -0
  78. package/scripts/runkit-contract/quick-metrics.mjs +86 -0
  79. package/scripts/runkit-contract/quick-receipt.mjs +139 -0
  80. package/scripts/runkit-contract/quick-verify.mjs +201 -0
  81. package/scripts/runkit-contract/quick-workspace-snapshot.mjs +3 -0
  82. package/scripts/runkit-contract/ready-for-commit.mjs +188 -0
  83. package/scripts/runkit-contract/receipt-lineage.mjs +332 -0
  84. package/scripts/runkit-contract/registry-adoption-gate.mjs +117 -0
  85. package/scripts/runkit-contract/repair-execution.mjs +997 -0
  86. package/scripts/runkit-contract/resource-preflight.mjs +829 -0
  87. package/scripts/runkit-contract/resume-execution.mjs +569 -0
  88. package/scripts/runkit-contract/runkit-cli.mjs +1214 -0
  89. package/scripts/runkit-contract/schemas/closeout-receipt-v2.schema.json +42 -0
  90. package/scripts/runkit-contract/schemas/core-artifact-v2.schema.json +23 -0
  91. package/scripts/runkit-contract/schemas/core-artifact.schema.json +23 -0
  92. package/scripts/runkit-contract/schemas/coverage-adopt-request-v1.schema.json +66 -0
  93. package/scripts/runkit-contract/schemas/engine-pin-v2.schema.json +14 -0
  94. package/scripts/runkit-contract/schemas/engine-pin.schema.json +14 -0
  95. package/scripts/runkit-contract/schemas/evidence-coverage-index-v1.schema.json +131 -0
  96. package/scripts/runkit-contract/schemas/finalize-request-v1.schema.json +131 -0
  97. package/scripts/runkit-contract/schemas/profiles.schema.json +47 -0
  98. package/scripts/runkit-contract/schemas/project-config-v2.schema.json +13 -0
  99. package/scripts/runkit-contract/schemas/project-config.schema.json +13 -0
  100. package/scripts/runkit-contract/schemas/ready-for-commit-v1.schema.json +26 -0
  101. package/scripts/runkit-contract/schemas/replayable-evidence-v1.schema.json +82 -0
  102. package/scripts/runkit-contract/schemas/resource-preflight-request-v1.schema.json +178 -0
  103. package/scripts/runkit-contract/schemas/resource-preflight-v1.schema.json +153 -0
  104. package/scripts/runkit-contract/schemas/resume-attempt-v1.schema.json +80 -0
  105. package/scripts/runkit-contract/schemas/resume-request-v1.schema.json +77 -0
  106. package/scripts/runkit-contract/schemas/snapshot-v1.schema.json +71 -0
  107. package/scripts/runkit-contract/schemas/verification-context-v1.schema.json +92 -0
  108. package/scripts/runkit-contract/schemas/verification-plan-v1.schema.json +150 -0
  109. package/scripts/runkit-contract/schemas/verification-receipt-v2.schema.json +118 -0
  110. package/scripts/runkit-contract/schemas/verify-plan-request-v1.schema.json +56 -0
  111. package/scripts/runkit-contract/schemas/visual-smoke-request-v1.schema.json +64 -0
  112. package/scripts/runkit-contract/schemas/visual-smoke-result-v1.schema.json +68 -0
  113. package/scripts/runkit-contract/snapshot.mjs +340 -0
  114. package/scripts/runkit-contract/source-fingerprint.mjs +404 -0
  115. package/scripts/runkit-contract/templates/coverage-adopt-request.json +26 -0
  116. package/scripts/runkit-contract/templates/finalize-request.json +18 -0
  117. package/scripts/runkit-contract/templates/goal-contract.json +11 -0
  118. package/scripts/runkit-contract/templates/ready-for-commit-request.json +11 -0
  119. package/scripts/runkit-contract/templates/resource-preflight-request.json +56 -0
  120. package/scripts/runkit-contract/templates/resume-request.json +10 -0
  121. package/scripts/runkit-contract/templates/snapshot-request.json +23 -0
  122. package/scripts/runkit-contract/templates/verify-plan-request.json +31 -0
  123. package/scripts/runkit-contract/templates/visual-smoke-request.json +32 -0
  124. package/scripts/runkit-contract/templates/worker-lease.json +7 -0
  125. package/scripts/runkit-contract/verification-context.mjs +141 -0
  126. package/scripts/runkit-contract/verification-plan.mjs +608 -0
  127. package/scripts/runkit-contract/verification-receipt-gate.mjs +566 -0
  128. package/scripts/runkit-contract/visual-smoke.mjs +410 -0
@@ -0,0 +1,178 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/resource-preflight-request-v1.json",
4
+ "title": "OwlCoda RunKit Resource Preflight Request V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "preflightId",
10
+ "verificationPlanPath",
11
+ "verificationPlanSha256",
12
+ "policy",
13
+ "observations",
14
+ "workloads"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": { "const": "OwlCodaRunKitResourcePreflightRequestV1" },
18
+ "preflightId": { "$ref": "#/$defs/identifier" },
19
+ "verificationPlanPath": { "type": "string", "minLength": 1 },
20
+ "verificationPlanSha256": { "$ref": "#/$defs/sha256" },
21
+ "policy": { "$ref": "#/$defs/policy" },
22
+ "observations": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "items": { "$ref": "#/$defs/observation" }
26
+ },
27
+ "workloads": {
28
+ "type": "array",
29
+ "items": { "$ref": "#/$defs/workload" }
30
+ }
31
+ },
32
+ "$defs": {
33
+ "identifier": {
34
+ "type": "string",
35
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
36
+ },
37
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
38
+ "unknownPolicy": { "enum": ["fail_open", "fail_closed"] },
39
+ "policy": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["gateMode", "maxObservationAgeMs", "unknownHandling", "limits"],
43
+ "properties": {
44
+ "gateMode": { "enum": ["model_required", "model_optional"] },
45
+ "maxObservationAgeMs": { "type": "integer", "minimum": 1 },
46
+ "unknownHandling": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["availability", "quota", "resetTime", "pricing"],
50
+ "properties": {
51
+ "availability": { "$ref": "#/$defs/unknownPolicy" },
52
+ "quota": { "$ref": "#/$defs/unknownPolicy" },
53
+ "resetTime": { "$ref": "#/$defs/unknownPolicy" },
54
+ "pricing": { "$ref": "#/$defs/unknownPolicy" }
55
+ }
56
+ },
57
+ "limits": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "properties": {
61
+ "maxCalls": { "type": "integer", "minimum": 0 },
62
+ "maxTotalTokens": { "type": "integer", "minimum": 0 },
63
+ "maxElapsedMs": { "type": "integer", "minimum": 0 },
64
+ "maxCostUsd": { "type": "number", "minimum": 0 }
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "unknown": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": ["status", "reason"],
73
+ "properties": {
74
+ "status": { "const": "unknown" },
75
+ "reason": { "type": "string", "minLength": 1 }
76
+ }
77
+ },
78
+ "knownInteger": {
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": ["status", "value"],
82
+ "properties": {
83
+ "status": { "const": "known" },
84
+ "value": { "type": "integer", "minimum": 0 }
85
+ }
86
+ },
87
+ "knownTimestamp": {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "required": ["status", "value"],
91
+ "properties": {
92
+ "status": { "const": "known" },
93
+ "value": { "type": "string", "format": "date-time" }
94
+ }
95
+ },
96
+ "observation": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": ["providerId", "modelId", "adapter", "availability", "quota", "pricing"],
100
+ "properties": {
101
+ "providerId": { "$ref": "#/$defs/identifier" },
102
+ "modelId": { "$ref": "#/$defs/identifier" },
103
+ "adapter": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": ["id", "kind", "evidenceRef", "evidenceSha256", "observedAt"],
107
+ "properties": {
108
+ "id": { "$ref": "#/$defs/identifier" },
109
+ "kind": { "enum": ["owlcoda_runtime", "provider_api", "project_declared"] },
110
+ "evidenceRef": { "type": "string", "minLength": 1 },
111
+ "evidenceSha256": { "$ref": "#/$defs/sha256" },
112
+ "observedAt": { "type": "string", "format": "date-time" }
113
+ }
114
+ },
115
+ "availability": {
116
+ "oneOf": [
117
+ {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": ["status"],
121
+ "properties": { "status": { "const": "available" } }
122
+ },
123
+ {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": ["status", "reason"],
127
+ "properties": {
128
+ "status": { "enum": ["unavailable", "unknown"] },
129
+ "reason": { "type": "string", "minLength": 1 }
130
+ }
131
+ }
132
+ ]
133
+ },
134
+ "quota": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["remainingCalls", "remainingTokens", "resetAt"],
138
+ "properties": {
139
+ "remainingCalls": { "oneOf": [{ "$ref": "#/$defs/knownInteger" }, { "$ref": "#/$defs/unknown" }] },
140
+ "remainingTokens": { "oneOf": [{ "$ref": "#/$defs/knownInteger" }, { "$ref": "#/$defs/unknown" }] },
141
+ "resetAt": { "oneOf": [{ "$ref": "#/$defs/knownTimestamp" }, { "$ref": "#/$defs/unknown" }] }
142
+ }
143
+ },
144
+ "pricing": {
145
+ "oneOf": [
146
+ { "$ref": "#/$defs/unknown" },
147
+ {
148
+ "type": "object",
149
+ "additionalProperties": false,
150
+ "required": ["status", "currency", "inputPerMillion", "outputPerMillion"],
151
+ "properties": {
152
+ "status": { "const": "known" },
153
+ "currency": { "const": "USD" },
154
+ "inputPerMillion": { "type": "number", "minimum": 0 },
155
+ "outputPerMillion": { "type": "number", "minimum": 0 }
156
+ }
157
+ }
158
+ ]
159
+ }
160
+ }
161
+ },
162
+ "workload": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": ["id", "providerId", "modelId", "calls", "inputTokens", "outputTokens", "elapsedMs"],
166
+ "properties": {
167
+ "id": { "$ref": "#/$defs/identifier" },
168
+ "providerId": { "$ref": "#/$defs/identifier" },
169
+ "modelId": { "$ref": "#/$defs/identifier" },
170
+ "calls": { "type": "integer", "minimum": 1 },
171
+ "inputTokens": { "type": "integer", "minimum": 0 },
172
+ "outputTokens": { "type": "integer", "minimum": 0 },
173
+ "elapsedMs": { "type": "integer", "minimum": 0 },
174
+ "coveredByReceiptId": { "$ref": "#/$defs/identifier" }
175
+ }
176
+ }
177
+ }
178
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/resource-preflight-v1.json",
4
+ "title": "OwlCoda RunKit Resource Preflight V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "runId",
10
+ "preflightId",
11
+ "sequence",
12
+ "evaluatedAt",
13
+ "validUntil",
14
+ "requestSha256",
15
+ "verificationPlan",
16
+ "policy",
17
+ "receiptReuse",
18
+ "estimate",
19
+ "resources",
20
+ "decision",
21
+ "authorizationGranted",
22
+ "gitAuthorization",
23
+ "releaseAuthorization"
24
+ ],
25
+ "properties": {
26
+ "schemaVersion": { "const": "OwlCodaRunKitResourcePreflightV1" },
27
+ "runId": { "$ref": "#/$defs/identifier" },
28
+ "preflightId": { "$ref": "#/$defs/identifier" },
29
+ "sequence": { "type": "integer", "minimum": 1 },
30
+ "evaluatedAt": { "type": "string", "format": "date-time" },
31
+ "validUntil": { "type": ["string", "null"], "format": "date-time" },
32
+ "requestSha256": { "$ref": "#/$defs/sha256" },
33
+ "verificationPlan": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["path", "sha256", "planId"],
37
+ "properties": {
38
+ "path": { "type": "string", "minLength": 1 },
39
+ "sha256": { "$ref": "#/$defs/sha256" },
40
+ "planId": { "$ref": "#/$defs/identifier" }
41
+ }
42
+ },
43
+ "policy": { "$ref": "resource-preflight-request-v1.schema.json#/$defs/policy" },
44
+ "receiptReuse": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["verificationPlanId", "reusableReceiptIds", "appliedReceiptIds"],
48
+ "properties": {
49
+ "verificationPlanId": { "$ref": "#/$defs/identifier" },
50
+ "reusableReceiptIds": { "$ref": "#/$defs/identifierArray" },
51
+ "appliedReceiptIds": { "$ref": "#/$defs/identifierArray" }
52
+ }
53
+ },
54
+ "estimate": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": [
58
+ "plannedWorkloads",
59
+ "reusedWorkloads",
60
+ "pendingWorkloads",
61
+ "calls",
62
+ "inputTokens",
63
+ "outputTokens",
64
+ "totalTokens",
65
+ "elapsedMs",
66
+ "cost"
67
+ ],
68
+ "properties": {
69
+ "plannedWorkloads": { "$ref": "#/$defs/nonNegativeInteger" },
70
+ "reusedWorkloads": { "$ref": "#/$defs/nonNegativeInteger" },
71
+ "pendingWorkloads": { "$ref": "#/$defs/nonNegativeInteger" },
72
+ "calls": { "$ref": "#/$defs/nonNegativeInteger" },
73
+ "inputTokens": { "$ref": "#/$defs/nonNegativeInteger" },
74
+ "outputTokens": { "$ref": "#/$defs/nonNegativeInteger" },
75
+ "totalTokens": { "$ref": "#/$defs/nonNegativeInteger" },
76
+ "elapsedMs": { "$ref": "#/$defs/nonNegativeInteger" },
77
+ "cost": {
78
+ "oneOf": [
79
+ {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": ["status", "valueUsd"],
83
+ "properties": {
84
+ "status": { "const": "known" },
85
+ "valueUsd": { "type": "number", "minimum": 0 }
86
+ }
87
+ },
88
+ {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["status", "knownSubtotalUsd", "unknownResources"],
92
+ "properties": {
93
+ "status": { "const": "unknown" },
94
+ "knownSubtotalUsd": { "type": "number", "minimum": 0 },
95
+ "unknownResources": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
96
+ }
97
+ }
98
+ ]
99
+ }
100
+ }
101
+ },
102
+ "resources": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["providerId", "modelId", "adapter", "availability", "quota", "pricing", "demand"],
108
+ "properties": {
109
+ "providerId": { "$ref": "#/$defs/identifier" },
110
+ "modelId": { "$ref": "#/$defs/identifier" },
111
+ "adapter": { "$ref": "resource-preflight-request-v1.schema.json#/$defs/observation/properties/adapter" },
112
+ "availability": { "$ref": "resource-preflight-request-v1.schema.json#/$defs/observation/properties/availability" },
113
+ "quota": { "$ref": "resource-preflight-request-v1.schema.json#/$defs/observation/properties/quota" },
114
+ "pricing": { "$ref": "resource-preflight-request-v1.schema.json#/$defs/observation/properties/pricing" },
115
+ "demand": { "$ref": "#/$defs/demand" }
116
+ }
117
+ }
118
+ },
119
+ "decision": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": ["status", "blockers", "warnings", "nextAllowedAction"],
123
+ "properties": {
124
+ "status": { "enum": ["ready_for_model_execution", "ready_without_model_execution", "blocked_by_resource"] },
125
+ "blockers": { "$ref": "#/$defs/stringArray" },
126
+ "warnings": { "$ref": "#/$defs/stringArray" },
127
+ "nextAllowedAction": { "enum": ["begin_model_execution", "continue_without_model_calls", "pause_at_deterministic_stage"] }
128
+ }
129
+ },
130
+ "authorizationGranted": { "const": false },
131
+ "gitAuthorization": { "const": false },
132
+ "releaseAuthorization": { "const": false }
133
+ },
134
+ "$defs": {
135
+ "identifier": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$" },
136
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
137
+ "nonNegativeInteger": { "type": "integer", "minimum": 0 },
138
+ "identifierArray": { "type": "array", "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true },
139
+ "stringArray": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
140
+ "demand": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["calls", "inputTokens", "outputTokens", "totalTokens", "elapsedMs"],
144
+ "properties": {
145
+ "calls": { "$ref": "#/$defs/nonNegativeInteger" },
146
+ "inputTokens": { "$ref": "#/$defs/nonNegativeInteger" },
147
+ "outputTokens": { "$ref": "#/$defs/nonNegativeInteger" },
148
+ "totalTokens": { "$ref": "#/$defs/nonNegativeInteger" },
149
+ "elapsedMs": { "$ref": "#/$defs/nonNegativeInteger" }
150
+ }
151
+ }
152
+ }
153
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/resume-attempt-v1.json",
4
+ "title": "OwlCoda RunKit Resume Attempt V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "resumeId",
10
+ "mode",
11
+ "runId",
12
+ "sourceRunId",
13
+ "reason",
14
+ "parentGoal",
15
+ "parentCloseout",
16
+ "inheritedEvidence",
17
+ "nextAllowedAction",
18
+ "requiredWorkflow",
19
+ "authorizationGranted"
20
+ ],
21
+ "properties": {
22
+ "schemaVersion": { "const": "OwlCodaRunKitResumeAttemptV1" },
23
+ "resumeId": { "type": "string", "minLength": 1 },
24
+ "mode": { "enum": ["same_execution", "continuation"] },
25
+ "runId": { "type": "string", "minLength": 1 },
26
+ "sourceRunId": { "type": "string", "minLength": 1 },
27
+ "reason": { "type": "string", "minLength": 1 },
28
+ "parentGoal": { "$ref": "#/$defs/artifactRef" },
29
+ "parentCloseout": {
30
+ "oneOf": [
31
+ { "type": "null" },
32
+ {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["decision", "path", "sha256"],
36
+ "properties": {
37
+ "decision": { "enum": ["accepted", "rejected", "blocked"] },
38
+ "path": { "type": "string", "minLength": 1 },
39
+ "sha256": { "$ref": "#/$defs/sha256" }
40
+ }
41
+ }
42
+ ]
43
+ },
44
+ "inheritedEvidence": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["coverageIndexPath", "coverageIndexSha256", "reusableReceiptIds"],
48
+ "properties": {
49
+ "coverageIndexPath": { "type": "string", "minLength": 1 },
50
+ "coverageIndexSha256": { "$ref": "#/$defs/sha256" },
51
+ "reusableReceiptIds": {
52
+ "type": "array",
53
+ "items": { "type": "string", "minLength": 1 },
54
+ "uniqueItems": true
55
+ }
56
+ }
57
+ },
58
+ "nextAllowedAction": { "const": "acquire_writer_lease" },
59
+ "requiredWorkflow": {
60
+ "const": [
61
+ "acquire_writer_lease",
62
+ "prepare_or_replace_delivery_packet",
63
+ "verify_plan"
64
+ ]
65
+ },
66
+ "authorizationGranted": { "const": false }
67
+ },
68
+ "$defs": {
69
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
70
+ "artifactRef": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["path", "sha256"],
74
+ "properties": {
75
+ "path": { "type": "string", "minLength": 1 },
76
+ "sha256": { "$ref": "#/$defs/sha256" }
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/resume-request-v1.json",
4
+ "title": "OwlCoda RunKit Resume Request V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "resumeId", "continuationRunId", "reason", "coverage"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "OwlCodaRunKitResumeRequestV1" },
10
+ "resumeId": { "type": "string", "minLength": 1 },
11
+ "continuationRunId": {
12
+ "oneOf": [
13
+ { "type": "null" },
14
+ { "type": "string", "minLength": 1 }
15
+ ]
16
+ },
17
+ "reason": { "type": "string", "minLength": 1 },
18
+ "coverage": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "required": ["coverageId", "sources"],
22
+ "properties": {
23
+ "coverageId": { "type": "string", "minLength": 1 },
24
+ "sources": {
25
+ "type": "array",
26
+ "items": { "$ref": "#/$defs/coverageSource" }
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
33
+ "coverageSource": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["gateInputPath", "gateInputSha256", "commandBindings", "dependencyBindings"],
37
+ "properties": {
38
+ "gateInputPath": { "type": "string", "minLength": 1 },
39
+ "gateInputSha256": { "$ref": "#/$defs/sha256" },
40
+ "commandBindings": {
41
+ "type": "array",
42
+ "minItems": 1,
43
+ "items": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["receiptCommandId", "profileId", "commandId"],
47
+ "properties": {
48
+ "receiptCommandId": { "type": "string", "minLength": 1 },
49
+ "profileId": { "type": "string", "minLength": 1 },
50
+ "commandId": { "type": "string", "minLength": 1 }
51
+ }
52
+ }
53
+ },
54
+ "dependencyBindings": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["dependencyId", "source"],
60
+ "properties": {
61
+ "dependencyId": { "type": "string", "minLength": 1 },
62
+ "source": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["kind", "identity"],
66
+ "properties": {
67
+ "kind": { "enum": ["lockfile", "fixture", "material_input"] },
68
+ "identity": { "type": "string", "minLength": 1 }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/snapshot-v1.json",
4
+ "title": "OwlCoda RunKit Snapshot V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runId", "snapshotId", "status", "mode", "targetRoot", "verificationContextFingerprint", "repositoryBefore", "repositoryAfter", "command", "authorizationGranted"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "OwlCodaRunKitSnapshotV1" },
10
+ "runId": { "type": "string", "minLength": 1 },
11
+ "snapshotId": { "type": "string", "minLength": 1 },
12
+ "status": { "enum": ["snapshot_passed", "snapshot_failed", "invalidated_by_target_write"] },
13
+ "mode": { "enum": ["project", "foreign_readonly"] },
14
+ "targetRoot": { "type": "string", "minLength": 1 },
15
+ "verificationContextFingerprint": { "$ref": "#/$defs/sha256" },
16
+ "repositoryBefore": { "$ref": "#/$defs/repositoryState" },
17
+ "repositoryAfter": { "$ref": "#/$defs/repositoryState" },
18
+ "command": { "$ref": "#/$defs/command" },
19
+ "visual": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["automationManifestPath", "resultPath", "result", "issues"],
23
+ "properties": {
24
+ "automationManifestPath": { "type": "string", "minLength": 1 },
25
+ "resultPath": { "type": "string", "minLength": 1 },
26
+ "result": { "type": ["object", "null"] },
27
+ "issues": { "type": "array", "items": { "type": "string" } }
28
+ }
29
+ },
30
+ "authorizationGranted": { "const": false }
31
+ },
32
+ "$defs": {
33
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
34
+ "fileMap": {
35
+ "type": "object",
36
+ "additionalProperties": { "$ref": "#/$defs/sha256" }
37
+ },
38
+ "repositoryState": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["head", "statusMode", "statusSha256", "statusByteCount", "statusEntryCount", "selectedFiles", "manifestFingerprint"],
42
+ "properties": {
43
+ "head": { "type": "string", "minLength": 1 },
44
+ "statusMode": { "const": "porcelain-v1-z-untracked-all-runkit-excluded" },
45
+ "statusSha256": { "$ref": "#/$defs/sha256" },
46
+ "statusByteCount": { "type": "integer", "minimum": 0 },
47
+ "statusEntryCount": { "type": "integer", "minimum": 0 },
48
+ "selectedFiles": { "$ref": "#/$defs/fileMap" },
49
+ "manifestFingerprint": { "$ref": "#/$defs/sha256" }
50
+ }
51
+ },
52
+ "command": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": ["startedAt", "endedAt", "durationMs", "exitCode", "stdoutPath", "stdoutSha256", "stdoutLineCount", "stderrPath", "stderrSha256", "stderrLineCount", "evidence"],
56
+ "properties": {
57
+ "startedAt": { "type": "string", "minLength": 1 },
58
+ "endedAt": { "type": "string", "minLength": 1 },
59
+ "durationMs": { "type": "integer", "minimum": 0 },
60
+ "exitCode": { "type": "integer" },
61
+ "stdoutPath": { "type": "string", "minLength": 1 },
62
+ "stdoutSha256": { "$ref": "#/$defs/sha256" },
63
+ "stdoutLineCount": { "type": "integer", "minimum": 0 },
64
+ "stderrPath": { "type": "string", "minLength": 1 },
65
+ "stderrSha256": { "$ref": "#/$defs/sha256" },
66
+ "stderrLineCount": { "type": "integer", "minimum": 0 },
67
+ "evidence": { "$ref": "replayable-evidence-v1.schema.json" }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://owlcoda.dev/schemas/runkit/verification-context-v1.json",
4
+ "title": "OwlCoda RunKit Verification Context V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "reusePolicy", "platform", "toolchains", "lockfiles", "fixtures", "services", "environment"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "OwlCodaRunKitVerificationContextV1" },
10
+ "reusePolicy": { "enum": ["portable", "platform_bound", "environment_bound"] },
11
+ "platform": {
12
+ "oneOf": [
13
+ { "type": "null" },
14
+ {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["os", "arch"],
18
+ "properties": {
19
+ "os": { "type": "string", "minLength": 1 },
20
+ "arch": { "type": "string", "minLength": 1 }
21
+ }
22
+ }
23
+ ]
24
+ },
25
+ "toolchains": {
26
+ "type": "array",
27
+ "items": { "$ref": "#/$defs/nameVersion" }
28
+ },
29
+ "lockfiles": {
30
+ "type": "array",
31
+ "items": { "$ref": "#/$defs/pathHash" }
32
+ },
33
+ "fixtures": {
34
+ "type": "array",
35
+ "items": { "$ref": "#/$defs/idHash" }
36
+ },
37
+ "services": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["id", "identity"],
43
+ "properties": {
44
+ "id": { "type": "string", "minLength": 1 },
45
+ "identity": { "type": "string", "minLength": 1 }
46
+ }
47
+ }
48
+ },
49
+ "environment": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": ["name", "valueSha256"],
55
+ "properties": {
56
+ "name": { "type": "string", "minLength": 1 },
57
+ "valueSha256": { "$ref": "#/$defs/sha256" }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "$defs": {
63
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
64
+ "nameVersion": {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": ["name", "version"],
68
+ "properties": {
69
+ "name": { "type": "string", "minLength": 1 },
70
+ "version": { "type": "string", "minLength": 1 }
71
+ }
72
+ },
73
+ "pathHash": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["path", "sha256"],
77
+ "properties": {
78
+ "path": { "type": "string", "minLength": 1 },
79
+ "sha256": { "$ref": "#/$defs/sha256" }
80
+ }
81
+ },
82
+ "idHash": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["id", "sha256"],
86
+ "properties": {
87
+ "id": { "type": "string", "minLength": 1 },
88
+ "sha256": { "$ref": "#/$defs/sha256" }
89
+ }
90
+ }
91
+ }
92
+ }