# LoomTension

Two threads in tension: they contradict each other, one appears to replace the other, or they hold different perspectives. Tensions are recorded, never forced to a resolution; use settles them over time, and they stay visible until then.

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

## Fields

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

| Field | Type | Description |
|---|---|---|
| `loomId` | `uuid` | The loom. |
| `threadId1` | `uuid` | The first thread. |
| `threadId2` | `uuid` | The second thread. |
| `kind` | [`TensionKind`](https://docs.maitento.com/reference/types/tension-kind.md) | What sort of tension it is. |
| `note` | `string` | What the tension is, in a sentence. |
| `subjectKeys` | `string[]` | The subjects of the two threads, lowercase, so the tapestry can raise tensions about the people present. |
| `detectedBy` | [`ThreadOrigin`](https://docs.maitento.com/reference/types/thread-origin.md) | Who noticed the tension, and from where. |
| `dateResolved` | `datetime \| null` | When the tension was resolved (UTC). Null while it is open. |
| `resolution` | `string \| null` | How it was resolved, in the resolver's words. Null while it is open. |
| `resolvedBy` | [`ThreadOrigin`](https://docs.maitento.com/reference/types/thread-origin.md)`\| null` | Who resolved it. Null while it is open. |
| `isOpen` | `boolean` | True until the tension is resolved. Set by Maitento. |
| `tenantId` | `uuid` | The id of the tenant it belongs to. |
| `id` | `uuid` | The unique id. Use it in `by-id` routes and wherever another object refers to this one. |
| `dateCreated` | `datetime` | When it was created, in UTC. |
| `dateUpdated` | `datetime` | When it was last changed, in UTC. |

## Example

```json
{
  "loomId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "threadId1": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "threadId2": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "kind": "Contradicts",
  "note": "...",
  "subjectKeys": [
    "..."
  ],
  "detectedBy": {
    "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"
  },
  "dateResolved": "2026-10-26T12:00:00.0000000Z",
  "resolution": "...",
  "resolvedBy": {
    "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"
  },
  "isOpen": false,
  "tenantId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "dateCreated": "2026-10-26T12:00:00.0000000Z",
  "dateUpdated": "2026-10-26T12:00:00.0000000Z"
}
```

## Where it's used

- Inside [`LoomTensionView`](https://docs.maitento.com/reference/types/loom-tension-view.md)
