engineering-behavior-observatory 0.2.1

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 (178) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +151 -0
  3. package/contracts/codex-app-server-0.150.1/manifest.json +25 -0
  4. package/contracts/codex-app-server-0.150.1/schema/InitializeParams.json +84 -0
  5. package/contracts/codex-app-server-0.150.1/schema/JSONRPCMessage.json +137 -0
  6. package/contracts/codex-app-server-0.150.1/schema/v2/ThreadReadParams.json +17 -0
  7. package/contracts/codex-app-server-0.150.1/schema/v2/ThreadTokenUsageUpdatedNotification.json +82 -0
  8. package/contracts/codex-app-server-0.150.1/schema/v2/TurnInterruptParams.json +17 -0
  9. package/contracts/codex-app-server-0.150.1/types/AskForApproval.ts +5 -0
  10. package/contracts/codex-app-server-0.150.1/types/ClientNotification.ts +5 -0
  11. package/contracts/codex-app-server-0.150.1/types/SandboxMode.ts +5 -0
  12. package/contracts/codex-app-server-0.150.1/types/ThreadReadParams.ts +9 -0
  13. package/contracts/codex-app-server-0.150.1/types/TokenUsageBreakdown.ts +5 -0
  14. package/contracts/codex-app-server-0.150.1/types/TurnInterruptParams.ts +5 -0
  15. package/contracts/codex-app-server-0.153.4/manifest.json +27 -0
  16. package/contracts/codex-app-server-0.153.4/schema/JSONRPCMessage.json +137 -0
  17. package/contracts/codex-app-server-0.153.4/schema/v1/InitializeParams.json +84 -0
  18. package/contracts/codex-app-server-0.153.4/schema/v2/ThreadReadParams.json +17 -0
  19. package/contracts/codex-app-server-0.153.4/schema/v2/ThreadStartParams.json +515 -0
  20. package/contracts/codex-app-server-0.153.4/schema/v2/ThreadTokenUsageUpdatedNotification.json +82 -0
  21. package/contracts/codex-app-server-0.153.4/schema/v2/TurnInterruptParams.json +17 -0
  22. package/contracts/codex-app-server-0.153.4/schema/v2/TurnStartParams.json +921 -0
  23. package/contracts/codex-app-server-0.153.4/types/AskForApproval.ts +5 -0
  24. package/contracts/codex-app-server-0.153.4/types/ClientNotification.ts +5 -0
  25. package/contracts/codex-app-server-0.153.4/types/SandboxMode.ts +5 -0
  26. package/contracts/codex-app-server-0.153.4/types/ThreadReadParams.ts +12 -0
  27. package/contracts/codex-app-server-0.153.4/types/TokenUsageBreakdown.ts +5 -0
  28. package/contracts/codex-app-server-0.153.4/types/TurnInterruptParams.ts +5 -0
  29. package/contracts/openhands-agent-server-v1.44.1.json +65 -0
  30. package/contracts/openhands-agent-server-v1.46.0.json +46 -0
  31. package/dist/contracts/codex-app-server-0.153.4/types/AskForApproval.d.ts +9 -0
  32. package/dist/contracts/codex-app-server-0.153.4/types/AskForApproval.js +2 -0
  33. package/dist/contracts/codex-app-server-0.153.4/types/ClientNotification.d.ts +3 -0
  34. package/dist/contracts/codex-app-server-0.153.4/types/ClientNotification.js +2 -0
  35. package/dist/contracts/codex-app-server-0.153.4/types/SandboxMode.d.ts +1 -0
  36. package/dist/contracts/codex-app-server-0.153.4/types/SandboxMode.js +2 -0
  37. package/dist/contracts/codex-app-server-0.153.4/types/ThreadReadParams.d.ts +10 -0
  38. package/dist/contracts/codex-app-server-0.153.4/types/ThreadReadParams.js +2 -0
  39. package/dist/contracts/codex-app-server-0.153.4/types/TokenUsageBreakdown.d.ts +8 -0
  40. package/dist/contracts/codex-app-server-0.153.4/types/TokenUsageBreakdown.js +2 -0
  41. package/dist/contracts/codex-app-server-0.153.4/types/TurnInterruptParams.d.ts +4 -0
  42. package/dist/contracts/codex-app-server-0.153.4/types/TurnInterruptParams.js +2 -0
  43. package/dist/src/agent-sdk-normalizer.d.ts +22 -0
  44. package/dist/src/agent-sdk-normalizer.js +995 -0
  45. package/dist/src/agent-sdk-run.d.ts +31 -0
  46. package/dist/src/agent-sdk-run.js +242 -0
  47. package/dist/src/agent-sdk-runner.d.ts +96 -0
  48. package/dist/src/agent-sdk-runner.js +407 -0
  49. package/dist/src/agent-sdk.d.ts +294 -0
  50. package/dist/src/agent-sdk.js +644 -0
  51. package/dist/src/aggregation.d.ts +183 -0
  52. package/dist/src/aggregation.js +513 -0
  53. package/dist/src/artifacts.d.ts +36 -0
  54. package/dist/src/artifacts.js +1372 -0
  55. package/dist/src/atlas-grafana.d.ts +377 -0
  56. package/dist/src/atlas-grafana.js +47 -0
  57. package/dist/src/atlas-html.d.ts +2 -0
  58. package/dist/src/atlas-html.js +34 -0
  59. package/dist/src/atlas.d.ts +130 -0
  60. package/dist/src/atlas.js +235 -0
  61. package/dist/src/behavior-assertions.d.ts +95 -0
  62. package/dist/src/behavior-assertions.js +154 -0
  63. package/dist/src/cli.d.ts +5 -0
  64. package/dist/src/cli.js +957 -0
  65. package/dist/src/codex-judge.d.ts +44 -0
  66. package/dist/src/codex-judge.js +214 -0
  67. package/dist/src/codex-run.d.ts +114 -0
  68. package/dist/src/codex-run.js +519 -0
  69. package/dist/src/codex.d.ts +187 -0
  70. package/dist/src/codex.js +1028 -0
  71. package/dist/src/contracts.d.ts +155 -0
  72. package/dist/src/contracts.js +866 -0
  73. package/dist/src/corpus.d.ts +67 -0
  74. package/dist/src/corpus.js +540 -0
  75. package/dist/src/cursor-sdk-runner.d.ts +81 -0
  76. package/dist/src/cursor-sdk-runner.js +362 -0
  77. package/dist/src/cursor-sdk.d.ts +81 -0
  78. package/dist/src/cursor-sdk.js +1078 -0
  79. package/dist/src/deepseek-adapter.d.ts +152 -0
  80. package/dist/src/deepseek-adapter.js +777 -0
  81. package/dist/src/exports.d.ts +69 -0
  82. package/dist/src/exports.js +966 -0
  83. package/dist/src/human-calibration.d.ts +167 -0
  84. package/dist/src/human-calibration.js +618 -0
  85. package/dist/src/index.d.ts +71 -0
  86. package/dist/src/index.js +38 -0
  87. package/dist/src/lifecycle.d.ts +196 -0
  88. package/dist/src/lifecycle.js +1889 -0
  89. package/dist/src/normalization-integrity.d.ts +128 -0
  90. package/dist/src/normalization-integrity.js +429 -0
  91. package/dist/src/openhands-run.d.ts +36 -0
  92. package/dist/src/openhands-run.js +415 -0
  93. package/dist/src/openhands.d.ts +130 -0
  94. package/dist/src/openhands.js +859 -0
  95. package/dist/src/pi.d.ts +203 -0
  96. package/dist/src/pi.js +1345 -0
  97. package/dist/src/process-protocol.d.ts +245 -0
  98. package/dist/src/process-protocol.js +1261 -0
  99. package/dist/src/retained-evidence.d.ts +12 -0
  100. package/dist/src/retained-evidence.js +201 -0
  101. package/dist/src/run-bundles.d.ts +193 -0
  102. package/dist/src/run-bundles.js +993 -0
  103. package/dist/src/scheduler.d.ts +109 -0
  104. package/dist/src/scheduler.js +1080 -0
  105. package/dist/src/semantic-judge.d.ts +194 -0
  106. package/dist/src/semantic-judge.js +875 -0
  107. package/dist/src/structural-observations.d.ts +124 -0
  108. package/dist/src/structural-observations.js +671 -0
  109. package/dist/src/task-packets.d.ts +115 -0
  110. package/dist/src/task-packets.js +683 -0
  111. package/dist/src/uniform-events.d.ts +120 -0
  112. package/dist/src/uniform-events.js +158 -0
  113. package/dist/src/verifiers.d.ts +116 -0
  114. package/dist/src/verifiers.js +819 -0
  115. package/dist/src/workspaces.d.ts +56 -0
  116. package/dist/src/workspaces.js +1314 -0
  117. package/docs/README.md +60 -0
  118. package/docs/development/README.md +71 -0
  119. package/docs/development/documentation-sync.md +58 -0
  120. package/docs/development/extension-contracts.md +307 -0
  121. package/docs/evaluation/README.md +48 -0
  122. package/docs/evaluation/aggregation.md +112 -0
  123. package/docs/evaluation/behavior-assertions.md +45 -0
  124. package/docs/evaluation/human-calibration.md +170 -0
  125. package/docs/evaluation/normalization-integrity.md +80 -0
  126. package/docs/evaluation/semantic-judge.md +188 -0
  127. package/docs/evaluation/structural-observations.md +84 -0
  128. package/docs/evaluation/uniform-events.md +131 -0
  129. package/docs/guides/atlas.md +144 -0
  130. package/docs/guides/evidence-and-sharing.md +100 -0
  131. package/docs/guides/operator-guide.md +424 -0
  132. package/docs/guides/quickstart.md +152 -0
  133. package/docs/guides/telemetry.md +66 -0
  134. package/docs/harnesses/README.md +31 -0
  135. package/docs/harnesses/claude-agent-sdk.md +61 -0
  136. package/docs/harnesses/codex-harness.md +174 -0
  137. package/docs/harnesses/cursor-sdk.md +149 -0
  138. package/docs/harnesses/deepseek-harness.md +134 -0
  139. package/docs/harnesses/openhands-agent-server.md +153 -0
  140. package/docs/harnesses/pi-sdk.md +66 -0
  141. package/docs/reference/README.md +19 -0
  142. package/docs/reference/agent-sdk-operational-runner.md +118 -0
  143. package/docs/reference/cli.md +114 -0
  144. package/docs/reference/contracts.md +222 -0
  145. package/docs/reference/run-bundle-contract.md +354 -0
  146. package/docs/reference/run-lifecycle.md +54 -0
  147. package/examples/cursor-sdk/README.md +11 -0
  148. package/examples/cursor-sdk/capture-profile.json +1 -0
  149. package/examples/cursor-sdk/harness.json +1 -0
  150. package/examples/cursor-sdk/model.json +1 -0
  151. package/examples/cursor-sdk/native-limits.json +1 -0
  152. package/examples/cursor-sdk/native-tool-policy.json +1 -0
  153. package/ontology/behavior-categories.v1.json +46 -0
  154. package/package.json +66 -0
  155. package/release/0.1.0/KNOWN_LIMITATIONS.md +35 -0
  156. package/release/0.1.0/README.md +46 -0
  157. package/release/0.1.0/reproducibility.json +61 -0
  158. package/release/0.2.0/KNOWN_LIMITATIONS.md +40 -0
  159. package/release/0.2.0/README.md +42 -0
  160. package/release/0.2.0/reproducibility.json +73 -0
  161. package/release/0.2.1/KNOWN_LIMITATIONS.md +18 -0
  162. package/release/0.2.1/README.md +63 -0
  163. package/release/0.2.1/reproducibility.json +73 -0
  164. package/release/README.md +13 -0
  165. package/schemas/aggregation.v1.json +293 -0
  166. package/schemas/behavior-assertions.v1.json +220 -0
  167. package/schemas/deepseek-runtime-composition.v1.schema.json +122 -0
  168. package/schemas/experiment.v1.schema.json +188 -0
  169. package/schemas/human-calibration.v1.json +336 -0
  170. package/schemas/normalization-integrity.v1.json +302 -0
  171. package/schemas/run-bundles/v1.json +1040 -0
  172. package/schemas/run-queue.v1.schema.json +206 -0
  173. package/schemas/semantic-judge.v1.json +380 -0
  174. package/schemas/structural-observations.v1.json +131 -0
  175. package/schemas/task-packet-freeze.v1.schema.json +106 -0
  176. package/schemas/task-packet.v1.schema.json +234 -0
  177. package/schemas/uniform-events/v1.json +289 -0
  178. package/scripts/atlas-grafana.sh +18 -0
@@ -0,0 +1,131 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:ebo:schema:structural-observations:v1",
4
+ "$defs": {
5
+ "identifier": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 1024,
9
+ "pattern": ".*\\S.*"
10
+ },
11
+ "reference": {
12
+ "$ref": "urn:ebo:schema:uniform-events:v1#/$defs/nativeReference"
13
+ },
14
+ "capability": {
15
+ "type": "string",
16
+ "pattern": "^(?:family:(?:message|model-request|tool|context|permission|delegation|artifact|validation|runtime|outcome)|evidence:nativeOrder)$"
17
+ },
18
+ "value": {
19
+ "oneOf": [
20
+ {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["status", "value", "unit"],
24
+ "properties": {
25
+ "status": { "const": "known" },
26
+ "value": {
27
+ "oneOf": [
28
+ { "type": "string", "maxLength": 1024 },
29
+ { "type": "number" },
30
+ { "type": "boolean" }
31
+ ]
32
+ },
33
+ "unit": { "$ref": "#/$defs/identifier" }
34
+ }
35
+ },
36
+ {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["status", "reason"],
40
+ "properties": {
41
+ "status": { "const": "unavailable" },
42
+ "reason": { "$ref": "#/$defs/identifier" }
43
+ }
44
+ }
45
+ ]
46
+ },
47
+ "observation": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["schemaVersion", "id", "runId", "attemptId", "extractor", "definition", "denominator", "value", "sourceEventIds", "sourceRecordCount", "citations"],
51
+ "properties": {
52
+ "schemaVersion": { "const": "ebo.structural-observation/v1" },
53
+ "id": { "$ref": "#/$defs/identifier" },
54
+ "runId": { "$ref": "#/$defs/identifier" },
55
+ "attemptId": { "$ref": "#/$defs/identifier" },
56
+ "extractor": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["id", "version", "requiredCapabilities"],
60
+ "properties": {
61
+ "id": { "$ref": "#/$defs/identifier" },
62
+ "version": { "const": "1.0.0" },
63
+ "requiredCapabilities": {
64
+ "type": "array",
65
+ "maxItems": 8,
66
+ "uniqueItems": true,
67
+ "items": { "$ref": "#/$defs/capability" }
68
+ }
69
+ }
70
+ },
71
+ "definition": { "type": "string", "minLength": 1, "maxLength": 2048 },
72
+ "denominator": {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": ["scope", "id", "value", "unit"],
76
+ "properties": {
77
+ "scope": { "const": "attempt" },
78
+ "id": { "$ref": "#/$defs/identifier" },
79
+ "value": { "const": 1 },
80
+ "unit": { "const": "attempt" }
81
+ }
82
+ },
83
+ "value": { "$ref": "#/$defs/value" },
84
+ "sourceEventIds": {
85
+ "type": "array",
86
+ "maxItems": 1000000,
87
+ "uniqueItems": true,
88
+ "items": { "$ref": "#/$defs/identifier" }
89
+ },
90
+ "sourceRecordCount": { "type": "integer", "minimum": 0, "maximum": 1000000 },
91
+ "citations": {
92
+ "type": "array",
93
+ "maxItems": 1000000,
94
+ "items": { "$ref": "#/$defs/reference" }
95
+ }
96
+ }
97
+ },
98
+ "set": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["schemaVersion", "runId", "attemptId", "assessmentMode", "extractorVersion", "normalization", "observations"],
102
+ "properties": {
103
+ "schemaVersion": { "const": "ebo.structural-observation-set/v1" },
104
+ "runId": { "$ref": "#/$defs/identifier" },
105
+ "attemptId": { "$ref": "#/$defs/identifier" },
106
+ "assessmentMode": { "enum": ["observational", "verified", "unknown"] },
107
+ "extractorVersion": { "const": "1.0.0" },
108
+ "normalization": {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": ["datasetDigest", "adapter", "coverage"],
112
+ "properties": {
113
+ "datasetDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
114
+ "adapter": { "$ref": "urn:ebo:schema:normalization-integrity:v1#/$defs/adapter" },
115
+ "capabilityProfile": { "$ref": "urn:ebo:schema:uniform-events:v1#/$defs/capabilityProfile" },
116
+ "coverage": { "$ref": "urn:ebo:schema:normalization-integrity:v1#/$defs/coverageReport" }
117
+ }
118
+ },
119
+ "observations": {
120
+ "type": "array",
121
+ "maxItems": 1000000,
122
+ "items": { "$ref": "#/$defs/observation" }
123
+ }
124
+ }
125
+ }
126
+ },
127
+ "oneOf": [
128
+ { "$ref": "#/$defs/observation" },
129
+ { "$ref": "#/$defs/set" }
130
+ ]
131
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ebo.dev/schemas/task-packet-freeze.v1.schema.json",
4
+ "title": "EBO task packet freeze v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "packetId",
10
+ "packetLocator",
11
+ "preAdmissionDigest",
12
+ "packetDigest",
13
+ "components",
14
+ "aggregateDigest",
15
+ "frozenAt"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": { "const": "ebo.task-packet-freeze/v1" },
19
+ "packetId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
20
+ "assessmentMode": { "enum": ["observational", "verified"] },
21
+ "packetLocator": {
22
+ "type": "string",
23
+ "maxLength": 960,
24
+ "pattern": "^(?!/)(?!(?:[^/]+/){64})(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*(?:^|/)\\.[Gg][Ii][Tt](?:/|$))(?!.*(?:^|/)[^/]{256})(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.[^/]*)?(?:/|$))(?!.*/$)[A-Za-z0-9][A-Za-z0-9._/-]*$"
25
+ },
26
+ "preAdmissionDigest": { "$ref": "#/$defs/digest" },
27
+ "packetDigest": { "$ref": "#/$defs/digest" },
28
+ "components": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["prompt", "fixture", "reference", "verifier", "reviewRecord", "controlledPerturbation"],
32
+ "properties": {
33
+ "prompt": { "$ref": "#/$defs/digest" },
34
+ "fixture": { "$ref": "#/$defs/digest" },
35
+ "reference": { "$ref": "#/$defs/referenceComponent" },
36
+ "verifier": {
37
+ "oneOf": [
38
+ { "$ref": "#/$defs/digest" },
39
+ { "type": "null" }
40
+ ]
41
+ },
42
+ "reviewRecord": { "$ref": "#/$defs/digest" },
43
+ "controlledPerturbation": { "$ref": "#/$defs/controlledPerturbationComponent" }
44
+ }
45
+ },
46
+ "aggregateDigest": { "$ref": "#/$defs/digest" },
47
+ "frozenAt": {
48
+ "type": "string",
49
+ "format": "date-time",
50
+ "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])[Tt](?:[01][0-9]|2[0-3]):[0-5][0-9]:(?:[0-5][0-9]|60)(?:\\.[0-9]+)?(?:[Zz]|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])$"
51
+ }
52
+ },
53
+ "$defs": {
54
+ "digest": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["algorithm", "value"],
58
+ "properties": {
59
+ "algorithm": { "const": "sha256" },
60
+ "value": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
61
+ }
62
+ },
63
+ "referenceComponent": {
64
+ "oneOf": [
65
+ {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": ["status", "digest"],
69
+ "properties": {
70
+ "status": { "const": "referenced" },
71
+ "digest": { "$ref": "#/$defs/digest" }
72
+ }
73
+ },
74
+ {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["status"],
78
+ "properties": {
79
+ "status": { "enum": ["not-provided", "unsupported"] }
80
+ }
81
+ }
82
+ ]
83
+ },
84
+ "controlledPerturbationComponent": {
85
+ "oneOf": [
86
+ {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": ["status", "digest"],
90
+ "properties": {
91
+ "status": { "const": "referenced" },
92
+ "digest": { "$ref": "#/$defs/digest" }
93
+ }
94
+ },
95
+ {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": ["status"],
99
+ "properties": {
100
+ "status": { "enum": ["not-applied", "unsupported"] }
101
+ }
102
+ }
103
+ ]
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,234 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ebo.dev/schemas/task-packet.v1.schema.json",
4
+ "title": "EBO task packet v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "id",
10
+ "agentInput",
11
+ "provenance",
12
+ "controlledPerturbation",
13
+ "sharing",
14
+ "admission"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": { "const": "ebo.task-packet/v1" },
18
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
19
+ "assessmentMode": { "enum": ["observational", "verified"] },
20
+ "agentInput": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["prompt", "fixture"],
24
+ "properties": {
25
+ "prompt": { "type": "string", "pattern": ".*\\S.*" },
26
+ "fixture": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["source", "materializer"],
30
+ "properties": {
31
+ "source": { "$ref": "#/$defs/safeSource" },
32
+ "materializer": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["kind", "destination", "includePaths"],
36
+ "properties": {
37
+ "kind": { "const": "verified-archive-literal-paths-no-links-v1" },
38
+ "destination": { "const": "workspace" },
39
+ "includePaths": {
40
+ "type": "array",
41
+ "minItems": 1,
42
+ "uniqueItems": true,
43
+ "items": {
44
+ "type": "string",
45
+ "maxLength": 960,
46
+ "pattern": "^(?!/)(?!(?:[^/]+/){64})(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*(?:^|/)\\.[Gg][Ii][Tt](?:/|$))(?!.*(?:^|/)[^/]{256})(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.[^/]*)?(?:/|$))(?!.*/$)[A-Za-z0-9._@+()\\[\\]/-]+$"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "provenance": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": ["repositoryUrl", "revision", "license"],
59
+ "properties": {
60
+ "repositoryUrl": {
61
+ "type": "string",
62
+ "format": "uri",
63
+ "pattern": "^https://(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*|\\[(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?:[0-9A-Fa-f]{1,4}:){1,7}:|(?:[0-9A-Fa-f]{1,4}:){1,6}:[0-9A-Fa-f]{1,4}|(?:[0-9A-Fa-f]{1,4}:){1,5}(?::[0-9A-Fa-f]{1,4}){1,2}|(?:[0-9A-Fa-f]{1,4}:){1,4}(?::[0-9A-Fa-f]{1,4}){1,3}|(?:[0-9A-Fa-f]{1,4}:){1,3}(?::[0-9A-Fa-f]{1,4}){1,4}|(?:[0-9A-Fa-f]{1,4}:){1,2}(?::[0-9A-Fa-f]{1,4}){1,5}|[0-9A-Fa-f]{1,4}:(?:(?::[0-9A-Fa-f]{1,4}){1,6})|:(?:(?::[0-9A-Fa-f]{1,4}){1,7}|:)|(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){0,4}|(?:[0-9A-Fa-f]{1,4}:){1,5}:)(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9]))\\])(?::(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?/[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*(?:\\.git)?$",
64
+ "not": { "pattern": "/\\.\\.?(?:/|$)" }
65
+ },
66
+ "revision": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" },
67
+ "license": { "type": "string", "pattern": ".*\\S.*" }
68
+ }
69
+ },
70
+ "controlledPerturbation": {
71
+ "oneOf": [
72
+ {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": ["reference"],
76
+ "properties": {
77
+ "reference": { "$ref": "#/$defs/artifactReference" }
78
+ }
79
+ },
80
+ {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["status"],
84
+ "properties": {
85
+ "status": { "enum": ["not-applied", "unsupported"] }
86
+ }
87
+ }
88
+ ]
89
+ },
90
+ "sharing": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["classification"],
94
+ "properties": {
95
+ "classification": { "enum": ["open", "restricted", "internal"] }
96
+ }
97
+ },
98
+ "admission": { "$ref": "#/$defs/admission" },
99
+ "restricted": {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": ["referenceSolution", "verifier"],
103
+ "properties": {
104
+ "referenceSolution": {
105
+ "oneOf": [
106
+ { "$ref": "#/$defs/restrictedReference" },
107
+ {
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": ["status"],
111
+ "properties": {
112
+ "status": { "enum": ["not-provided", "unsupported"] }
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ "verifier": { "$ref": "#/$defs/restrictedReference" }
118
+ }
119
+ }
120
+ },
121
+ "allOf": [
122
+ {
123
+ "if": {
124
+ "properties": { "assessmentMode": { "const": "observational" } },
125
+ "required": ["assessmentMode"]
126
+ },
127
+ "then": { "not": { "required": ["restricted"] } }
128
+ },
129
+ {
130
+ "if": {
131
+ "properties": { "assessmentMode": { "const": "verified" } },
132
+ "required": ["assessmentMode"]
133
+ },
134
+ "then": { "required": ["restricted"] }
135
+ },
136
+ {
137
+ "if": { "not": { "required": ["assessmentMode"] } },
138
+ "then": { "required": ["restricted"] }
139
+ }
140
+ ],
141
+ "$defs": {
142
+ "admission": {
143
+ "oneOf": [
144
+ {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": ["status", "review"],
148
+ "properties": {
149
+ "status": { "const": "proposed" },
150
+ "review": { "const": null }
151
+ }
152
+ },
153
+ {
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": ["status", "review"],
157
+ "properties": {
158
+ "status": { "enum": ["admitted", "rejected"] },
159
+ "review": {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": ["reviewedAt", "reviewedBy", "reviewRecord"],
163
+ "properties": {
164
+ "reviewedAt": {
165
+ "type": "string",
166
+ "format": "date-time",
167
+ "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])[Tt](?:[01][0-9]|2[0-3]):[0-5][0-9]:(?:[0-5][0-9]|60)(?:\\.[0-9]+)?(?:[Zz]|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])$"
168
+ },
169
+ "reviewedBy": { "type": "string", "pattern": ".*\\S.*" },
170
+ "reviewRecord": { "$ref": "#/$defs/restrictedReference" }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ ]
176
+ },
177
+ "digest": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": ["algorithm", "value"],
181
+ "properties": {
182
+ "algorithm": { "const": "sha256" },
183
+ "value": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
184
+ }
185
+ },
186
+ "safeSource": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "required": ["kind", "format", "limits", "locator", "digest"],
190
+ "properties": {
191
+ "kind": { "const": "sanitized-archive" },
192
+ "format": { "const": "tar-gzip-v1" },
193
+ "limits": {
194
+ "type": "object",
195
+ "additionalProperties": false,
196
+ "required": ["maxCompressedBytes", "maxExpandedBytes", "maxMembers"],
197
+ "properties": {
198
+ "maxCompressedBytes": { "type": "integer", "minimum": 1, "maximum": 104857600 },
199
+ "maxExpandedBytes": { "type": "integer", "minimum": 1, "maximum": 1073741824 },
200
+ "maxMembers": { "type": "integer", "minimum": 1, "maximum": 100000 }
201
+ }
202
+ },
203
+ "locator": {
204
+ "type": "string",
205
+ "maxLength": 960,
206
+ "pattern": "^(?!/)(?!(?:[^/]+/){64})(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*(?:^|/)\\.[Gg][Ii][Tt](?:/|$))(?!.*(?:^|/)[^/]{256})(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.[^/]*)?(?:/|$))(?!.*://)(?!.*@)(?!.*/$)[A-Za-z0-9][A-Za-z0-9._/-]*$"
207
+ },
208
+ "digest": { "$ref": "#/$defs/digest" }
209
+ }
210
+ },
211
+ "artifactReference": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": ["locator", "digest"],
215
+ "properties": {
216
+ "locator": {
217
+ "type": "string",
218
+ "maxLength": 960,
219
+ "pattern": "^(?!(?:[^/]+/){64})(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*(?:^|/)\\.[Gg][Ii][Tt](?:/|$))(?!.*(?:^|/)[^/]{256})(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.[^/]*)?(?:/|$))(?!.*/$)[A-Za-z0-9][A-Za-z0-9._/-]*$"
220
+ },
221
+ "digest": { "$ref": "#/$defs/digest" }
222
+ }
223
+ },
224
+ "restrictedReference": {
225
+ "type": "object",
226
+ "additionalProperties": false,
227
+ "required": ["locator", "digest"],
228
+ "properties": {
229
+ "locator": { "type": "string", "pattern": ".*\\S.*" },
230
+ "digest": { "$ref": "#/$defs/digest" }
231
+ }
232
+ }
233
+ }
234
+ }