{
  "profile": "rbx.reader-host.1",
  "actions": [
    {
      "name": "reader.instances.list",
      "description": "List permitted independent loaded instances.",
      "effect": "read",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "instanceId": {
              "type": "string",
              "minLength": 1
            },
            "documentId": {
              "type": "string",
              "minLength": 1
            },
            "title": {
              "type": "string"
            },
            "editCounter": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "savedEditCounter": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "instanceId",
            "documentId",
            "title",
            "editCounter",
            "savedEditCounter"
          ],
          "additionalProperties": false
        }
      },
      "completionSchema": null,
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    },
    {
      "name": "reader.library.list",
      "description": "Filter metadata; scalar-sort identity then offset (default 0) and limit (default 100). Text uses the Part 4 search algorithm.",
      "effect": "read",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "redbook",
              "blueprint",
              "theme",
              "plugin",
              "asset"
            ]
          },
          "id": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": "string"
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1
            },
            "kind": {
              "enum": [
                "redbook",
                "blueprint",
                "theme",
                "plugin",
                "asset"
              ]
            },
            "title": {
              "type": "string"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          },
          "required": [
            "id",
            "kind",
            "title",
            "bytes",
            "sha256"
          ],
          "additionalProperties": false
        }
      },
      "completionSchema": null,
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {
        "kind": "No kind filter.",
        "id": "No identity filter.",
        "text": "No title-text filter.",
        "offset": 0,
        "limit": 100
      }
    },
    {
      "name": "reader.files.choose",
      "description": "Explicit native chooser; multiple defaults false, accept absent accepts supported types. Unsupported chooser unavailable.",
      "effect": "external",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "mode": {
            "enum": [
              "read",
              "write"
            ]
          },
          "accept": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "multiple": {
            "type": "boolean"
          }
        },
        "required": [
          "mode"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job-receipt.schema.json"
      },
      "completionSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "handle": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string"
                },
                "mode": {
                  "enum": [
                    "read",
                    "write"
                  ]
                },
                "destinationRevision": {
                  "type": "string",
                  "minLength": 1
                },
                "mediaType": {
                  "type": "string"
                },
                "bytes": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "sha256": {
                  "type": "string"
                }
              },
              "required": [
                "handle",
                "name",
                "mode",
                "destinationRevision"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "files"
        ],
        "additionalProperties": false
      },
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {
        "accept": "Accept supported types.",
        "multiple": false
      }
    },
    {
      "name": "reader.files.open",
      "description": "Open accepted readable file or library ticket passively; no automatic activation.",
      "effect": "external",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "handle": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "handle"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job-receipt.schema.json"
      },
      "completionSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "instanceId": {
            "type": "string",
            "minLength": 1
          },
          "documentId": {
            "type": "string",
            "minLength": 1
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "instanceId",
          "documentId",
          "capabilities"
        ],
        "additionalProperties": false
      },
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    },
    {
      "name": "reader.files.save",
      "description": "Save requested accepted revision atomically to write ticket; reject stale revision/destination.",
      "effect": "external",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "instanceId": {
            "type": "string",
            "minLength": 1
          },
          "editCounter": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "handle": {
            "type": "string",
            "minLength": 1
          },
          "expectedDestinationRevision": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "instanceId",
          "editCounter",
          "handle",
          "expectedDestinationRevision"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job-receipt.schema.json"
      },
      "completionSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "savedEditCounter": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "destinationRevision": {
            "type": "string",
            "minLength": 1
          },
          "sha256": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "dirty": {
            "type": "boolean"
          }
        },
        "required": [
          "savedEditCounter",
          "destinationRevision",
          "sha256",
          "bytes",
          "dirty"
        ],
        "additionalProperties": false
      },
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    },
    {
      "name": "reader.resources.stage",
      "description": "Accept immutable selected resource bytes for later explicit receive/install.",
      "effect": "external",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "handle": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "handle"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job-receipt.schema.json"
      },
      "completionSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "resourceHandle": {
            "type": "string",
            "minLength": 1
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sha256": {
            "type": "string"
          },
          "mediaType": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "resourceHandle",
          "bytes",
          "sha256",
          "mediaType"
        ],
        "additionalProperties": false
      },
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    },
    {
      "name": "reader.library.receive",
      "description": "Store exact accepted package bytes as a fresh independent library item; title defaults to package title/name.",
      "effect": "external",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "handle": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "handle"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job-receipt.schema.json"
      },
      "completionSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "enum": [
              "redbook",
              "blueprint",
              "theme",
              "plugin",
              "asset"
            ]
          },
          "title": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "bytes",
          "sha256"
        ],
        "additionalProperties": false
      },
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {
        "title": "Use the package title, or selected filename when it has no title."
      }
    },
    {
      "name": "reader.connections.list",
      "description": "List granted named connection contracts; never expose credentials.",
      "effect": "read",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1
            },
            "label": {
              "type": "string"
            },
            "available": {
              "type": "boolean"
            },
            "operations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "inputSchema": {
                    "type": "object"
                  },
                  "outputSchema": {
                    "type": "object"
                  },
                  "egressDescription": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "inputSchema",
                  "outputSchema",
                  "egressDescription"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "id",
            "label",
            "available",
            "operations"
          ],
          "additionalProperties": false
        }
      },
      "completionSchema": null,
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    },
    {
      "name": "reader.connections.request",
      "description": "Run the declared granted operation; its own discovered outputSchema further constrains completion.",
      "effect": "external",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string",
            "minLength": 1
          },
          "operation": {
            "type": "string",
            "minLength": 1
          },
          "input": {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          }
        },
        "required": [
          "connectionId",
          "operation",
          "input"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job-receipt.schema.json"
      },
      "completionSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json"
      },
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    },
    {
      "name": "reader.jobs.read",
      "description": "Read a scoped permitted job, including operation-specific completion.",
      "effect": "read",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "jobId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job.schema.json"
      },
      "completionSchema": null,
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    },
    {
      "name": "reader.jobs.cancel",
      "description": "Request cancellation and report actual target job state; already completed effects are not undone.",
      "effect": "external",
      "modes": [
        "reader-admin"
      ],
      "requirements": [
        "rbx.reader-host.1"
      ],
      "capability": "reader-host",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "jobId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job-receipt.schema.json"
      },
      "completionSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$ref": "https://redbook.fun/specification/1.0/schemas/host-job.schema.json"
      },
      "errors": [
        "CAPABILITY_UNAVAILABLE",
        "ROLE",
        "SCHEMA",
        "HANDLE_EXPIRED",
        "STATE"
      ],
      "normativeReference": "/redbook-specification/#d-10-minimal-portable-reader-host-api",
      "absentParameters": {}
    }
  ],
  "callContract": "Synchronous reads return results; external operations return a job receipt and later a completionSchema result. Grant and current context remain mandatory."
}
