{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/shruggietech/insonic/v0.0.0/schemas/v0.0.0/master.schema.json",
  "title": "insonic system contract",
  "description": "The versioned root of all insonic-owned interchange contracts. Each document identifies its kind and system schema version. Software, documentation and this registry share the same release version. Stable required fields define each operation while documented extension containers support adapter-specific values. Cueson documents retain their separate immutable upstream schema rather than being rewritten as an insonic format.",
  "$defs": {
    "common": {
      "$ref": "common.schema.json",
      "description": "Shared identities, digests, revisions, artifact references and extensible values used by the system contracts."
    },
    "import-manifest": {
      "$ref": "import-manifest.schema.json",
      "description": "Batch source admission with per-item origination dates, timezone interpretation, subtitle attachments and processing defaults."
    },
    "artifact-manifest": {
      "$ref": "artifact-manifest.schema.json",
      "description": "Immutable content identity, verified storage locations and producer provenance independent of local paths or object providers."
    },
    "metadata-snapshot": {
      "$ref": "metadata-snapshot.schema.json",
      "description": "Early raw metadata capture, qualified observations and explicit coverage/interpretation outcomes bound to original bytes."
    },
    "workspace-config": {
      "$ref": "workspace-config.schema.json",
      "description": "Workspace identity and independently selected artifact, catalog and graph profiles with secret references."
    },
    "pipeline-config": {
      "$ref": "pipeline-config.schema.json",
      "description": "Revisioned task routing, adapter capabilities, model options and configured automation without credential values."
    },
    "job-event": {
      "$ref": "job-event.schema.json",
      "description": "Machine-readable durable job progress with attempt identity, structured outcomes and provenance."
    },
    "graph-query": {
      "$ref": "graph-query.schema.json",
      "description": "Normalized or explicitly backend-tagged native graph queries, typed parameters and saved-view compatibility."
    },
    "speaker-segments": {
      "$ref": "speaker-segments.schema.json",
      "description": "Source-timed speaker audio corpus records and revisioned assignments across the library."
    },
    "speaker-dataset": {
      "$ref": "speaker-dataset.schema.json",
      "description": "Frozen speaker training membership, input revisions, preparation and diagnostics."
    },
    "speaker-model": {
      "$ref": "speaker-model.schema.json",
      "description": "Immutable model versions, originating speaker, dataset/run lineage, compatibility and artifact retrieval."
    }
  },
  "oneOf": [
    {
      "$ref": "#/$defs/import-manifest"
    },
    {
      "$ref": "#/$defs/artifact-manifest"
    },
    {
      "$ref": "#/$defs/metadata-snapshot"
    },
    {
      "$ref": "#/$defs/workspace-config"
    },
    {
      "$ref": "#/$defs/pipeline-config"
    },
    {
      "$ref": "#/$defs/job-event"
    },
    {
      "$ref": "#/$defs/graph-query"
    },
    {
      "$ref": "#/$defs/speaker-segments"
    },
    {
      "$ref": "#/$defs/speaker-dataset"
    },
    {
      "$ref": "#/$defs/speaker-model"
    }
  ]
}
