sail-api 0.4.0

Embeddable library API, daemon wire protocol and structured output schema
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sail.invalid/schema/project-result-v2.json",
  "title": "Sail managed project result v1",
  "type": "object",
  "required": [
    "kind",
    "schema_version",
    "run_id",
    "workspace",
    "context_sha256",
    "input_revision",
    "currentness",
    "exit_code",
    "targets",
    "execution",
    "notes",
    "error"
  ],
  "properties": {
    "kind": {
      "const": "sail-project-result"
    },
    "schema_version": {
      "const": 2
    },
    "run_id": {
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "context_sha256": {
      "type": "string"
    },
    "input_revision": {
      "type": "string"
    },
    "currentness": {
      "enum": [
        "current",
        "historical",
        "unknown"
      ]
    },
    "exit_code": {
      "type": [
        "integer",
        "null"
      ]
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/target"
      }
    },
    "execution": {
      "type": "object",
      "required": [
        "verifier_invocations",
        "reused_targets",
        "wall_ms"
      ],
      "properties": {
        "verifier_invocations": {
          "type": "integer",
          "minimum": 0
        },
        "reused_targets": {
          "type": "integer",
          "minimum": 0
        },
        "wall_ms": {
          "type": "number",
          "minimum": 0
        }
      }
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "engine": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "manifest_sha256"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "manifest_sha256": {
          "type": "string"
        }
      }
    },
    "no_reuse": {
      "description": "Present when the setup could not be bound to a proof receipt (SAIL3112, ADR 0046): nothing was reused or recorded, and the result is never current",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "reason",
        "verified_as"
      ],
      "properties": {
        "code": {
          "const": "SAIL3112"
        },
        "reason": {
          "type": "string"
        },
        "verified_as": {
          "enum": [
            "plain-cargo-verus",
            "managed"
          ]
        }
      }
    },
    "error": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string",
          "pattern": "^SAIL[0-9]{4}$"
        },
        "message": {
          "type": "string"
        }
      }
    }
  },
  "$defs": {
    "target": {
      "type": "object",
      "required": [
        "package_id",
        "target",
        "kind",
        "establishing_run",
        "reused",
        "requested",
        "complete",
        "report"
      ],
      "properties": {
        "package_id": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "establishing_run": {
          "description": "Proof-establishing invocation; shipped:<build identity>/<entry key> names a nonlocal shipped proof, never its local replay run",
          "type": "string"
        },
        "kind": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "reused": {
          "type": "boolean"
        },
        "scope_reuse": {
          "type": "array",
          "items": { "type": "string" },
          "minItems": 1
        },
        "requested": {
          "type": "boolean"
        },
        "complete": {
          "type": "boolean"
        },
        "dependency_store": {
          "description": "Key of the dependency store entry this run placed in a new Cargo target (ADR 0045); absent otherwise",
          "type": "string"
        },
        "report": {
          "$ref": "verify-output-v2.json"
        },
        "dependency_build": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kind",
            "identity",
            "establishing_run"
          ],
          "properties": {
            "kind": {
              "enum": [
                "release",
                "machine-local"
              ]
            },
            "identity": {
              "type": "string"
            },
            "establishing_run": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}