Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

18.8 KB
Raw Blame
{
  "schemaVersion": 1,
  "targetPlaceholder": "example-worker",
  "actions": {
    "host.summary": {
      "description": "Report bounded host, CPU, load, and runner-disk information.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "argv": ["/usr/local/libexec/pixel-ops-action", "host", "summary"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 30,
      "exclusiveTarget": false
    },
    "host.processes": {
      "description": "Report a bounded process inventory.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "argv": ["/usr/local/libexec/pixel-ops-action", "host", "processes"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 30,
      "exclusiveTarget": false
    },
    "host.gpu": {
      "description": "Report bounded NVIDIA GPU inventory and health data when available.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "argv": ["/usr/local/libexec/pixel-ops-action", "host", "gpu"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 30,
      "exclusiveTarget": false
    },
    "service.status": {
      "description": "Read bounded status for one operator-configured service.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "parameters": {"service": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/local/libexec/pixel-ops-action", "host", "service-status", "{service}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 30,
      "exclusiveTarget": false
    },
    "repo.status": {
      "description": "Read status for one operator-configured repository.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "parameters": {"repository": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/local/libexec/pixel-ops-action", "repo", "status", "{repository}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 30,
      "exclusiveTarget": false
    },
    "repo.fetch": {
      "description": "Fetch and prune one operator-configured repository origin.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {"repository": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/local/libexec/pixel-ops-action", "repo", "fetch", "{repository}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 600,
      "exclusiveTarget": true
    },
    "repo.checkout": {
      "description": "Check out one policy-allowed ref in a configured repository.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {
        "repository": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "ref": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,199}$", "maxLength": 200}
      },
      "argv": ["/usr/local/libexec/pixel-ops-action", "repo", "checkout", "{repository}", "{ref}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 120,
      "exclusiveTarget": true
    },
    "repo.recipe": {
      "description": "Run one fixed operator-configured build, test, lint, or package recipe.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": false,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {
        "repository": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "recipe": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}
      },
      "argv": ["/usr/local/libexec/pixel-ops-action", "repo", "recipe", "{repository}", "{recipe}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 3600,
      "exclusiveTarget": true
    },
    "artifact.checksum": {
      "description": "Hash one regular file below the runner job root.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "parameters": {"path": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,255}$", "maxLength": 256}},
      "argv": ["/usr/local/libexec/pixel-ops-action", "artifact", "checksum", "{path}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 300,
      "exclusiveTarget": false
    },
    "artifact.compare": {
      "description": "Compare two regular files below the runner job root by SHA-256 and size.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "parameters": {
        "left": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,255}$", "maxLength": 256},
        "right": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,255}$", "maxLength": 256}
      },
      "argv": ["/usr/local/libexec/pixel-ops-action", "artifact", "compare", "{left}", "{right}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 300,
      "exclusiveTarget": false
    },
    "artifact.collect": {
      "description": "Copy one configured collection source into runner quarantine without overwrite.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": false,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {
        "source": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "destination": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$", "maxLength": 200}
      },
      "argv": ["/usr/local/libexec/pixel-ops-action", "artifact", "collect", "{source}", "{destination}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 300,
      "exclusiveTarget": true
    },
    "artifact.archive": {
      "description": "Create a no-symlink bounded tar archive below the runner job root.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": false,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {
        "source": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,255}$", "maxLength": 256},
        "destination": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$", "maxLength": 200}
      },
      "argv": ["/usr/local/libexec/pixel-ops-action", "artifact", "archive", "{source}", "{destination}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 900,
      "exclusiveTarget": true
    },
    "artifact.cleanup": {
      "description": "Remove one reviewed directory below the dedicated runner job root.",
      "tier": "managed",
      "effect": "manage",
      "defaultAuthority": "propose",
      "idempotent": false,
      "reversible": false,
      "targets": ["example-worker"],
      "parameters": {"path": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,255}$", "maxLength": 256}},
      "argv": ["/usr/local/libexec/pixel-ops-action", "artifact", "cleanup", "{path}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 300,
      "exclusiveTarget": true
    },
    "service.verify": {
      "description": "Verify one operator-configured service through the root-owned helper.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "parameters": {"service": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "service", "verify", "{service}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 120,
      "exclusiveTarget": false
    },
    "service.restart": {
      "description": "Transactionally restart and verify one operator-configured service, restoring its prior state on failure.",
      "tier": "managed",
      "effect": "manage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "rollbackAction": "service.rollback",
      "verificationAction": "service.verify",
      "targets": ["example-worker"],
      "parameters": {"service": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "service", "restart", "{service}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 300,
      "exclusiveTarget": true
    },
    "service.rollback": {
      "description": "Restore one operator-configured service to its configured rollback state.",
      "tier": "managed",
      "effect": "manage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "verificationAction": "service.verify",
      "targets": ["example-worker"],
      "parameters": {"service": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "service", "rollback", "{service}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 300,
      "exclusiveTarget": true
    },
    "deploy.verify": {
      "description": "Verify the active immutable release for one configured deployment.",
      "tier": "read",
      "effect": "observe",
      "defaultAuthority": "observe",
      "idempotent": true,
      "reversible": false,
      "targets": ["example-worker"],
      "parameters": {"deployment": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "deploy", "verify", "{deployment}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 180,
      "exclusiveTarget": false
    },
    "deploy.activate": {
      "description": "Atomically activate and verify one immutable release, automatically restoring the prior release on failure.",
      "tier": "managed",
      "effect": "manage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "rollbackAction": "deploy.rollback",
      "verificationAction": "deploy.verify",
      "targets": ["example-worker"],
      "parameters": {
        "deployment": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "release": {"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "maxLength": 128}
      },
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "deploy", "activate", "{deployment}", "{release}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 600,
      "exclusiveTarget": true
    },
    "deploy.rollback": {
      "description": "Atomically swap a configured deployment back to its previous immutable release and verify it.",
      "tier": "managed",
      "effect": "manage",
      "defaultAuthority": "propose",
      "idempotent": false,
      "reversible": true,
      "rollbackAction": "deploy.rollback",
      "verificationAction": "deploy.verify",
      "targets": ["example-worker"],
      "parameters": {"deployment": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64}},
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "deploy", "rollback", "{deployment}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 600,
      "exclusiveTarget": true
    },
    "package.verify": {
      "description": "Verify an allow-rooted staged package by exact hash and configured signature command.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {
        "package": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "path": {"pattern": "^/[A-Za-z0-9][A-Za-z0-9/._-]{0,511}$", "maxLength": 512},
        "sha256": {"pattern": "^[a-f0-9]{64}$", "maxLength": 64}
      },
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "package", "verify", "{package}", "{path}", "{sha256}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 600,
      "exclusiveTarget": true
    },
    "package.install.verify": {
      "description": "Verify the installed state of one configured package after re-verifying its exact staged artifact.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {
        "package": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "path": {"pattern": "^/[A-Za-z0-9][A-Za-z0-9/._-]{0,511}$", "maxLength": 512},
        "sha256": {"pattern": "^[a-f0-9]{64}$", "maxLength": 64}
      },
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "package", "install-verify", "{package}", "{path}", "{sha256}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 600,
      "exclusiveTarget": true
    },
    "package.rollback.verify": {
      "description": "Verify the configured post-rollback state after re-verifying the exact staged artifact.",
      "tier": "staging",
      "effect": "stage",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "targets": ["example-worker"],
      "parameters": {
        "package": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "path": {"pattern": "^/[A-Za-z0-9][A-Za-z0-9/._-]{0,511}$", "maxLength": 512},
        "sha256": {"pattern": "^[a-f0-9]{64}$", "maxLength": 64}
      },
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "package", "rollback-verify", "{package}", "{path}", "{sha256}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 600,
      "exclusiveTarget": true
    },
    "package.install": {
      "description": "Install and verify one exact staged package through fixed root-owned commands, rolling back on failure.",
      "tier": "change",
      "effect": "change",
      "defaultAuthority": "propose",
      "idempotent": false,
      "reversible": true,
      "rollbackAction": "package.rollback",
      "verificationAction": "package.install.verify",
      "targets": ["example-worker"],
      "parameters": {
        "package": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "path": {"pattern": "^/[A-Za-z0-9][A-Za-z0-9/._-]{0,511}$", "maxLength": 512},
        "sha256": {"pattern": "^[a-f0-9]{64}$", "maxLength": 64}
      },
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "package", "install", "{package}", "{path}", "{sha256}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 3600,
      "exclusiveTarget": true
    },
    "package.rollback": {
      "description": "Run the fixed rollback for one configured package after re-verifying the exact staged artifact.",
      "tier": "change",
      "effect": "change",
      "defaultAuthority": "propose",
      "idempotent": true,
      "reversible": true,
      "verificationAction": "package.rollback.verify",
      "targets": ["example-worker"],
      "parameters": {
        "package": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "maxLength": 64},
        "path": {"pattern": "^/[A-Za-z0-9][A-Za-z0-9/._-]{0,511}$", "maxLength": 512},
        "sha256": {"pattern": "^[a-f0-9]{64}$", "maxLength": 64}
      },
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "package", "rollback", "{package}", "{path}", "{sha256}"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "isolation": "dedicated-runner",
      "timeoutSeconds": 1200,
      "exclusiveTarget": true
    },
    "host.reboot": {
      "description": "Request a configured host reboot. This action is never eligible for bounded autonomy.",
      "tier": "change",
      "effect": "change",
      "defaultAuthority": "propose",
      "idempotent": false,
      "reversible": false,
      "targets": ["example-worker"],
      "argv": ["/usr/bin/sudo", "--non-interactive", "/usr/local/libexec/pixel-ops-managed", "host", "reboot", "approved"],
      "cwd": "/var/lib/pixel-runner/jobs",
      "timeoutSeconds": 30,
      "exclusiveTarget": true
    }
  },
  "authorityGrants": [
    {
      "id": "safe-runner-staging",
      "level": "bounded-auto",
      "actions": ["repo.fetch", "repo.checkout", "repo.recipe", "artifact.collect", "artifact.archive", "package.verify"],
      "targets": ["example-worker"],
      "tiers": ["staging"],
      "environments": ["lab", "test"],
      "maxExecutions": 100,
      "windowSeconds": 3600,
      "maxConcurrent": 4,
      "maxRuntimeSeconds": 3600,
      "maxOutputBytes": 262144,
      "maxArtifactBytes": 1073741824,
      "maxFailures": 10
    },
    {
      "id": "fixture-service-window",
      "level": "bounded-auto",
      "actions": ["service.restart"],
      "targets": ["example-worker"],
      "tiers": ["managed"],
      "environments": ["lab", "test"],
      "parameterConstraints": {
        "service": {"values": ["pixel-fixture"]}
      },
      "maxExecutions": 10,
      "windowSeconds": 3600,
      "maxConcurrent": 1,
      "maxRuntimeSeconds": 300,
      "maxOutputBytes": 262144,
      "maxFailures": 2
    },
    {
      "id": "fixture-deploy-window",
      "level": "bounded-auto",
      "actions": ["deploy.activate"],
      "targets": ["example-worker"],
      "tiers": ["managed"],
      "environments": ["lab", "test"],
      "parameterConstraints": {
        "deployment": {"values": ["client-app"]},
        "release": {"pattern": "^candidate-[0-9]{8}$"}
      },
      "maxExecutions": 10,
      "windowSeconds": 3600,
      "maxConcurrent": 1,
      "maxRuntimeSeconds": 600,
      "maxOutputBytes": 262144,
      "maxFailures": 2
    }
  ]
}