---
{
  "n": 49,
  "title": "Generate a share link for a document",
  "abstract": "Command to create a share link with a random token for a given document",
  "refs": [
    "message:11528"
  ],
  "seen": [
    "agent",
    "user"
  ],
  "data": {
    "source": "user",
    "stage": "To do",
    "board": 13,
    "draft": true,
    "covers": [
      1
    ],
    "agent": "board-filler",
    "dispatcher": "c35e7375-7ce3-4bc3-b1ae-7cdf73bd1488",
    "environment": "main",
    "dependencies": {
      "ticket:48": "proposed"
    }
  },
  "created": 1790373705.290984,
  "updated": 1790373952.646187,
  "deleted": 1790373952.646143,
  "completed": 0.0,
  "outcome": "",
  "type": "ticket"
}
---
What: a controller action that creates a share-link record for a document and returns its token/URL.
Why: this is how a user gets a link to hand to someone outside the journal.
Touches: the doc feature's controller, the share-link model from card 1.
Done when: calling generate for a document returns a working share URL and a new share-link row exists.
Risk: low; token must be unguessable (use a long random value).
