@bjoernrochel/sevro 0.1.0-rc.17 → 0.1.0-rc.18

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.
@@ -280,7 +280,7 @@ It runs candidate tools under Claude Code's native sandbox with private,
280
280
  source, and result paths denied. The route disables hooks by default and does not expose
281
281
  the Write tool. It currently supports passive candidate turns only. Use
282
282
  `--protected-root` to exclude additional private paths from the candidate's
283
- filesystem access. Configure shared host tools, private caches, goals, and selected
283
+ filesystem access. Configure shared host tools, private or reusable caches, goals, and selected
284
284
  plugin hooks with [`sevro.json` or `--runtime-config-file`](runtime-v1.md).
285
285
  The same policy reaches isolated checks and native grading hosts.
286
286
 
@@ -87,7 +87,10 @@ contents and temporary native state paths do not enter identity.
87
87
  Selected [runtime configuration](runtime-v1.md) is retained under
88
88
  `configuration.redacted.runtimePolicy` and enters `configurationDigest`.
89
89
  It includes declared non-secret environment values, canonical read roots,
90
- private seed digests and optional role selections, and hook authority. Per-role output paths are resolved
90
+ private seed digests and optional role selections, shared-cache sources/slots/roles,
91
+ and hook authority. Mutable shared-cache contents are excluded; equal identities
92
+ do not establish equal cache contents or trial independence in shared mode.
93
+ Per-role output paths are resolved
91
94
  only during execution; runtime placeholders remain symbolic in identity.
92
95
  Runtime roots also retain lexical aliases, metadata discovery sources,
93
96
  and skipped optional directories. Moving or
@@ -23,10 +23,10 @@ Local installation records the selected version in the project lockfile.
23
23
 
24
24
  ## Current release
25
25
 
26
- The current release is `0.1.0-rc.17`. Install this exact version:
26
+ The current release is `0.1.0-rc.18`. Install this exact version:
27
27
 
28
28
  ```sh
29
- bun add --exact @bjoernrochel/sevro@0.1.0-rc.17
29
+ bun add --exact @bjoernrochel/sevro@0.1.0-rc.18
30
30
  ```
31
31
 
32
32
  <!-- sevro-current-release:end -->
@@ -44,7 +44,7 @@ Repository skill mounts under `.claude/skills` require explicit
44
44
  `--claude-project-settings`; otherwise repository dispatch is refused before
45
45
  launch. The bundled route disables hooks by default and omits candidate Write
46
46
  access. [Runtime configuration](runtime-v1.md) enables native goals and selected
47
- plugin hooks and reuses declared host tools with private caches. These changes
47
+ plugin hooks and reuses declared host tools with private or explicitly shared caches. These changes
48
48
  require `rc.3` or later. The CLI reference covers credential scrubbing
49
49
  and follow-ups.
50
50
 
package/docs/recipes.md CHANGED
@@ -209,9 +209,13 @@ The negative fixture changes the port to `9000`; Python raises an assertion:
209
209
  bun "$SEVRO_RECIPES/run.ts" python-uv deterministic --fail
210
210
  ```
211
211
 
212
- For real dependencies, prepare a public cache before evaluation and add a
213
- declared [seed directory](runtime-v1.md#private-writable-state), then use your locked
214
- offline install command. This dependency-free recipe needs no cache seed.
212
+ For real dependencies, prepare a public cache once outside the evaluated project
213
+ and declare a [shared cache](runtime-v1.md#reuse-a-shared-dependency-cache), then
214
+ use your locked offline install command. Select only the roles using UV; add
215
+ `checks` only when the grader needs it. The same directory can serve candidates,
216
+ hooks, and UV-based graders across trials and runs without copying the cache.
217
+ Use [private seeds](runtime-v1.md#private-writable-state) when isolated dependency
218
+ bytes matter more than disk reuse. This dependency-free recipe needs no cache seed.
215
219
 
216
220
  ### An existing mise installation
217
221
 
@@ -147,6 +147,11 @@ remain available through grading and are removed afterward, including failed
147
147
  and cancelled trials. Failed-fixture retention does not preserve them.
148
148
  Read access does not automatically retain artifact bytes in run evidence.
149
149
 
150
+ Checker private home, temporary storage, and copied dependency slots are removed
151
+ after grading on success, failure, and cancellation. Retained failed fixtures and
152
+ saved evidence do not retain checker runtime copies. Explicitly declared shared
153
+ caches survive this cleanup and remain under operator control.
154
+
150
155
  A host adapter can return `executionFailed: true` with bounded artifacts from
151
156
  a failed process. The engine retains those artifacts, skips all grading, and
152
157
  reports `failed` / `not_requested` / `not_assessed` with exit code `2`. A final
@@ -1,6 +1,6 @@
1
1
  # Runtime configuration v1
2
2
 
3
- Configure access to existing host tools, private writable caches, native goals,
3
+ Configure access to existing host tools, private state, reusable caches, native goals,
4
4
  and selected plugin hooks in `<project-root>/sevro.json`.
5
5
 
6
6
  `--runtime-config-file /absolute/path/runtime.json` selects a replacement file.
@@ -36,7 +36,13 @@ capabilities:
36
36
  }
37
37
  },
38
38
  "runtime": {
39
- "seedDirectories": [{ "source": "./public-uv-cache", "target": "uv-cache" }]
39
+ "sharedCacheDirectories": [
40
+ {
41
+ "source": "../public-uv-cache",
42
+ "target": "uv-cache",
43
+ "roles": ["candidate", "hooks"]
44
+ }
45
+ ]
40
46
  },
41
47
  "hooks": {
42
48
  "nativeGoal": true,
@@ -45,7 +51,7 @@ capabilities:
45
51
  }
46
52
  ```
47
53
 
48
- Create the example's `public-uv-cache` directory beside the configuration, or
54
+ Prepare the example's `public-uv-cache` directory outside the project, or
49
55
  omit `runtime` when no prepared cache is needed. Selected plugin names must be
50
56
  present in the case's prepared mounts; remove names that the case does not mount.
51
57
  `DARROW_CACHE_DIR` is an ordinary explicit variable in this example, not a
@@ -235,10 +241,12 @@ digits, and hyphens. `home` and `tmp` are reserved. Targets must be unique.
235
241
  An optional nonempty `roles` array selects any of `candidate`, `checks`, `hooks`,
236
242
  `semantic`, and `advisory`. For example, `"roles": ["candidate", "checks", "hooks"]`
237
243
  keeps dependency slots out of semantic and advisory runtimes. Without `roles`,
238
- execution and artifact-grading roles retain the existing selection. Response-only
244
+ candidate, hook, artifact semantic, and advisory roles receive private copies.
245
+ Shell checks require explicit `"checks"` selection; a non-UV grader receives no
246
+ implicit UV/Python cache. Existing configurations whose shell checks need seeded
247
+ dependencies must add `"checks"` to `roles`. Response-only
239
248
  semantic grading omits implicit seeds; include `"semantic"` explicitly in `roles`
240
- when that route needs dependencies. Artifact semantic grading and executable
241
- shell checks keep their declared tools and default seed selection.
249
+ when that route needs dependencies. Declared host tools remain available to shell checks.
242
250
 
243
251
  Each source tree is bounded to 16,384 entries and 512 MiB. Escaping symlinks,
244
252
  directory cycles, dangling links, and special files are refused. File content
@@ -254,6 +262,41 @@ retaining large policies can retain up to the configured per-seed byte bounds.
254
262
  Source caches are never a writable runtime. Use prepared public caches rather
255
263
  than credential-bearing homes or evaluator directories.
256
264
 
265
+ ### Reuse a shared dependency cache
266
+
267
+ `runtime.sharedCacheDirectories` opts into persistent writable caches without
268
+ copying or hashing their contents for each trial. Each entry requires `source`,
269
+ `target`, and a nonempty `roles` array drawn from the same five roles above.
270
+ The source must already be an owned, readable, writable directory. Relative paths
271
+ resolve beside the runtime file. Sevro resolves declaration symlinks to their
272
+ canonical source and revalidates that directory before execution.
273
+ Targets use the seed slot rules and must be unique across seeds and shared caches.
274
+ Sources cannot overlap each other, private seed sources, declared read-only
275
+ inputs, evaluated project/source trees, results, credentials, or native private state.
276
+
277
+ Select only roles that actually use UV, for example `"roles": ["candidate", "hooks"]`.
278
+ If a grader also uses UV, add `"checks"` to that same entry; both roles use the
279
+ same cache. Each selected private slot aliases the original directory, with a
280
+ narrow sandbox write grant. Other roles receive no slot or source grant.
281
+ Shared content survives successful, failed, and cancelled trials and later runs.
282
+ Sevro removes only disposable role state, never the declared shared source.
283
+
284
+ Prepare UV packages once outside evaluation, point `UV_CACHE_DIR` at
285
+ `{{sevro.runtime}}/uv-cache`, and reuse the existing Python installation through
286
+ declared read-only tool roots. Set `UV_PYTHON_DOWNLOADS=never` to require that
287
+ installation. Sevro keeps `UV_OFFLINE=1`; a missing dependency fails rather than
288
+ downloading during a trial. Project virtual environments and temporary files
289
+ remain disposable; UV's install/link mode can still allocate files in a virtual
290
+ environment. The shared option removes the full cache copy per trial.
291
+
292
+ Shared caches are mutable across trials, roles, and runs. Use them only for public
293
+ dependencies and accept that a participant can change them for later participants.
294
+ Use isolated seeds when dependency independence is required. Configuration identity
295
+ binds the source, slot, and roles, but excludes mutable cache contents; equal
296
+ identities therefore do not prove identical shared-cache bytes. Sevro does not
297
+ age-delete shared caches. Manage their size between evaluations with the cache
298
+ tool, such as `uv cache prune --cache-dir /absolute/public-uv-cache`.
299
+
257
300
  `{{sevro.runtime}}` in an environment value resolves to that role's writable
258
301
  root. Codex commands receive a `TMPPREFIX` inside their private `TMPDIR`,
259
302
  so zsh here-documents use their existing private temporary storage while shared
@@ -266,13 +309,15 @@ use. Its temporary directory stays disposable.
266
309
  Candidate, hook, checker, semantic, and advisory
267
310
  state are separate. With a runtime policy, native candidate, semantic, and
268
311
  advisory roots live in a unique runner-owned host directory outside the Git
269
- fixture. The root contains `home`, `tmp`, and declared seed slots; plugins can
312
+ fixture. The root contains `home`, `tmp`, private seed slots and selected shared-cache links; plugins can
270
313
  use paths such as `~/.darrow/reviews` without creating repository-local review
271
314
  state. Command runtime directories are separate from host authentication,
272
- configuration, and live transcript sources. Checker and hook caches also live
273
- outside candidate-controlled workspace state. Private roots survive native
315
+ configuration, and live transcript sources. Checker and hook private state also lives
316
+ outside candidate-controlled workspace state. Shared sources remain at their declared locations. Private roots survive native
274
317
  continuation turns and children, then are removed with their owning trial or
275
- host state after owned hooks terminate. Opted-in candidate artifact runtimes
318
+ host state after owned hooks terminate. Checker home, temporary storage, and copied
319
+ seeds are removed after grading even when the fixture is retained after failure
320
+ or cancellation. Results and evidence are preserved. Opted-in candidate artifact runtimes
276
321
  remain alive through grading as described below. Runs with neither fixture setup
277
322
  nor a selected runtime policy
278
323
  retain their previous writable-state locations.
@@ -525,7 +570,7 @@ run evidence. Extensions and external benchmarks consume the
525
570
  ## Evidence and compatibility
526
571
 
527
572
  `configuration.redacted.runtimePolicy` retains the selected environment,
528
- canonical read roots, seed digests, and hook declaration. The engine snapshots
573
+ canonical read roots, seed digests, shared-cache declarations, and hook declaration. The engine snapshots
529
574
  this input once; it participates in `configurationDigest` and evaluation
530
575
  identity. Symbolic runtime placeholders remain symbolic in identity, while
531
576
  execution uses per-role paths. This binds declared setup and seed contents;
@@ -539,7 +584,8 @@ file contents do not. The same discovery and skip evidence reaches
539
584
  `sevro.host.runtime` observations.
540
585
 
541
586
  Bundled hosts supply `sevro.host.runtime` with the applied policy digest, role,
542
- environment names, read roots, and seed slots. `sevro.host.hooks` records source
587
+ environment names, read roots, seed slots, and selected shared-cache declarations.
588
+ Shared entries contain no content digest. `sevro.host.hooks` records source
543
589
  and effective plugin digests plus observed executions and their exit codes.
544
590
  An empty execution list does not prove hook activation. Partial lifecycle
545
591
  evidence remains partial. Cases can require these observations; missing required
@@ -549,7 +595,8 @@ task verdict.
549
595
  `--toolchain-bin-dir` and `--claude-uv-cache-dir` are deprecated. They keep their
550
596
  previous behavior with a warning when no runtime file is selected. Combining
551
597
  them with a runtime file fails before execution. Migrate to `environment`,
552
- `filesystem`, and private seed slots; removal is no earlier than `0.2.0`.
598
+ `filesystem`, and either private seed slots or shared-cache declarations; removal
599
+ is no earlier than `0.2.0`. The deprecated UV option continues to copy privately.
553
600
  See the [CLI reference](development-cli.md), [native hosts](native-hosts.md),
554
601
  and [identity contract](identity-v1.md).
555
602
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjoernrochel/sevro",
3
- "version": "0.1.0-rc.17",
3
+ "version": "0.1.0-rc.18",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "A standalone evaluation runner for agentic coding capabilities",
6
6
  "type": "module",
@@ -62,6 +62,38 @@
62
62
  }
63
63
  }
64
64
  },
65
+ "sharedCacheDirectories": {
66
+ "type": "array",
67
+ "maxItems": 16,
68
+ "items": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": ["source", "target", "roles"],
72
+ "properties": {
73
+ "source": { "type": "string", "minLength": 1, "maxLength": 4096 },
74
+ "target": {
75
+ "type": "string",
76
+ "pattern": "^[a-z][a-z0-9-]{0,63}$",
77
+ "not": { "enum": ["home", "tmp"] }
78
+ },
79
+ "roles": {
80
+ "type": "array",
81
+ "minItems": 1,
82
+ "maxItems": 5,
83
+ "uniqueItems": true,
84
+ "items": {
85
+ "enum": [
86
+ "candidate",
87
+ "checks",
88
+ "hooks",
89
+ "semantic",
90
+ "advisory"
91
+ ]
92
+ }
93
+ }
94
+ }
95
+ }
96
+ },
65
97
  "seedDirectories": {
66
98
  "type": "array",
67
99
  "maxItems": 16,
@@ -1,4 +1,5 @@
1
1
  import { rm } from "node:fs/promises";
2
+ import { hashJson } from "../identity";
2
3
  import {
3
4
  allocateCandidateRuntime,
4
5
  candidateArtifactRoots,
@@ -38,7 +39,10 @@ import type {
38
39
  ObservationCompleteness,
39
40
  TaskVerdict,
40
41
  } from "../contract-types";
41
- import { clearFixtureContents } from "../fixtures/cleanup";
42
+ import {
43
+ clearFixtureContents,
44
+ removeDisposableDirectory,
45
+ } from "../fixtures/cleanup";
42
46
  import { retainWorkspace } from "../fixtures/workspace-state";
43
47
  import { gitHeadRevision } from "../graders/git-head";
44
48
  import {
@@ -789,6 +793,13 @@ class EvaluationTrial {
789
793
  evaluationProgress(this.options, stage, status, this.trial);
790
794
  }
791
795
  private async cleanup(): Promise<void> {
796
+ await removeDisposableDirectory(
797
+ join(
798
+ this.context.resources.stateDir,
799
+ "shell-sandbox/runtime",
800
+ hashJson(this.fixture.workspace),
801
+ ),
802
+ );
792
803
  if (this.state.candidateTranscriptRoot)
793
804
  await rm(this.state.candidateTranscriptRoot, {
794
805
  recursive: true,
@@ -15,6 +15,18 @@ async function restoreDirectoryAccess(path: string): Promise<void> {
15
15
  await restoreDirectoryAccess(join(path, child.name));
16
16
  }
17
17
 
18
+ /** Remove owned disposable state without following cache or fixture symlinks. */
19
+ export async function removeDisposableDirectory(path: string): Promise<void> {
20
+ try {
21
+ await rm(path, { recursive: true, force: true });
22
+ } catch (error) {
23
+ if ((error as NodeJS.ErrnoException).code === "ENOTDIR") return;
24
+ if (!permissionFailure(error)) throw error;
25
+ await restoreDirectoryAccess(path);
26
+ await rm(path, { recursive: true, force: true });
27
+ }
28
+ }
29
+
18
30
  /** Clear a completed fixture while preserving its reserved root for active peers. */
19
31
  export async function clearFixtureContents(workspace: string): Promise<void> {
20
32
  const root = await lstat(workspace);
@@ -26,13 +38,7 @@ export async function clearFixtureContents(workspace: string): Promise<void> {
26
38
  await Promise.all(
27
39
  names.map(async (name) => {
28
40
  const path = join(workspace, name);
29
- try {
30
- await rm(path, { recursive: true, force: true });
31
- } catch (error) {
32
- if (!permissionFailure(error)) throw error;
33
- await restoreDirectoryAccess(path);
34
- await rm(path, { recursive: true, force: true });
35
- }
41
+ await removeDisposableDirectory(path);
36
42
  }),
37
43
  );
38
44
  }
@@ -1,2 +1,2 @@
1
1
  // Generated by bun run schemas:generate; do not edit.
2
- "use strict";module.exports = validate104;module.exports.default = validate104;const schema164 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"urn:sevro:schema:runtime:v1","title":"Sevro runtime policy v1","type":"object","additionalProperties":false,"required":["format"],"properties":{"codexState":{"type":"boolean"},"network":{"type":"object","additionalProperties":false,"properties":{"localHttp":{"type":"boolean"}}},"nativeTranscripts":{"type":"boolean"},"hooks":{"type":"object","additionalProperties":false,"properties":{"nativeGoal":{"type":"boolean"},"plugins":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9-]*$","maxLength":128}}}},"runtime":{"type":"object","additionalProperties":false,"properties":{"artifactDirectories":{"type":"array","maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["name","path"],"properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"path":{"type":"string","minLength":1,"maxLength":4096}}}},"seedDirectories":{"type":"array","maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["source","target"],"properties":{"source":{"type":"string","minLength":1,"maxLength":4096},"target":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$","not":{"enum":["home","tmp"]}},"roles":{"type":"array","minItems":1,"maxItems":5,"uniqueItems":true,"items":{"enum":["candidate","checks","hooks","semantic","advisory"]}}}}}}},"format":{"const":"sevro.runtime.v1"},"filesystem":{"type":"object","additionalProperties":false,"properties":{"optionalReadOnlyRoots":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":4096}},"readOnlyRoots":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":4096}}}},"environment":{"type":"object","additionalProperties":false,"properties":{"inherit":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"}},"set":{"type":"object","maxProperties":64,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"additionalProperties":{"type":"string","maxLength":8192}}}}}};const func2 = require("ajv/dist/runtime/ucs2length").default;const func0 = require("ajv/dist/runtime/equal").default;const pattern55 = new RegExp("^[a-z][a-z0-9-]*$", "u");const pattern56 = new RegExp("^[a-z][a-z0-9_]{0,63}$", "u");const pattern57 = new RegExp("^[a-z][a-z0-9-]{0,63}$", "u");const pattern58 = new RegExp("^[A-Za-z_][A-Za-z0-9_]{0,127}$", "u");function validate104(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="urn:sevro:schema:runtime:v1" */;let vErrors = null;let errors = 0;const evaluated0 = validate104.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.format === undefined) && (missing0 = "format")){validate104.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs1 = errors;for(const key0 in data){if(!((((((((key0 === "codexState") || (key0 === "network")) || (key0 === "nativeTranscripts")) || (key0 === "hooks")) || (key0 === "runtime")) || (key0 === "format")) || (key0 === "filesystem")) || (key0 === "environment"))){validate104.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.codexState !== undefined){const _errs2 = errors;if(typeof data.codexState !== "boolean"){validate104.errors = [{instancePath:instancePath+"/codexState",schemaPath:"#/properties/codexState/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.network !== undefined){let data1 = data.network;const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){const _errs6 = errors;for(const key1 in data1){if(!(key1 === "localHttp")){validate104.errors = [{instancePath:instancePath+"/network",schemaPath:"#/properties/network/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs6 === errors){if(data1.localHttp !== undefined){if(typeof data1.localHttp !== "boolean"){validate104.errors = [{instancePath:instancePath+"/network/localHttp",schemaPath:"#/properties/network/properties/localHttp/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}}}}else {validate104.errors = [{instancePath:instancePath+"/network",schemaPath:"#/properties/network/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.nativeTranscripts !== undefined){const _errs9 = errors;if(typeof data.nativeTranscripts !== "boolean"){validate104.errors = [{instancePath:instancePath+"/nativeTranscripts",schemaPath:"#/properties/nativeTranscripts/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.hooks !== undefined){let data4 = data.hooks;const _errs11 = errors;if(errors === _errs11){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){const _errs13 = errors;for(const key2 in data4){if(!((key2 === "nativeGoal") || (key2 === "plugins"))){validate104.errors = [{instancePath:instancePath+"/hooks",schemaPath:"#/properties/hooks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"}];return false;break;}}if(_errs13 === errors){if(data4.nativeGoal !== undefined){const _errs14 = errors;if(typeof data4.nativeGoal !== "boolean"){validate104.errors = [{instancePath:instancePath+"/hooks/nativeGoal",schemaPath:"#/properties/hooks/properties/nativeGoal/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data4.plugins !== undefined){let data6 = data4.plugins;const _errs16 = errors;if(errors === _errs16){if(Array.isArray(data6)){if(data6.length > 64){validate104.errors = [{instancePath:instancePath+"/hooks/plugins",schemaPath:"#/properties/hooks/properties/plugins/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid3 = true;const len0 = data6.length;for(let i0=0; i0<len0; i0++){let data7 = data6[i0];const _errs18 = errors;if(errors === _errs18){if(typeof data7 === "string"){if(func2(data7) > 128){validate104.errors = [{instancePath:instancePath+"/hooks/plugins/" + i0,schemaPath:"#/properties/hooks/properties/plugins/items/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"}];return false;}else {if(!pattern55.test(data7)){validate104.errors = [{instancePath:instancePath+"/hooks/plugins/" + i0,schemaPath:"#/properties/hooks/properties/plugins/items/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]*$"},message:"must match pattern \""+"^[a-z][a-z0-9-]*$"+"\""}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/hooks/plugins/" + i0,schemaPath:"#/properties/hooks/properties/plugins/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid3 = _errs18 === errors;if(!valid3){break;}}if(valid3){let i1 = data6.length;let j0;if(i1 > 1){const indices0 = {};for(;i1--;){let item0 = data6[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];validate104.errors = [{instancePath:instancePath+"/hooks/plugins",schemaPath:"#/properties/hooks/properties/plugins/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"}];return false;break;}indices0[item0] = i1;}}}}}else {validate104.errors = [{instancePath:instancePath+"/hooks/plugins",schemaPath:"#/properties/hooks/properties/plugins/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}else {validate104.errors = [{instancePath:instancePath+"/hooks",schemaPath:"#/properties/hooks/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.runtime !== undefined){let data8 = data.runtime;const _errs20 = errors;if(errors === _errs20){if(data8 && typeof data8 == "object" && !Array.isArray(data8)){const _errs22 = errors;for(const key3 in data8){if(!((key3 === "artifactDirectories") || (key3 === "seedDirectories"))){validate104.errors = [{instancePath:instancePath+"/runtime",schemaPath:"#/properties/runtime/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"}];return false;break;}}if(_errs22 === errors){if(data8.artifactDirectories !== undefined){let data9 = data8.artifactDirectories;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data9)){if(data9.length > 16){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories",schemaPath:"#/properties/runtime/properties/artifactDirectories/maxItems",keyword:"maxItems",params:{limit: 16},message:"must NOT have more than 16 items"}];return false;}else {var valid6 = true;const len1 = data9.length;for(let i2=0; i2<len1; i2++){let data10 = data9[i2];const _errs25 = errors;if(errors === _errs25){if(data10 && typeof data10 == "object" && !Array.isArray(data10)){let missing1;if(((data10.name === undefined) && (missing1 = "name")) || ((data10.path === undefined) && (missing1 = "path"))){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2,schemaPath:"#/properties/runtime/properties/artifactDirectories/items/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs27 = errors;for(const key4 in data10){if(!((key4 === "name") || (key4 === "path"))){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2,schemaPath:"#/properties/runtime/properties/artifactDirectories/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"}];return false;break;}}if(_errs27 === errors){if(data10.name !== undefined){let data11 = data10.name;const _errs28 = errors;if(errors === _errs28){if(typeof data11 === "string"){if(!pattern56.test(data11)){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/name",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/name/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9_]{0,63}$"},message:"must match pattern \""+"^[a-z][a-z0-9_]{0,63}$"+"\""}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/name",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid7 = _errs28 === errors;}else {var valid7 = true;}if(valid7){if(data10.path !== undefined){let data12 = data10.path;const _errs30 = errors;if(errors === _errs30){if(typeof data12 === "string"){if(func2(data12) > 4096){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/path",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/path/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data12) < 1){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/path",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/path/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/path",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid7 = _errs30 === errors;}else {var valid7 = true;}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2,schemaPath:"#/properties/runtime/properties/artifactDirectories/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid6 = _errs25 === errors;if(!valid6){break;}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories",schemaPath:"#/properties/runtime/properties/artifactDirectories/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid5 = _errs23 === errors;}else {var valid5 = true;}if(valid5){if(data8.seedDirectories !== undefined){let data13 = data8.seedDirectories;const _errs32 = errors;if(errors === _errs32){if(Array.isArray(data13)){if(data13.length > 16){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories",schemaPath:"#/properties/runtime/properties/seedDirectories/maxItems",keyword:"maxItems",params:{limit: 16},message:"must NOT have more than 16 items"}];return false;}else {var valid8 = true;const len2 = data13.length;for(let i3=0; i3<len2; i3++){let data14 = data13[i3];const _errs34 = errors;if(errors === _errs34){if(data14 && typeof data14 == "object" && !Array.isArray(data14)){let missing2;if(((data14.source === undefined) && (missing2 = "source")) || ((data14.target === undefined) && (missing2 = "target"))){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3,schemaPath:"#/properties/runtime/properties/seedDirectories/items/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {const _errs36 = errors;for(const key5 in data14){if(!(((key5 === "source") || (key5 === "target")) || (key5 === "roles"))){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3,schemaPath:"#/properties/runtime/properties/seedDirectories/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"}];return false;break;}}if(_errs36 === errors){if(data14.source !== undefined){let data15 = data14.source;const _errs37 = errors;if(errors === _errs37){if(typeof data15 === "string"){if(func2(data15) > 4096){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/source",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/source/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data15) < 1){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/source",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/source/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/source",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/source/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid9 = _errs37 === errors;}else {var valid9 = true;}if(valid9){if(data14.target !== undefined){let data16 = data14.target;const _errs39 = errors;const _errs41 = errors;const _errs42 = errors;if(!((data16 === "home") || (data16 === "tmp"))){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var valid10 = _errs42 === errors;if(valid10){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/target",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/target/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}if(errors === _errs39){if(typeof data16 === "string"){if(!pattern57.test(data16)){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/target",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/target/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]{0,63}$"},message:"must match pattern \""+"^[a-z][a-z0-9-]{0,63}$"+"\""}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/target",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/target/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid9 = _errs39 === errors;}else {var valid9 = true;}if(valid9){if(data14.roles !== undefined){let data17 = data14.roles;const _errs43 = errors;if(errors === _errs43){if(Array.isArray(data17)){if(data17.length > 5){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"}];return false;}else {if(data17.length < 1){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid11 = true;const len3 = data17.length;for(let i4=0; i4<len3; i4++){let data18 = data17[i4];const _errs45 = errors;if(!(((((data18 === "candidate") || (data18 === "checks")) || (data18 === "hooks")) || (data18 === "semantic")) || (data18 === "advisory"))){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/roles/" + i4,schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/items/enum",keyword:"enum",params:{allowedValues: schema164.properties.runtime.properties.seedDirectories.items.properties.roles.items.enum},message:"must be equal to one of the allowed values"}];return false;}var valid11 = _errs45 === errors;if(!valid11){break;}}if(valid11){let i5 = data17.length;let j1;if(i5 > 1){outer0:for(;i5--;){for(j1 = i5; j1--;){if(func0(data17[i5], data17[j1])){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i5+" are identical)"}];return false;break outer0;}}}}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid9 = _errs43 === errors;}else {var valid9 = true;}}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i3,schemaPath:"#/properties/runtime/properties/seedDirectories/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid8 = _errs34 === errors;if(!valid8){break;}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories",schemaPath:"#/properties/runtime/properties/seedDirectories/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid5 = _errs32 === errors;}else {var valid5 = true;}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime",schemaPath:"#/properties/runtime/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs20 === errors;}else {var valid0 = true;}if(valid0){if(data.format !== undefined){const _errs46 = errors;if("sevro.runtime.v1" !== data.format){validate104.errors = [{instancePath:instancePath+"/format",schemaPath:"#/properties/format/const",keyword:"const",params:{allowedValue: "sevro.runtime.v1"},message:"must be equal to constant"}];return false;}var valid0 = _errs46 === errors;}else {var valid0 = true;}if(valid0){if(data.filesystem !== undefined){let data20 = data.filesystem;const _errs47 = errors;if(errors === _errs47){if(data20 && typeof data20 == "object" && !Array.isArray(data20)){const _errs49 = errors;for(const key6 in data20){if(!((key6 === "optionalReadOnlyRoots") || (key6 === "readOnlyRoots"))){validate104.errors = [{instancePath:instancePath+"/filesystem",schemaPath:"#/properties/filesystem/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"}];return false;break;}}if(_errs49 === errors){if(data20.optionalReadOnlyRoots !== undefined){let data21 = data20.optionalReadOnlyRoots;const _errs50 = errors;if(errors === _errs50){if(Array.isArray(data21)){if(data21.length > 64){validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots",schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid14 = true;const len4 = data21.length;for(let i6=0; i6<len4; i6++){let data22 = data21[i6];const _errs52 = errors;if(errors === _errs52){if(typeof data22 === "string"){if(func2(data22) > 4096){validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots/" + i6,schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/items/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data22) < 1){validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots/" + i6,schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots/" + i6,schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid14 = _errs52 === errors;if(!valid14){break;}}if(valid14){let i7 = data21.length;let j2;if(i7 > 1){const indices1 = {};for(;i7--;){let item1 = data21[i7];if(typeof item1 !== "string"){continue;}if(typeof indices1[item1] == "number"){j2 = indices1[item1];validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots",schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/uniqueItems",keyword:"uniqueItems",params:{i: i7, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i7+" are identical)"}];return false;break;}indices1[item1] = i7;}}}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots",schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid13 = _errs50 === errors;}else {var valid13 = true;}if(valid13){if(data20.readOnlyRoots !== undefined){let data23 = data20.readOnlyRoots;const _errs54 = errors;if(errors === _errs54){if(Array.isArray(data23)){if(data23.length > 64){validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots",schemaPath:"#/properties/filesystem/properties/readOnlyRoots/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid16 = true;const len5 = data23.length;for(let i8=0; i8<len5; i8++){let data24 = data23[i8];const _errs56 = errors;if(errors === _errs56){if(typeof data24 === "string"){if(func2(data24) > 4096){validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots/" + i8,schemaPath:"#/properties/filesystem/properties/readOnlyRoots/items/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data24) < 1){validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots/" + i8,schemaPath:"#/properties/filesystem/properties/readOnlyRoots/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots/" + i8,schemaPath:"#/properties/filesystem/properties/readOnlyRoots/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid16 = _errs56 === errors;if(!valid16){break;}}if(valid16){let i9 = data23.length;let j3;if(i9 > 1){const indices2 = {};for(;i9--;){let item2 = data23[i9];if(typeof item2 !== "string"){continue;}if(typeof indices2[item2] == "number"){j3 = indices2[item2];validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots",schemaPath:"#/properties/filesystem/properties/readOnlyRoots/uniqueItems",keyword:"uniqueItems",params:{i: i9, j: j3},message:"must NOT have duplicate items (items ## "+j3+" and "+i9+" are identical)"}];return false;break;}indices2[item2] = i9;}}}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots",schemaPath:"#/properties/filesystem/properties/readOnlyRoots/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid13 = _errs54 === errors;}else {var valid13 = true;}}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem",schemaPath:"#/properties/filesystem/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs47 === errors;}else {var valid0 = true;}if(valid0){if(data.environment !== undefined){let data25 = data.environment;const _errs58 = errors;if(errors === _errs58){if(data25 && typeof data25 == "object" && !Array.isArray(data25)){const _errs60 = errors;for(const key7 in data25){if(!((key7 === "inherit") || (key7 === "set"))){validate104.errors = [{instancePath:instancePath+"/environment",schemaPath:"#/properties/environment/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"}];return false;break;}}if(_errs60 === errors){if(data25.inherit !== undefined){let data26 = data25.inherit;const _errs61 = errors;if(errors === _errs61){if(Array.isArray(data26)){if(data26.length > 64){validate104.errors = [{instancePath:instancePath+"/environment/inherit",schemaPath:"#/properties/environment/properties/inherit/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid19 = true;const len6 = data26.length;for(let i10=0; i10<len6; i10++){let data27 = data26[i10];const _errs63 = errors;if(errors === _errs63){if(typeof data27 === "string"){if(!pattern58.test(data27)){validate104.errors = [{instancePath:instancePath+"/environment/inherit/" + i10,schemaPath:"#/properties/environment/properties/inherit/items/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z_][A-Za-z0-9_]{0,127}$"},message:"must match pattern \""+"^[A-Za-z_][A-Za-z0-9_]{0,127}$"+"\""}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/environment/inherit/" + i10,schemaPath:"#/properties/environment/properties/inherit/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid19 = _errs63 === errors;if(!valid19){break;}}if(valid19){let i11 = data26.length;let j4;if(i11 > 1){const indices3 = {};for(;i11--;){let item3 = data26[i11];if(typeof item3 !== "string"){continue;}if(typeof indices3[item3] == "number"){j4 = indices3[item3];validate104.errors = [{instancePath:instancePath+"/environment/inherit",schemaPath:"#/properties/environment/properties/inherit/uniqueItems",keyword:"uniqueItems",params:{i: i11, j: j4},message:"must NOT have duplicate items (items ## "+j4+" and "+i11+" are identical)"}];return false;break;}indices3[item3] = i11;}}}}}else {validate104.errors = [{instancePath:instancePath+"/environment/inherit",schemaPath:"#/properties/environment/properties/inherit/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid18 = _errs61 === errors;}else {var valid18 = true;}if(valid18){if(data25.set !== undefined){let data28 = data25.set;const _errs65 = errors;if(errors === _errs65){if(data28 && typeof data28 == "object" && !Array.isArray(data28)){if(Object.keys(data28).length > 64){validate104.errors = [{instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/maxProperties",keyword:"maxProperties",params:{limit: 64},message:"must NOT have more than 64 properties"}];return false;}else {for(const key8 in data28){const _errs67 = errors;if(typeof key8 === "string"){if(!pattern58.test(key8)){const err1 = {instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/propertyNames/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z_][A-Za-z0-9_]{0,127}$"},message:"must match pattern \""+"^[A-Za-z_][A-Za-z0-9_]{0,127}$"+"\"",propertyName:key8};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var valid21 = _errs67 === errors;if(!valid21){const err2 = {instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/propertyNames",keyword:"propertyNames",params:{propertyName: key8},message:"property name must be valid"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate104.errors = vErrors;return false;break;}}if(valid21){for(const key9 in data28){let data29 = data28[key9];const _errs69 = errors;if(errors === _errs69){if(typeof data29 === "string"){if(func2(data29) > 8192){validate104.errors = [{instancePath:instancePath+"/environment/set/" + key9.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/environment/properties/set/additionalProperties/maxLength",keyword:"maxLength",params:{limit: 8192},message:"must NOT have more than 8192 characters"}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/environment/set/" + key9.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/environment/properties/set/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid22 = _errs69 === errors;if(!valid22){break;}}}}}else {validate104.errors = [{instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid18 = _errs65 === errors;}else {var valid18 = true;}}}}else {validate104.errors = [{instancePath:instancePath+"/environment",schemaPath:"#/properties/environment/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs58 === errors;}else {var valid0 = true;}}}}}}}}}}}else {validate104.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate104.errors = vErrors;return errors === 0;}validate104.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
2
+ "use strict";module.exports = validate104;module.exports.default = validate104;const schema164 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"urn:sevro:schema:runtime:v1","title":"Sevro runtime policy v1","type":"object","additionalProperties":false,"required":["format"],"properties":{"codexState":{"type":"boolean"},"network":{"type":"object","additionalProperties":false,"properties":{"localHttp":{"type":"boolean"}}},"nativeTranscripts":{"type":"boolean"},"hooks":{"type":"object","additionalProperties":false,"properties":{"nativeGoal":{"type":"boolean"},"plugins":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9-]*$","maxLength":128}}}},"runtime":{"type":"object","additionalProperties":false,"properties":{"artifactDirectories":{"type":"array","maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["name","path"],"properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"path":{"type":"string","minLength":1,"maxLength":4096}}}},"sharedCacheDirectories":{"type":"array","maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["source","target","roles"],"properties":{"source":{"type":"string","minLength":1,"maxLength":4096},"target":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$","not":{"enum":["home","tmp"]}},"roles":{"type":"array","minItems":1,"maxItems":5,"uniqueItems":true,"items":{"enum":["candidate","checks","hooks","semantic","advisory"]}}}}},"seedDirectories":{"type":"array","maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["source","target"],"properties":{"source":{"type":"string","minLength":1,"maxLength":4096},"target":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,63}$","not":{"enum":["home","tmp"]}},"roles":{"type":"array","minItems":1,"maxItems":5,"uniqueItems":true,"items":{"enum":["candidate","checks","hooks","semantic","advisory"]}}}}}}},"format":{"const":"sevro.runtime.v1"},"filesystem":{"type":"object","additionalProperties":false,"properties":{"optionalReadOnlyRoots":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":4096}},"readOnlyRoots":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":4096}}}},"environment":{"type":"object","additionalProperties":false,"properties":{"inherit":{"type":"array","maxItems":64,"uniqueItems":true,"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"}},"set":{"type":"object","maxProperties":64,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"additionalProperties":{"type":"string","maxLength":8192}}}}}};const func2 = require("ajv/dist/runtime/ucs2length").default;const func0 = require("ajv/dist/runtime/equal").default;const pattern55 = new RegExp("^[a-z][a-z0-9-]*$", "u");const pattern56 = new RegExp("^[a-z][a-z0-9_]{0,63}$", "u");const pattern57 = new RegExp("^[a-z][a-z0-9-]{0,63}$", "u");const pattern59 = new RegExp("^[A-Za-z_][A-Za-z0-9_]{0,127}$", "u");function validate104(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="urn:sevro:schema:runtime:v1" */;let vErrors = null;let errors = 0;const evaluated0 = validate104.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.format === undefined) && (missing0 = "format")){validate104.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs1 = errors;for(const key0 in data){if(!((((((((key0 === "codexState") || (key0 === "network")) || (key0 === "nativeTranscripts")) || (key0 === "hooks")) || (key0 === "runtime")) || (key0 === "format")) || (key0 === "filesystem")) || (key0 === "environment"))){validate104.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.codexState !== undefined){const _errs2 = errors;if(typeof data.codexState !== "boolean"){validate104.errors = [{instancePath:instancePath+"/codexState",schemaPath:"#/properties/codexState/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.network !== undefined){let data1 = data.network;const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){const _errs6 = errors;for(const key1 in data1){if(!(key1 === "localHttp")){validate104.errors = [{instancePath:instancePath+"/network",schemaPath:"#/properties/network/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs6 === errors){if(data1.localHttp !== undefined){if(typeof data1.localHttp !== "boolean"){validate104.errors = [{instancePath:instancePath+"/network/localHttp",schemaPath:"#/properties/network/properties/localHttp/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}}}}else {validate104.errors = [{instancePath:instancePath+"/network",schemaPath:"#/properties/network/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.nativeTranscripts !== undefined){const _errs9 = errors;if(typeof data.nativeTranscripts !== "boolean"){validate104.errors = [{instancePath:instancePath+"/nativeTranscripts",schemaPath:"#/properties/nativeTranscripts/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.hooks !== undefined){let data4 = data.hooks;const _errs11 = errors;if(errors === _errs11){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){const _errs13 = errors;for(const key2 in data4){if(!((key2 === "nativeGoal") || (key2 === "plugins"))){validate104.errors = [{instancePath:instancePath+"/hooks",schemaPath:"#/properties/hooks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"}];return false;break;}}if(_errs13 === errors){if(data4.nativeGoal !== undefined){const _errs14 = errors;if(typeof data4.nativeGoal !== "boolean"){validate104.errors = [{instancePath:instancePath+"/hooks/nativeGoal",schemaPath:"#/properties/hooks/properties/nativeGoal/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data4.plugins !== undefined){let data6 = data4.plugins;const _errs16 = errors;if(errors === _errs16){if(Array.isArray(data6)){if(data6.length > 64){validate104.errors = [{instancePath:instancePath+"/hooks/plugins",schemaPath:"#/properties/hooks/properties/plugins/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid3 = true;const len0 = data6.length;for(let i0=0; i0<len0; i0++){let data7 = data6[i0];const _errs18 = errors;if(errors === _errs18){if(typeof data7 === "string"){if(func2(data7) > 128){validate104.errors = [{instancePath:instancePath+"/hooks/plugins/" + i0,schemaPath:"#/properties/hooks/properties/plugins/items/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"}];return false;}else {if(!pattern55.test(data7)){validate104.errors = [{instancePath:instancePath+"/hooks/plugins/" + i0,schemaPath:"#/properties/hooks/properties/plugins/items/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]*$"},message:"must match pattern \""+"^[a-z][a-z0-9-]*$"+"\""}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/hooks/plugins/" + i0,schemaPath:"#/properties/hooks/properties/plugins/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid3 = _errs18 === errors;if(!valid3){break;}}if(valid3){let i1 = data6.length;let j0;if(i1 > 1){const indices0 = {};for(;i1--;){let item0 = data6[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];validate104.errors = [{instancePath:instancePath+"/hooks/plugins",schemaPath:"#/properties/hooks/properties/plugins/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"}];return false;break;}indices0[item0] = i1;}}}}}else {validate104.errors = [{instancePath:instancePath+"/hooks/plugins",schemaPath:"#/properties/hooks/properties/plugins/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}else {validate104.errors = [{instancePath:instancePath+"/hooks",schemaPath:"#/properties/hooks/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.runtime !== undefined){let data8 = data.runtime;const _errs20 = errors;if(errors === _errs20){if(data8 && typeof data8 == "object" && !Array.isArray(data8)){const _errs22 = errors;for(const key3 in data8){if(!(((key3 === "artifactDirectories") || (key3 === "sharedCacheDirectories")) || (key3 === "seedDirectories"))){validate104.errors = [{instancePath:instancePath+"/runtime",schemaPath:"#/properties/runtime/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"}];return false;break;}}if(_errs22 === errors){if(data8.artifactDirectories !== undefined){let data9 = data8.artifactDirectories;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data9)){if(data9.length > 16){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories",schemaPath:"#/properties/runtime/properties/artifactDirectories/maxItems",keyword:"maxItems",params:{limit: 16},message:"must NOT have more than 16 items"}];return false;}else {var valid6 = true;const len1 = data9.length;for(let i2=0; i2<len1; i2++){let data10 = data9[i2];const _errs25 = errors;if(errors === _errs25){if(data10 && typeof data10 == "object" && !Array.isArray(data10)){let missing1;if(((data10.name === undefined) && (missing1 = "name")) || ((data10.path === undefined) && (missing1 = "path"))){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2,schemaPath:"#/properties/runtime/properties/artifactDirectories/items/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs27 = errors;for(const key4 in data10){if(!((key4 === "name") || (key4 === "path"))){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2,schemaPath:"#/properties/runtime/properties/artifactDirectories/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"}];return false;break;}}if(_errs27 === errors){if(data10.name !== undefined){let data11 = data10.name;const _errs28 = errors;if(errors === _errs28){if(typeof data11 === "string"){if(!pattern56.test(data11)){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/name",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/name/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9_]{0,63}$"},message:"must match pattern \""+"^[a-z][a-z0-9_]{0,63}$"+"\""}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/name",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid7 = _errs28 === errors;}else {var valid7 = true;}if(valid7){if(data10.path !== undefined){let data12 = data10.path;const _errs30 = errors;if(errors === _errs30){if(typeof data12 === "string"){if(func2(data12) > 4096){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/path",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/path/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data12) < 1){validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/path",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/path/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2+"/path",schemaPath:"#/properties/runtime/properties/artifactDirectories/items/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid7 = _errs30 === errors;}else {var valid7 = true;}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories/" + i2,schemaPath:"#/properties/runtime/properties/artifactDirectories/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid6 = _errs25 === errors;if(!valid6){break;}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/artifactDirectories",schemaPath:"#/properties/runtime/properties/artifactDirectories/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid5 = _errs23 === errors;}else {var valid5 = true;}if(valid5){if(data8.sharedCacheDirectories !== undefined){let data13 = data8.sharedCacheDirectories;const _errs32 = errors;if(errors === _errs32){if(Array.isArray(data13)){if(data13.length > 16){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/maxItems",keyword:"maxItems",params:{limit: 16},message:"must NOT have more than 16 items"}];return false;}else {var valid8 = true;const len2 = data13.length;for(let i3=0; i3<len2; i3++){let data14 = data13[i3];const _errs34 = errors;if(errors === _errs34){if(data14 && typeof data14 == "object" && !Array.isArray(data14)){let missing2;if((((data14.source === undefined) && (missing2 = "source")) || ((data14.target === undefined) && (missing2 = "target"))) || ((data14.roles === undefined) && (missing2 = "roles"))){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3,schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {const _errs36 = errors;for(const key5 in data14){if(!(((key5 === "source") || (key5 === "target")) || (key5 === "roles"))){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3,schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"}];return false;break;}}if(_errs36 === errors){if(data14.source !== undefined){let data15 = data14.source;const _errs37 = errors;if(errors === _errs37){if(typeof data15 === "string"){if(func2(data15) > 4096){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/source",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/source/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data15) < 1){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/source",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/source/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/source",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/source/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid9 = _errs37 === errors;}else {var valid9 = true;}if(valid9){if(data14.target !== undefined){let data16 = data14.target;const _errs39 = errors;const _errs41 = errors;const _errs42 = errors;if(!((data16 === "home") || (data16 === "tmp"))){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var valid10 = _errs42 === errors;if(valid10){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/target",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/target/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}if(errors === _errs39){if(typeof data16 === "string"){if(!pattern57.test(data16)){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/target",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/target/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]{0,63}$"},message:"must match pattern \""+"^[a-z][a-z0-9-]{0,63}$"+"\""}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/target",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/target/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid9 = _errs39 === errors;}else {var valid9 = true;}if(valid9){if(data14.roles !== undefined){let data17 = data14.roles;const _errs43 = errors;if(errors === _errs43){if(Array.isArray(data17)){if(data17.length > 5){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/roles/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"}];return false;}else {if(data17.length < 1){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/roles/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid11 = true;const len3 = data17.length;for(let i4=0; i4<len3; i4++){let data18 = data17[i4];const _errs45 = errors;if(!(((((data18 === "candidate") || (data18 === "checks")) || (data18 === "hooks")) || (data18 === "semantic")) || (data18 === "advisory"))){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/roles/" + i4,schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/roles/items/enum",keyword:"enum",params:{allowedValues: schema164.properties.runtime.properties.sharedCacheDirectories.items.properties.roles.items.enum},message:"must be equal to one of the allowed values"}];return false;}var valid11 = _errs45 === errors;if(!valid11){break;}}if(valid11){let i5 = data17.length;let j1;if(i5 > 1){outer0:for(;i5--;){for(j1 = i5; j1--;){if(func0(data17[i5], data17[j1])){validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/roles/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i5+" are identical)"}];return false;break outer0;}}}}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3+"/roles",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/properties/roles/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid9 = _errs43 === errors;}else {var valid9 = true;}}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories/" + i3,schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid8 = _errs34 === errors;if(!valid8){break;}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/sharedCacheDirectories",schemaPath:"#/properties/runtime/properties/sharedCacheDirectories/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid5 = _errs32 === errors;}else {var valid5 = true;}if(valid5){if(data8.seedDirectories !== undefined){let data19 = data8.seedDirectories;const _errs46 = errors;if(errors === _errs46){if(Array.isArray(data19)){if(data19.length > 16){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories",schemaPath:"#/properties/runtime/properties/seedDirectories/maxItems",keyword:"maxItems",params:{limit: 16},message:"must NOT have more than 16 items"}];return false;}else {var valid13 = true;const len4 = data19.length;for(let i6=0; i6<len4; i6++){let data20 = data19[i6];const _errs48 = errors;if(errors === _errs48){if(data20 && typeof data20 == "object" && !Array.isArray(data20)){let missing3;if(((data20.source === undefined) && (missing3 = "source")) || ((data20.target === undefined) && (missing3 = "target"))){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6,schemaPath:"#/properties/runtime/properties/seedDirectories/items/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {const _errs50 = errors;for(const key6 in data20){if(!(((key6 === "source") || (key6 === "target")) || (key6 === "roles"))){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6,schemaPath:"#/properties/runtime/properties/seedDirectories/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"}];return false;break;}}if(_errs50 === errors){if(data20.source !== undefined){let data21 = data20.source;const _errs51 = errors;if(errors === _errs51){if(typeof data21 === "string"){if(func2(data21) > 4096){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/source",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/source/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data21) < 1){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/source",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/source/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/source",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/source/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid14 = _errs51 === errors;}else {var valid14 = true;}if(valid14){if(data20.target !== undefined){let data22 = data20.target;const _errs53 = errors;const _errs55 = errors;const _errs56 = errors;if(!((data22 === "home") || (data22 === "tmp"))){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid15 = _errs56 === errors;if(valid15){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/target",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/target/not",keyword:"not",params:{},message:"must NOT be valid"}];return false;}else {errors = _errs55;if(vErrors !== null){if(_errs55){vErrors.length = _errs55;}else {vErrors = null;}}}if(errors === _errs53){if(typeof data22 === "string"){if(!pattern57.test(data22)){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/target",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/target/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]{0,63}$"},message:"must match pattern \""+"^[a-z][a-z0-9-]{0,63}$"+"\""}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/target",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/target/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid14 = _errs53 === errors;}else {var valid14 = true;}if(valid14){if(data20.roles !== undefined){let data23 = data20.roles;const _errs57 = errors;if(errors === _errs57){if(Array.isArray(data23)){if(data23.length > 5){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"}];return false;}else {if(data23.length < 1){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid16 = true;const len5 = data23.length;for(let i7=0; i7<len5; i7++){let data24 = data23[i7];const _errs59 = errors;if(!(((((data24 === "candidate") || (data24 === "checks")) || (data24 === "hooks")) || (data24 === "semantic")) || (data24 === "advisory"))){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/roles/" + i7,schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/items/enum",keyword:"enum",params:{allowedValues: schema164.properties.runtime.properties.seedDirectories.items.properties.roles.items.enum},message:"must be equal to one of the allowed values"}];return false;}var valid16 = _errs59 === errors;if(!valid16){break;}}if(valid16){let i8 = data23.length;let j2;if(i8 > 1){outer1:for(;i8--;){for(j2 = i8; j2--;){if(func0(data23[i8], data23[j2])){validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/uniqueItems",keyword:"uniqueItems",params:{i: i8, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i8+" are identical)"}];return false;break outer1;}}}}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6+"/roles",schemaPath:"#/properties/runtime/properties/seedDirectories/items/properties/roles/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid14 = _errs57 === errors;}else {var valid14 = true;}}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories/" + i6,schemaPath:"#/properties/runtime/properties/seedDirectories/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid13 = _errs48 === errors;if(!valid13){break;}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime/seedDirectories",schemaPath:"#/properties/runtime/properties/seedDirectories/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid5 = _errs46 === errors;}else {var valid5 = true;}}}}}else {validate104.errors = [{instancePath:instancePath+"/runtime",schemaPath:"#/properties/runtime/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs20 === errors;}else {var valid0 = true;}if(valid0){if(data.format !== undefined){const _errs60 = errors;if("sevro.runtime.v1" !== data.format){validate104.errors = [{instancePath:instancePath+"/format",schemaPath:"#/properties/format/const",keyword:"const",params:{allowedValue: "sevro.runtime.v1"},message:"must be equal to constant"}];return false;}var valid0 = _errs60 === errors;}else {var valid0 = true;}if(valid0){if(data.filesystem !== undefined){let data26 = data.filesystem;const _errs61 = errors;if(errors === _errs61){if(data26 && typeof data26 == "object" && !Array.isArray(data26)){const _errs63 = errors;for(const key7 in data26){if(!((key7 === "optionalReadOnlyRoots") || (key7 === "readOnlyRoots"))){validate104.errors = [{instancePath:instancePath+"/filesystem",schemaPath:"#/properties/filesystem/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"}];return false;break;}}if(_errs63 === errors){if(data26.optionalReadOnlyRoots !== undefined){let data27 = data26.optionalReadOnlyRoots;const _errs64 = errors;if(errors === _errs64){if(Array.isArray(data27)){if(data27.length > 64){validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots",schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid19 = true;const len6 = data27.length;for(let i9=0; i9<len6; i9++){let data28 = data27[i9];const _errs66 = errors;if(errors === _errs66){if(typeof data28 === "string"){if(func2(data28) > 4096){validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots/" + i9,schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/items/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data28) < 1){validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots/" + i9,schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots/" + i9,schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid19 = _errs66 === errors;if(!valid19){break;}}if(valid19){let i10 = data27.length;let j3;if(i10 > 1){const indices1 = {};for(;i10--;){let item1 = data27[i10];if(typeof item1 !== "string"){continue;}if(typeof indices1[item1] == "number"){j3 = indices1[item1];validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots",schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/uniqueItems",keyword:"uniqueItems",params:{i: i10, j: j3},message:"must NOT have duplicate items (items ## "+j3+" and "+i10+" are identical)"}];return false;break;}indices1[item1] = i10;}}}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/optionalReadOnlyRoots",schemaPath:"#/properties/filesystem/properties/optionalReadOnlyRoots/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid18 = _errs64 === errors;}else {var valid18 = true;}if(valid18){if(data26.readOnlyRoots !== undefined){let data29 = data26.readOnlyRoots;const _errs68 = errors;if(errors === _errs68){if(Array.isArray(data29)){if(data29.length > 64){validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots",schemaPath:"#/properties/filesystem/properties/readOnlyRoots/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid21 = true;const len7 = data29.length;for(let i11=0; i11<len7; i11++){let data30 = data29[i11];const _errs70 = errors;if(errors === _errs70){if(typeof data30 === "string"){if(func2(data30) > 4096){validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots/" + i11,schemaPath:"#/properties/filesystem/properties/readOnlyRoots/items/maxLength",keyword:"maxLength",params:{limit: 4096},message:"must NOT have more than 4096 characters"}];return false;}else {if(func2(data30) < 1){validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots/" + i11,schemaPath:"#/properties/filesystem/properties/readOnlyRoots/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots/" + i11,schemaPath:"#/properties/filesystem/properties/readOnlyRoots/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid21 = _errs70 === errors;if(!valid21){break;}}if(valid21){let i12 = data29.length;let j4;if(i12 > 1){const indices2 = {};for(;i12--;){let item2 = data29[i12];if(typeof item2 !== "string"){continue;}if(typeof indices2[item2] == "number"){j4 = indices2[item2];validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots",schemaPath:"#/properties/filesystem/properties/readOnlyRoots/uniqueItems",keyword:"uniqueItems",params:{i: i12, j: j4},message:"must NOT have duplicate items (items ## "+j4+" and "+i12+" are identical)"}];return false;break;}indices2[item2] = i12;}}}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem/readOnlyRoots",schemaPath:"#/properties/filesystem/properties/readOnlyRoots/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid18 = _errs68 === errors;}else {var valid18 = true;}}}}else {validate104.errors = [{instancePath:instancePath+"/filesystem",schemaPath:"#/properties/filesystem/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs61 === errors;}else {var valid0 = true;}if(valid0){if(data.environment !== undefined){let data31 = data.environment;const _errs72 = errors;if(errors === _errs72){if(data31 && typeof data31 == "object" && !Array.isArray(data31)){const _errs74 = errors;for(const key8 in data31){if(!((key8 === "inherit") || (key8 === "set"))){validate104.errors = [{instancePath:instancePath+"/environment",schemaPath:"#/properties/environment/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"}];return false;break;}}if(_errs74 === errors){if(data31.inherit !== undefined){let data32 = data31.inherit;const _errs75 = errors;if(errors === _errs75){if(Array.isArray(data32)){if(data32.length > 64){validate104.errors = [{instancePath:instancePath+"/environment/inherit",schemaPath:"#/properties/environment/properties/inherit/maxItems",keyword:"maxItems",params:{limit: 64},message:"must NOT have more than 64 items"}];return false;}else {var valid24 = true;const len8 = data32.length;for(let i13=0; i13<len8; i13++){let data33 = data32[i13];const _errs77 = errors;if(errors === _errs77){if(typeof data33 === "string"){if(!pattern59.test(data33)){validate104.errors = [{instancePath:instancePath+"/environment/inherit/" + i13,schemaPath:"#/properties/environment/properties/inherit/items/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z_][A-Za-z0-9_]{0,127}$"},message:"must match pattern \""+"^[A-Za-z_][A-Za-z0-9_]{0,127}$"+"\""}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/environment/inherit/" + i13,schemaPath:"#/properties/environment/properties/inherit/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid24 = _errs77 === errors;if(!valid24){break;}}if(valid24){let i14 = data32.length;let j5;if(i14 > 1){const indices3 = {};for(;i14--;){let item3 = data32[i14];if(typeof item3 !== "string"){continue;}if(typeof indices3[item3] == "number"){j5 = indices3[item3];validate104.errors = [{instancePath:instancePath+"/environment/inherit",schemaPath:"#/properties/environment/properties/inherit/uniqueItems",keyword:"uniqueItems",params:{i: i14, j: j5},message:"must NOT have duplicate items (items ## "+j5+" and "+i14+" are identical)"}];return false;break;}indices3[item3] = i14;}}}}}else {validate104.errors = [{instancePath:instancePath+"/environment/inherit",schemaPath:"#/properties/environment/properties/inherit/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid23 = _errs75 === errors;}else {var valid23 = true;}if(valid23){if(data31.set !== undefined){let data34 = data31.set;const _errs79 = errors;if(errors === _errs79){if(data34 && typeof data34 == "object" && !Array.isArray(data34)){if(Object.keys(data34).length > 64){validate104.errors = [{instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/maxProperties",keyword:"maxProperties",params:{limit: 64},message:"must NOT have more than 64 properties"}];return false;}else {for(const key9 in data34){const _errs81 = errors;if(typeof key9 === "string"){if(!pattern59.test(key9)){const err2 = {instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/propertyNames/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z_][A-Za-z0-9_]{0,127}$"},message:"must match pattern \""+"^[A-Za-z_][A-Za-z0-9_]{0,127}$"+"\"",propertyName:key9};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var valid26 = _errs81 === errors;if(!valid26){const err3 = {instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/propertyNames",keyword:"propertyNames",params:{propertyName: key9},message:"property name must be valid"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;validate104.errors = vErrors;return false;break;}}if(valid26){for(const key10 in data34){let data35 = data34[key10];const _errs83 = errors;if(errors === _errs83){if(typeof data35 === "string"){if(func2(data35) > 8192){validate104.errors = [{instancePath:instancePath+"/environment/set/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/environment/properties/set/additionalProperties/maxLength",keyword:"maxLength",params:{limit: 8192},message:"must NOT have more than 8192 characters"}];return false;}}else {validate104.errors = [{instancePath:instancePath+"/environment/set/" + key10.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/environment/properties/set/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid27 = _errs83 === errors;if(!valid27){break;}}}}}else {validate104.errors = [{instancePath:instancePath+"/environment/set",schemaPath:"#/properties/environment/properties/set/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid23 = _errs79 === errors;}else {var valid23 = true;}}}}else {validate104.errors = [{instancePath:instancePath+"/environment",schemaPath:"#/properties/environment/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs72 === errors;}else {var valid0 = true;}}}}}}}}}}}else {validate104.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate104.errors = vErrors;return errors === 0;}validate104.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
@@ -8,6 +8,7 @@ import { delimiter, join } from "node:path";
8
8
  import { prepareIsolatedCommand } from "../hosts/isolation";
9
9
  import type { RuntimePolicy } from "../runtime/config";
10
10
  import { prepareRuntimeState } from "../runtime/state";
11
+ import { sharedCacheDenyRoots } from "../runtime/shared-cache";
11
12
  import { hashJson } from "../identity";
12
13
  import {
13
14
  captureBoundedText,
@@ -279,7 +280,11 @@ async function shellRuntime(options: ShellRunOptions) {
279
280
  privateRuntimeRoot: runtime.root,
280
281
  };
281
282
  }
282
- const root = join(options.workspace, ".git", "sevro-runtime"),
283
+ const root = join(
284
+ options.privateStateRoot,
285
+ "runtime",
286
+ hashJson(options.workspace),
287
+ ),
283
288
  home = join(root, "check-home"),
284
289
  temp = join(root, "check-tmp");
285
290
  await Promise.all([
@@ -290,9 +295,10 @@ async function shellRuntime(options: ShellRunOptions) {
290
295
  root,
291
296
  home,
292
297
  temp,
293
- uvCache: join(root, "uv-cache"),
298
+ uvCache: join(options.workspace, ".git", "sevro-runtime", "uv-cache"),
294
299
  environment: {} as Record<string, string>,
295
- privateRuntimeRoot: undefined,
300
+ privateRuntimeRoot: root,
301
+ writableCacheRoots: [],
296
302
  };
297
303
  }
298
304
  type ShellRuntime = Awaited<ReturnType<typeof shellRuntime>>;
@@ -429,11 +435,15 @@ export async function runShellCheck(
429
435
  ? [options.candidateTranscriptRoot]
430
436
  : [],
431
437
  writableRuntimeRoot: runtime.privateRuntimeRoot,
438
+ writableCacheRoots: runtime.writableCacheRoots,
432
439
  });
433
440
  await requireShellRuntimeCache(options, runtime);
434
441
  return new ShellExecution(check, options, isolated, runtime).run();
435
442
  }
436
443
 
437
444
  function shellSeedSources(options: ShellRunOptions): string[] {
438
- return runtimeSeedSources(options.runtimePolicy);
445
+ return [
446
+ ...runtimeSeedSources(options.runtimePolicy),
447
+ ...sharedCacheDenyRoots(options.runtimePolicy, "checks"),
448
+ ];
439
449
  }