# io.atcr.hold.notifyManifest

> Notify hold about a manifest push, pull or visibility change. For pushes: records the repository's visibility and the manifest's blobs, creates layer records and optionally posts to Bluesky. For pulls: just increments stats. Pushes and pulls always increment the matching count. For visibility changes: records the new visibility and nothing else, so no counter moves and no manifest body is needed.

- Kind: procedure
- Authority: hold.atcr.io
- Lexicon: 1
- Published by [did:web:lexicon.atcr.io](https://lexicon.garden/identity/did:web:lexicon.atcr.io), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.notifyManifest)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.notifyManifest/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.notifyManifest/analytics)

## Procedure (`io.atcr.hold.notifyManifest`)

Type: procedure · POST

### Input (application/json)

- `manifest` (ref): The pushed manifest. Required for 'push'; absent for 'pull' and 'visibility'.
  - Reference: `#manifestInfo`
- `manifestDigest` (string, required): Manifest digest for building layer record AT-URIs
  - Constraints: maxLength: 128
- `operation` (string): Operation type (defaults to 'push' for backward compatibility). 'visibility' records a new visibility for an already pushed manifest and does nothing else; it carries no manifest body and moves no counter.
  - Constraints: maxLength: 16, default: "push", knownValues: push | pull | visibility
- `repository` (string, required): Image repository name
  - Constraints: maxLength: 256
- `tag` (string): Image tag (optional, required for Bluesky posts)
  - Constraints: maxLength: 128
- `userDid` (string · did, required): DID of the image owner
- `visibility` (string): Visibility of the sailor repository this manifest belongs to. The hold records it against the manifest and enforces it on OCI blob reads: a layer or image config blob named only by private manifests is served to the hold's owner and crew only, even on a public hold. Absent means public. Re-sending the notification with a different value is how a repository is flipped. Honoured on a push only; ignored on a pull, whose token belongs to the puller rather than the repository owner.
  - Constraints: maxLength: 16, default: "public", knownValues: public | private

### Output (application/json)

- `layersCreated` (integer): Number of layer records created (push only)
- `operation` (string, required): The operation that was performed ('push' or 'pull')
  - Constraints: maxLength: 16
- `postCreated` (boolean): Whether a Bluesky post was created (push only)
- `postUri` (string · at-uri): AT-URI of the created Bluesky post (if postCreated is true)
- `statsUpdated` (boolean, required): Whether stats were successfully updated
- `success` (boolean, required): Whether the operation completed successfully

### Errors

- `InvalidOperation`: No description in schema.
- `UserMismatch`: No description in schema.
- `QuotaExceeded`: No description in schema.

## #blobInfo (`io.atcr.hold.notifyManifest#blobInfo`)

Type: object

### Properties

- `digest` (string)
  - Constraints: maxLength: 128
- `mediaType` (string)
  - Constraints: maxLength: 256
- `size` (integer)

## #childManifestInfo (`io.atcr.hold.notifyManifest#childManifestInfo`)

Type: object

### Properties

- `digest` (string)
  - Constraints: maxLength: 128
- `mediaType` (string)
  - Constraints: maxLength: 256
- `platform` (ref)
  - Reference: `#platformInfo`
- `size` (integer)

## #layerInfo (`io.atcr.hold.notifyManifest#layerInfo`)

Type: object

### Properties

- `digest` (string)
  - Constraints: maxLength: 128
- `mediaType` (string)
  - Constraints: maxLength: 256
- `size` (integer)

## #manifestInfo (`io.atcr.hold.notifyManifest#manifestInfo`)

Type: object

OCI manifest information

### Properties

- `config` (ref)
  - Reference: `#blobInfo`
- `layers` (array)
  - `items` (ref)
    - Reference: `#layerInfo`
- `manifests` (array): Child manifests for multi-arch images
  - `items` (ref)
    - Reference: `#childManifestInfo`
- `mediaType` (string): OCI media type
  - Constraints: maxLength: 256
- `subject` (ref): Manifest this artifact refers to (attestations, signatures, SBOMs). Absent for ordinary images.
  - Reference: `#blobInfo`

## #platformInfo (`io.atcr.hold.notifyManifest#platformInfo`)

Type: object

### Properties

- `architecture` (string)
  - Constraints: maxLength: 64
- `os` (string)
  - Constraints: maxLength: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "blobInfo": {
      "properties": {
        "digest": {
          "maxLength": 128,
          "type": "string"
        },
        "mediaType": {
          "maxLength": 256,
          "type": "string"
        },
        "size": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "childManifestInfo": {
      "properties": {
        "digest": {
          "maxLength": 128,
          "type": "string"
        },
        "mediaType": {
          "maxLength": 256,
          "type": "string"
        },
        "platform": {
          "ref": "#platformInfo",
          "type": "ref"
        },
        "size": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "layerInfo": {
      "properties": {
        "digest": {
          "maxLength": 128,
          "type": "string"
        },
        "mediaType": {
          "maxLength": 256,
          "type": "string"
        },
        "size": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "Notify hold about a manifest push, pull or visibility change. For pushes: records the repository's visibility and the manifest's blobs, creates layer records and optionally posts to Bluesky. For pulls: just increments stats. Pushes and pulls always increment the matching count. For visibility changes: records the new visibility and nothing else, so no counter moves and no manifest body is needed.",
      "errors": [
        {
          "name": "InvalidOperation"
        },
        {
          "name": "UserMismatch"
        },
        {
          "name": "QuotaExceeded"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "manifest": {
              "description": "The pushed manifest. Required for 'push'; absent for 'pull' and 'visibility'.",
              "ref": "#manifestInfo",
              "type": "ref"
            },
            "manifestDigest": {
              "description": "Manifest digest for building layer record AT-URIs",
              "maxLength": 128,
              "type": "string"
            },
            "operation": {
              "default": "push",
              "description": "Operation type (defaults to 'push' for backward compatibility). 'visibility' records a new visibility for an already pushed manifest and does nothing else; it carries no manifest body and moves no counter.",
              "knownValues": [
                "push",
                "pull",
                "visibility"
              ],
              "maxLength": 16,
              "type": "string"
            },
            "repository": {
              "description": "Image repository name",
              "maxLength": 256,
              "type": "string"
            },
            "tag": {
              "description": "Image tag (optional, required for Bluesky posts)",
              "maxLength": 128,
              "type": "string"
            },
            "userDid": {
              "description": "DID of the image owner",
              "format": "did",
              "type": "string"
            },
            "visibility": {
              "default": "public",
              "description": "Visibility of the sailor repository this manifest belongs to. The hold records it against the manifest and enforces it on OCI blob reads: a layer or image config blob named only by private manifests is served to the hold's owner and crew only, even on a public hold. Absent means public. Re-sending the notification with a different value is how a repository is flipped. Honoured on a push only; ignored on a pull, whose token belongs to the puller rather than the repository owner.",
              "knownValues": [
                "public",
                "private"
              ],
              "maxLength": 16,
              "type": "string"
            }
          },
          "required": [
            "repository",
            "userDid",
            "manifestDigest"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "layersCreated": {
              "description": "Number of layer records created (push only)",
              "type": "integer"
            },
            "operation": {
              "description": "The operation that was performed ('push' or 'pull')",
              "maxLength": 16,
              "type": "string"
            },
            "postCreated": {
              "description": "Whether a Bluesky post was created (push only)",
              "type": "boolean"
            },
            "postUri": {
              "description": "AT-URI of the created Bluesky post (if postCreated is true)",
              "format": "at-uri",
              "type": "string"
            },
            "statsUpdated": {
              "description": "Whether stats were successfully updated",
              "type": "boolean"
            },
            "success": {
              "description": "Whether the operation completed successfully",
              "type": "boolean"
            }
          },
          "required": [
            "success",
            "operation",
            "statsUpdated"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    },
    "manifestInfo": {
      "description": "OCI manifest information",
      "properties": {
        "config": {
          "ref": "#blobInfo",
          "type": "ref"
        },
        "layers": {
          "items": {
            "ref": "#layerInfo",
            "type": "ref"
          },
          "type": "array"
        },
        "manifests": {
          "description": "Child manifests for multi-arch images",
          "items": {
            "ref": "#childManifestInfo",
            "type": "ref"
          },
          "type": "array"
        },
        "mediaType": {
          "description": "OCI media type",
          "maxLength": 256,
          "type": "string"
        },
        "subject": {
          "description": "Manifest this artifact refers to (attestations, signatures, SBOMs). Absent for ordinary images.",
          "ref": "#blobInfo",
          "type": "ref"
        }
      },
      "type": "object"
    },
    "platformInfo": {
      "properties": {
        "architecture": {
          "maxLength": 64,
          "type": "string"
        },
        "os": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "id": "io.atcr.hold.notifyManifest",
  "lexicon": 1
}
```
