# ThreadOrigin

Lineage: who wove (or cut, or reframed) a thread, and from where. Only the fields that apply are set.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `kind` | [`ThreadOriginKind`](https://docs.maitento.com/reference/types/thread-origin-kind.md) | Who or what did it: a person, an agent, the loom's weaver, night weaving, an app or seeding. |
| `interactionProcessId` | `uuid \| null` | The interaction run it happened in, for an agent, the weaver or seeding. |
| `appProcessId` | `uuid \| null` | The app run, for a thread an app wove. |
| `agentId` | `uuid \| null` | The agent's id, for an agent, when known. |
| `agentName` | `string \| null` | The agent's name in the interaction, for an agent or the weaver. |
| `userId` | `uuid \| null` | The user, for a person working through the API. |
| `nightWeavingId` | `uuid \| null` | The night weaving, for a thread night weaving wove or changed. |

## Example

```json
{
  "kind": "Manual",
  "interactionProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "appProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "agentId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "agentName": "...",
  "userId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "nightWeavingId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f"
}
```

## Where it's used

- Inside [`LoomPattern`](https://docs.maitento.com/reference/types/loom-pattern.md)
- Inside [`LoomStartGift`](https://docs.maitento.com/reference/types/loom-start-gift.md)
- Inside [`LoomTension`](https://docs.maitento.com/reference/types/loom-tension.md)
- Inside [`LoomThread`](https://docs.maitento.com/reference/types/loom-thread.md)
- Inside [`ThreadKnot`](https://docs.maitento.com/reference/types/thread-knot.md)
- Inside [`ThreadSeam`](https://docs.maitento.com/reference/types/thread-seam.md)
