Skip to content

Commit bdcb630

Browse files
authored
Merge pull request #23 from SourceOS-Linux/schemas-control-node-seam-v0
2 parents 42e166d + b347df3 commit bdcb630

8 files changed

Lines changed: 248 additions & 0 deletions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"id": "urn:srcos:build-evidence:sourceos-workstation-v0-2026-04-15",
3+
"type": "BuildValidationEvidenceBundle",
4+
"specVersion": "2.0.0",
5+
"buildRef": "urn:srcos:build:sourceos-workstation-v0-2026-04-15",
6+
"profileRef": "urn:srcos:control-node:macbook-air-operator-01",
7+
"artifactRefs": [
8+
"urn:agentplane:artifact:validation:bundle-sourceos-workstation-v0-2026-04-15",
9+
"urn:agentplane:artifact:run:sourceos-workstation-v0-2026-04-15",
10+
"urn:agentplane:artifact:replay:sourceos-workstation-v0-2026-04-15"
11+
],
12+
"scenarioResults": [
13+
{
14+
"scenarioId": "sourceos.first_boot.dev_init.v1",
15+
"status": "passed",
16+
"artifactRef": "urn:agentplane:artifact:validation:sourceos.first_boot.dev_init.v1"
17+
},
18+
{
19+
"scenarioId": "node-commander.local.bootstrap.v0",
20+
"status": "passed",
21+
"artifactRef": "urn:agentplane:artifact:run:node-commander.local.bootstrap.v0"
22+
}
23+
],
24+
"promotionGateRef": "urn:srcos:image-gate:sourceos-workstation-v0-dev",
25+
"replayRef": "urn:agentplane:artifact:replay:sourceos-workstation-v0-2026-04-15",
26+
"issuedAt": "2026-04-15T22:45:00Z"
27+
}

examples/control_node_profile.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"id": "urn:srcos:control-node:macbook-air-operator-01",
3+
"type": "ControlNodeProfile",
4+
"specVersion": "2.0.0",
5+
"hostRole": "operator-control-node",
6+
"hostPlatform": "aarch64-darwin",
7+
"containerRuntime": "podman",
8+
"nodeCommanderRuntimeRef": "urn:srcos:node-commander:runtime:macbook-air-operator-01",
9+
"placementOrder": [
10+
"local",
11+
"trusted-private",
12+
"attested-fog",
13+
"burst-cloud"
14+
],
15+
"workspace": {
16+
"configDir": "/etc/node-commander",
17+
"stateDir": "/var/lib/node-commander",
18+
"evidenceDir": "/var/lib/node-commander/evidence"
19+
}
20+
}

examples/image_promotion_gate.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"id": "urn:srcos:image-gate:sourceos-workstation-v0-dev",
3+
"type": "ImagePromotionGate",
4+
"specVersion": "2.0.0",
5+
"candidateBuildRef": "urn:srcos:build:sourceos-workstation-v0-2026-04-15",
6+
"profileRef": "urn:srcos:control-node:macbook-air-operator-01",
7+
"requiredArtifacts": [
8+
"validation-artifact.json",
9+
"run-artifact.json",
10+
"replay-artifact.json"
11+
],
12+
"requiredChecks": [
13+
"static-validation",
14+
"scenario-pass",
15+
"promotion-evidence-complete"
16+
],
17+
"decision": "approved",
18+
"reasonCodes": [
19+
"all-required-checks-passed"
20+
],
21+
"gitUpdate": {
22+
"allowed": true,
23+
"targetRepo": "SociOS-Linux/source-os",
24+
"targetRef": "main"
25+
},
26+
"taskCompletion": {
27+
"allowed": true,
28+
"issueRef": "issue://source-os/workstation-v0-bootstrap"
29+
}
30+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"id": "urn:srcos:node-commander:runtime:macbook-air-operator-01",
3+
"type": "NodeCommanderRuntime",
4+
"specVersion": "2.0.0",
5+
"runtimeMode": "bootstrap",
6+
"packaging": {
7+
"kind": "oci-image",
8+
"imageRef": "us-central1-docker.pkg.dev/socioprophet-web/node-commander/node-commander:dev-boot",
9+
"entrypoint": "podman --connection podman-machine-default run --pull=never --rm --replace --name node-commander <image>"
10+
},
11+
"execution": {
12+
"scope": "user",
13+
"serviceManager": "launchd",
14+
"rootless": true
15+
},
16+
"config": {
17+
"configDir": "/etc/node-commander",
18+
"stateDir": "/var/lib/node-commander",
19+
"logDestination": "/tmp/node-commander.log"
20+
}
21+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.srcos.ai/v2/BuildValidationEvidenceBundle.json",
4+
"title": "BuildValidationEvidenceBundle",
5+
"description": "Evidence bundle tying build identity, scenario outcomes, and promotion references together for image validation.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"required": ["id", "type", "specVersion", "buildRef", "profileRef", "artifactRefs", "scenarioResults", "issuedAt"],
9+
"properties": {
10+
"id": { "type": "string", "pattern": "^urn:srcos:build-evidence:" },
11+
"type": { "const": "BuildValidationEvidenceBundle" },
12+
"specVersion": { "type": "string" },
13+
"buildRef": { "type": "string" },
14+
"profileRef": { "type": "string", "pattern": "^urn:srcos:control-node:" },
15+
"artifactRefs": { "type": "array", "items": { "type": "string" } },
16+
"scenarioResults": {
17+
"type": "array",
18+
"items": {
19+
"type": "object",
20+
"additionalProperties": false,
21+
"required": ["scenarioId", "status", "artifactRef"],
22+
"properties": {
23+
"scenarioId": { "type": "string" },
24+
"status": { "enum": ["passed", "failed", "skipped"] },
25+
"artifactRef": { "type": "string" }
26+
}
27+
}
28+
},
29+
"promotionGateRef": { "type": ["string", "null"], "pattern": "^urn:srcos:image-gate:" },
30+
"replayRef": { "type": ["string", "null"] },
31+
"issuedAt": { "type": "string", "format": "date-time" }
32+
}
33+
}

schemas/ControlNodeProfile.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.srcos.ai/v2/ControlNodeProfile.json",
4+
"title": "ControlNodeProfile",
5+
"description": "Typed profile for an operator-side local-first control node.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"required": ["id", "type", "specVersion", "hostRole", "hostPlatform", "containerRuntime", "placementOrder", "workspace"],
9+
"properties": {
10+
"id": { "type": "string", "pattern": "^urn:srcos:control-node:" },
11+
"type": { "const": "ControlNodeProfile" },
12+
"specVersion": { "type": "string" },
13+
"hostRole": { "enum": ["operator-control-node"] },
14+
"hostPlatform": { "type": "string" },
15+
"containerRuntime": { "enum": ["podman"] },
16+
"nodeCommanderRuntimeRef": { "type": ["string", "null"], "pattern": "^urn:srcos:node-commander:" },
17+
"placementOrder": {
18+
"type": "array",
19+
"items": { "enum": ["local", "trusted-private", "attested-fog", "burst-cloud"] },
20+
"minItems": 1
21+
},
22+
"workspace": {
23+
"type": "object",
24+
"additionalProperties": false,
25+
"required": ["configDir", "stateDir", "evidenceDir"],
26+
"properties": {
27+
"configDir": { "type": "string" },
28+
"stateDir": { "type": "string" },
29+
"evidenceDir": { "type": "string" }
30+
}
31+
}
32+
}
33+
}

schemas/ImagePromotionGate.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.srcos.ai/v2/ImagePromotionGate.json",
4+
"title": "ImagePromotionGate",
5+
"description": "Promotion decision envelope for whether a candidate image may update a Git repository and mark a task complete.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"required": ["id", "type", "specVersion", "candidateBuildRef", "profileRef", "requiredArtifacts", "requiredChecks", "decision", "gitUpdate", "taskCompletion"],
9+
"properties": {
10+
"id": { "type": "string", "pattern": "^urn:srcos:image-gate:" },
11+
"type": { "const": "ImagePromotionGate" },
12+
"specVersion": { "type": "string" },
13+
"candidateBuildRef": { "type": "string" },
14+
"profileRef": { "type": "string", "pattern": "^urn:srcos:control-node:" },
15+
"requiredArtifacts": { "type": "array", "items": { "type": "string" } },
16+
"requiredChecks": { "type": "array", "items": { "type": "string" } },
17+
"decision": { "enum": ["pending", "approved", "denied", "waived"] },
18+
"reasonCodes": { "type": "array", "items": { "type": "string" } },
19+
"gitUpdate": {
20+
"type": "object",
21+
"additionalProperties": false,
22+
"required": ["allowed"],
23+
"properties": {
24+
"allowed": { "type": "boolean" },
25+
"targetRepo": { "type": ["string", "null"] },
26+
"targetRef": { "type": ["string", "null"] }
27+
}
28+
},
29+
"taskCompletion": {
30+
"type": "object",
31+
"additionalProperties": false,
32+
"required": ["allowed"],
33+
"properties": {
34+
"allowed": { "type": "boolean" },
35+
"issueRef": { "type": ["string", "null"] }
36+
}
37+
}
38+
}
39+
}

schemas/NodeCommanderRuntime.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.srcos.ai/v2/NodeCommanderRuntime.json",
4+
"title": "NodeCommanderRuntime",
5+
"description": "Typed runtime descriptor for a Node Commander deployment envelope.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"required": ["id", "type", "specVersion", "runtimeMode", "packaging", "execution", "config"],
9+
"properties": {
10+
"id": { "type": "string", "pattern": "^urn:srcos:node-commander:" },
11+
"type": { "const": "NodeCommanderRuntime" },
12+
"specVersion": { "type": "string" },
13+
"runtimeMode": { "enum": ["bootstrap", "service"] },
14+
"packaging": {
15+
"type": "object",
16+
"additionalProperties": false,
17+
"required": ["kind"],
18+
"properties": {
19+
"kind": { "enum": ["oci-image", "local-binary"] },
20+
"imageRef": { "type": ["string", "null"] },
21+
"entrypoint": { "type": ["string", "null"] }
22+
}
23+
},
24+
"execution": {
25+
"type": "object",
26+
"additionalProperties": false,
27+
"required": ["scope", "serviceManager", "rootless"],
28+
"properties": {
29+
"scope": { "enum": ["user", "system"] },
30+
"serviceManager": { "enum": ["launchd", "systemd"] },
31+
"rootless": { "type": "boolean" }
32+
}
33+
},
34+
"config": {
35+
"type": "object",
36+
"additionalProperties": false,
37+
"required": ["configDir", "stateDir", "logDestination"],
38+
"properties": {
39+
"configDir": { "type": "string" },
40+
"stateDir": { "type": "string" },
41+
"logDestination": { "type": "string" }
42+
}
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)