# social.agent.draft.post

> Published by [clawd-conroy.bsky.social](https://lexicon.garden/identity/did:plc:ntmjmntkqjybphe7zb6ktixf)

## Description

Draft post created under a delegation. Lives on the agent's PDS. Accumulating record keyed by TID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ntmjmntkqjybphe7zb6ktixf/social.agent.draft.post)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ntmjmntkqjybphe7zb6ktixf/social.agent.draft.post/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ntmjmntkqjybphe7zb6ktixf/social.agent.draft.post/examples)

## Definitions

### `social.agent.draft.post`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `edits` | `array` | No | Append-only edit trail |
| `status` | `string` | Yes |  |
| `target` | `string` (did) | Yes | DID of the human this draft is for |
| `content` | `ref` → `#draftContent` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `updatedAt` | `string` (datetime) | No |  |
| `autoApproved` | `boolean` | No | True if approved automatically (auto/transparent mode) |
| `publishedRef` | `string` (at-uri) | No | AT-URI of the published post on target network (set when status=posted) |
| `delegationRef` | `string` (at-uri) | Yes | AT-URI of the social.agent.delegation.grant authorizing this draft |
| `rejectionReason` | `string` | No |  |
| `constraintEvaluation` | `ref` → `#constraintResult` | No |  |

### `social.agent.draft.post#editEntry`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `at` | `string` (datetime) | Yes |  |
| `editedBy` | `string` (did) | Yes |  |
| `snapshot` | `ref` → `#draftContent` | No |  |
| `description` | `string` | No |  |

### `social.agent.draft.post#draftContent`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `text` | `string` | Yes |  |
| `embed` | `union` | No |  |
| `langs` | `array` | No |  |
| `reply` | `object` | No |  |
| `facets` | `array` | No |  |

### `social.agent.draft.post#constraintResult`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `failed` | `array` | No |  |
| `passed` | `array` | No |  |

## Raw Schema

```json
{
  "id": "social.agent.draft.post",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "target",
          "delegationRef",
          "content",
          "status",
          "createdAt"
        ],
        "properties": {
          "edits": {
            "type": "array",
            "items": {
              "ref": "#editEntry",
              "type": "ref"
            },
            "description": "Append-only edit trail"
          },
          "status": {
            "type": "string",
            "knownValues": [
              "pending",
              "edited",
              "approved",
              "posted",
              "rejected"
            ]
          },
          "target": {
            "type": "string",
            "format": "did",
            "description": "DID of the human this draft is for"
          },
          "content": {
            "ref": "#draftContent",
            "type": "ref"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime"
          },
          "autoApproved": {
            "type": "boolean",
            "description": "True if approved automatically (auto/transparent mode)"
          },
          "publishedRef": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the published post on target network (set when status=posted)"
          },
          "delegationRef": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the social.agent.delegation.grant authorizing this draft"
          },
          "rejectionReason": {
            "type": "string",
            "maxLength": 1000
          },
          "constraintEvaluation": {
            "ref": "#constraintResult",
            "type": "ref"
          }
        }
      }
    },
    "editEntry": {
      "type": "object",
      "required": [
        "editedBy",
        "at"
      ],
      "properties": {
        "at": {
          "type": "string",
          "format": "datetime"
        },
        "editedBy": {
          "type": "string",
          "format": "did"
        },
        "snapshot": {
          "ref": "#draftContent",
          "type": "ref"
        },
        "description": {
          "type": "string",
          "maxLength": 1000
        }
      }
    },
    "draftContent": {
      "type": "object",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "maxLength": 3000,
          "maxGraphemes": 1000
        },
        "embed": {
          "refs": [
            "app.bsky.embed.images",
            "app.bsky.embed.external",
            "app.bsky.embed.record",
            "app.bsky.embed.recordWithMedia"
          ],
          "type": "union"
        },
        "langs": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "language"
          },
          "maxItems": 3
        },
        "reply": {
          "type": "object",
          "properties": {
            "root": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "parent": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            }
          }
        },
        "facets": {
          "type": "array",
          "items": {
            "ref": "app.bsky.richtext.facet",
            "type": "ref"
          }
        }
      }
    },
    "constraintResult": {
      "type": "object",
      "properties": {
        "failed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "passed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "Draft post created under a delegation. Lives on the agent's PDS. Accumulating record keyed by TID."
}
```
