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.

2.9 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://osmantic.com/pixel/schemas/work-knowledge-ingestion-v1.schema.json",
  "title": "Pixel Deep Work knowledge ingestion authorization v1",
  "type": "object", "additionalProperties": false,
  "required": ["$schema", "schemaVersion", "ingestionId", "sourceId", "ownerId", "clientId", "issuedAt", "expiresAt", "singleUse", "classification", "parser", "provenance", "source", "retention", "consent", "authority", "boundary"],
  "properties": {
    "$schema": {"const": "https://osmantic.com/pixel/schemas/work-knowledge-ingestion-v1.schema.json"},
    "schemaVersion": {"const": 1},
    "ingestionId": {"type": "string", "pattern": "^workknowledgeingest-[0-9]{13}-[a-f0-9]{12}$"},
    "sourceId": {"type": "string", "pattern": "^workknowledgesource-[0-9]{13}-[a-f0-9]{12}$"},
    "ownerId": {"$ref": "#/$defs/tenant"}, "clientId": {"$ref": "#/$defs/tenant"},
    "issuedAt": {"type": "string", "format": "date-time"}, "expiresAt": {"type": "string", "format": "date-time"},
    "singleUse": {"const": true},
    "classification": {"$ref": "#/$defs/classification"},
    "parser": {"const": "plain-text-v1"},
    "provenance": {"type": "object", "additionalProperties": false, "required": ["originType", "identifierSha256", "capturedAt"], "properties": {"originType": {"enum": ["manual-text", "local-file", "generated-artifact"]}, "identifierSha256": {"$ref": "#/$defs/sha256"}, "capturedAt": {"type": "string", "format": "date-time"}}},
    "source": {
      "type": "object", "additionalProperties": false,
      "required": ["titleSha256", "contentSha256", "byteLength"],
      "properties": {"titleSha256": {"$ref": "#/$defs/sha256"}, "contentSha256": {"$ref": "#/$defs/sha256"}, "byteLength": {"type": "integer", "minimum": 1, "maximum": 1048576}}
    },
    "retention": {
      "type": "object", "additionalProperties": false, "required": ["deleteAfter"],
      "properties": {"deleteAfter": {"type": ["string", "null"], "format": "date-time"}}
    },
    "consent": {
      "type": "object", "additionalProperties": false, "required": ["approved", "approverId", "approvedAt"],
      "properties": {"approved": {"const": true}, "approverId": {"$ref": "#/$defs/tenant"}, "approvedAt": {"type": "string", "format": "date-time"}}
    },
    "authority": {"const": {"localVaultWrite": true, "network": false, "externalEffects": false, "scopeExpansion": false, "completion": false}},
    "boundary": {"const": "Explicit single-use authorization to ingest one exact local text source into one owner and client knowledge partition. It grants no network, cross-client read, external-effect, scope-expansion, or completion authority."}
  },
  "$defs": {
    "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
    "tenant": {"type": "string", "pattern": "^[a-z][a-z0-9-]{2,63}$"},
    "classification": {"enum": ["public", "internal", "confidential", "restricted"]}
  }
}