{
  "openapi": "3.1.0",
  "info": {
    "title": "Forge API",
    "version": "v1",
    "description": "Local-first execution, planning, memory, health, and Psyche API for the Forge runtime."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:4317",
      "description": "Default local Forge runtime"
    },
    {
      "url": "/",
      "description": "Embedded runtime-relative origin"
    }
  ],
  "components": {
    "schemas": {
      "ValidationIssue": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "path",
          "message"
        ],
        "properties": {
          "path": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "code",
          "error",
          "statusCode"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "statusCode": {
            "type": "integer"
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationIssue"
            }
          }
        }
      },
      "Tag": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "kind",
          "color",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "value",
              "category",
              "execution"
            ]
          },
          "color": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "Goal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "description",
          "horizon",
          "status",
          "targetPoints",
          "themeColor",
          "createdAt",
          "updatedAt",
          "tagIds"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "horizon": {
            "type": "string",
            "enum": [
              "quarter",
              "year",
              "lifetime"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "completed"
            ]
          },
          "targetPoints": {
            "type": "integer"
          },
          "themeColor": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "tagIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DashboardGoal": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Goal"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "progress",
              "totalTasks",
              "completedTasks",
              "earnedPoints",
              "momentumLabel",
              "tags"
            ],
            "properties": {
              "progress": {
                "type": "number"
              },
              "totalTasks": {
                "type": "integer"
              },
              "completedTasks": {
                "type": "integer"
              },
              "earnedPoints": {
                "type": "integer"
              },
              "momentumLabel": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          }
        ]
      },
      "Project": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "goalId",
          "title",
          "description",
          "status",
          "targetPoints",
          "themeColor",
          "schedulingRules",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "goalId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "completed"
            ]
          },
          "targetPoints": {
            "type": "integer"
          },
          "themeColor": {
            "type": "string"
          },
          "schedulingRules": {
            "$ref": "#/components/schemas/CalendarSchedulingRules"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CalendarSchedulingRules": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "allowWorkBlockKinds",
          "blockWorkBlockKinds",
          "allowCalendarIds",
          "blockCalendarIds",
          "allowEventTypes",
          "blockEventTypes",
          "allowEventKeywords",
          "blockEventKeywords",
          "allowAvailability",
          "blockAvailability"
        ],
        "properties": {
          "allowWorkBlockKinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "main_activity",
                "secondary_activity",
                "third_activity",
                "rest",
                "holiday",
                "custom"
              ]
            }
          },
          "blockWorkBlockKinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "main_activity",
                "secondary_activity",
                "third_activity",
                "rest",
                "holiday",
                "custom"
              ]
            }
          },
          "allowCalendarIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockCalendarIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowEventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockEventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowEventKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockEventKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowAvailability": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "busy",
                "free"
              ]
            }
          },
          "blockAvailability": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "busy",
                "free"
              ]
            }
          }
        }
      },
      "CalendarConnection": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "provider",
          "label",
          "accountLabel",
          "status",
          "config",
          "forgeCalendarId",
          "lastSyncedAt",
          "lastSyncError",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "google",
              "apple",
              "caldav"
            ]
          },
          "label": {
            "type": "string"
          },
          "accountLabel": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "needs_attention",
              "error"
            ]
          },
          "config": {
            "type": "object",
            "additionalProperties": true
          },
          "forgeCalendarId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastSyncedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastSyncError": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CalendarResource": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "connectionId",
          "remoteId",
          "title",
          "description",
          "color",
          "timezone",
          "isPrimary",
          "canWrite",
          "forgeManaged",
          "lastSyncedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "remoteId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "canWrite": {
            "type": "boolean"
          },
          "forgeManaged": {
            "type": "boolean"
          },
          "lastSyncedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CalendarEventSource": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "provider",
          "connectionId",
          "calendarId",
          "remoteCalendarId",
          "remoteEventId",
          "remoteUid",
          "recurrenceInstanceId",
          "isMasterRecurring",
          "remoteHref",
          "remoteEtag",
          "syncState",
          "lastSyncedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "google",
              "apple",
              "caldav"
            ]
          },
          "connectionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "calendarId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "remoteCalendarId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "remoteEventId": {
            "type": "string"
          },
          "remoteUid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "recurrenceInstanceId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isMasterRecurring": {
            "type": "boolean"
          },
          "remoteHref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "remoteEtag": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "syncState": {
            "type": "string",
            "enum": [
              "pending_create",
              "pending_update",
              "pending_delete",
              "synced",
              "error",
              "deleted"
            ]
          },
          "lastSyncedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CalendarEventLink": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "entityType",
          "entityId",
          "relationshipType",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "entityType": {
            "$ref": "#/components/schemas/CrudEntityType"
          },
          "entityId": {
            "type": "string"
          },
          "relationshipType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CalendarEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "connectionId",
          "calendarId",
          "remoteId",
          "ownership",
          "originType",
          "status",
          "title",
          "description",
          "location",
          "startAt",
          "endAt",
          "timezone",
          "isAllDay",
          "availability",
          "eventType",
          "categories",
          "sourceMappings",
          "links",
          "remoteUpdatedAt",
          "deletedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "connectionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "calendarId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "remoteId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ownership": {
            "type": "string",
            "enum": [
              "external",
              "forge"
            ]
          },
          "originType": {
            "type": "string",
            "enum": [
              "native",
              "google",
              "apple",
              "caldav",
              "derived"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "confirmed",
              "tentative",
              "cancelled"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          },
          "timezone": {
            "type": "string"
          },
          "isAllDay": {
            "type": "boolean"
          },
          "availability": {
            "type": "string",
            "enum": [
              "busy",
              "free"
            ]
          },
          "eventType": {
            "type": "string"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarEventSource"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarEventLink"
            }
          },
          "remoteUpdatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkBlockTemplate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "kind",
          "color",
          "timezone",
          "weekDays",
          "startMinute",
          "endMinute",
          "startsOn",
          "endsOn",
          "blockingState",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "main_activity",
              "secondary_activity",
              "third_activity",
              "rest",
              "holiday",
              "custom"
            ]
          },
          "color": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "weekDays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "startMinute": {
            "type": "integer"
          },
          "endMinute": {
            "type": "integer"
          },
          "startsOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "endsOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "blockingState": {
            "type": "string",
            "enum": [
              "allowed",
              "blocked"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkBlockInstance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "templateId",
          "dateKey",
          "startAt",
          "endAt",
          "title",
          "kind",
          "color",
          "blockingState",
          "calendarEventId",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "dateKey": {
            "type": "string",
            "format": "date"
          },
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "main_activity",
              "secondary_activity",
              "third_activity",
              "rest",
              "holiday",
              "custom"
            ]
          },
          "color": {
            "type": "string"
          },
          "blockingState": {
            "type": "string",
            "enum": [
              "allowed",
              "blocked"
            ]
          },
          "calendarEventId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TaskTimebox": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "taskId",
          "projectId",
          "connectionId",
          "calendarId",
          "remoteEventId",
          "linkedTaskRunId",
          "status",
          "source",
          "title",
          "startsAt",
          "endsAt",
          "overrideReason",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "taskId": {
            "type": "string"
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "connectionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "calendarId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "remoteEventId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedTaskRunId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "planned",
              "active",
              "completed",
              "cancelled"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "manual",
              "suggested",
              "live_run"
            ]
          },
          "title": {
            "type": "string"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "overrideReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CalendarOverviewPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "providers",
          "connections",
          "calendars",
          "events",
          "workBlockTemplates",
          "workBlockInstances",
          "timeboxes"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "provider",
                "label",
                "supportsDedicatedForgeCalendar",
                "connectionHelp"
              ],
              "properties": {
                "provider": {
                  "type": "string",
                  "enum": [
                    "google",
                    "apple",
                    "caldav"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "supportsDedicatedForgeCalendar": {
                  "type": "boolean"
                },
                "connectionHelp": {
                  "type": "string"
                }
              }
            }
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarConnection"
            }
          },
          "calendars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarResource"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarEvent"
            }
          },
          "workBlockTemplates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkBlockTemplate"
            }
          },
          "workBlockInstances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkBlockInstance"
            }
          },
          "timeboxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskTimebox"
            }
          }
        }
      },
      "TaskTimeSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "totalTrackedSeconds",
          "totalCreditedSeconds",
          "liveTrackedSeconds",
          "liveCreditedSeconds",
          "manualAdjustedSeconds",
          "activeRunCount",
          "hasCurrentRun",
          "currentRunId"
        ],
        "properties": {
          "totalTrackedSeconds": {
            "type": "integer"
          },
          "totalCreditedSeconds": {
            "type": "number"
          },
          "liveTrackedSeconds": {
            "type": "integer"
          },
          "liveCreditedSeconds": {
            "type": "number"
          },
          "manualAdjustedSeconds": {
            "type": "integer"
          },
          "activeRunCount": {
            "type": "integer"
          },
          "hasCurrentRun": {
            "type": "boolean"
          },
          "currentRunId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ProjectSummary": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Project"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "goalTitle",
              "activeTaskCount",
              "completedTaskCount",
              "totalTasks",
              "earnedPoints",
              "progress",
              "nextTaskId",
              "nextTaskTitle",
              "momentumLabel",
              "time"
            ],
            "properties": {
              "goalTitle": {
                "type": "string"
              },
              "activeTaskCount": {
                "type": "integer"
              },
              "completedTaskCount": {
                "type": "integer"
              },
              "totalTasks": {
                "type": "integer"
              },
              "earnedPoints": {
                "type": "integer"
              },
              "progress": {
                "type": "number"
              },
              "nextTaskId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nextTaskTitle": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "momentumLabel": {
                "type": "string"
              },
              "time": {
                "$ref": "#/components/schemas/TaskTimeSummary"
              }
            }
          }
        ]
      },
      "Task": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "description",
          "status",
          "priority",
          "owner",
          "goalId",
          "projectId",
          "dueDate",
          "effort",
          "energy",
          "points",
          "plannedDurationSeconds",
          "schedulingRules",
          "sortOrder",
          "completedAt",
          "createdAt",
          "updatedAt",
          "tagIds",
          "time"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "backlog",
              "focus",
              "in_progress",
              "blocked",
              "done"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "owner": {
            "type": "string"
          },
          "goalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "dueDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "effort": {
            "type": "string",
            "enum": [
              "light",
              "deep",
              "marathon"
            ]
          },
          "energy": {
            "type": "string",
            "enum": [
              "low",
              "steady",
              "high"
            ]
          },
          "points": {
            "type": "integer"
          },
          "plannedDurationSeconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedulingRules": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CalendarSchedulingRules"
              },
              {
                "type": "null"
              }
            ]
          },
          "sortOrder": {
            "type": "integer"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "tagIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "time": {
            "$ref": "#/components/schemas/TaskTimeSummary"
          }
        }
      },
      "TaskRun": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "taskId",
          "taskTitle",
          "actor",
          "status",
          "note",
          "leaseTtlSeconds",
          "claimedAt",
          "heartbeatAt",
          "leaseExpiresAt",
          "completedAt",
          "releasedAt",
          "timedOutAt",
          "updatedAt",
          "timerMode",
          "plannedDurationSeconds",
          "elapsedWallSeconds",
          "creditedSeconds",
          "remainingSeconds",
          "overtimeSeconds",
          "isCurrent",
          "overrideReason"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "taskId": {
            "type": "string"
          },
          "taskTitle": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "completed",
              "released",
              "timed_out"
            ]
          },
          "note": {
            "type": "string"
          },
          "leaseTtlSeconds": {
            "type": "integer"
          },
          "claimedAt": {
            "type": "string",
            "format": "date-time"
          },
          "heartbeatAt": {
            "type": "string",
            "format": "date-time"
          },
          "leaseExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "releasedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "timedOutAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "timerMode": {
            "type": "string",
            "enum": [
              "planned",
              "unlimited"
            ]
          },
          "plannedDurationSeconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "elapsedWallSeconds": {
            "type": "integer"
          },
          "creditedSeconds": {
            "type": "number"
          },
          "remainingSeconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "overtimeSeconds": {
            "type": "integer"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "overrideReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "HabitCheckIn": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "habitId",
          "dateKey",
          "status",
          "note",
          "deltaXp",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "habitId": {
            "type": "string"
          },
          "dateKey": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "done",
              "missed"
            ]
          },
          "note": {
            "type": "string"
          },
          "deltaXp": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Habit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "description",
          "status",
          "polarity",
          "frequency",
          "targetCount",
          "weekDays",
          "linkedGoalIds",
          "linkedProjectIds",
          "linkedTaskIds",
          "linkedValueIds",
          "linkedPatternIds",
          "linkedBehaviorIds",
          "linkedBeliefIds",
          "linkedModeIds",
          "linkedReportIds",
          "linkedBehaviorId",
          "linkedBehaviorTitle",
          "linkedBehaviorTitles",
          "rewardXp",
          "penaltyXp",
          "createdAt",
          "updatedAt",
          "lastCheckInAt",
          "lastCheckInStatus",
          "streakCount",
          "completionRate",
          "dueToday",
          "checkIns"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          },
          "polarity": {
            "type": "string",
            "enum": [
              "positive",
              "negative"
            ]
          },
          "frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly"
            ]
          },
          "targetCount": {
            "type": "integer"
          },
          "weekDays": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "linkedGoalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedProjectIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedTaskIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedValueIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedPatternIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedBehaviorIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedBeliefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedModeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedReportIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedBehaviorId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedBehaviorTitle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedBehaviorTitles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rewardXp": {
            "type": "integer"
          },
          "penaltyXp": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastCheckInAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastCheckInStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "done",
                  "missed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "streakCount": {
            "type": "integer"
          },
          "completionRate": {
            "type": "number"
          },
          "dueToday": {
            "type": "boolean"
          },
          "checkIns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HabitCheckIn"
            }
          }
        }
      },
      "ActivityEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "entityType",
          "entityId",
          "eventType",
          "title",
          "description",
          "actor",
          "source",
          "metadata",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "task",
              "habit",
              "goal",
              "project",
              "domain",
              "psyche_value",
              "behavior_pattern",
              "behavior",
              "belief_entry",
              "mode_profile",
              "mode_guide_session",
              "trigger_report",
              "note",
              "tag",
              "task_run",
              "system",
              "insight",
              "approval_request",
              "agent_action",
              "reward",
              "session",
              "event_type",
              "emotion_definition"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "ui",
              "openclaw",
              "agent",
              "system"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GamificationProfile": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "totalXp",
          "level",
          "currentLevelXp",
          "nextLevelXp",
          "weeklyXp",
          "streakDays",
          "comboMultiplier",
          "momentumScore",
          "topGoalId",
          "topGoalTitle"
        ],
        "properties": {
          "totalXp": {
            "type": "integer"
          },
          "level": {
            "type": "integer"
          },
          "currentLevelXp": {
            "type": "integer"
          },
          "nextLevelXp": {
            "type": "integer"
          },
          "weeklyXp": {
            "type": "integer"
          },
          "streakDays": {
            "type": "integer"
          },
          "comboMultiplier": {
            "type": "number"
          },
          "momentumScore": {
            "type": "integer"
          },
          "topGoalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "topGoalTitle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "AchievementSignal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "summary",
          "tier",
          "progressLabel",
          "unlocked",
          "unlockedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "tier": {
            "type": "string",
            "enum": [
              "bronze",
              "silver",
              "gold",
              "platinum"
            ]
          },
          "progressLabel": {
            "type": "string"
          },
          "unlocked": {
            "type": "boolean"
          },
          "unlockedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "MilestoneReward": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "summary",
          "rewardLabel",
          "progressLabel",
          "current",
          "target",
          "completed"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "rewardLabel": {
            "type": "string"
          },
          "progressLabel": {
            "type": "string"
          },
          "current": {
            "type": "integer"
          },
          "target": {
            "type": "integer"
          },
          "completed": {
            "type": "boolean"
          }
        }
      },
      "XpMomentumPulse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "headline",
          "detail",
          "celebrationLabel",
          "nextMilestoneId",
          "nextMilestoneLabel"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "surging",
              "steady",
              "recovering"
            ]
          },
          "headline": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "celebrationLabel": {
            "type": "string"
          },
          "nextMilestoneId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "nextMilestoneLabel": {
            "type": "string"
          }
        }
      },
      "DashboardPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "stats",
          "goals",
          "projects",
          "tasks",
          "habits",
          "tags",
          "suggestedTags",
          "owners",
          "executionBuckets",
          "gamification",
          "achievements",
          "milestoneRewards",
          "recentActivity",
          "notesSummaryByEntity"
        ],
        "properties": {
          "stats": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "totalPoints",
              "completedThisWeek",
              "activeGoals",
              "alignmentScore",
              "focusTasks",
              "overdueTasks",
              "dueThisWeek"
            ],
            "properties": {
              "totalPoints": {
                "type": "integer"
              },
              "completedThisWeek": {
                "type": "integer"
              },
              "activeGoals": {
                "type": "integer"
              },
              "alignmentScore": {
                "type": "integer"
              },
              "focusTasks": {
                "type": "integer"
              },
              "overdueTasks": {
                "type": "integer"
              },
              "dueThisWeek": {
                "type": "integer"
              }
            }
          },
          "goals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardGoal"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSummary"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "habits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Habit"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "suggestedTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "owners": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "executionBuckets": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "label",
                "summary",
                "tone",
                "tasks"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "overdue",
                    "due_soon",
                    "focus_now",
                    "recently_completed"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "tone": {
                  "type": "string",
                  "enum": [
                    "urgent",
                    "accent",
                    "neutral",
                    "success"
                  ]
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Task"
                  }
                }
              }
            }
          },
          "gamification": {
            "$ref": "#/components/schemas/GamificationProfile"
          },
          "achievements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AchievementSignal"
            }
          },
          "milestoneRewards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MilestoneReward"
            }
          },
          "recentActivity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            }
          },
          "notesSummaryByEntity": {
            "$ref": "#/components/schemas/NotesSummaryByEntity"
          }
        }
      },
      "OverviewContext": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "strategicHeader",
          "projects",
          "activeGoals",
          "topTasks",
          "dueHabits",
          "recentEvidence",
          "achievements",
          "domainBalance",
          "neglectedGoals"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "strategicHeader": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "streakDays",
              "level",
              "totalXp",
              "currentLevelXp",
              "nextLevelXp",
              "momentumScore",
              "focusTasks",
              "overdueTasks"
            ],
            "properties": {
              "streakDays": {
                "type": "integer"
              },
              "level": {
                "type": "integer"
              },
              "totalXp": {
                "type": "integer"
              },
              "currentLevelXp": {
                "type": "integer"
              },
              "nextLevelXp": {
                "type": "integer"
              },
              "momentumScore": {
                "type": "integer"
              },
              "focusTasks": {
                "type": "integer"
              },
              "overdueTasks": {
                "type": "integer"
              }
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSummary"
            }
          },
          "activeGoals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardGoal"
            }
          },
          "topTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "dueHabits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Habit"
            }
          },
          "recentEvidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            }
          },
          "achievements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AchievementSignal"
            }
          },
          "domainBalance": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "tagId",
                "label",
                "color",
                "goalCount",
                "activeTaskCount",
                "completedPoints",
                "momentumLabel"
              ],
              "properties": {
                "tagId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "color": {
                  "type": "string"
                },
                "goalCount": {
                  "type": "integer"
                },
                "activeTaskCount": {
                  "type": "integer"
                },
                "completedPoints": {
                  "type": "integer"
                },
                "momentumLabel": {
                  "type": "string"
                }
              }
            }
          },
          "neglectedGoals": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "goalId",
                "title",
                "summary",
                "risk"
              ],
              "properties": {
                "goalId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "risk": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                }
              }
            }
          }
        }
      },
      "TodayContext": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "directive",
          "timeline",
          "dueHabits",
          "dailyQuests",
          "milestoneRewards",
          "recentHabitRewards",
          "momentum"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "directive": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "task",
              "goalTitle",
              "rewardXp",
              "sessionLabel"
            ],
            "properties": {
              "task": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Task"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "goalTitle": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rewardXp": {
                "type": "integer"
              },
              "sessionLabel": {
                "type": "string"
              }
            }
          },
          "timeline": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "label",
                "tasks"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "completed",
                    "active",
                    "upcoming",
                    "deferred"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Task"
                  }
                }
              }
            }
          },
          "dueHabits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Habit"
            }
          },
          "dailyQuests": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "title",
                "summary",
                "rewardXp",
                "progressLabel",
                "completed"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "rewardXp": {
                  "type": "integer"
                },
                "progressLabel": {
                  "type": "string"
                },
                "completed": {
                  "type": "boolean"
                }
              }
            }
          },
          "milestoneRewards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MilestoneReward"
            }
          },
          "recentHabitRewards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RewardLedgerEvent"
            }
          },
          "momentum": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "streakDays",
              "momentumScore",
              "recoveryHint"
            ],
            "properties": {
              "streakDays": {
                "type": "integer"
              },
              "momentumScore": {
                "type": "integer"
              },
              "recoveryHint": {
                "type": "string"
              }
            }
          }
        }
      },
      "RiskContext": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "overdueTasks",
          "blockedTasks",
          "neglectedGoals",
          "summary"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "overdueTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "blockedTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "neglectedGoals": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "goalId",
                "title",
                "summary",
                "risk"
              ],
              "properties": {
                "goalId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "risk": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                }
              }
            }
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "ForgeSnapshot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "meta",
          "metrics",
          "dashboard",
          "overview",
          "today",
          "risk",
          "goals",
          "projects",
          "tags",
          "tasks",
          "habits",
          "activeTaskRuns",
          "activity"
        ],
        "properties": {
          "meta": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "apiVersion",
              "transport",
              "generatedAt",
              "backend",
              "mode"
            ],
            "properties": {
              "apiVersion": {
                "type": "string",
                "const": "v1"
              },
              "transport": {
                "type": "string"
              },
              "generatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "backend": {
                "type": "string"
              },
              "mode": {
                "type": "string"
              }
            }
          },
          "metrics": {
            "$ref": "#/components/schemas/GamificationProfile"
          },
          "dashboard": {
            "$ref": "#/components/schemas/DashboardPayload"
          },
          "overview": {
            "$ref": "#/components/schemas/OverviewContext"
          },
          "today": {
            "$ref": "#/components/schemas/TodayContext"
          },
          "risk": {
            "$ref": "#/components/schemas/RiskContext"
          },
          "goals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Goal"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSummary"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "habits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Habit"
            }
          },
          "activeTaskRuns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskRun"
            }
          },
          "activity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            }
          }
        }
      },
      "TaskContextPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "task",
          "goal",
          "project",
          "activeTaskRun",
          "taskRuns",
          "activity",
          "notesSummaryByEntity"
        ],
        "properties": {
          "task": {
            "$ref": "#/components/schemas/Task"
          },
          "goal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Goal"
              },
              {
                "type": "null"
              }
            ]
          },
          "project": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "activeTaskRun": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskRun"
              },
              {
                "type": "null"
              }
            ]
          },
          "taskRuns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskRun"
            }
          },
          "activity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            }
          },
          "notesSummaryByEntity": {
            "$ref": "#/components/schemas/NotesSummaryByEntity"
          }
        }
      },
      "ProjectBoardPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "project",
          "goal",
          "tasks",
          "activity",
          "notesSummaryByEntity"
        ],
        "properties": {
          "project": {
            "$ref": "#/components/schemas/ProjectSummary"
          },
          "goal": {
            "$ref": "#/components/schemas/Goal"
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "activity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            }
          },
          "notesSummaryByEntity": {
            "$ref": "#/components/schemas/NotesSummaryByEntity"
          }
        }
      },
      "InsightsPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "status",
          "momentumHeatmap",
          "executionTrends",
          "domainBalance",
          "coaching",
          "evidenceDigest",
          "feed",
          "openCount"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "systemStatus",
              "streakDays",
              "momentumScore"
            ],
            "properties": {
              "systemStatus": {
                "type": "string"
              },
              "streakDays": {
                "type": "integer"
              },
              "momentumScore": {
                "type": "integer"
              }
            }
          },
          "momentumHeatmap": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "label",
                "completed",
                "focus",
                "intensity"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "completed": {
                  "type": "integer"
                },
                "focus": {
                  "type": "integer"
                },
                "intensity": {
                  "type": "integer"
                }
              }
            }
          },
          "executionTrends": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "label",
                "xp",
                "focusScore"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "xp": {
                  "type": "integer"
                },
                "focusScore": {
                  "type": "integer"
                }
              }
            }
          },
          "domainBalance": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "label",
                "value",
                "color",
                "note"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "integer"
                },
                "color": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "coaching": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "title",
              "summary",
              "recommendation",
              "ctaLabel"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "recommendation": {
                "type": "string"
              },
              "ctaLabel": {
                "type": "string"
              }
            }
          },
          "evidenceDigest": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            }
          },
          "feed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Insight"
            }
          },
          "openCount": {
            "type": "integer"
          }
        }
      },
      "WeeklyReviewPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "windowLabel",
          "weekKey",
          "weekStartDate",
          "weekEndDate",
          "momentumSummary",
          "chart",
          "wins",
          "calibration",
          "reward",
          "completion"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "windowLabel": {
            "type": "string"
          },
          "weekKey": {
            "type": "string"
          },
          "weekStartDate": {
            "type": "string"
          },
          "weekEndDate": {
            "type": "string"
          },
          "momentumSummary": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "totalXp",
              "focusHours",
              "efficiencyScore",
              "peakWindow"
            ],
            "properties": {
              "totalXp": {
                "type": "integer"
              },
              "focusHours": {
                "type": "integer"
              },
              "efficiencyScore": {
                "type": "integer"
              },
              "peakWindow": {
                "type": "string"
              }
            }
          },
          "chart": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "label",
                "xp",
                "focusHours"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "xp": {
                  "type": "integer"
                },
                "focusHours": {
                  "type": "integer"
                }
              }
            }
          },
          "wins": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "title",
                "summary",
                "rewardXp"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "rewardXp": {
                  "type": "integer"
                }
              }
            }
          },
          "calibration": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "title",
                "mode",
                "note"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "accelerate",
                    "maintain",
                    "recover"
                  ]
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "reward": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "title",
              "summary",
              "rewardXp"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "rewardXp": {
                "type": "integer"
              }
            }
          },
          "completion": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "finalized",
              "finalizedAt",
              "finalizedBy"
            ],
            "properties": {
              "finalized": {
                "type": "boolean"
              },
              "finalizedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "finalizedBy": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "SettingsPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "profile",
          "notifications",
          "execution",
          "themePreference",
          "customTheme",
          "localePreference",
          "security",
          "agents",
          "agentTokens"
        ],
        "properties": {
          "profile": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "operatorName",
              "operatorEmail",
              "operatorTitle"
            ],
            "properties": {
              "operatorName": {
                "type": "string"
              },
              "operatorEmail": {
                "type": "string"
              },
              "operatorTitle": {
                "type": "string"
              }
            }
          },
          "notifications": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "goalDriftAlerts",
              "dailyQuestReminders",
              "achievementCelebrations"
            ],
            "properties": {
              "goalDriftAlerts": {
                "type": "boolean"
              },
              "dailyQuestReminders": {
                "type": "boolean"
              },
              "achievementCelebrations": {
                "type": "boolean"
              }
            }
          },
          "execution": {
            "$ref": "#/components/schemas/ExecutionSettings"
          },
          "themePreference": {
            "type": "string",
            "enum": [
              "obsidian",
              "solar",
              "aurora",
              "ember",
              "paper",
              "dawn",
              "atelier",
              "custom",
              "system"
            ]
          },
          "customTheme": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "label",
                  "primary",
                  "secondary",
                  "tertiary",
                  "canvas",
                  "panel",
                  "panelHigh",
                  "panelLow",
                  "ink"
                ],
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "primary": {
                    "type": "string"
                  },
                  "secondary": {
                    "type": "string"
                  },
                  "tertiary": {
                    "type": "string"
                  },
                  "canvas": {
                    "type": "string"
                  },
                  "panel": {
                    "type": "string"
                  },
                  "panelHigh": {
                    "type": "string"
                  },
                  "panelLow": {
                    "type": "string"
                  },
                  "ink": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "localePreference": {
            "type": "string",
            "enum": [
              "en",
              "fr"
            ]
          },
          "security": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "integrityScore",
              "lastAuditAt",
              "storageMode",
              "activeSessions",
              "tokenCount"
            ],
            "properties": {
              "integrityScore": {
                "type": "integer"
              },
              "lastAuditAt": {
                "type": "string",
                "format": "date-time"
              },
              "storageMode": {
                "type": "string",
                "const": "local-first"
              },
              "activeSessions": {
                "type": "integer"
              },
              "tokenCount": {
                "type": "integer"
              }
            }
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentIdentity"
            }
          },
          "agentTokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTokenSummary"
            }
          }
        }
      },
      "ExecutionSettings": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "maxActiveTasks",
          "timeAccountingMode"
        ],
        "properties": {
          "maxActiveTasks": {
            "type": "integer",
            "minimum": 1,
            "maximum": 8
          },
          "timeAccountingMode": {
            "type": "string",
            "enum": [
              "split",
              "parallel",
              "primary_only"
            ]
          }
        }
      },
      "TaskRunClaimInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "actor"
        ],
        "properties": {
          "actor": {
            "type": "string"
          },
          "timerMode": {
            "type": "string",
            "enum": [
              "planned",
              "unlimited"
            ],
            "default": "unlimited"
          },
          "plannedDurationSeconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 60,
                "maximum": 86400
              },
              {
                "type": "null"
              }
            ]
          },
          "overrideReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isCurrent": {
            "type": "boolean",
            "default": true
          },
          "leaseTtlSeconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 14400,
            "default": 900
          },
          "note": {
            "type": "string",
            "default": ""
          }
        }
      },
      "TaskRunHeartbeatInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "actor": {
            "type": "string"
          },
          "leaseTtlSeconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 14400,
            "default": 900
          },
          "note": {
            "type": "string"
          }
        }
      },
      "TaskRunFinishInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "actor": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "default": ""
          },
          "closeoutNote": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "contentMarkdown"
            ],
            "properties": {
              "contentMarkdown": {
                "type": "string"
              },
              "author": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "links": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NoteLink"
                }
              }
            }
          }
        }
      },
      "TaskRunFocusInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "actor": {
            "type": "string"
          }
        }
      },
      "WorkAdjustment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "entityType",
          "entityId",
          "requestedDeltaMinutes",
          "appliedDeltaMinutes",
          "note",
          "actor",
          "source",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "task",
              "project"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "requestedDeltaMinutes": {
            "type": "integer"
          },
          "appliedDeltaMinutes": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "ui",
              "openclaw",
              "agent",
              "system"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkAdjustmentTargetSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entityType",
          "entityId",
          "title",
          "time"
        ],
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "task",
              "project"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "time": {
            "$ref": "#/components/schemas/TaskTimeSummary"
          }
        }
      },
      "WorkAdjustmentInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entityType",
          "entityId",
          "deltaMinutes"
        ],
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "task",
              "project"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "deltaMinutes": {
            "type": "integer"
          },
          "note": {
            "type": "string",
            "default": ""
          }
        }
      },
      "WorkAdjustmentResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "adjustment",
          "target",
          "reward",
          "metrics"
        ],
        "properties": {
          "adjustment": {
            "$ref": "#/components/schemas/WorkAdjustment"
          },
          "target": {
            "$ref": "#/components/schemas/WorkAdjustmentTargetSummary"
          },
          "reward": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RewardLedgerEvent"
              },
              {
                "type": "null"
              }
            ]
          },
          "metrics": {
            "$ref": "#/components/schemas/XpMetricsPayload"
          }
        }
      },
      "SettingsUpdateInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "profile": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operatorName": {
                "type": "string"
              },
              "operatorEmail": {
                "type": "string"
              },
              "operatorTitle": {
                "type": "string"
              }
            }
          },
          "notifications": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "goalDriftAlerts": {
                "type": "boolean"
              },
              "dailyQuestReminders": {
                "type": "boolean"
              },
              "achievementCelebrations": {
                "type": "boolean"
              }
            }
          },
          "execution": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "maxActiveTasks": {
                "type": "integer",
                "minimum": 1,
                "maximum": 8
              },
              "timeAccountingMode": {
                "type": "string",
                "enum": [
                  "split",
                  "parallel",
                  "primary_only"
                ]
              }
            }
          },
          "themePreference": {
            "type": "string",
            "enum": [
              "obsidian",
              "solar",
              "aurora",
              "ember",
              "paper",
              "dawn",
              "atelier",
              "custom",
              "system"
            ]
          },
          "customTheme": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "label",
                  "primary",
                  "secondary",
                  "tertiary",
                  "canvas",
                  "panel",
                  "panelHigh",
                  "panelLow",
                  "ink"
                ],
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "primary": {
                    "type": "string"
                  },
                  "secondary": {
                    "type": "string"
                  },
                  "tertiary": {
                    "type": "string"
                  },
                  "canvas": {
                    "type": "string"
                  },
                  "panel": {
                    "type": "string"
                  },
                  "panelHigh": {
                    "type": "string"
                  },
                  "panelLow": {
                    "type": "string"
                  },
                  "ink": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "localePreference": {
            "type": "string",
            "enum": [
              "en",
              "fr"
            ]
          }
        }
      },
      "AgentOnboardingPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "forgeBaseUrl",
          "webAppUrl",
          "apiBaseUrl",
          "openApiUrl",
          "healthUrl",
          "settingsUrl",
          "tokenCreateUrl",
          "pluginBasePath",
          "defaultConnectionMode",
          "defaultActorLabel",
          "defaultTimeoutMs",
          "recommendedScopes",
          "recommendedTrustLevel",
          "recommendedAutonomyMode",
          "recommendedApprovalMode",
          "authModes",
          "tokenRecovery",
          "requiredHeaders",
          "conceptModel",
          "psycheSubmoduleModel",
          "psycheCoachingPlaybooks",
          "conversationRules",
          "entityConversationPlaybooks",
          "relationshipModel",
          "entityRouteModel",
          "multiUserModel",
          "strategyContractModel",
          "entityCatalog",
          "toolInputCatalog",
          "connectionGuides",
          "verificationPaths",
          "recommendedPluginTools",
          "interactionGuidance",
          "mutationGuidance"
        ],
        "properties": {
          "forgeBaseUrl": {
            "type": "string"
          },
          "webAppUrl": {
            "type": "string"
          },
          "apiBaseUrl": {
            "type": "string"
          },
          "openApiUrl": {
            "type": "string"
          },
          "healthUrl": {
            "type": "string"
          },
          "settingsUrl": {
            "type": "string"
          },
          "tokenCreateUrl": {
            "type": "string"
          },
          "pluginBasePath": {
            "type": "string"
          },
          "defaultConnectionMode": {
            "type": "string",
            "enum": [
              "operator_session",
              "managed_token"
            ]
          },
          "defaultActorLabel": {
            "type": "string"
          },
          "defaultTimeoutMs": {
            "type": "integer"
          },
          "recommendedScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recommendedTrustLevel": {
            "type": "string",
            "enum": [
              "standard",
              "trusted",
              "autonomous"
            ]
          },
          "recommendedAutonomyMode": {
            "type": "string",
            "enum": [
              "approval_required",
              "scoped_write",
              "autonomous"
            ]
          },
          "recommendedApprovalMode": {
            "type": "string",
            "enum": [
              "approval_by_default",
              "high_impact_only",
              "none"
            ]
          },
          "authModes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "operatorSession",
              "managedToken"
            ],
            "properties": {
              "operatorSession": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "label",
                  "summary",
                  "tokenRequired",
                  "trustedTargets"
                ],
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "tokenRequired": {
                    "type": "boolean"
                  },
                  "trustedTargets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "managedToken": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "label",
                  "summary",
                  "tokenRequired"
                ],
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "tokenRequired": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "tokenRecovery": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "rawTokenStoredByForge",
              "recoveryAction",
              "rotationSummary",
              "settingsSummary"
            ],
            "properties": {
              "rawTokenStoredByForge": {
                "type": "boolean"
              },
              "recoveryAction": {
                "type": "string"
              },
              "rotationSummary": {
                "type": "string"
              },
              "settingsSummary": {
                "type": "string"
              }
            }
          },
          "requiredHeaders": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "authorization",
              "source",
              "actor"
            ],
            "properties": {
              "authorization": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "actor": {
                "type": "string"
              }
            }
          },
          "conceptModel": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "goal",
              "project",
              "task",
              "taskRun",
              "note",
              "wiki",
              "sleepSession",
              "workoutSession",
              "preferences",
              "questionnaire",
              "selfObservation",
              "insight",
              "calendar",
              "workBlock",
              "taskTimebox",
              "workAdjustment",
              "movement",
              "lifeForce",
              "workbench",
              "psyche"
            ],
            "properties": {
              "goal": {
                "type": "string"
              },
              "project": {
                "type": "string"
              },
              "task": {
                "type": "string"
              },
              "taskRun": {
                "type": "string"
              },
              "note": {
                "type": "string"
              },
              "wiki": {
                "type": "string"
              },
              "sleepSession": {
                "type": "string"
              },
              "workoutSession": {
                "type": "string"
              },
              "preferences": {
                "type": "string"
              },
              "questionnaire": {
                "type": "string"
              },
              "selfObservation": {
                "type": "string"
              },
              "insight": {
                "type": "string"
              },
              "calendar": {
                "type": "string"
              },
              "workBlock": {
                "type": "string"
              },
              "taskTimebox": {
                "type": "string"
              },
              "workAdjustment": {
                "type": "string"
              },
              "movement": {
                "type": "string"
              },
              "lifeForce": {
                "type": "string"
              },
              "workbench": {
                "type": "string"
              },
              "psyche": {
                "type": "string"
              }
            }
          },
          "psycheSubmoduleModel": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "value",
              "behaviorPattern",
              "behavior",
              "beliefEntry",
              "schemaCatalog",
              "modeProfile",
              "modeGuideSession",
              "eventType",
              "emotionDefinition",
              "triggerReport"
            ],
            "properties": {
              "value": {
                "type": "string"
              },
              "behaviorPattern": {
                "type": "string"
              },
              "behavior": {
                "type": "string"
              },
              "beliefEntry": {
                "type": "string"
              },
              "schemaCatalog": {
                "type": "string"
              },
              "modeProfile": {
                "type": "string"
              },
              "modeGuideSession": {
                "type": "string"
              },
              "eventType": {
                "type": "string"
              },
              "emotionDefinition": {
                "type": "string"
              },
              "triggerReport": {
                "type": "string"
              }
            }
          },
          "psycheCoachingPlaybooks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "focus",
                "useWhen",
                "coachingGoal",
                "askSequence",
                "requiredForCreate",
                "highValueOptionalFields",
                "exampleQuestions",
                "notes"
              ],
              "properties": {
                "focus": {
                  "type": "string"
                },
                "useWhen": {
                  "type": "string"
                },
                "coachingGoal": {
                  "type": "string"
                },
                "askSequence": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "requiredForCreate": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "highValueOptionalFields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "exampleQuestions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "notes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "conversationRules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "entityConversationPlaybooks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "focus",
                "openingQuestion",
                "coachingGoal",
                "askSequence"
              ],
              "properties": {
                "focus": {
                  "type": "string"
                },
                "openingQuestion": {
                  "type": "string"
                },
                "coachingGoal": {
                  "type": "string"
                },
                "askSequence": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "relationshipModel": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "entityRouteModel": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "batchCrudEntities",
              "batchRoutes",
              "specializedCrudEntities",
              "actionEntities",
              "specializedDomainSurfaces",
              "readModelOnlySurfaces"
            ],
            "properties": {
              "batchCrudEntities": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "batchRoutes": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "search",
                  "create",
                  "update",
                  "delete",
                  "restore"
                ],
                "properties": {
                  "search": {
                    "type": "string"
                  },
                  "create": {
                    "type": "string"
                  },
                  "update": {
                    "type": "string"
                  },
                  "delete": {
                    "type": "string"
                  },
                  "restore": {
                    "type": "string"
                  }
                }
              },
              "specializedCrudEntities": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "actionEntities": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "specializedDomainSurfaces": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "readModelOnlySurfaces": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "multiUserModel": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "summary",
              "defaultUserScopeBehavior",
              "routeScoping",
              "relationshipGraphDefaults"
            ],
            "properties": {
              "summary": {
                "type": "string"
              },
              "defaultUserScopeBehavior": {
                "type": "string"
              },
              "routeScoping": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "relationshipGraphDefaults": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "strategyContractModel": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "draftSummary",
              "lockSummary",
              "unlockSummary",
              "alignmentSummary",
              "metricBreakdown"
            ],
            "properties": {
              "draftSummary": {
                "type": "string"
              },
              "lockSummary": {
                "type": "string"
              },
              "unlockSummary": {
                "type": "string"
              },
              "alignmentSummary": {
                "type": "string"
              },
              "metricBreakdown": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "entityCatalog": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "entityType",
                "classification",
                "purpose",
                "minimumCreateFields",
                "relationshipRules",
                "searchHints",
                "fieldGuide",
                "preferredMutationPath"
              ],
              "properties": {
                "entityType": {
                  "type": "string"
                },
                "classification": {
                  "type": "string",
                  "enum": [
                    "batch_crud_entity",
                    "specialized_crud_entity",
                    "action_workflow_entity",
                    "specialized_domain_surface",
                    "read_model_only_surface"
                  ]
                },
                "purpose": {
                  "type": "string"
                },
                "minimumCreateFields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "relationshipRules": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "searchHints": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "routeBase": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "preferredMutationPath": {
                  "type": "string"
                },
                "preferredReadPath": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "preferredMutationTool": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "examples": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "fieldGuide": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "name",
                      "type",
                      "required",
                      "description"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "enumValues": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "defaultValue": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "nullable": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          },
          "toolInputCatalog": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "toolName",
                "summary",
                "whenToUse",
                "inputShape",
                "requiredFields",
                "notes",
                "example"
              ],
              "properties": {
                "toolName": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "whenToUse": {
                  "type": "string"
                },
                "inputShape": {
                  "type": "string"
                },
                "requiredFields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "notes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "example": {
                  "type": "string"
                }
              }
            }
          },
          "verificationPaths": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "context",
              "xpMetrics",
              "weeklyReview",
              "sleepOverview",
              "sportsOverview",
              "lifeForce",
              "lifeForceProfile",
              "lifeForceWeekdayTemplate",
              "lifeForceFatigueSignals",
              "movementDay",
              "movementMonth",
              "movementTimeline",
              "movementAllTime",
              "movementPlaces",
              "movementTripDetail",
              "movementSelection",
              "movementUserBoxPreflight",
              "movementUserBoxUpdate",
              "movementAutomaticBoxInvalidate",
              "movementStayUpdate",
              "movementTripUpdate",
              "movementTripPointUpdate",
              "workbenchFlows",
              "workbenchFlowBySlug",
              "workbenchPublishedOutput",
              "workbenchRunDetail",
              "workbenchNodeResult",
              "workbenchLatestNodeOutput",
              "wikiSettings",
              "wikiSearch",
              "wikiHealth",
              "calendarOverview",
              "settingsBin",
              "batchSearch",
              "psycheSchemaCatalog",
              "psycheEventTypes",
              "psycheEmotions"
            ],
            "properties": {
              "context": {
                "type": "string"
              },
              "xpMetrics": {
                "type": "string"
              },
              "weeklyReview": {
                "type": "string"
              },
              "sleepOverview": {
                "type": "string"
              },
              "sportsOverview": {
                "type": "string"
              },
              "lifeForce": {
                "type": "string"
              },
              "lifeForceProfile": {
                "type": "string"
              },
              "lifeForceWeekdayTemplate": {
                "type": "string"
              },
              "lifeForceFatigueSignals": {
                "type": "string"
              },
              "movementDay": {
                "type": "string"
              },
              "movementMonth": {
                "type": "string"
              },
              "movementTimeline": {
                "type": "string"
              },
              "movementAllTime": {
                "type": "string"
              },
              "movementPlaces": {
                "type": "string"
              },
              "movementTripDetail": {
                "type": "string"
              },
              "movementSelection": {
                "type": "string"
              },
              "movementUserBoxPreflight": {
                "type": "string"
              },
              "movementUserBoxUpdate": {
                "type": "string"
              },
              "movementAutomaticBoxInvalidate": {
                "type": "string"
              },
              "movementStayUpdate": {
                "type": "string"
              },
              "movementTripUpdate": {
                "type": "string"
              },
              "movementTripPointUpdate": {
                "type": "string"
              },
              "workbenchFlows": {
                "type": "string"
              },
              "workbenchFlowBySlug": {
                "type": "string"
              },
              "workbenchPublishedOutput": {
                "type": "string"
              },
              "workbenchRunDetail": {
                "type": "string"
              },
              "workbenchNodeResult": {
                "type": "string"
              },
              "workbenchLatestNodeOutput": {
                "type": "string"
              },
              "wikiSettings": {
                "type": "string"
              },
              "wikiSearch": {
                "type": "string"
              },
              "wikiHealth": {
                "type": "string"
              },
              "calendarOverview": {
                "type": "string"
              },
              "settingsBin": {
                "type": "string"
              },
              "batchSearch": {
                "type": "string"
              },
              "psycheSchemaCatalog": {
                "type": "string"
              },
              "psycheEventTypes": {
                "type": "string"
              },
              "psycheEmotions": {
                "type": "string"
              }
            }
          },
          "recommendedPluginTools": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "bootstrap",
              "readModels",
              "uiWorkflow",
              "entityWorkflow",
              "wikiWorkflow",
              "healthWorkflow",
              "rewardWorkflow",
              "workWorkflow",
              "calendarWorkflow",
              "insightWorkflow"
            ],
            "properties": {
              "bootstrap": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "readModels": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "uiWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "entityWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "wikiWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "healthWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "rewardWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "workWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "calendarWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "insightWorkflow": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "interactionGuidance": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "conversationMode",
              "saveSuggestionPlacement",
              "saveSuggestionTone",
              "maxQuestionsPerTurn",
              "psycheExplorationRule",
              "psycheOpeningQuestionRule",
              "duplicateCheckRoute",
              "uiSuggestionRule",
              "browserFallbackRule",
              "writeConsentRule"
            ],
            "properties": {
              "conversationMode": {
                "type": "string"
              },
              "saveSuggestionPlacement": {
                "type": "string"
              },
              "saveSuggestionTone": {
                "type": "string"
              },
              "maxQuestionsPerTurn": {
                "type": "integer"
              },
              "psycheExplorationRule": {
                "type": "string"
              },
              "psycheOpeningQuestionRule": {
                "type": "string"
              },
              "duplicateCheckRoute": {
                "type": "string"
              },
              "uiSuggestionRule": {
                "type": "string"
              },
              "browserFallbackRule": {
                "type": "string"
              },
              "writeConsentRule": {
                "type": "string"
              }
            }
          },
          "connectionGuides": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "label",
                "installSteps",
                "verifyCommands",
                "configNotes"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "installSteps": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "verifyCommands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "configNotes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "mutationGuidance": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "preferredBatchRoutes",
              "deleteDefault",
              "hardDeleteRequiresExplicitMode",
              "restoreSummary",
              "entityDeleteSummary",
              "batchingRule",
              "searchRule",
              "createRule",
              "updateRule",
              "createExample",
              "updateExample"
            ],
            "properties": {
              "preferredBatchRoutes": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "create",
                  "update",
                  "delete",
                  "restore",
                  "search"
                ],
                "properties": {
                  "create": {
                    "type": "string"
                  },
                  "update": {
                    "type": "string"
                  },
                  "delete": {
                    "type": "string"
                  },
                  "restore": {
                    "type": "string"
                  },
                  "search": {
                    "type": "string"
                  }
                }
              },
              "deleteDefault": {
                "type": "string",
                "enum": [
                  "soft",
                  "hard"
                ]
              },
              "hardDeleteRequiresExplicitMode": {
                "type": "boolean"
              },
              "restoreSummary": {
                "type": "string"
              },
              "entityDeleteSummary": {
                "type": "string"
              },
              "batchingRule": {
                "type": "string"
              },
              "searchRule": {
                "type": "string"
              },
              "createRule": {
                "type": "string"
              },
              "updateRule": {
                "type": "string"
              },
              "createExample": {
                "type": "string"
              },
              "updateExample": {
                "type": "string"
              }
            }
          }
        }
      },
      "DeletedEntityRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entityType",
          "entityId",
          "title",
          "deletedAt",
          "snapshot"
        ],
        "properties": {
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "subtitle": {
            "type": [
              "string",
              "null"
            ]
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedByActor": {
            "type": [
              "string",
              "null"
            ]
          },
          "deletedSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "deleteReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "snapshot": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SettingsBinPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "totalCount",
          "countsByEntityType",
          "records"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "totalCount": {
            "type": "integer"
          },
          "countsByEntityType": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeletedEntityRecord"
            }
          }
        }
      },
      "BatchEntityResult": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "ok",
          "entityType"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "entityType": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "clientRef": {
            "type": "string"
          },
          "entity": {
            "type": "object",
            "additionalProperties": true
          },
          "matches": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "deletedRecord": {
            "$ref": "#/components/schemas/DeletedEntityRecord"
          },
          "error": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "AgentIdentity": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "agentType",
          "trustLevel",
          "autonomyMode",
          "approvalMode",
          "description",
          "tokenCount",
          "activeTokenCount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "agentType": {
            "type": "string"
          },
          "trustLevel": {
            "type": "string",
            "enum": [
              "standard",
              "trusted",
              "autonomous"
            ]
          },
          "autonomyMode": {
            "type": "string",
            "enum": [
              "approval_required",
              "scoped_write",
              "autonomous"
            ]
          },
          "approvalMode": {
            "type": "string",
            "enum": [
              "approval_by_default",
              "high_impact_only",
              "none"
            ]
          },
          "description": {
            "type": "string"
          },
          "tokenCount": {
            "type": "integer"
          },
          "activeTokenCount": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AgentTokenSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "tokenPrefix",
          "scopes",
          "agentId",
          "agentLabel",
          "trustLevel",
          "autonomyMode",
          "approvalMode",
          "description",
          "lastUsedAt",
          "revokedAt",
          "createdAt",
          "updatedAt",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "tokenPrefix": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "agentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "agentLabel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trustLevel": {
            "type": "string",
            "enum": [
              "standard",
              "trusted",
              "autonomous"
            ]
          },
          "autonomyMode": {
            "type": "string",
            "enum": [
              "approval_required",
              "scoped_write",
              "autonomous"
            ]
          },
          "approvalMode": {
            "type": "string",
            "enum": [
              "approval_by_default",
              "high_impact_only",
              "none"
            ]
          },
          "description": {
            "type": "string"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          }
        }
      },
      "AgentTokenMutationResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "token",
          "tokenSummary"
        ],
        "properties": {
          "token": {
            "type": "string"
          },
          "tokenSummary": {
            "$ref": "#/components/schemas/AgentTokenSummary"
          }
        }
      },
      "Domain": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "slug",
          "title",
          "description",
          "themeColor",
          "sensitive",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "themeColor": {
            "type": "string"
          },
          "sensitive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SchemaCatalogEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "slug",
          "title",
          "family",
          "schemaType",
          "description",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "schemaType": {
            "type": "string",
            "enum": [
              "maladaptive",
              "adaptive"
            ]
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EventType": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "label",
          "description",
          "system",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "system": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EmotionDefinition": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "label",
          "description",
          "category",
          "system",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "system": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PsycheValue": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "title",
          "description",
          "valuedDirection",
          "whyItMatters",
          "linkedGoalIds",
          "linkedProjectIds",
          "linkedTaskIds",
          "committedActions",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "valuedDirection": {
            "type": "string"
          },
          "whyItMatters": {
            "type": "string"
          },
          "linkedGoalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedProjectIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedTaskIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "committedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BehaviorPattern": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "title",
          "description",
          "targetBehavior",
          "cueContexts",
          "shortTermPayoff",
          "longTermCost",
          "preferredResponse",
          "linkedValueIds",
          "linkedSchemaLabels",
          "linkedModeLabels",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "targetBehavior": {
            "type": "string"
          },
          "cueContexts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "shortTermPayoff": {
            "type": "string"
          },
          "longTermCost": {
            "type": "string"
          },
          "preferredResponse": {
            "type": "string"
          },
          "linkedValueIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedSchemaLabels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedModeLabels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Behavior": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "kind",
          "title",
          "description",
          "commonCues",
          "urgeStory",
          "shortTermPayoff",
          "longTermCost",
          "replacementMove",
          "repairPlan",
          "linkedPatternIds",
          "linkedValueIds",
          "linkedSchemaIds",
          "linkedModeIds",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "away",
              "committed",
              "recovery"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "commonCues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "urgeStory": {
            "type": "string"
          },
          "shortTermPayoff": {
            "type": "string"
          },
          "longTermCost": {
            "type": "string"
          },
          "replacementMove": {
            "type": "string"
          },
          "repairPlan": {
            "type": "string"
          },
          "linkedPatternIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedValueIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedSchemaIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedModeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BeliefEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "schemaId",
          "statement",
          "beliefType",
          "originNote",
          "confidence",
          "evidenceFor",
          "evidenceAgainst",
          "flexibleAlternative",
          "linkedValueIds",
          "linkedBehaviorIds",
          "linkedModeIds",
          "linkedReportIds",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "schemaId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "statement": {
            "type": "string"
          },
          "beliefType": {
            "type": "string",
            "enum": [
              "absolute",
              "conditional"
            ]
          },
          "originNote": {
            "type": "string"
          },
          "confidence": {
            "type": "integer"
          },
          "evidenceFor": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "evidenceAgainst": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "flexibleAlternative": {
            "type": "string"
          },
          "linkedValueIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedBehaviorIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedModeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedReportIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ModeProfile": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "family",
          "archetype",
          "title",
          "persona",
          "imagery",
          "symbolicForm",
          "facialExpression",
          "fear",
          "burden",
          "protectiveJob",
          "originContext",
          "firstAppearanceAt",
          "linkedPatternIds",
          "linkedBehaviorIds",
          "linkedValueIds",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "family": {
            "type": "string",
            "enum": [
              "coping",
              "child",
              "critic_parent",
              "healthy_adult",
              "happy_child"
            ]
          },
          "archetype": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "persona": {
            "type": "string"
          },
          "imagery": {
            "type": "string"
          },
          "symbolicForm": {
            "type": "string"
          },
          "facialExpression": {
            "type": "string"
          },
          "fear": {
            "type": "string"
          },
          "burden": {
            "type": "string"
          },
          "protectiveJob": {
            "type": "string"
          },
          "originContext": {
            "type": "string"
          },
          "firstAppearanceAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedPatternIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedBehaviorIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedValueIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ModeGuideSession": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "summary",
          "answers",
          "results",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "questionKey",
                "value"
              ],
              "properties": {
                "questionKey": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "family",
                "archetype",
                "label",
                "confidence",
                "reasoning"
              ],
              "properties": {
                "family": {
                  "type": "string",
                  "enum": [
                    "coping",
                    "child",
                    "critic_parent",
                    "healthy_adult",
                    "happy_child"
                  ]
                },
                "archetype": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "reasoning": {
                  "type": "string"
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TriggerReport": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "domainId",
          "title",
          "status",
          "eventTypeId",
          "customEventType",
          "eventSituation",
          "occurredAt",
          "emotions",
          "thoughts",
          "behaviors",
          "consequences",
          "linkedPatternIds",
          "linkedValueIds",
          "linkedGoalIds",
          "linkedProjectIds",
          "linkedTaskIds",
          "linkedBehaviorIds",
          "linkedBeliefIds",
          "linkedModeIds",
          "modeOverlays",
          "schemaLinks",
          "modeTimeline",
          "nextMoves",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "domainId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "reviewed",
              "integrated"
            ]
          },
          "eventTypeId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "customEventType": {
            "type": "string"
          },
          "eventSituation": {
            "type": "string"
          },
          "occurredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "emotions": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "emotionDefinitionId",
                "label",
                "intensity",
                "note"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "emotionDefinitionId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "label": {
                  "type": "string"
                },
                "intensity": {
                  "type": "integer"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "thoughts": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "text",
                "parentMode",
                "criticMode",
                "beliefId"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "parentMode": {
                  "type": "string"
                },
                "criticMode": {
                  "type": "string"
                },
                "beliefId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "behaviors": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "text",
                "mode",
                "behaviorId"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "mode": {
                  "type": "string"
                },
                "behaviorId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "consequences": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "selfShortTerm",
              "selfLongTerm",
              "othersShortTerm",
              "othersLongTerm"
            ],
            "properties": {
              "selfShortTerm": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "selfLongTerm": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "othersShortTerm": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "othersLongTerm": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "linkedPatternIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedValueIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedGoalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedProjectIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedTaskIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedBehaviorIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedBeliefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedModeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modeOverlays": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "schemaLinks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modeTimeline": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "stage",
                "modeId",
                "label",
                "note"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "stage": {
                  "type": "string"
                },
                "modeId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "label": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "nextMoves": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "NoteLink": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entityType",
          "entityId",
          "anchorKey"
        ],
        "properties": {
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "anchorKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Note": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "contentMarkdown",
          "contentPlain",
          "author",
          "source",
          "createdAt",
          "updatedAt",
          "links",
          "tags",
          "destroyAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "contentMarkdown": {
            "type": "string"
          },
          "contentPlain": {
            "type": "string"
          },
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "ui",
              "openclaw",
              "agent",
              "system"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NoteLink"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "destroyAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "NoteSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "count",
          "latestNoteId",
          "latestCreatedAt"
        ],
        "properties": {
          "count": {
            "type": "integer"
          },
          "latestNoteId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "latestCreatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "NotesSummaryByEntity": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/components/schemas/NoteSummary"
        }
      },
      "HealthLink": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entityType",
          "entityId",
          "relationshipType"
        ],
        "properties": {
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "relationshipType": {
            "type": "string"
          }
        }
      },
      "SleepSession": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "externalUid",
          "pairingSessionId",
          "userId",
          "source",
          "sourceType",
          "sourceDevice",
          "startedAt",
          "endedAt",
          "timeInBedSeconds",
          "asleepSeconds",
          "awakeSeconds",
          "sleepScore",
          "regularityScore",
          "bedtimeConsistencyMinutes",
          "wakeConsistencyMinutes",
          "stageBreakdown",
          "recoveryMetrics",
          "links",
          "annotations",
          "provenance",
          "derived",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "externalUid": {
            "type": "string"
          },
          "pairingSessionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "userId": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "sourceDevice": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "timeInBedSeconds": {
            "type": "integer"
          },
          "asleepSeconds": {
            "type": "integer"
          },
          "awakeSeconds": {
            "type": "integer"
          },
          "sleepScore": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "regularityScore": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "bedtimeConsistencyMinutes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wakeConsistencyMinutes": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "stageBreakdown": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "stage",
                "seconds"
              ],
              "properties": {
                "stage": {
                  "type": "string"
                },
                "seconds": {
                  "type": "integer"
                }
              }
            }
          },
          "recoveryMetrics": {
            "type": "object",
            "additionalProperties": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthLink"
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": true
          },
          "provenance": {
            "type": "object",
            "additionalProperties": true
          },
          "derived": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkoutSession": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "externalUid",
          "pairingSessionId",
          "userId",
          "source",
          "sourceType",
          "workoutType",
          "sourceDevice",
          "startedAt",
          "endedAt",
          "durationSeconds",
          "activeEnergyKcal",
          "totalEnergyKcal",
          "distanceMeters",
          "stepCount",
          "exerciseMinutes",
          "averageHeartRate",
          "maxHeartRate",
          "subjectiveEffort",
          "moodBefore",
          "moodAfter",
          "meaningText",
          "plannedContext",
          "socialContext",
          "links",
          "tags",
          "annotations",
          "provenance",
          "derived",
          "generatedFromHabitId",
          "generatedFromCheckInId",
          "reconciliationStatus",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "externalUid": {
            "type": "string"
          },
          "pairingSessionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "userId": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "workoutType": {
            "type": "string"
          },
          "sourceDevice": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationSeconds": {
            "type": "integer"
          },
          "activeEnergyKcal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalEnergyKcal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "distanceMeters": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "stepCount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "exerciseMinutes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "averageHeartRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "maxHeartRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "subjectiveEffort": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "moodBefore": {
            "type": "string"
          },
          "moodAfter": {
            "type": "string"
          },
          "meaningText": {
            "type": "string"
          },
          "plannedContext": {
            "type": "string"
          },
          "socialContext": {
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HealthLink"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "annotations": {
            "type": "object",
            "additionalProperties": true
          },
          "provenance": {
            "type": "object",
            "additionalProperties": true
          },
          "derived": {
            "type": "object",
            "additionalProperties": true
          },
          "generatedFromHabitId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "generatedFromCheckInId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reconciliationStatus": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SleepViewData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "summary",
          "weeklyTrend",
          "monthlyPattern",
          "stageAverages",
          "linkBreakdown",
          "sessions"
        ],
        "properties": {
          "summary": {
            "type": "object",
            "additionalProperties": true
          },
          "weeklyTrend": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "monthlyPattern": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "stageAverages": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "linkBreakdown": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SleepSession"
            }
          }
        }
      },
      "FitnessViewData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "summary",
          "weeklyTrend",
          "typeBreakdown",
          "sessions"
        ],
        "properties": {
          "summary": {
            "type": "object",
            "additionalProperties": true
          },
          "weeklyTrend": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "typeBreakdown": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkoutSession"
            }
          }
        }
      },
      "PsycheOverviewPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "domain",
          "values",
          "patterns",
          "behaviors",
          "beliefs",
          "modes",
          "schemaPressure",
          "reports",
          "openInsights",
          "openNotes",
          "committedActions"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "domain": {
            "$ref": "#/components/schemas/Domain"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PsycheValue"
            }
          },
          "patterns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BehaviorPattern"
            }
          },
          "behaviors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Behavior"
            }
          },
          "beliefs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BeliefEntry"
            }
          },
          "modes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModeProfile"
            }
          },
          "schemaPressure": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "schemaId",
                "title",
                "activationCount"
              ],
              "properties": {
                "schemaId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "activationCount": {
                  "type": "integer"
                }
              }
            }
          },
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TriggerReport"
            }
          },
          "openInsights": {
            "type": "integer"
          },
          "openNotes": {
            "type": "integer"
          },
          "committedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Insight": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "originType",
          "originAgentId",
          "originLabel",
          "visibility",
          "status",
          "entityType",
          "entityId",
          "timeframeLabel",
          "title",
          "summary",
          "recommendation",
          "rationale",
          "confidence",
          "ctaLabel",
          "evidence",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "originType": {
            "type": "string",
            "enum": [
              "system",
              "user",
              "agent"
            ]
          },
          "originAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "originLabel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "visible",
              "pending_review",
              "archived"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "accepted",
              "dismissed",
              "snoozed",
              "applied",
              "expired"
            ]
          },
          "entityType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "entityId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "timeframeLabel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "recommendation": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "ctaLabel": {
            "type": "string"
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "entityType",
                "entityId",
                "label"
              ],
              "properties": {
                "entityType": {
                  "type": "string"
                },
                "entityId": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "InsightFeedback": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "insightId",
          "actor",
          "feedbackType",
          "note",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "insightId": {
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feedbackType": {
            "type": "string",
            "enum": [
              "accepted",
              "dismissed",
              "applied",
              "snoozed"
            ]
          },
          "note": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApprovalRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "actionType",
          "status",
          "title",
          "summary",
          "entityType",
          "entityId",
          "requestedByAgentId",
          "requestedByTokenId",
          "requestedPayload",
          "approvedBy",
          "approvedAt",
          "rejectedBy",
          "rejectedAt",
          "resolutionNote",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "actionType": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "cancelled",
              "executed"
            ]
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "entityType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "entityId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedByAgentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedByTokenId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedPayload": {
            "type": "object",
            "additionalProperties": true
          },
          "approvedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "approvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rejectedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rejectedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolutionNote": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AgentAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "agentId",
          "tokenId",
          "actionType",
          "riskLevel",
          "status",
          "title",
          "summary",
          "payload",
          "idempotencyKey",
          "approvalRequestId",
          "outcome",
          "createdAt",
          "updatedAt",
          "completedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "agentId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tokenId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actionType": {
            "type": "string"
          },
          "riskLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_approval",
              "approved",
              "rejected",
              "executed"
            ]
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "idempotencyKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "approvalRequestId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "RewardRule": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "family",
          "code",
          "title",
          "description",
          "active",
          "config",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "family": {
            "type": "string",
            "enum": [
              "completion",
              "consistency",
              "alignment",
              "recovery",
              "collaboration",
              "ambient"
            ]
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "config": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RewardLedgerEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "ruleId",
          "eventLogId",
          "entityType",
          "entityId",
          "actor",
          "source",
          "deltaXp",
          "reasonTitle",
          "reasonSummary",
          "reversibleGroup",
          "reversedByRewardId",
          "metadata",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "ruleId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "eventLogId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "ui",
              "openclaw",
              "agent",
              "system"
            ]
          },
          "deltaXp": {
            "type": "integer"
          },
          "reasonTitle": {
            "type": "string"
          },
          "reasonSummary": {
            "type": "string"
          },
          "reversibleGroup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reversedByRewardId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EventLogEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "eventKind",
          "entityType",
          "entityId",
          "actor",
          "source",
          "causedByEventId",
          "metadata",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "eventKind": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "actor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "ui",
              "openclaw",
              "agent",
              "system"
            ]
          },
          "causedByEventId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "XpMetricsPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "profile",
          "achievements",
          "milestoneRewards",
          "momentumPulse",
          "recentLedger",
          "rules",
          "dailyAmbientXp",
          "dailyAmbientCap"
        ],
        "properties": {
          "profile": {
            "$ref": "#/components/schemas/GamificationProfile"
          },
          "achievements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AchievementSignal"
            }
          },
          "milestoneRewards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MilestoneReward"
            }
          },
          "momentumPulse": {
            "$ref": "#/components/schemas/XpMomentumPulse"
          },
          "recentLedger": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RewardLedgerEvent"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RewardRule"
            }
          },
          "dailyAmbientXp": {
            "type": "integer"
          },
          "dailyAmbientCap": {
            "type": "integer"
          }
        }
      },
      "OperatorContextPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "activeProjects",
          "focusTasks",
          "dueHabits",
          "currentBoard",
          "recentActivity",
          "recentTaskRuns",
          "recommendedNextTask",
          "xp"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "activeProjects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSummary"
            }
          },
          "focusTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "dueHabits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Habit"
            }
          },
          "currentBoard": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "backlog",
              "focus",
              "inProgress",
              "blocked",
              "done"
            ],
            "properties": {
              "backlog": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Task"
                }
              },
              "focus": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Task"
                }
              },
              "inProgress": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Task"
                }
              },
              "blocked": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Task"
                }
              },
              "done": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "recentActivity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEvent"
            }
          },
          "recentTaskRuns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskRun"
            }
          },
          "recommendedNextTask": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Task"
              },
              {
                "type": "null"
              }
            ]
          },
          "xp": {
            "$ref": "#/components/schemas/XpMetricsPayload"
          }
        }
      },
      "OperatorOverviewPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generatedAt",
          "snapshot",
          "operator",
          "domains",
          "psyche",
          "onboarding",
          "capabilities",
          "warnings",
          "routeGuide"
        ],
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "snapshot": {
            "$ref": "#/components/schemas/ForgeSnapshot"
          },
          "operator": {
            "$ref": "#/components/schemas/OperatorContextPayload"
          },
          "domains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Domain"
            }
          },
          "psyche": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PsycheOverviewPayload"
              },
              {
                "type": "null"
              }
            ]
          },
          "onboarding": {
            "$ref": "#/components/schemas/AgentOnboardingPayload"
          },
          "capabilities": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "tokenPresent",
              "scopes",
              "canReadPsyche",
              "canWritePsyche",
              "canManageModes",
              "canManageRewards"
            ],
            "properties": {
              "tokenPresent": {
                "type": "boolean"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "canReadPsyche": {
                "type": "boolean"
              },
              "canWritePsyche": {
                "type": "boolean"
              },
              "canManageModes": {
                "type": "boolean"
              },
              "canManageRewards": {
                "type": "boolean"
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "routeGuide": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "preferredStart",
              "mainRoutes"
            ],
            "properties": {
              "preferredStart": {
                "type": "string"
              },
              "mainRoutes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "path",
                    "summary",
                    "requiredScope"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "requiredScope": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Error response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/api/v1/health": {
      "get": {
        "summary": "Get Forge API health and watchdog status",
        "responses": {
          "200": {
            "description": "Forge health payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "app",
                    "now",
                    "watchdog"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "app": {
                      "type": "string",
                      "enum": [
                        "forge"
                      ]
                    },
                    "now": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "watchdog": {
                      "type": "object",
                      "required": [
                        "enabled",
                        "healthy",
                        "state",
                        "reason",
                        "status"
                      ],
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "healthy": {
                          "type": "boolean"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "disabled",
                            "idle",
                            "healthy",
                            "degraded"
                          ]
                        },
                        "reason": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "anyOf": [
                            {
                              "type": "object",
                              "additionalProperties": true
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "gethealth"
      }
    },
    "/api/v1/health/sleep": {
      "get": {
        "summary": "Read the Forge sleep overview surface",
        "responses": {
          "200": {
            "description": "Sleep overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sleep"
                  ],
                  "properties": {
                    "sleep": {
                      "$ref": "#/components/schemas/SleepViewData"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "gethealth_sleep"
      },
      "post": {
        "summary": "Create one manual sleep session",
        "responses": {
          "201": {
            "description": "Created sleep session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sleep"
                  ],
                  "properties": {
                    "sleep": {
                      "$ref": "#/components/schemas/SleepSession"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "posthealth_sleep"
      }
    },
    "/api/v1/health/fitness": {
      "get": {
        "summary": "Read the Forge sports and workout overview surface",
        "responses": {
          "200": {
            "description": "Fitness overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "fitness"
                  ],
                  "properties": {
                    "fitness": {
                      "$ref": "#/components/schemas/FitnessViewData"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "gethealth_fitness"
      }
    },
    "/api/v1/health/workouts": {
      "post": {
        "summary": "Create one manual workout session",
        "responses": {
          "201": {
            "description": "Created workout session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workout"
                  ],
                  "properties": {
                    "workout": {
                      "$ref": "#/components/schemas/WorkoutSession"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "posthealth_workouts"
      }
    },
    "/api/v1/health/workouts/{id}": {
      "get": {
        "summary": "Read one workout session",
        "responses": {
          "200": {
            "description": "Workout session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workout"
                  ],
                  "properties": {
                    "workout": {
                      "$ref": "#/components/schemas/WorkoutSession"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "gethealth_workouts_id"
      },
      "patch": {
        "summary": "Update one workout session's reflective metadata",
        "responses": {
          "200": {
            "description": "Updated workout session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workout"
                  ],
                  "properties": {
                    "workout": {
                      "$ref": "#/components/schemas/WorkoutSession"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "patchhealth_workouts_id"
      },
      "delete": {
        "summary": "Delete one workout session immediately",
        "responses": {
          "200": {
            "description": "Deleted workout session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workout"
                  ],
                  "properties": {
                    "workout": {
                      "$ref": "#/components/schemas/WorkoutSession"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "deletehealth_workouts_id"
      }
    },
    "/api/v1/health/sleep/{id}": {
      "get": {
        "summary": "Read one sleep session",
        "responses": {
          "200": {
            "description": "Sleep session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sleep"
                  ],
                  "properties": {
                    "sleep": {
                      "$ref": "#/components/schemas/SleepSession"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "gethealth_sleep_id"
      },
      "patch": {
        "summary": "Update one sleep session's reflective metadata",
        "responses": {
          "200": {
            "description": "Updated sleep session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sleep"
                  ],
                  "properties": {
                    "sleep": {
                      "$ref": "#/components/schemas/SleepSession"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "patchhealth_sleep_id"
      },
      "delete": {
        "summary": "Delete one sleep session immediately",
        "responses": {
          "200": {
            "description": "Deleted sleep session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sleep"
                  ],
                  "properties": {
                    "sleep": {
                      "$ref": "#/components/schemas/SleepSession"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Health"
        ],
        "operationId": "deletehealth_sleep_id"
      }
    },
    "/api/v1/life-force": {
      "get": {
        "summary": "Read the current life-force overview with stats, drains, curve state, warnings, and recommendations",
        "responses": {
          "200": {
            "description": "Life-force overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "lifeForce",
                    "templates"
                  ],
                  "properties": {
                    "lifeForce": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "templates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Life Force"
        ],
        "operationId": "getlife_force"
      }
    },
    "/api/v1/life-force/profile": {
      "patch": {
        "summary": "Update the user-controlled life-force profile settings",
        "responses": {
          "200": {
            "description": "Updated life-force profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "lifeForce",
                    "actor"
                  ],
                  "properties": {
                    "lifeForce": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "actor": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Life Force"
        ],
        "operationId": "patchlife_force_profile"
      }
    },
    "/api/v1/life-force/templates/{weekday}": {
      "put": {
        "summary": "Replace one weekday life-force curve template",
        "responses": {
          "200": {
            "description": "Updated weekday curve template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "weekday",
                    "points",
                    "actor"
                  ],
                  "properties": {
                    "weekday": {
                      "type": "integer"
                    },
                    "points": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "actor": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Life Force"
        ],
        "operationId": "putlife_force_templates_weekday"
      }
    },
    "/api/v1/life-force/fatigue-signals": {
      "post": {
        "summary": "Record a tired or recovered fatigue signal and rebuild life-force state",
        "responses": {
          "200": {
            "description": "Updated life-force state after fatigue signal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "lifeForce",
                    "actor"
                  ],
                  "properties": {
                    "lifeForce": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "actor": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Life Force"
        ],
        "operationId": "postlife_force_fatigue_signals"
      }
    },
    "/api/v1/movement/day": {
      "get": {
        "summary": "Read one day of movement detail with distance, stays, trips, gaps, and summaries",
        "responses": {
          "200": {
            "description": "Movement day detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "movement"
                  ],
                  "properties": {
                    "movement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "getmovement_day"
      }
    },
    "/api/v1/movement/month": {
      "get": {
        "summary": "Read one month of movement summary",
        "responses": {
          "200": {
            "description": "Movement month summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "movement"
                  ],
                  "properties": {
                    "movement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "getmovement_month"
      }
    },
    "/api/v1/movement/all-time": {
      "get": {
        "summary": "Read all-time movement summary including place and trip distribution",
        "responses": {
          "200": {
            "description": "Movement all-time summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "movement"
                  ],
                  "properties": {
                    "movement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "getmovement_all_time"
      }
    },
    "/api/v1/movement/timeline": {
      "get": {
        "summary": "Read the paginated movement timeline with stays, trips, missing spans, and projected boxes",
        "responses": {
          "200": {
            "description": "Movement timeline",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "movement"
                  ],
                  "properties": {
                    "movement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "getmovement_timeline"
      }
    },
    "/api/v1/movement/settings": {
      "get": {
        "summary": "Read movement capture settings",
        "responses": {
          "200": {
            "description": "Movement settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "settings"
                  ],
                  "properties": {
                    "settings": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "getmovement_settings"
      },
      "patch": {
        "summary": "Update movement capture settings",
        "responses": {
          "200": {
            "description": "Updated movement settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "settings"
                  ],
                  "properties": {
                    "settings": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "patchmovement_settings"
      }
    },
    "/api/v1/movement/places": {
      "get": {
        "summary": "List known movement places",
        "responses": {
          "200": {
            "description": "Movement places",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "places"
                  ],
                  "properties": {
                    "places": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "getmovement_places"
      },
      "post": {
        "summary": "Create one user-defined movement place",
        "responses": {
          "201": {
            "description": "Created movement place",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "place"
                  ],
                  "properties": {
                    "place": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "postmovement_places"
      }
    },
    "/api/v1/movement/places/{id}": {
      "patch": {
        "summary": "Update one known movement place",
        "responses": {
          "200": {
            "description": "Updated movement place",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "place"
                  ],
                  "properties": {
                    "place": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "patchmovement_places_id"
      }
    },
    "/api/v1/movement/user-boxes": {
      "post": {
        "summary": "Create a user-defined movement overlay box such as a manual stay, trip, or missing-data override",
        "responses": {
          "201": {
            "description": "Created movement user box",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "box"
                  ],
                  "properties": {
                    "box": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "postmovement_user_boxes"
      }
    },
    "/api/v1/movement/user-boxes/preflight": {
      "post": {
        "summary": "Analyze a proposed movement overlay before saving it, especially when replacing a missing gap or overlapping another box",
        "responses": {
          "200": {
            "description": "Movement user-box preflight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preflight"
                  ],
                  "properties": {
                    "preflight": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "postmovement_user_boxes_preflight"
      }
    },
    "/api/v1/movement/user-boxes/{id}": {
      "patch": {
        "summary": "Update one user-defined movement overlay box",
        "responses": {
          "200": {
            "description": "Updated movement user box",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "box"
                  ],
                  "properties": {
                    "box": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "patchmovement_user_boxes_id"
      },
      "delete": {
        "summary": "Delete one user-defined movement box",
        "responses": {
          "200": {
            "description": "Deleted movement user box",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "deletemovement_user_boxes_id"
      }
    },
    "/api/v1/movement/automatic-boxes/{id}/invalidate": {
      "post": {
        "summary": "Hide one automatic movement box and project the resulting user-defined overlay",
        "responses": {
          "201": {
            "description": "Invalidated automatic movement box",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "box"
                  ],
                  "properties": {
                    "box": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "postmovement_automatic_boxes_id_invalidate"
      }
    },
    "/api/v1/movement/stays/{id}": {
      "patch": {
        "summary": "Update one recorded movement stay",
        "responses": {
          "200": {
            "description": "Updated movement stay",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "stay"
                  ],
                  "properties": {
                    "stay": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "patchmovement_stays_id"
      },
      "delete": {
        "summary": "Delete one recorded movement stay",
        "responses": {
          "200": {
            "description": "Deleted movement stay",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "deletemovement_stays_id"
      }
    },
    "/api/v1/movement/trips/{id}": {
      "get": {
        "summary": "Read one movement trip with its full detail",
        "responses": {
          "200": {
            "description": "Movement trip detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "movement"
                  ],
                  "properties": {
                    "movement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "getmovement_trips_id"
      },
      "patch": {
        "summary": "Update one movement trip",
        "responses": {
          "200": {
            "description": "Updated movement trip",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "trip"
                  ],
                  "properties": {
                    "trip": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "patchmovement_trips_id"
      },
      "delete": {
        "summary": "Delete one movement trip",
        "responses": {
          "200": {
            "description": "Deleted movement trip",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "deletemovement_trips_id"
      }
    },
    "/api/v1/movement/trips/{id}/points/{pointId}": {
      "patch": {
        "summary": "Update one movement trip datapoint",
        "responses": {
          "200": {
            "description": "Updated movement trip point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "patchmovement_trips_id_points_pointId"
      },
      "delete": {
        "summary": "Delete one movement trip datapoint",
        "responses": {
          "200": {
            "description": "Deleted movement trip point",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "deletemovement_trips_id_points_pointId"
      }
    },
    "/api/v1/movement/selection": {
      "post": {
        "summary": "Aggregate one selected movement range or set of segments",
        "responses": {
          "200": {
            "description": "Movement selection aggregate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "movement"
                  ],
                  "properties": {
                    "movement": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Movement"
        ],
        "operationId": "postmovement_selection"
      }
    },
    "/api/v1/workbench/catalog/boxes": {
      "get": {
        "summary": "List registered Workbench boxes and their contracts",
        "responses": {
          "200": {
            "description": "Workbench box catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "boxes"
                  ],
                  "properties": {
                    "boxes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_catalog_boxes"
      }
    },
    "/api/v1/workbench/flows": {
      "get": {
        "summary": "List Workbench flows and recent execution summaries",
        "responses": {
          "200": {
            "description": "Workbench flow collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flows"
                  ],
                  "properties": {
                    "flows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows"
      },
      "post": {
        "summary": "Create one Workbench flow",
        "responses": {
          "201": {
            "description": "Created Workbench flow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "postworkbench_flows"
      }
    },
    "/api/v1/workbench/flows/{id}": {
      "get": {
        "summary": "Read one Workbench flow with runs",
        "responses": {
          "200": {
            "description": "Workbench flow detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "runs"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_id"
      },
      "patch": {
        "summary": "Update one Workbench flow",
        "responses": {
          "200": {
            "description": "Updated Workbench flow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "patchworkbench_flows_id"
      },
      "delete": {
        "summary": "Delete one Workbench flow",
        "responses": {
          "200": {
            "description": "Deleted Workbench flow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "deleteworkbench_flows_id"
      }
    },
    "/api/v1/workbench/flows/by-slug/{slug}": {
      "get": {
        "summary": "Read one Workbench flow by slug",
        "responses": {
          "200": {
            "description": "Workbench flow by slug",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_by_slug_slug"
      }
    },
    "/api/v1/workbench/flows/{id}/run": {
      "post": {
        "summary": "Run one Workbench flow by id",
        "responses": {
          "200": {
            "description": "Workbench flow execution",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "run",
                    "conversation"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "conversation": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "postworkbench_flows_id_run"
      }
    },
    "/api/v1/workbench/run": {
      "post": {
        "summary": "Run one Workbench flow by payload with flowId",
        "responses": {
          "200": {
            "description": "Workbench flow execution",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "run",
                    "conversation"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "conversation": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "postworkbench_run"
      }
    },
    "/api/v1/workbench/flows/{id}/chat": {
      "post": {
        "summary": "Continue or start one Workbench chat flow",
        "responses": {
          "200": {
            "description": "Workbench chat response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "postworkbench_flows_id_chat"
      }
    },
    "/api/v1/workbench/flows/{id}/output": {
      "get": {
        "summary": "Read the latest published whole-flow output",
        "responses": {
          "200": {
            "description": "Workbench published output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_id_output"
      }
    },
    "/api/v1/workbench/flows/{id}/runs": {
      "get": {
        "summary": "List Workbench runs for one flow",
        "responses": {
          "200": {
            "description": "Workbench run list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "runs"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_id_runs"
      }
    },
    "/api/v1/workbench/flows/{id}/runs/{runId}": {
      "get": {
        "summary": "Read one Workbench run detail",
        "responses": {
          "200": {
            "description": "Workbench run detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "run"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_id_runs_runId"
      }
    },
    "/api/v1/workbench/flows/{id}/runs/{runId}/nodes": {
      "get": {
        "summary": "List node results for one Workbench run",
        "responses": {
          "200": {
            "description": "Workbench node results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "run",
                    "nodeResults"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "nodeResults": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_id_runs_runId_nodes"
      }
    },
    "/api/v1/workbench/flows/{id}/runs/{runId}/nodes/{nodeId}": {
      "get": {
        "summary": "Read one node result for one Workbench run",
        "responses": {
          "200": {
            "description": "Workbench node result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "nodeResult"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "nodeResult": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_id_runs_runId_nodes_nodeId"
      }
    },
    "/api/v1/workbench/flows/{id}/nodes/{nodeId}/output": {
      "get": {
        "summary": "Read the latest successful output for one Workbench node",
        "responses": {
          "200": {
            "description": "Workbench latest node output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "flow",
                    "run",
                    "nodeResult"
                  ],
                  "properties": {
                    "flow": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "nodeResult": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Workbench"
        ],
        "operationId": "getworkbench_flows_id_nodes_nodeId_output"
      }
    },
    "/api/v1/wiki/settings": {
      "get": {
        "summary": "Read wiki spaces plus enabled LLM and embedding profiles",
        "responses": {
          "200": {
            "description": "Wiki settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "settings"
                  ],
                  "properties": {
                    "settings": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "getwiki_settings"
      }
    },
    "/api/v1/wiki/pages": {
      "get": {
        "summary": "List wiki or evidence pages inside one space",
        "responses": {
          "200": {
            "description": "Wiki page list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "pages"
                  ],
                  "properties": {
                    "pages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "getwiki_pages"
      },
      "post": {
        "summary": "Create a wiki page through the file-backed wiki surface",
        "responses": {
          "200": {
            "description": "Created wiki page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "page"
                  ],
                  "properties": {
                    "page": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "postwiki_pages"
      }
    },
    "/api/v1/wiki/pages/{id}": {
      "get": {
        "summary": "Read one wiki page with backlinks and attached metadata",
        "responses": {
          "200": {
            "description": "Wiki page detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "page"
                  ],
                  "properties": {
                    "page": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "getwiki_pages_id"
      },
      "patch": {
        "summary": "Update an existing wiki page through the file-backed surface",
        "responses": {
          "200": {
            "description": "Updated wiki page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "page"
                  ],
                  "properties": {
                    "page": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "patchwiki_pages_id"
      }
    },
    "/api/v1/wiki/search": {
      "post": {
        "summary": "Search the wiki with text, semantic, entity, or hybrid retrieval",
        "responses": {
          "200": {
            "description": "Wiki search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "postwiki_search"
      }
    },
    "/api/v1/wiki/health": {
      "get": {
        "summary": "Read wiki health signals for one space",
        "responses": {
          "200": {
            "description": "Wiki health",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "getwiki_health"
      }
    },
    "/api/v1/wiki/sync": {
      "post": {
        "summary": "Resync markdown files from the local wiki vault into Forge metadata",
        "responses": {
          "200": {
            "description": "Wiki sync result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "postwiki_sync"
      }
    },
    "/api/v1/wiki/reindex": {
      "post": {
        "summary": "Recompute wiki embedding chunks for one space and optional profile",
        "responses": {
          "200": {
            "description": "Wiki reindex result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "postwiki_reindex"
      }
    },
    "/api/v1/wiki/ingest-jobs": {
      "post": {
        "summary": "Queue a wiki ingest job from raw text, local files, or a URL",
        "responses": {
          "200": {
            "description": "Queued wiki ingest job",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "tags": [
          "Wiki"
        ],
        "operationId": "postwiki_ingest_jobs"
      }
    },
    "/api/v1/context": {
      "get": {
        "summary": "Get the full Forge snapshot for the routed app shell",
        "responses": {
          "200": {
            "description": "Forge snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForgeSnapshot"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Platform"
        ],
        "operationId": "getcontext"
      }
    },
    "/api/v1/operator/context": {
      "get": {
        "summary": "Get the operator-focused Forge context for agents and assistant workflows",
        "responses": {
          "200": {
            "description": "Operator context",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "context"
                  ],
                  "properties": {
                    "context": {
                      "$ref": "#/components/schemas/OperatorContextPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Operator"
        ],
        "operationId": "getoperator_context"
      }
    },
    "/api/v1/users/directory": {
      "get": {
        "summary": "Read the live human and bot directory with ownership summaries and directional relationship graph",
        "responses": {
          "200": {
            "description": "User directory",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "directory"
                  ],
                  "properties": {
                    "directory": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Users"
        ],
        "operationId": "getusers_directory"
      }
    },
    "/api/v1/preferences/workspace": {
      "get": {
        "summary": "Get the inferred Preferences workspace for one user, domain, and optional context",
        "responses": {
          "200": {
            "description": "Preferences workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workspace"
                  ],
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_workspace"
      }
    },
    "/api/v1/preferences/game/start": {
      "post": {
        "summary": "Start the Preferences game for a domain or concept list and return the refreshed workspace",
        "responses": {
          "200": {
            "description": "Refreshed Preferences workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workspace"
                  ],
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_game_start"
      }
    },
    "/api/v1/preferences/catalogs": {
      "get": {
        "summary": "List Preferences concept lists",
        "responses": {
          "200": {
            "description": "Preferences catalogs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "catalogs"
                  ],
                  "properties": {
                    "catalogs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_catalogs"
      },
      "post": {
        "summary": "Create a Preferences concept list",
        "responses": {
          "201": {
            "description": "Created Preferences catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "catalog"
                  ],
                  "properties": {
                    "catalog": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_catalogs"
      }
    },
    "/api/v1/preferences/catalogs/{id}": {
      "get": {
        "summary": "Get one Preferences concept list",
        "responses": {
          "200": {
            "description": "Preferences catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "catalog"
                  ],
                  "properties": {
                    "catalog": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_catalogs_id"
      },
      "patch": {
        "summary": "Update a Preferences concept list",
        "responses": {
          "200": {
            "description": "Updated Preferences catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "catalog"
                  ],
                  "properties": {
                    "catalog": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "patchpreferences_catalogs_id"
      },
      "delete": {
        "summary": "Delete a Preferences concept list",
        "responses": {
          "200": {
            "description": "Deleted Preferences catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "catalog"
                  ],
                  "properties": {
                    "catalog": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "deletepreferences_catalogs_id"
      }
    },
    "/api/v1/preferences/catalog-items": {
      "get": {
        "summary": "List Preferences concept entries",
        "responses": {
          "200": {
            "description": "Preferences catalog items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_catalog_items"
      },
      "post": {
        "summary": "Create a Preferences concept entry",
        "responses": {
          "201": {
            "description": "Created Preferences catalog item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_catalog_items"
      }
    },
    "/api/v1/preferences/catalog-items/{id}": {
      "get": {
        "summary": "Get one Preferences concept entry",
        "responses": {
          "200": {
            "description": "Preferences catalog item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_catalog_items_id"
      },
      "patch": {
        "summary": "Update a Preferences concept entry",
        "responses": {
          "200": {
            "description": "Updated Preferences catalog item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "patchpreferences_catalog_items_id"
      },
      "delete": {
        "summary": "Delete a Preferences concept entry",
        "responses": {
          "200": {
            "description": "Deleted Preferences catalog item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "deletepreferences_catalog_items_id"
      }
    },
    "/api/v1/preferences/contexts": {
      "get": {
        "summary": "List Preferences contexts",
        "responses": {
          "200": {
            "description": "Preferences contexts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "contexts"
                  ],
                  "properties": {
                    "contexts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_contexts"
      },
      "post": {
        "summary": "Create a Preferences context",
        "responses": {
          "201": {
            "description": "Created Preferences context",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "context"
                  ],
                  "properties": {
                    "context": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_contexts"
      }
    },
    "/api/v1/preferences/contexts/{id}": {
      "get": {
        "summary": "Get one Preferences context",
        "responses": {
          "200": {
            "description": "Preferences context",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "context"
                  ],
                  "properties": {
                    "context": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_contexts_id"
      },
      "patch": {
        "summary": "Update a Preferences context",
        "responses": {
          "200": {
            "description": "Updated Preferences context",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "context"
                  ],
                  "properties": {
                    "context": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "patchpreferences_contexts_id"
      },
      "delete": {
        "summary": "Delete a Preferences context",
        "responses": {
          "200": {
            "description": "Deleted Preferences context",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "context"
                  ],
                  "properties": {
                    "context": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "deletepreferences_contexts_id"
      }
    },
    "/api/v1/preferences/contexts/merge": {
      "post": {
        "summary": "Merge one Preferences context into another",
        "responses": {
          "200": {
            "description": "Merged Preferences contexts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "merge"
                  ],
                  "properties": {
                    "merge": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_contexts_merge"
      }
    },
    "/api/v1/preferences/items": {
      "get": {
        "summary": "List Preferences items",
        "responses": {
          "200": {
            "description": "Preferences items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_items"
      },
      "post": {
        "summary": "Create a standalone Preferences item",
        "responses": {
          "201": {
            "description": "Created Preferences item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_items"
      }
    },
    "/api/v1/preferences/items/{id}": {
      "get": {
        "summary": "Get one Preferences item",
        "responses": {
          "200": {
            "description": "Preferences item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "getpreferences_items_id"
      },
      "patch": {
        "summary": "Update a Preferences item",
        "responses": {
          "200": {
            "description": "Updated Preferences item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "patchpreferences_items_id"
      },
      "delete": {
        "summary": "Delete a Preferences item",
        "responses": {
          "200": {
            "description": "Deleted Preferences item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "deletepreferences_items_id"
      }
    },
    "/api/v1/preferences/items/from-entity": {
      "post": {
        "summary": "Create or queue a Preferences item from an existing Forge entity",
        "responses": {
          "201": {
            "description": "Queued entity-backed Preferences item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "item"
                  ],
                  "properties": {
                    "item": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_items_from_entity"
      }
    },
    "/api/v1/preferences/judgments": {
      "post": {
        "summary": "Submit a pairwise Preferences judgment",
        "responses": {
          "201": {
            "description": "Created pairwise judgment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "judgment"
                  ],
                  "properties": {
                    "judgment": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_judgments"
      }
    },
    "/api/v1/preferences/signals": {
      "post": {
        "summary": "Submit an absolute Preferences signal",
        "responses": {
          "201": {
            "description": "Created absolute signal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "signal"
                  ],
                  "properties": {
                    "signal": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "postpreferences_signals"
      }
    },
    "/api/v1/preferences/items/{id}/score": {
      "patch": {
        "summary": "Patch manual score state for a Preferences item and return the refreshed workspace",
        "responses": {
          "200": {
            "description": "Refreshed Preferences workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workspace"
                  ],
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Preferences"
        ],
        "operationId": "patchpreferences_items_id_score"
      }
    },
    "/api/v1/psyche/questionnaires": {
      "get": {
        "summary": "List questionnaire instruments available in the Psyche library",
        "responses": {
          "200": {
            "description": "Questionnaire instrument collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instruments"
                  ],
                  "properties": {
                    "instruments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "getpsyche_questionnaires"
      },
      "post": {
        "summary": "Create a custom questionnaire instrument",
        "responses": {
          "201": {
            "description": "Created questionnaire instrument",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "postpsyche_questionnaires"
      }
    },
    "/api/v1/psyche/questionnaires/{id}": {
      "get": {
        "summary": "Get one questionnaire instrument with version and history detail",
        "responses": {
          "200": {
            "description": "Questionnaire instrument detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "getpsyche_questionnaires_id"
      },
      "patch": {
        "summary": "Update one questionnaire instrument through the direct route",
        "responses": {
          "200": {
            "description": "Updated questionnaire instrument",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "patchpsyche_questionnaires_id"
      },
      "delete": {
        "summary": "Archive one questionnaire instrument through the direct route",
        "responses": {
          "200": {
            "description": "Archived questionnaire instrument",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "deletepsyche_questionnaires_id"
      }
    },
    "/api/v1/psyche/questionnaires/{id}/clone": {
      "post": {
        "summary": "Clone a questionnaire instrument into a new draftable custom copy",
        "responses": {
          "201": {
            "description": "Cloned questionnaire instrument",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "postpsyche_questionnaires_id_clone"
      }
    },
    "/api/v1/psyche/questionnaires/{id}/draft": {
      "post": {
        "summary": "Ensure a draft questionnaire version exists",
        "responses": {
          "200": {
            "description": "Questionnaire instrument with ensured draft",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "postpsyche_questionnaires_id_draft"
      },
      "patch": {
        "summary": "Update the current questionnaire draft version",
        "responses": {
          "200": {
            "description": "Questionnaire instrument with updated draft",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "patchpsyche_questionnaires_id_draft"
      }
    },
    "/api/v1/psyche/questionnaires/{id}/publish": {
      "post": {
        "summary": "Publish the current questionnaire draft as a new version",
        "responses": {
          "200": {
            "description": "Published questionnaire instrument",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "properties": {
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "postpsyche_questionnaires_id_publish"
      }
    },
    "/api/v1/psyche/questionnaires/{id}/runs": {
      "post": {
        "summary": "Start a questionnaire run for one user and instrument version",
        "responses": {
          "201": {
            "description": "Started questionnaire run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "run",
                    "instrument",
                    "version",
                    "answers",
                    "scores",
                    "history"
                  ],
                  "properties": {
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "version": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "answers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "scores": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "postpsyche_questionnaires_id_runs"
      }
    },
    "/api/v1/psyche/questionnaire-runs/{id}": {
      "get": {
        "summary": "Get one questionnaire run with answers, scores, and version detail",
        "responses": {
          "200": {
            "description": "Questionnaire run detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "run",
                    "instrument",
                    "version",
                    "answers",
                    "scores",
                    "history"
                  ],
                  "properties": {
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "version": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "answers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "scores": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "getpsyche_questionnaire_runs_id"
      },
      "patch": {
        "summary": "Update an in-progress questionnaire run",
        "responses": {
          "200": {
            "description": "Updated questionnaire run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "run",
                    "instrument",
                    "version",
                    "answers",
                    "scores",
                    "history"
                  ],
                  "properties": {
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "version": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "answers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "scores": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "patchpsyche_questionnaire_runs_id"
      }
    },
    "/api/v1/psyche/questionnaire-runs/{id}/complete": {
      "post": {
        "summary": "Complete a questionnaire run and persist its final scores",
        "responses": {
          "200": {
            "description": "Completed questionnaire run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "run",
                    "instrument",
                    "version",
                    "answers",
                    "scores",
                    "history"
                  ],
                  "properties": {
                    "run": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "instrument": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "version": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "answers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "scores": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "postpsyche_questionnaire_runs_id_complete"
      }
    },
    "/api/v1/psyche/self-observation/calendar": {
      "get": {
        "summary": "Read self-observation notes arranged as a calendar-ready reflection surface",
        "responses": {
          "200": {
            "description": "Self-observation calendar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "calendar"
                  ],
                  "properties": {
                    "calendar": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Questionnaires",
          "Psyche"
        ],
        "operationId": "getpsyche_self_observation_calendar"
      }
    },
    "/api/v1/operator/overview": {
      "get": {
        "summary": "Get the one-shot operator overview with full current state, route guidance, and optional Psyche summary",
        "responses": {
          "200": {
            "description": "Operator overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "overview"
                  ],
                  "properties": {
                    "overview": {
                      "$ref": "#/components/schemas/OperatorOverviewPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Operator"
        ],
        "operationId": "getoperator_overview"
      }
    },
    "/api/v1/domains": {
      "get": {
        "summary": "List canonical Forge domains",
        "responses": {
          "200": {
            "description": "Domain collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "domains"
                  ],
                  "properties": {
                    "domains": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Domain"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Platform"
        ],
        "operationId": "getdomains"
      }
    },
    "/api/v1/psyche/overview": {
      "get": {
        "summary": "Get the Psyche hub overview",
        "responses": {
          "200": {
            "description": "Psyche overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "overview"
                  ],
                  "properties": {
                    "overview": {
                      "$ref": "#/components/schemas/PsycheOverviewPayload"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_overview"
      }
    },
    "/api/v1/psyche/values": {
      "get": {
        "summary": "List ACT-style values",
        "responses": {
          "200": {
            "description": "Psyche value collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "values"
                  ],
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PsycheValue"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_values"
      },
      "post": {
        "summary": "Create a Psyche value",
        "responses": {
          "201": {
            "description": "Created value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "$ref": "#/components/schemas/PsycheValue"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_values"
      }
    },
    "/api/v1/psyche/values/{id}": {
      "get": {
        "summary": "Get a Psyche value",
        "responses": {
          "200": {
            "description": "Psyche value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "$ref": "#/components/schemas/PsycheValue"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_values_id"
      },
      "patch": {
        "summary": "Update a Psyche value",
        "responses": {
          "200": {
            "description": "Updated value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "$ref": "#/components/schemas/PsycheValue"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_values_id"
      },
      "delete": {
        "summary": "Delete a Psyche value",
        "responses": {
          "200": {
            "description": "Deleted value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "$ref": "#/components/schemas/PsycheValue"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_values_id"
      }
    },
    "/api/v1/psyche/patterns": {
      "get": {
        "summary": "List behavior patterns",
        "responses": {
          "200": {
            "description": "Behavior pattern collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "patterns"
                  ],
                  "properties": {
                    "patterns": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BehaviorPattern"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_patterns"
      },
      "post": {
        "summary": "Create a behavior pattern",
        "responses": {
          "201": {
            "description": "Created behavior pattern",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "pattern"
                  ],
                  "properties": {
                    "pattern": {
                      "$ref": "#/components/schemas/BehaviorPattern"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_patterns"
      }
    },
    "/api/v1/psyche/patterns/{id}": {
      "get": {
        "summary": "Get a behavior pattern",
        "responses": {
          "200": {
            "description": "Behavior pattern",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "pattern"
                  ],
                  "properties": {
                    "pattern": {
                      "$ref": "#/components/schemas/BehaviorPattern"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_patterns_id"
      },
      "patch": {
        "summary": "Update a behavior pattern",
        "responses": {
          "200": {
            "description": "Updated behavior pattern",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "pattern"
                  ],
                  "properties": {
                    "pattern": {
                      "$ref": "#/components/schemas/BehaviorPattern"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_patterns_id"
      },
      "delete": {
        "summary": "Delete a behavior pattern",
        "responses": {
          "200": {
            "description": "Deleted behavior pattern",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "pattern"
                  ],
                  "properties": {
                    "pattern": {
                      "$ref": "#/components/schemas/BehaviorPattern"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_patterns_id"
      }
    },
    "/api/v1/psyche/behaviors": {
      "get": {
        "summary": "List tracked Psyche behaviors",
        "responses": {
          "200": {
            "description": "Behavior collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "behaviors"
                  ],
                  "properties": {
                    "behaviors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Behavior"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_behaviors"
      },
      "post": {
        "summary": "Create a Psyche behavior",
        "responses": {
          "201": {
            "description": "Created behavior",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "behavior"
                  ],
                  "properties": {
                    "behavior": {
                      "$ref": "#/components/schemas/Behavior"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_behaviors"
      }
    },
    "/api/v1/psyche/behaviors/{id}": {
      "get": {
        "summary": "Get a Psyche behavior",
        "responses": {
          "200": {
            "description": "Behavior detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "behavior"
                  ],
                  "properties": {
                    "behavior": {
                      "$ref": "#/components/schemas/Behavior"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_behaviors_id"
      },
      "patch": {
        "summary": "Update a Psyche behavior",
        "responses": {
          "200": {
            "description": "Updated behavior",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "behavior"
                  ],
                  "properties": {
                    "behavior": {
                      "$ref": "#/components/schemas/Behavior"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_behaviors_id"
      },
      "delete": {
        "summary": "Delete a Psyche behavior",
        "responses": {
          "200": {
            "description": "Deleted behavior",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "behavior"
                  ],
                  "properties": {
                    "behavior": {
                      "$ref": "#/components/schemas/Behavior"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_behaviors_id"
      }
    },
    "/api/v1/psyche/schema-catalog": {
      "get": {
        "summary": "List the fixed schema-therapy catalog",
        "responses": {
          "200": {
            "description": "Schema catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schemas"
                  ],
                  "properties": {
                    "schemas": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SchemaCatalogEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_schema_catalog"
      }
    },
    "/api/v1/psyche/beliefs": {
      "get": {
        "summary": "List belief entries linked to schemas and reports",
        "responses": {
          "200": {
            "description": "Belief collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "beliefs"
                  ],
                  "properties": {
                    "beliefs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BeliefEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_beliefs"
      },
      "post": {
        "summary": "Create a belief entry",
        "responses": {
          "201": {
            "description": "Created belief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "belief"
                  ],
                  "properties": {
                    "belief": {
                      "$ref": "#/components/schemas/BeliefEntry"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_beliefs"
      }
    },
    "/api/v1/psyche/beliefs/{id}": {
      "get": {
        "summary": "Get a belief entry",
        "responses": {
          "200": {
            "description": "Belief detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "belief"
                  ],
                  "properties": {
                    "belief": {
                      "$ref": "#/components/schemas/BeliefEntry"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_beliefs_id"
      },
      "patch": {
        "summary": "Update a belief entry",
        "responses": {
          "200": {
            "description": "Updated belief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "belief"
                  ],
                  "properties": {
                    "belief": {
                      "$ref": "#/components/schemas/BeliefEntry"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_beliefs_id"
      },
      "delete": {
        "summary": "Delete a belief entry",
        "responses": {
          "200": {
            "description": "Deleted belief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "belief"
                  ],
                  "properties": {
                    "belief": {
                      "$ref": "#/components/schemas/BeliefEntry"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_beliefs_id"
      }
    },
    "/api/v1/psyche/modes": {
      "get": {
        "summary": "List Psyche mode profiles",
        "responses": {
          "200": {
            "description": "Mode collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "modes"
                  ],
                  "properties": {
                    "modes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ModeProfile"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_modes"
      },
      "post": {
        "summary": "Create a Psyche mode profile",
        "responses": {
          "201": {
            "description": "Created mode",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "mode"
                  ],
                  "properties": {
                    "mode": {
                      "$ref": "#/components/schemas/ModeProfile"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_modes"
      }
    },
    "/api/v1/psyche/modes/{id}": {
      "get": {
        "summary": "Get a Psyche mode profile",
        "responses": {
          "200": {
            "description": "Mode detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "mode"
                  ],
                  "properties": {
                    "mode": {
                      "$ref": "#/components/schemas/ModeProfile"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_modes_id"
      },
      "patch": {
        "summary": "Update a Psyche mode profile",
        "responses": {
          "200": {
            "description": "Updated mode",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "mode"
                  ],
                  "properties": {
                    "mode": {
                      "$ref": "#/components/schemas/ModeProfile"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_modes_id"
      },
      "delete": {
        "summary": "Delete a Psyche mode profile",
        "responses": {
          "200": {
            "description": "Deleted mode",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "mode"
                  ],
                  "properties": {
                    "mode": {
                      "$ref": "#/components/schemas/ModeProfile"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_modes_id"
      }
    },
    "/api/v1/psyche/mode-guides": {
      "get": {
        "summary": "List guided mode-identification sessions",
        "responses": {
          "200": {
            "description": "Mode guide sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sessions"
                  ],
                  "properties": {
                    "sessions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ModeGuideSession"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_mode_guides"
      },
      "post": {
        "summary": "Create a guided mode-identification session",
        "responses": {
          "201": {
            "description": "Created mode guide session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "session"
                  ],
                  "properties": {
                    "session": {
                      "$ref": "#/components/schemas/ModeGuideSession"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_mode_guides"
      }
    },
    "/api/v1/psyche/mode-guides/{id}": {
      "get": {
        "summary": "Get a guided mode-identification session",
        "responses": {
          "200": {
            "description": "Mode guide detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "session"
                  ],
                  "properties": {
                    "session": {
                      "$ref": "#/components/schemas/ModeGuideSession"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_mode_guides_id"
      },
      "patch": {
        "summary": "Update a guided mode-identification session",
        "responses": {
          "200": {
            "description": "Updated mode guide session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "session"
                  ],
                  "properties": {
                    "session": {
                      "$ref": "#/components/schemas/ModeGuideSession"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_mode_guides_id"
      },
      "delete": {
        "summary": "Delete a guided mode-identification session",
        "responses": {
          "200": {
            "description": "Deleted mode guide session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "session"
                  ],
                  "properties": {
                    "session": {
                      "$ref": "#/components/schemas/ModeGuideSession"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_mode_guides_id"
      }
    },
    "/api/v1/psyche/event-types": {
      "get": {
        "summary": "List seeded and custom Psyche event types",
        "responses": {
          "200": {
            "description": "Event type collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "eventTypes"
                  ],
                  "properties": {
                    "eventTypes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventType"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_event_types"
      },
      "post": {
        "summary": "Create a custom Psyche event type",
        "responses": {
          "201": {
            "description": "Created event type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "eventType"
                  ],
                  "properties": {
                    "eventType": {
                      "$ref": "#/components/schemas/EventType"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_event_types"
      }
    },
    "/api/v1/psyche/event-types/{id}": {
      "get": {
        "summary": "Get a Psyche event type",
        "responses": {
          "200": {
            "description": "Event type detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "eventType"
                  ],
                  "properties": {
                    "eventType": {
                      "$ref": "#/components/schemas/EventType"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_event_types_id"
      },
      "patch": {
        "summary": "Update a custom Psyche event type",
        "responses": {
          "200": {
            "description": "Updated event type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "eventType"
                  ],
                  "properties": {
                    "eventType": {
                      "$ref": "#/components/schemas/EventType"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_event_types_id"
      },
      "delete": {
        "summary": "Delete a custom Psyche event type",
        "responses": {
          "200": {
            "description": "Deleted event type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "eventType"
                  ],
                  "properties": {
                    "eventType": {
                      "$ref": "#/components/schemas/EventType"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_event_types_id"
      }
    },
    "/api/v1/psyche/emotions": {
      "get": {
        "summary": "List seeded and custom Psyche emotions",
        "responses": {
          "200": {
            "description": "Emotion collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "emotions"
                  ],
                  "properties": {
                    "emotions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EmotionDefinition"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_emotions"
      },
      "post": {
        "summary": "Create a custom Psyche emotion",
        "responses": {
          "201": {
            "description": "Created emotion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "emotion"
                  ],
                  "properties": {
                    "emotion": {
                      "$ref": "#/components/schemas/EmotionDefinition"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_emotions"
      }
    },
    "/api/v1/psyche/emotions/{id}": {
      "get": {
        "summary": "Get a Psyche emotion definition",
        "responses": {
          "200": {
            "description": "Emotion detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "emotion"
                  ],
                  "properties": {
                    "emotion": {
                      "$ref": "#/components/schemas/EmotionDefinition"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_emotions_id"
      },
      "patch": {
        "summary": "Update a custom Psyche emotion definition",
        "responses": {
          "200": {
            "description": "Updated emotion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "emotion"
                  ],
                  "properties": {
                    "emotion": {
                      "$ref": "#/components/schemas/EmotionDefinition"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_emotions_id"
      },
      "delete": {
        "summary": "Delete a custom Psyche emotion definition",
        "responses": {
          "200": {
            "description": "Deleted emotion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "emotion"
                  ],
                  "properties": {
                    "emotion": {
                      "$ref": "#/components/schemas/EmotionDefinition"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_emotions_id"
      }
    },
    "/api/v1/psyche/reports": {
      "get": {
        "summary": "List trigger reports",
        "responses": {
          "200": {
            "description": "Trigger report collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "reports"
                  ],
                  "properties": {
                    "reports": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TriggerReport"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_reports"
      },
      "post": {
        "summary": "Create a trigger report",
        "responses": {
          "201": {
            "description": "Created trigger report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report"
                  ],
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/TriggerReport"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "postpsyche_reports"
      }
    },
    "/api/v1/psyche/reports/{id}": {
      "get": {
        "summary": "Get a trigger report with linked notes and insights",
        "responses": {
          "200": {
            "description": "Trigger report detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report",
                    "notes",
                    "insights"
                  ],
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/TriggerReport"
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Note"
                      }
                    },
                    "insights": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Insight"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "getpsyche_reports_id"
      },
      "patch": {
        "summary": "Update a trigger report",
        "responses": {
          "200": {
            "description": "Updated trigger report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report"
                  ],
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/TriggerReport"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "patchpsyche_reports_id"
      },
      "delete": {
        "summary": "Delete a trigger report",
        "responses": {
          "200": {
            "description": "Deleted trigger report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report"
                  ],
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/TriggerReport"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Psyche"
        ],
        "operationId": "deletepsyche_reports_id"
      }
    },
    "/api/v1/notes": {
      "get": {
        "summary": "List notes linked to Forge entities",
        "parameters": [
          {
            "name": "linkedEntityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkedEntityId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "anchorKey",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "linkedTo",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "tags",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "textTerms",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "author",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updatedFrom",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "updatedTo",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Note collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "notes"
                  ],
                  "properties": {
                    "notes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Note"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Notes"
        ],
        "operationId": "getnotes"
      },
      "post": {
        "summary": "Create a note linked to one or more Forge entities",
        "responses": {
          "201": {
            "description": "Created note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "note"
                  ],
                  "properties": {
                    "note": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Notes"
        ],
        "operationId": "postnotes"
      }
    },
    "/api/v1/notes/{id}": {
      "get": {
        "summary": "Get a note",
        "responses": {
          "200": {
            "description": "Note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "note"
                  ],
                  "properties": {
                    "note": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Notes"
        ],
        "operationId": "getnotes_id"
      },
      "patch": {
        "summary": "Update a note",
        "responses": {
          "200": {
            "description": "Updated note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "note"
                  ],
                  "properties": {
                    "note": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Notes"
        ],
        "operationId": "patchnotes_id"
      },
      "delete": {
        "summary": "Delete a note",
        "responses": {
          "200": {
            "description": "Deleted note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "note"
                  ],
                  "properties": {
                    "note": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Notes"
        ],
        "operationId": "deletenotes_id"
      }
    },
    "/api/v1/projects": {
      "get": {
        "summary": "List projects",
        "responses": {
          "200": {
            "description": "Project collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "projects"
                  ],
                  "properties": {
                    "projects": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Projects"
        ],
        "operationId": "getprojects"
      },
      "post": {
        "summary": "Create a project",
        "responses": {
          "201": {
            "description": "Created project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "project"
                  ],
                  "properties": {
                    "project": {
                      "$ref": "#/components/schemas/Project"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Projects"
        ],
        "operationId": "postprojects"
      }
    },
    "/api/v1/calendar/overview": {
      "get": {
        "summary": "Read connected calendars, mirrored events, work blocks, and timeboxes",
        "responses": {
          "200": {
            "description": "Calendar overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "calendar"
                  ],
                  "properties": {
                    "calendar": {
                      "$ref": "#/components/schemas/CalendarOverviewPayload"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_overview"
      }
    },
    "/api/v1/calendar/connections": {
      "get": {
        "summary": "List connected calendar providers",
        "responses": {
          "200": {
            "description": "Calendar connections",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "providers",
                    "connections"
                  ],
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "provider",
                          "label",
                          "supportsDedicatedForgeCalendar",
                          "connectionHelp"
                        ],
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "google",
                              "apple",
                              "caldav"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "supportsDedicatedForgeCalendar": {
                            "type": "boolean"
                          },
                          "connectionHelp": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "connections": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CalendarConnection"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_connections"
      },
      "post": {
        "summary": "Create a Google, Apple, or custom CalDAV calendar connection",
        "description": "Forge first discovers the writable calendars for the account, then stores the chosen mirrored calendars and either reuses the existing shared Forge write target or saves a new one when needed.",
        "responses": {
          "201": {
            "description": "Created calendar connection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connection"
                  ],
                  "properties": {
                    "connection": {
                      "$ref": "#/components/schemas/CalendarConnection"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "postcalendar_connections"
      }
    },
    "/api/v1/calendar/connections/{id}/sync": {
      "post": {
        "summary": "Sync one connected calendar provider",
        "responses": {
          "200": {
            "description": "Synced calendar connection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "connection"
                  ],
                  "properties": {
                    "connection": {
                      "$ref": "#/components/schemas/CalendarConnection"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "postcalendar_connections_id_sync"
      }
    },
    "/api/v1/calendar/work-block-templates": {
      "get": {
        "summary": "List recurring work-block templates",
        "responses": {
          "200": {
            "description": "Work-block templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "templates"
                  ],
                  "properties": {
                    "templates": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkBlockTemplate"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_work_block_templates"
      },
      "post": {
        "summary": "Create a recurring work-block template",
        "responses": {
          "201": {
            "description": "Created work-block template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "template"
                  ],
                  "properties": {
                    "template": {
                      "$ref": "#/components/schemas/WorkBlockTemplate"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "postcalendar_work_block_templates"
      }
    },
    "/api/v1/calendar/work-block-templates/{id}": {
      "get": {
        "summary": "Get one recurring work-block template",
        "responses": {
          "200": {
            "description": "Work-block template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "template"
                  ],
                  "properties": {
                    "template": {
                      "$ref": "#/components/schemas/WorkBlockTemplate"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_work_block_templates_id"
      }
    },
    "/api/v1/calendar/timeboxes": {
      "get": {
        "summary": "List task timeboxes",
        "responses": {
          "200": {
            "description": "Task timeboxes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "timeboxes"
                  ],
                  "properties": {
                    "timeboxes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskTimebox"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_timeboxes"
      },
      "post": {
        "summary": "Create a planned task timebox",
        "responses": {
          "201": {
            "description": "Created task timebox",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "timebox"
                  ],
                  "properties": {
                    "timebox": {
                      "$ref": "#/components/schemas/TaskTimebox"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "postcalendar_timeboxes"
      }
    },
    "/api/v1/calendar/timeboxes/{id}": {
      "get": {
        "summary": "Get one task timebox",
        "responses": {
          "200": {
            "description": "Task timebox",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "timebox"
                  ],
                  "properties": {
                    "timebox": {
                      "$ref": "#/components/schemas/TaskTimebox"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_timeboxes_id"
      }
    },
    "/api/v1/calendar/timeboxes/recommend": {
      "post": {
        "summary": "Suggest future timeboxes for a task",
        "description": "Recommendations consider provider events, work blocks, scheduling rules, and planned duration.",
        "responses": {
          "200": {
            "description": "Suggested task timeboxes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "timeboxes"
                  ],
                  "properties": {
                    "timeboxes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskTimebox"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "postcalendar_timeboxes_recommend"
      }
    },
    "/api/v1/calendar/events": {
      "get": {
        "summary": "List native and mirrored calendar events for a range",
        "responses": {
          "200": {
            "description": "Calendar events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "events"
                  ],
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CalendarEvent"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_events"
      },
      "post": {
        "summary": "Create a native Forge calendar event",
        "description": "Forge stores the event canonically first, then projects it to a connected writable calendar when a preferred calendar is selected.",
        "responses": {
          "201": {
            "description": "Created calendar event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "event"
                  ],
                  "properties": {
                    "event": {
                      "$ref": "#/components/schemas/CalendarEvent"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "postcalendar_events"
      }
    },
    "/api/v1/calendar/events/{id}": {
      "get": {
        "summary": "Get one Forge calendar event",
        "responses": {
          "200": {
            "description": "Calendar event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "event"
                  ],
                  "properties": {
                    "event": {
                      "$ref": "#/components/schemas/CalendarEvent"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "getcalendar_events_id"
      },
      "patch": {
        "summary": "Update a Forge calendar event and sync remote projections",
        "responses": {
          "200": {
            "description": "Updated calendar event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "event"
                  ],
                  "properties": {
                    "event": {
                      "$ref": "#/components/schemas/CalendarEvent"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "patchcalendar_events_id"
      },
      "delete": {
        "summary": "Delete a Forge calendar event and remove projected remote copies",
        "responses": {
          "200": {
            "description": "Deleted calendar event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "event"
                  ],
                  "properties": {
                    "event": {
                      "$ref": "#/components/schemas/CalendarEvent"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Calendar"
        ],
        "operationId": "deletecalendar_events_id"
      }
    },
    "/api/v1/campaigns": {
      "get": {
        "deprecated": true,
        "summary": "Deprecated alias for project listing",
        "responses": {
          "200": {
            "description": "Project collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "projects"
                  ],
                  "properties": {
                    "projects": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Projects"
        ],
        "operationId": "getcampaigns"
      }
    },
    "/api/v1/projects/{id}": {
      "get": {
        "summary": "Get a project summary",
        "responses": {
          "200": {
            "description": "Project summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "project"
                  ],
                  "properties": {
                    "project": {
                      "$ref": "#/components/schemas/ProjectSummary"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Projects"
        ],
        "operationId": "getprojects_id"
      },
      "patch": {
        "summary": "Update a project",
        "description": "Project lifecycle is status-driven. Set status to paused to suspend, completed to finish, or active to restart. Updating a project to completed auto-completes linked unfinished tasks through the normal task completion flow.",
        "responses": {
          "200": {
            "description": "Updated project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "project"
                  ],
                  "properties": {
                    "project": {
                      "$ref": "#/components/schemas/Project"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Projects"
        ],
        "operationId": "patchprojects_id"
      },
      "delete": {
        "summary": "Delete a project",
        "description": "Project DELETE defaults to soft delete. Pass mode=hard only when permanent removal is intended.",
        "responses": {
          "200": {
            "description": "Deleted project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "project"
                  ],
                  "properties": {
                    "project": {
                      "$ref": "#/components/schemas/Project"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Projects"
        ],
        "operationId": "deleteprojects_id"
      }
    },
    "/api/v1/projects/{id}/board": {
      "get": {
        "summary": "Get the board and evidence for one project",
        "responses": {
          "200": {
            "description": "Project board",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBoardPayload"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Projects"
        ],
        "operationId": "getprojects_id_board"
      }
    },
    "/api/v1/goals": {
      "get": {
        "summary": "List life goals",
        "responses": {
          "200": {
            "description": "Goal collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "goals"
                  ],
                  "properties": {
                    "goals": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Goal"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Goals"
        ],
        "operationId": "getgoals"
      },
      "post": {
        "summary": "Create a life goal",
        "responses": {
          "201": {
            "description": "Created goal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "goal"
                  ],
                  "properties": {
                    "goal": {
                      "$ref": "#/components/schemas/Goal"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Goals"
        ],
        "operationId": "postgoals"
      }
    },
    "/api/v1/goals/{id}": {
      "get": {
        "summary": "Get a life goal",
        "responses": {
          "200": {
            "description": "Goal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "goal"
                  ],
                  "properties": {
                    "goal": {
                      "$ref": "#/components/schemas/Goal"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Goals"
        ],
        "operationId": "getgoals_id"
      },
      "patch": {
        "summary": "Update a life goal",
        "responses": {
          "200": {
            "description": "Updated goal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "goal"
                  ],
                  "properties": {
                    "goal": {
                      "$ref": "#/components/schemas/Goal"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Goals"
        ],
        "operationId": "patchgoals_id"
      },
      "delete": {
        "summary": "Delete a life goal",
        "responses": {
          "200": {
            "description": "Deleted goal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "goal"
                  ],
                  "properties": {
                    "goal": {
                      "$ref": "#/components/schemas/Goal"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Goals"
        ],
        "operationId": "deletegoals_id"
      }
    },
    "/api/v1/habits": {
      "get": {
        "summary": "List habits with current streak and due-today state",
        "responses": {
          "200": {
            "description": "Habit collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "habits"
                  ],
                  "properties": {
                    "habits": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Habit"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Habits"
        ],
        "operationId": "gethabits"
      },
      "post": {
        "summary": "Create a habit",
        "responses": {
          "201": {
            "description": "Created habit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "habit"
                  ],
                  "properties": {
                    "habit": {
                      "$ref": "#/components/schemas/Habit"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Habits"
        ],
        "operationId": "posthabits"
      }
    },
    "/api/v1/habits/{id}": {
      "get": {
        "summary": "Get a habit",
        "responses": {
          "200": {
            "description": "Habit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "habit"
                  ],
                  "properties": {
                    "habit": {
                      "$ref": "#/components/schemas/Habit"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Habits"
        ],
        "operationId": "gethabits_id"
      },
      "patch": {
        "summary": "Update a habit",
        "responses": {
          "200": {
            "description": "Updated habit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "habit"
                  ],
                  "properties": {
                    "habit": {
                      "$ref": "#/components/schemas/Habit"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Habits"
        ],
        "operationId": "patchhabits_id"
      },
      "delete": {
        "summary": "Delete a habit",
        "responses": {
          "200": {
            "description": "Deleted habit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "habit"
                  ],
                  "properties": {
                    "habit": {
                      "$ref": "#/components/schemas/Habit"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Habits"
        ],
        "operationId": "deletehabits_id"
      }
    },
    "/api/v1/habits/{id}/check-ins": {
      "post": {
        "summary": "Record a habit outcome for one day",
        "responses": {
          "200": {
            "description": "Habit check-in result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "habit",
                    "metrics"
                  ],
                  "properties": {
                    "habit": {
                      "$ref": "#/components/schemas/Habit"
                    },
                    "metrics": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Habits"
        ],
        "operationId": "posthabits_id_check_ins"
      }
    },
    "/api/v1/habits/{id}/check-ins/{dateKey}": {
      "delete": {
        "summary": "Delete a habit check-in for one day",
        "responses": {
          "200": {
            "description": "Habit check-in deletion result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "habit",
                    "metrics"
                  ],
                  "properties": {
                    "habit": {
                      "$ref": "#/components/schemas/Habit"
                    },
                    "metrics": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Habits"
        ],
        "operationId": "deletehabits_id_check_ins_dateKey"
      }
    },
    "/api/v1/tags": {
      "get": {
        "summary": "List tags",
        "responses": {
          "200": {
            "description": "Tag collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tags"
                  ],
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tag"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Tags"
        ],
        "operationId": "gettags"
      },
      "post": {
        "summary": "Create a tag",
        "responses": {
          "201": {
            "description": "Created tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "$ref": "#/components/schemas/Tag"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tags"
        ],
        "operationId": "posttags"
      }
    },
    "/api/v1/tags/{id}": {
      "get": {
        "summary": "Get a tag",
        "responses": {
          "200": {
            "description": "Tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "$ref": "#/components/schemas/Tag"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tags"
        ],
        "operationId": "gettags_id"
      },
      "patch": {
        "summary": "Update a tag",
        "responses": {
          "200": {
            "description": "Updated tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "$ref": "#/components/schemas/Tag"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tags"
        ],
        "operationId": "patchtags_id"
      },
      "delete": {
        "summary": "Delete a tag",
        "responses": {
          "200": {
            "description": "Deleted tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tag"
                  ],
                  "properties": {
                    "tag": {
                      "$ref": "#/components/schemas/Tag"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tags"
        ],
        "operationId": "deletetags_id"
      }
    },
    "/api/v1/tasks": {
      "get": {
        "summary": "List tasks",
        "responses": {
          "200": {
            "description": "Task collection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tasks"
                  ],
                  "properties": {
                    "tasks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Task"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "gettasks"
      },
      "post": {
        "summary": "Create a task",
        "responses": {
          "201": {
            "description": "Created task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "posttasks"
      }
    },
    "/api/v1/operator/log-work": {
      "post": {
        "summary": "Log work that already happened by creating or updating a task and returning fresh XP state",
        "responses": {
          "200": {
            "description": "Updated task and XP state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task",
                    "xp"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    },
                    "xp": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created task and XP state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task",
                    "xp"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    },
                    "xp": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Operator"
        ],
        "operationId": "postoperator_log_work"
      }
    },
    "/api/v1/work-adjustments": {
      "post": {
        "summary": "Add or remove tracked work minutes on an existing task or project and return fresh XP state",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkAdjustmentInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created work adjustment and refreshed XP state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkAdjustmentResult"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "postwork_adjustments"
      }
    },
    "/api/v1/tasks/{id}": {
      "get": {
        "summary": "Get a task",
        "responses": {
          "200": {
            "description": "Task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "gettasks_id"
      },
      "patch": {
        "summary": "Update a task",
        "responses": {
          "200": {
            "description": "Updated task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "patchtasks_id"
      },
      "delete": {
        "summary": "Delete a task",
        "responses": {
          "200": {
            "description": "Deleted task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "deletetasks_id"
      }
    },
    "/api/v1/tasks/{id}/context": {
      "get": {
        "summary": "Get task detail context including project, goal, runs, and evidence",
        "responses": {
          "200": {
            "description": "Task detail payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskContextPayload"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "gettasks_id_context"
      }
    },
    "/api/v1/tasks/{id}/runs": {
      "post": {
        "summary": "Start or renew a live task timer for a task",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRunClaimInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Existing active task timer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "taskRun"
                  ],
                  "properties": {
                    "taskRun": {
                      "$ref": "#/components/schemas/TaskRun"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created task timer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "taskRun"
                  ],
                  "properties": {
                    "taskRun": {
                      "$ref": "#/components/schemas/TaskRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "posttasks_id_runs"
      }
    },
    "/api/v1/tasks/{id}/uncomplete": {
      "post": {
        "summary": "Reopen a completed task and remove its completion XP",
        "responses": {
          "200": {
            "description": "Reopened task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/Task"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Tasks"
        ],
        "operationId": "posttasks_id_uncomplete"
      }
    },
    "/api/v1/task-runs": {
      "get": {
        "summary": "List task timers with optional task and active-state filters",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "completed",
                "released",
                "timed_out"
              ]
            }
          },
          {
            "name": "active",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task timers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "taskRuns"
                  ],
                  "properties": {
                    "taskRuns": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskRun"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Task Runs"
        ],
        "operationId": "gettask_runs"
      }
    },
    "/api/v1/task-runs/{id}/heartbeat": {
      "post": {
        "summary": "Renew a live task timer heartbeat",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRunHeartbeatInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated task timer heartbeat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "taskRun"
                  ],
                  "properties": {
                    "taskRun": {
                      "$ref": "#/components/schemas/TaskRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Task Runs"
        ],
        "operationId": "posttask_runs_id_heartbeat"
      }
    },
    "/api/v1/task-runs/{id}/focus": {
      "post": {
        "summary": "Mark one live task timer as the current primary timer",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRunFocusInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Focused task timer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "taskRun"
                  ],
                  "properties": {
                    "taskRun": {
                      "$ref": "#/components/schemas/TaskRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Task Runs"
        ],
        "operationId": "posttask_runs_id_focus"
      }
    },
    "/api/v1/task-runs/{id}/complete": {
      "post": {
        "summary": "Complete a live task timer and complete the task",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRunFinishInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Completed task timer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "taskRun"
                  ],
                  "properties": {
                    "taskRun": {
                      "$ref": "#/components/schemas/TaskRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Task Runs"
        ],
        "operationId": "posttask_runs_id_complete"
      }
    },
    "/api/v1/task-runs/{id}/release": {
      "post": {
        "summary": "Pause or release a live task timer without completing the task",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRunFinishInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Released task timer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "taskRun"
                  ],
                  "properties": {
                    "taskRun": {
                      "$ref": "#/components/schemas/TaskRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Task Runs"
        ],
        "operationId": "posttask_runs_id_release"
      }
    },
    "/api/v1/activity": {
      "get": {
        "summary": "List visible activity events",
        "responses": {
          "200": {
            "description": "Activity archive",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActivityEvent"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Activity"
        ],
        "operationId": "getactivity"
      }
    },
    "/api/v1/activity/{id}/remove": {
      "post": {
        "summary": "Hide an activity event from the visible archive through a correction record",
        "responses": {
          "200": {
            "description": "Correction event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "event"
                  ],
                  "properties": {
                    "event": {
                      "$ref": "#/components/schemas/ActivityEvent"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Activity"
        ],
        "operationId": "postactivity_id_remove"
      }
    },
    "/api/v1/metrics": {
      "get": {
        "summary": "Get gamification metrics",
        "responses": {
          "200": {
            "description": "Gamification metrics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "metrics"
                  ],
                  "properties": {
                    "metrics": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "profile",
                        "achievements",
                        "milestoneRewards"
                      ],
                      "properties": {
                        "profile": {
                          "$ref": "#/components/schemas/GamificationProfile"
                        },
                        "achievements": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AchievementSignal"
                          }
                        },
                        "milestoneRewards": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MilestoneReward"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Metrics"
        ],
        "operationId": "getmetrics"
      }
    },
    "/api/v1/metrics/xp": {
      "get": {
        "summary": "Get explainable XP metrics and reward-ledger state",
        "responses": {
          "200": {
            "description": "XP metrics payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "metrics"
                  ],
                  "properties": {
                    "metrics": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Metrics"
        ],
        "operationId": "getmetrics_xp"
      }
    },
    "/api/v1/insights": {
      "get": {
        "summary": "Get deterministic coaching and stored insight feed",
        "responses": {
          "200": {
            "description": "Insights payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "insights"
                  ],
                  "properties": {
                    "insights": {
                      "$ref": "#/components/schemas/InsightsPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Insights"
        ],
        "operationId": "getinsights"
      },
      "post": {
        "summary": "Store a structured insight",
        "responses": {
          "201": {
            "description": "Created insight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "insight"
                  ],
                  "properties": {
                    "insight": {
                      "$ref": "#/components/schemas/Insight"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Insights"
        ],
        "operationId": "postinsights"
      }
    },
    "/api/v1/insights/{id}": {
      "get": {
        "summary": "Get one stored insight",
        "responses": {
          "200": {
            "description": "Insight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "insight"
                  ],
                  "properties": {
                    "insight": {
                      "$ref": "#/components/schemas/Insight"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Insights"
        ],
        "operationId": "getinsights_id"
      },
      "patch": {
        "summary": "Update a stored insight",
        "responses": {
          "200": {
            "description": "Updated insight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "insight"
                  ],
                  "properties": {
                    "insight": {
                      "$ref": "#/components/schemas/Insight"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Insights"
        ],
        "operationId": "patchinsights_id"
      },
      "delete": {
        "summary": "Soft delete or permanently delete a stored insight",
        "parameters": [
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "soft",
                "hard"
              ]
            }
          },
          {
            "name": "reason",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted insight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "insight"
                  ],
                  "properties": {
                    "insight": {
                      "$ref": "#/components/schemas/Insight"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Insights"
        ],
        "operationId": "deleteinsights_id"
      }
    },
    "/api/v1/insights/{id}/feedback": {
      "post": {
        "summary": "Record structured feedback for an insight",
        "responses": {
          "200": {
            "description": "Insight feedback",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "feedback"
                  ],
                  "properties": {
                    "feedback": {
                      "$ref": "#/components/schemas/InsightFeedback"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Insights"
        ],
        "operationId": "postinsights_id_feedback"
      }
    },
    "/api/v1/approval-requests": {
      "get": {
        "summary": "List approval requests",
        "responses": {
          "200": {
            "description": "Approval requests",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approvalRequests"
                  ],
                  "properties": {
                    "approvalRequests": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApprovalRequest"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Approvals"
        ],
        "operationId": "getapproval_requests"
      }
    },
    "/api/v1/approval-requests/{id}/approve": {
      "post": {
        "summary": "Approve and execute a pending agent action",
        "responses": {
          "200": {
            "description": "Approved request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approvalRequest"
                  ],
                  "properties": {
                    "approvalRequest": {
                      "$ref": "#/components/schemas/ApprovalRequest"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Approvals"
        ],
        "operationId": "postapproval_requests_id_approve"
      }
    },
    "/api/v1/approval-requests/{id}/reject": {
      "post": {
        "summary": "Reject a pending agent action",
        "responses": {
          "200": {
            "description": "Rejected request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "approvalRequest"
                  ],
                  "properties": {
                    "approvalRequest": {
                      "$ref": "#/components/schemas/ApprovalRequest"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Approvals"
        ],
        "operationId": "postapproval_requests_id_reject"
      }
    },
    "/api/v1/agents": {
      "get": {
        "summary": "List registered agent identities",
        "responses": {
          "200": {
            "description": "Agent identities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "agents"
                  ],
                  "properties": {
                    "agents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AgentIdentity"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Agents"
        ],
        "operationId": "getagents"
      }
    },
    "/api/v1/agents/onboarding": {
      "get": {
        "summary": "Get the live onboarding contract for new API agents",
        "responses": {
          "200": {
            "description": "Agent onboarding payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "onboarding"
                  ],
                  "properties": {
                    "onboarding": {
                      "$ref": "#/components/schemas/AgentOnboardingPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Agents"
        ],
        "operationId": "getagents_onboarding"
      }
    },
    "/api/v1/agents/{id}/actions": {
      "get": {
        "summary": "List actions created by one agent",
        "responses": {
          "200": {
            "description": "Agent actions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "actions"
                  ],
                  "properties": {
                    "actions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AgentAction"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Agents"
        ],
        "operationId": "getagents_id_actions"
      }
    },
    "/api/v1/agent-actions": {
      "post": {
        "summary": "Create an agent action that either executes directly or enters the approval queue",
        "responses": {
          "201": {
            "description": "Executed agent action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "action",
                    "approvalRequest"
                  ],
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/AgentAction"
                    },
                    "approvalRequest": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/ApprovalRequest"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Pending approval agent action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "action",
                    "approvalRequest"
                  ],
                  "properties": {
                    "action": {
                      "$ref": "#/components/schemas/AgentAction"
                    },
                    "approvalRequest": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/ApprovalRequest"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Agents"
        ],
        "operationId": "postagent_actions"
      }
    },
    "/api/v1/rewards/rules": {
      "get": {
        "summary": "List reward rules",
        "responses": {
          "200": {
            "description": "Reward rules",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "rules"
                  ],
                  "properties": {
                    "rules": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RewardRule"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Metrics"
        ],
        "operationId": "getrewards_rules"
      }
    },
    "/api/v1/rewards/rules/{id}": {
      "get": {
        "summary": "Get one reward rule",
        "responses": {
          "200": {
            "description": "Reward rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "rule"
                  ],
                  "properties": {
                    "rule": {
                      "$ref": "#/components/schemas/RewardRule"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Metrics"
        ],
        "operationId": "getrewards_rules_id"
      },
      "patch": {
        "summary": "Update a reward rule",
        "responses": {
          "200": {
            "description": "Updated reward rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "rule"
                  ],
                  "properties": {
                    "rule": {
                      "$ref": "#/components/schemas/RewardRule"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Metrics"
        ],
        "operationId": "patchrewards_rules_id"
      }
    },
    "/api/v1/rewards/ledger": {
      "get": {
        "summary": "List reward ledger events",
        "responses": {
          "200": {
            "description": "Reward ledger",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ledger"
                  ],
                  "properties": {
                    "ledger": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RewardLedgerEvent"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Metrics"
        ],
        "operationId": "getrewards_ledger"
      }
    },
    "/api/v1/rewards/bonus": {
      "post": {
        "summary": "Create a manual, explainable XP bonus entry",
        "responses": {
          "201": {
            "description": "Manual reward bonus",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "reward",
                    "metrics"
                  ],
                  "properties": {
                    "reward": {
                      "$ref": "#/components/schemas/RewardLedgerEvent"
                    },
                    "metrics": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Metrics"
        ],
        "operationId": "postrewards_bonus"
      }
    },
    "/api/v1/events": {
      "get": {
        "summary": "List canonical event log entries",
        "responses": {
          "200": {
            "description": "Event log",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "events"
                  ],
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventLogEntry"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Activity"
        ],
        "operationId": "getevents"
      }
    },
    "/api/v1/session-events": {
      "post": {
        "summary": "Record bounded ambient engagement telemetry",
        "responses": {
          "201": {
            "description": "Recorded session event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "sessionEvent",
                    "rewardEvent"
                  ],
                  "properties": {
                    "sessionEvent": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "rewardEvent": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/RewardLedgerEvent"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Activity"
        ],
        "operationId": "postsession_events"
      }
    },
    "/api/v1/reviews/weekly": {
      "get": {
        "summary": "Get the weekly review payload",
        "responses": {
          "200": {
            "description": "Weekly review payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "review"
                  ],
                  "properties": {
                    "review": {
                      "$ref": "#/components/schemas/WeeklyReviewPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Reviews"
        ],
        "operationId": "getreviews_weekly"
      }
    },
    "/api/v1/reviews/weekly/finalize": {
      "post": {
        "summary": "Finalize the current weekly review cycle",
        "responses": {
          "200": {
            "description": "Existing weekly review closure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "review",
                    "closure",
                    "reward",
                    "metrics"
                  ],
                  "properties": {
                    "review": {
                      "$ref": "#/components/schemas/WeeklyReviewPayload"
                    },
                    "closure": {
                      "type": "object",
                      "required": [
                        "id",
                        "weekKey",
                        "weekStartDate",
                        "weekEndDate",
                        "windowLabel",
                        "actor",
                        "source",
                        "rewardId",
                        "activityEventId",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "weekKey": {
                          "type": "string"
                        },
                        "weekStartDate": {
                          "type": "string"
                        },
                        "weekEndDate": {
                          "type": "string"
                        },
                        "windowLabel": {
                          "type": "string"
                        },
                        "actor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "ui",
                            "openclaw",
                            "agent",
                            "system"
                          ]
                        },
                        "rewardId": {
                          "type": "string"
                        },
                        "activityEventId": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "reward": {
                      "$ref": "#/components/schemas/RewardLedgerEvent"
                    },
                    "metrics": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created weekly review closure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "review",
                    "closure",
                    "reward",
                    "metrics"
                  ],
                  "properties": {
                    "review": {
                      "$ref": "#/components/schemas/WeeklyReviewPayload"
                    },
                    "closure": {
                      "type": "object",
                      "required": [
                        "id",
                        "weekKey",
                        "weekStartDate",
                        "weekEndDate",
                        "windowLabel",
                        "actor",
                        "source",
                        "rewardId",
                        "activityEventId",
                        "createdAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "weekKey": {
                          "type": "string"
                        },
                        "weekStartDate": {
                          "type": "string"
                        },
                        "weekEndDate": {
                          "type": "string"
                        },
                        "windowLabel": {
                          "type": "string"
                        },
                        "actor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "ui",
                            "openclaw",
                            "agent",
                            "system"
                          ]
                        },
                        "rewardId": {
                          "type": "string"
                        },
                        "activityEventId": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "reward": {
                      "$ref": "#/components/schemas/RewardLedgerEvent"
                    },
                    "metrics": {
                      "$ref": "#/components/schemas/XpMetricsPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Reviews"
        ],
        "operationId": "postreviews_weekly_finalize"
      }
    },
    "/api/v1/settings": {
      "get": {
        "summary": "Get local operator settings",
        "responses": {
          "200": {
            "description": "Settings payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "settings"
                  ],
                  "properties": {
                    "settings": {
                      "$ref": "#/components/schemas/SettingsPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Settings"
        ],
        "operationId": "getsettings"
      },
      "patch": {
        "summary": "Update local operator settings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "settings"
                  ],
                  "properties": {
                    "settings": {
                      "$ref": "#/components/schemas/SettingsPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Settings"
        ],
        "operationId": "patchsettings"
      }
    },
    "/api/v1/settings/bin": {
      "get": {
        "summary": "Get the deleted-items bin with restore and hard-delete context",
        "responses": {
          "200": {
            "description": "Settings bin payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "bin"
                  ],
                  "properties": {
                    "bin": {
                      "$ref": "#/components/schemas/SettingsBinPayload"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Settings"
        ],
        "operationId": "getsettings_bin"
      }
    },
    "/api/v1/entities/create": {
      "post": {
        "summary": "Create multiple Forge entities in one ordered batch request",
        "responses": {
          "200": {
            "description": "Batch create results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BatchEntityResult"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Entity Batch"
        ],
        "operationId": "postentities_create"
      }
    },
    "/api/v1/entities/update": {
      "post": {
        "summary": "Update multiple Forge entities in one ordered batch request",
        "responses": {
          "200": {
            "description": "Batch update results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BatchEntityResult"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Entity Batch"
        ],
        "operationId": "postentities_update"
      }
    },
    "/api/v1/entities/delete": {
      "post": {
        "summary": "Delete multiple Forge entities in one ordered batch request. Soft delete is the default.",
        "responses": {
          "200": {
            "description": "Batch delete results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BatchEntityResult"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Entity Batch"
        ],
        "operationId": "postentities_delete"
      }
    },
    "/api/v1/entities/restore": {
      "post": {
        "summary": "Restore multiple soft-deleted Forge entities in one ordered batch request",
        "responses": {
          "200": {
            "description": "Batch restore results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BatchEntityResult"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Entity Batch"
        ],
        "operationId": "postentities_restore"
      }
    },
    "/api/v1/entities/search": {
      "post": {
        "summary": "Search across multiple Forge entity types in one ordered batch request",
        "responses": {
          "200": {
            "description": "Batch search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BatchEntityResult"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Entity Batch"
        ],
        "operationId": "postentities_search"
      }
    },
    "/api/v1/settings/tokens": {
      "post": {
        "summary": "Create an agent token",
        "responses": {
          "201": {
            "description": "Created agent token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "token"
                  ],
                  "properties": {
                    "token": {
                      "$ref": "#/components/schemas/AgentTokenMutationResult"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Settings"
        ],
        "operationId": "postsettings_tokens"
      }
    }
  },
  "tags": [
    {
      "name": "Meta",
      "description": "OpenAPI discovery and route-level API metadata."
    },
    {
      "name": "Health",
      "description": "Runtime health, sleep, sports, workout, and mobile sync surfaces."
    },
    {
      "name": "Movement",
      "description": "Movement overviews, timeline history, known places, stays, trips, selection aggregates, and user-defined overlay routes."
    },
    {
      "name": "Life Force",
      "description": "Energy-budget, fatigue, and action-point modeling routes."
    },
    {
      "name": "Auth",
      "description": "Operator session bootstrapping for trusted local usage."
    },
    {
      "name": "Platform",
      "description": "Top-level runtime context and canonical Forge domain catalogs."
    },
    {
      "name": "Operator",
      "description": "Current work, overview, and operator-facing runtime state."
    },
    {
      "name": "Users",
      "description": "Forge user directory, ownership, and multi-user runtime surfaces."
    },
    {
      "name": "Settings",
      "description": "Local runtime settings, settings bin, and token management."
    },
    {
      "name": "Agents",
      "description": "Agent onboarding, registry, and action feeds."
    },
    {
      "name": "Approvals",
      "description": "Approval workflows for deferred or gated agent actions."
    },
    {
      "name": "Entity Batch",
      "description": "Batch create, update, delete, restore, and search operations across entity types."
    },
    {
      "name": "Goals",
      "description": "Long-horizon life goals."
    },
    {
      "name": "Projects",
      "description": "Project execution surfaces and project summaries."
    },
    {
      "name": "Strategies",
      "description": "Directed planning structures that sit above project execution."
    },
    {
      "name": "Tasks",
      "description": "Task CRUD, task context, and execution-adjacent task routes."
    },
    {
      "name": "Task Runs",
      "description": "Live task timer and timed work-session operations."
    },
    {
      "name": "Habits",
      "description": "Recurring commitments and habit check-ins."
    },
    {
      "name": "Calendar",
      "description": "Calendar connections, work blocks, timeboxes, and native Forge events."
    },
    {
      "name": "Notes",
      "description": "Markdown evidence records linked to one or more Forge entities."
    },
    {
      "name": "Tags",
      "description": "Tag CRUD for shared Forge classification."
    },
    {
      "name": "Wiki",
      "description": "File-first wiki settings, pages, ingest, sync, health, and search."
    },
    {
      "name": "Preferences",
      "description": "Preference profiles, comparisons, concepts, contexts, and learned scores."
    },
    {
      "name": "Psyche",
      "description": "Values, patterns, behaviors, beliefs, modes, reports, and related Psyche surfaces."
    },
    {
      "name": "Questionnaires",
      "description": "Psyche questionnaire libraries, runs, scoring, and self-observation calendar integration."
    },
    {
      "name": "Insights",
      "description": "Stored insights and structured feedback on them."
    },
    {
      "name": "Workbench",
      "description": "Graph-flow catalog, execution, published outputs, and node-result routes."
    },
    {
      "name": "Metrics",
      "description": "XP, reward-ledger, and runtime metric surfaces."
    },
    {
      "name": "Reviews",
      "description": "Weekly review and review-finalization operations."
    },
    {
      "name": "Activity",
      "description": "Activity feeds, event logs, and ambient session events."
    },
    {
      "name": "Diagnostics",
      "description": "Runtime diagnostics and operational logging routes."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Runtime",
      "tags": [
        "Meta",
        "Auth",
        "Platform",
        "Operator",
        "Diagnostics"
      ]
    },
    {
      "name": "Embodied Context",
      "tags": [
        "Health",
        "Movement",
        "Life Force"
      ]
    },
    {
      "name": "Core Work",
      "tags": [
        "Goals",
        "Projects",
        "Strategies",
        "Tasks",
        "Task Runs",
        "Habits",
        "Calendar",
        "Notes",
        "Tags",
        "Activity",
        "Metrics",
        "Reviews",
        "Insights",
        "Workbench"
      ]
    },
    {
      "name": "Knowledge And Reflection",
      "tags": [
        "Wiki",
        "Preferences",
        "Psyche",
        "Questionnaires"
      ]
    },
    {
      "name": "Platform And Agents",
      "tags": [
        "Users",
        "Settings",
        "Agents",
        "Approvals",
        "Entity Batch"
      ]
    }
  ]
}
