Skip to content

HTTP API

All endpoints live under /api/v1 on the loopback address and are private unless marked public. Private endpoints need the session cookie from pairing; state-changing ones also need an Origin header from the repobs origin and the x-repobs-csrf header. There are no CORS headers, no file-reading endpoints and no command execution.

Method Path Access Request Response Purpose
GET /health public — Health Version and monitor state; no paths or private data.
POST /auth/pair public PairRequest AuthSession Exchange a one-time launcher pairing token for an HttpOnly session cookie. Requires an Origin header.
GET /auth/session session — AuthSession CSRF token for the current session.
POST /auth/logout session+csrf — — Clear the session cookie.
GET /snapshot session — Snapshot Normalized repositories, refs, worktrees, sessions, annotation summaries and PR metadata.
GET /events session — SnapshotDiff Server-sent events: hello {version}, diff (SnapshotDiff), monitor (MonitorHealth). Refetch /snapshot on a version gap.
GET /repositories session — Repository[] Registered repositories.
POST /repositories session+csrf RegisterRepositoryRequest Repository Register a validated local Git repository (any path inside it). Read-only for the repository.
POST /repositories/batch session+csrf RegisterRepositoriesRequest RegisterRepositoriesResponse Register up to 50 repositories at once; each path reports success or its own error.
GET /repositories/suggestions session — RepositorySuggestion[] Unregistered repositories seen in session working directories, with session counts and last activity (no disk indexing).
POST /repositories/pick-directory session+csrf — PickDirectoryResponse Show the native folder chooser on this Windows machine (501 elsewhere).
POST /repositories/reorder session+csrf ReorderRepositoriesRequest — Persist repository order.
PATCH /repositories/{id} session+csrf UpdateRepositoryRequest — Rename the dashboard entry.
DELETE /repositories/{id} session+csrf — — Remove from the dashboard only. Never deletes files; annotations are kept.
GET /repositories/{id}/pull-requests session — PullRequest[] Cached open PR metadata (only when the GitHub integration is enabled).
POST /pull-requests/refresh session+csrf — — Refresh PR metadata now (409 while the integration is disabled).
GET /sessions session — AgentSession[] Sessions associated with registered repositories (and annotated orphans).
GET /sessions/{id} session — AgentSession One session with its annotation.
GET /sessions/{id}/annotation session — SessionAnnotation Human annotation (or null).
PUT /sessions/{id}/annotation session+csrf AnnotationInput SessionAnnotation Upsert tags, review state, note, alias and checklist (app-local only).
DELETE /sessions/{id}/annotation session+csrf — — Explicitly delete a session annotation.
GET /annotations/export session — AnnotationExport Download all annotations as sanitized JSON (no transcripts).
POST /annotations/import session+csrf AnnotationExport — Merge an export; newer annotations win.
GET /sessions/{id}/automation session — AutomationApplication[] Automation rules that were applied to this session, newest first.
GET /automation/rules session — AutomationRuleStatus[] Automation rules with the agents each matches now and was applied to.
POST /automation/rules session+csrf AutomationRuleInput AutomationRule Create a rule. An enabled rule applies at once to the agents it matches (once per agent and revision).
PUT /automation/rules/{id} session+csrf AutomationRuleInput AutomationRule Edit a rule; changed conditions or actions start a new revision, which applies afresh.
DELETE /automation/rules/{id} session+csrf — — Delete a rule. Annotations it changed stay as they are.
POST /automation/preview session+csrf AutomationRuleInput AutomationPreview Agents a rule would match now; changes nothing.
GET /settings session — Settings App settings.
PATCH /settings session+csrf SettingsPatch Settings Change settings (deep partial).
POST /rescan session+csrf — — Troubleshooting only: full rescan. Normal operation never needs it.
GET /diagnostics session — Diagnostics Redacted adapter, watcher, Git and database health.

Schemas

JSON Schema generated from the shared zod contracts.

AgentSession

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "provider": {
      "type": "string",
      "enum": [
        "claude",
        "codex"
      ]
    },
    "providerSessionId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "titleSource": {
      "type": "string",
      "enum": [
        "provider",
        "fallback"
      ]
    },
    "observedCwd": {
      "type": "string"
    },
    "worktreeId": {
      "type": "string"
    },
    "repoId": {
      "type": "string"
    },
    "association": {
      "type": "string",
      "enum": [
        "matched",
        "unassigned"
      ]
    },
    "unassignedReason": {
      "type": "string",
      "enum": [
        "cwd_missing",
        "worktree_removed",
        "no_matching_worktree",
        "source_missing"
      ]
    },
    "firstSeenAt": {
      "type": "string",
      "maxLength": 64
    },
    "lastActivityAt": {
      "type": "string",
      "maxLength": 64
    },
    "state": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "running",
            "running_subagents",
            "waiting_approval",
            "waiting_user",
            "idle_or_turn_finished",
            "ended",
            "unknown",
            "error"
          ]
        },
        "confidence": {
          "type": "string",
          "enum": [
            "direct",
            "inferred",
            "unknown"
          ]
        },
        "source": {
          "type": "string"
        },
        "observedAt": {
          "type": "string",
          "maxLength": 64
        },
        "detail": {
          "type": "string",
          "enum": [
            "provider_reports_busy",
            "provider_reports_idle",
            "provider_reports_other",
            "process_not_running",
            "turn_in_progress",
            "tool_pending",
            "turn_completed",
            "turn_aborted",
            "approval_requested",
            "user_input_requested",
            "subagent_active",
            "stale_evidence",
            "no_lifecycle_records",
            "unrecognized_records",
            "provider_error_event",
            "source_missing"
          ]
        },
        "possiblyAwaitingApproval": {
          "type": "boolean"
        }
      },
      "required": [
        "kind",
        "confidence",
        "source"
      ],
      "additionalProperties": false
    },
    "historical": {
      "type": "boolean"
    },
    "sourceAvailable": {
      "type": "boolean"
    },
    "subagents": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "active": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "total",
        "active"
      ],
      "additionalProperties": false
    },
    "providerVersion": {
      "type": "string"
    },
    "recordedBranch": {
      "type": "string"
    },
    "activityLabel": {
      "type": "string"
    },
    "parentSessionId": {
      "type": "string"
    },
    "agentType": {
      "type": "string"
    },
    "lastMessage": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "assistant",
            "tool"
          ]
        },
        "text": {
          "type": "string",
          "maxLength": 400
        },
        "at": {
          "type": "string",
          "maxLength": 64
        }
      },
      "required": [
        "kind",
        "text"
      ],
      "additionalProperties": false
    },
    "plan": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "claude_task_list",
            "claude_todo",
            "claude_tasks",
            "codex_update_plan"
          ]
        },
        "updatedAt": {
          "type": "string",
          "maxLength": 64
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "in_progress",
                  "completed"
                ]
              }
            },
            "required": [
              "key",
              "text",
              "status"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "source",
        "items"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "provider",
    "providerSessionId",
    "title",
    "titleSource",
    "association",
    "state",
    "historical",
    "sourceAvailable",
    "subagents"
  ],
  "additionalProperties": false
}

AnnotationExport

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "format": {
      "type": "string",
      "const": "repobs-annotations"
    },
    "version": {
      "type": "number",
      "const": 1
    },
    "exportedAt": {
      "type": "string",
      "maxLength": 64
    },
    "annotations": {
      "maxItems": 100000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "displayAlias": {
            "type": "string",
            "maxLength": 120
          },
          "review": {
            "type": "string",
            "enum": [
              "unreviewed",
              "needs_review",
              "reviewed",
              "complete",
              "flagged",
              "outdated"
            ]
          },
          "tags": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          "note": {
            "type": "string",
            "maxLength": 20000
          },
          "checklist": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "done": {
                  "type": "boolean"
                },
                "order": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "createdAt": {
                  "type": "string",
                  "maxLength": 64
                },
                "completedAt": {
                  "type": "string",
                  "maxLength": 64
                }
              },
              "required": [
                "id",
                "text",
                "done",
                "order",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "planOverrides": {
            "default": {},
            "type": "object",
            "propertyNames": {
              "type": "string",
              "pattern": "^[0-9a-f]{16}$"
            },
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "createdAt": {
            "type": "string",
            "maxLength": 64
          },
          "updatedAt": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "sessionId",
          "review",
          "tags",
          "note",
          "checklist",
          "planOverrides",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "format",
    "version",
    "exportedAt",
    "annotations"
  ],
  "additionalProperties": false
}

AnnotationInput

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "displayAlias": {
      "type": "string",
      "maxLength": 120
    },
    "review": {
      "type": "string",
      "enum": [
        "unreviewed",
        "needs_review",
        "reviewed",
        "complete",
        "flagged",
        "outdated"
      ]
    },
    "tags": {
      "maxItems": 32,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      }
    },
    "note": {
      "type": "string",
      "maxLength": 20000
    },
    "checklist": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "done": {
            "type": "boolean"
          },
          "order": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "createdAt": {
            "type": "string",
            "maxLength": 64
          },
          "completedAt": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "id",
          "text",
          "done",
          "order"
        ],
        "additionalProperties": false
      }
    },
    "planOverrides": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[0-9a-f]{16}$"
      },
      "additionalProperties": {
        "type": "boolean"
      }
    }
  },
  "required": [
    "review",
    "tags",
    "note",
    "checklist"
  ],
  "additionalProperties": false
}

AuthSession

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "csrfToken": {
      "type": "string"
    },
    "expiresAt": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "csrfToken",
    "expiresAt"
  ],
  "additionalProperties": false
}

AutomationApplication

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ruleId": {
      "type": "string"
    },
    "ruleName": {
      "type": "string"
    },
    "revision": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "appliedAt": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "ruleId",
    "ruleName",
    "revision",
    "appliedAt"
  ],
  "additionalProperties": false
}

AutomationPreview

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "matching": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "examples": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "sessionId",
          "title"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "matching",
    "examples"
  ],
  "additionalProperties": false
}

AutomationRule

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "enabled": {
      "type": "boolean"
    },
    "match": {
      "type": "string",
      "enum": [
        "all",
        "any"
      ]
    },
    "conditions": {
      "minItems": 1,
      "maxItems": 12,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "last_activity"
              },
              "op": {
                "type": "string",
                "enum": [
                  "older_than",
                  "within"
                ]
              },
              "amount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000
              },
              "unit": {
                "type": "string",
                "enum": [
                  "hours",
                  "days"
                ]
              }
            },
            "required": [
              "kind",
              "op",
              "amount",
              "unit"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "text"
              },
              "field": {
                "type": "string",
                "enum": [
                  "title",
                  "alias",
                  "note",
                  "tags",
                  "repository",
                  "branch",
                  "agent_type",
                  "last_message"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "contains",
                  "not_contains",
                  "equals"
                ]
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "kind",
              "field",
              "op",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "review"
              },
              "states": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "unreviewed",
                    "needs_review",
                    "reviewed",
                    "complete",
                    "flagged",
                    "outdated"
                  ]
                }
              }
            },
            "required": [
              "kind",
              "states"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "tag"
              },
              "op": {
                "type": "string",
                "enum": [
                  "has",
                  "lacks"
                ]
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "op",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "provider"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "claude",
                  "codex"
                ]
              }
            },
            "required": [
              "kind",
              "provider"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "activity"
              },
              "state": {
                "type": "string",
                "enum": [
                  "live",
                  "finished"
                ]
              }
            },
            "required": [
              "kind",
              "state"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "checklist"
              },
              "op": {
                "type": "string",
                "enum": [
                  "all_done",
                  "has_open",
                  "empty"
                ]
              }
            },
            "required": [
              "kind",
              "op"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "spawned"
              },
              "value": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "actions": {
      "minItems": 1,
      "maxItems": 12,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "set_review"
              },
              "review": {
                "type": "string",
                "enum": [
                  "unreviewed",
                  "needs_review",
                  "reviewed",
                  "complete",
                  "flagged",
                  "outdated"
                ]
              }
            },
            "required": [
              "kind",
              "review"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "add_tag"
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "remove_tag"
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "set_alias"
              },
              "alias": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              }
            },
            "required": [
              "kind",
              "alias"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "append_note"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "add_checklist_item"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "complete_checklist"
              },
              "match": {
                "type": "string",
                "maxLength": 200
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "remove_done_items"
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "order": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "createdAt": {
      "type": "string",
      "maxLength": 64
    },
    "updatedAt": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "name",
    "enabled",
    "match",
    "conditions",
    "actions",
    "id",
    "revision",
    "order",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false
}

AutomationRuleInput

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "enabled": {
      "type": "boolean"
    },
    "match": {
      "type": "string",
      "enum": [
        "all",
        "any"
      ]
    },
    "conditions": {
      "minItems": 1,
      "maxItems": 12,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "last_activity"
              },
              "op": {
                "type": "string",
                "enum": [
                  "older_than",
                  "within"
                ]
              },
              "amount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000
              },
              "unit": {
                "type": "string",
                "enum": [
                  "hours",
                  "days"
                ]
              }
            },
            "required": [
              "kind",
              "op",
              "amount",
              "unit"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "text"
              },
              "field": {
                "type": "string",
                "enum": [
                  "title",
                  "alias",
                  "note",
                  "tags",
                  "repository",
                  "branch",
                  "agent_type",
                  "last_message"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "contains",
                  "not_contains",
                  "equals"
                ]
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "kind",
              "field",
              "op",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "review"
              },
              "states": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "unreviewed",
                    "needs_review",
                    "reviewed",
                    "complete",
                    "flagged",
                    "outdated"
                  ]
                }
              }
            },
            "required": [
              "kind",
              "states"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "tag"
              },
              "op": {
                "type": "string",
                "enum": [
                  "has",
                  "lacks"
                ]
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "op",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "provider"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "claude",
                  "codex"
                ]
              }
            },
            "required": [
              "kind",
              "provider"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "activity"
              },
              "state": {
                "type": "string",
                "enum": [
                  "live",
                  "finished"
                ]
              }
            },
            "required": [
              "kind",
              "state"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "checklist"
              },
              "op": {
                "type": "string",
                "enum": [
                  "all_done",
                  "has_open",
                  "empty"
                ]
              }
            },
            "required": [
              "kind",
              "op"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "spawned"
              },
              "value": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "actions": {
      "minItems": 1,
      "maxItems": 12,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "set_review"
              },
              "review": {
                "type": "string",
                "enum": [
                  "unreviewed",
                  "needs_review",
                  "reviewed",
                  "complete",
                  "flagged",
                  "outdated"
                ]
              }
            },
            "required": [
              "kind",
              "review"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "add_tag"
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "remove_tag"
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "set_alias"
              },
              "alias": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              }
            },
            "required": [
              "kind",
              "alias"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "append_note"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "add_checklist_item"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "complete_checklist"
              },
              "match": {
                "type": "string",
                "maxLength": 200
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "remove_done_items"
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "required": [
    "name",
    "enabled",
    "match",
    "conditions",
    "actions"
  ],
  "additionalProperties": false
}

AutomationRuleStatus

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "enabled": {
      "type": "boolean"
    },
    "match": {
      "type": "string",
      "enum": [
        "all",
        "any"
      ]
    },
    "conditions": {
      "minItems": 1,
      "maxItems": 12,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "last_activity"
              },
              "op": {
                "type": "string",
                "enum": [
                  "older_than",
                  "within"
                ]
              },
              "amount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000
              },
              "unit": {
                "type": "string",
                "enum": [
                  "hours",
                  "days"
                ]
              }
            },
            "required": [
              "kind",
              "op",
              "amount",
              "unit"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "text"
              },
              "field": {
                "type": "string",
                "enum": [
                  "title",
                  "alias",
                  "note",
                  "tags",
                  "repository",
                  "branch",
                  "agent_type",
                  "last_message"
                ]
              },
              "op": {
                "type": "string",
                "enum": [
                  "contains",
                  "not_contains",
                  "equals"
                ]
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "kind",
              "field",
              "op",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "review"
              },
              "states": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "unreviewed",
                    "needs_review",
                    "reviewed",
                    "complete",
                    "flagged",
                    "outdated"
                  ]
                }
              }
            },
            "required": [
              "kind",
              "states"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "tag"
              },
              "op": {
                "type": "string",
                "enum": [
                  "has",
                  "lacks"
                ]
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "op",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "provider"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "claude",
                  "codex"
                ]
              }
            },
            "required": [
              "kind",
              "provider"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "activity"
              },
              "state": {
                "type": "string",
                "enum": [
                  "live",
                  "finished"
                ]
              }
            },
            "required": [
              "kind",
              "state"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "checklist"
              },
              "op": {
                "type": "string",
                "enum": [
                  "all_done",
                  "has_open",
                  "empty"
                ]
              }
            },
            "required": [
              "kind",
              "op"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "spawned"
              },
              "value": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "actions": {
      "minItems": 1,
      "maxItems": 12,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "set_review"
              },
              "review": {
                "type": "string",
                "enum": [
                  "unreviewed",
                  "needs_review",
                  "reviewed",
                  "complete",
                  "flagged",
                  "outdated"
                ]
              }
            },
            "required": [
              "kind",
              "review"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "add_tag"
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "remove_tag"
              },
              "tag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              }
            },
            "required": [
              "kind",
              "tag"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "set_alias"
              },
              "alias": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              }
            },
            "required": [
              "kind",
              "alias"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "append_note"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "add_checklist_item"
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "complete_checklist"
              },
              "match": {
                "type": "string",
                "maxLength": 200
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "remove_done_items"
              }
            },
            "required": [
              "kind"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "order": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "createdAt": {
      "type": "string",
      "maxLength": 64
    },
    "updatedAt": {
      "type": "string",
      "maxLength": 64
    },
    "matching": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "applied": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "lastAppliedAt": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "name",
    "enabled",
    "match",
    "conditions",
    "actions",
    "id",
    "revision",
    "order",
    "createdAt",
    "updatedAt",
    "matching",
    "applied"
  ],
  "additionalProperties": false
}

Diagnostics

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "string"
    },
    "startedAt": {
      "type": "string",
      "maxLength": 64
    },
    "dataDir": {
      "type": "string"
    },
    "git": {
      "type": "object",
      "properties": {
        "available": {
          "type": "boolean"
        },
        "version": {
          "type": "string"
        },
        "error": {
          "type": "string"
        }
      },
      "required": [
        "available"
      ],
      "additionalProperties": false
    },
    "database": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        },
        "schemaVersion": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "recoveredFromCorruption": {
          "type": "string"
        }
      },
      "required": [
        "path",
        "schemaVersion"
      ],
      "additionalProperties": false
    },
    "monitor": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "starting",
            "ok",
            "degraded"
          ]
        },
        "lastSyncAt": {
          "type": "string",
          "maxLength": 64
        },
        "watchers": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "watcherErrors": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "pollIntervalsMs": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "number"
          }
        },
        "snapshotVersion": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "sseClients": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "state",
        "watchers",
        "watcherErrors",
        "pollIntervalsMs",
        "snapshotVersion",
        "sseClients"
      ],
      "additionalProperties": false
    },
    "adapters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "claude",
              "codex"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "available": {
            "type": "boolean"
          },
          "root": {
            "type": "string"
          },
          "rootSource": {
            "type": "string",
            "enum": [
              "settings",
              "environment",
              "default"
            ]
          },
          "filesTracked": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "sessionsDiscovered": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "sessionsInRegisteredRepos": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "liveRegistryEntries": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "lastScanAt": {
            "type": "string",
            "maxLength": 64
          },
          "lastScanMs": {
            "type": "number"
          },
          "watching": {
            "type": "boolean"
          },
          "problems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "count": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "code",
                "message",
                "count"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "provider",
          "enabled",
          "available",
          "root",
          "rootSource",
          "filesTracked",
          "sessionsDiscovered",
          "sessionsInRegisteredRepos",
          "watching",
          "problems"
        ],
        "additionalProperties": false
      }
    },
    "github": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "lastRunAt": {
          "type": "string",
          "maxLength": 64
        },
        "error": {
          "type": "string"
        }
      },
      "required": [
        "enabled"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "version",
    "startedAt",
    "dataDir",
    "git",
    "database",
    "monitor",
    "adapters",
    "github"
  ],
  "additionalProperties": false
}

Health

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "const": true
    },
    "name": {
      "type": "string",
      "const": "repobs"
    },
    "version": {
      "type": "string"
    },
    "monitor": {
      "type": "string",
      "enum": [
        "starting",
        "ok",
        "degraded"
      ]
    }
  },
  "required": [
    "ok",
    "name",
    "version",
    "monitor"
  ],
  "additionalProperties": false
}

PairRequest

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "minLength": 10,
      "maxLength": 512
    }
  },
  "required": [
    "token"
  ],
  "additionalProperties": false
}

PickDirectoryResponse

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "path": {
      "type": "string"
    },
    "cancelled": {
      "type": "boolean"
    }
  },
  "required": [
    "cancelled"
  ],
  "additionalProperties": false
}

PullRequest

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "repoId": {
      "type": "string"
    },
    "number": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "title": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "headRef": {
      "type": "string"
    },
    "baseRef": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "isDraft": {
      "type": "boolean"
    },
    "updatedAt": {
      "type": "string",
      "maxLength": 64
    },
    "fetchedAt": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "id",
    "repoId",
    "number",
    "title",
    "url",
    "headRef",
    "baseRef",
    "state",
    "isDraft",
    "fetchedAt"
  ],
  "additionalProperties": false
}

RegisterRepositoriesRequest

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "paths": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024
      }
    }
  },
  "required": [
    "paths"
  ],
  "additionalProperties": false
}

RegisterRepositoriesResponse

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "repositoryId": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 64
              },
              "message": {
                "type": "string",
                "maxLength": 500
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "path",
          "ok"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "results"
  ],
  "additionalProperties": false
}

RegisterRepositoryRequest

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "path": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "path"
  ],
  "additionalProperties": false
}

ReorderRepositoriesRequest

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ids": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 128
      }
    }
  },
  "required": [
    "ids"
  ],
  "additionalProperties": false
}

Repository

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "displayName": {
      "type": "string"
    },
    "registeredPath": {
      "type": "string"
    },
    "primaryPath": {
      "type": "string"
    },
    "commonGitDir": {
      "type": "string"
    },
    "isBare": {
      "type": "boolean"
    },
    "order": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "addedAt": {
      "type": "string",
      "maxLength": 64
    },
    "lastSuccessfulScanAt": {
      "type": "string",
      "maxLength": 64
    },
    "scanState": {
      "type": "string",
      "enum": [
        "pending",
        "ok",
        "error"
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "maxLength": 64
        },
        "message": {
          "type": "string",
          "maxLength": 500
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "displayName",
    "registeredPath",
    "primaryPath",
    "commonGitDir",
    "isBare",
    "order",
    "addedAt",
    "scanState"
  ],
  "additionalProperties": false
}

RepositorySuggestion

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "path": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "claude",
        "codex"
      ]
    },
    "sessionCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "activeSessionCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "lastActivityAt": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "path",
    "source",
    "sessionCount",
    "activeSessionCount"
  ],
  "additionalProperties": false
}

SessionAnnotation

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "sessionId": {
      "type": "string"
    },
    "displayAlias": {
      "type": "string",
      "maxLength": 120
    },
    "review": {
      "type": "string",
      "enum": [
        "unreviewed",
        "needs_review",
        "reviewed",
        "complete",
        "flagged",
        "outdated"
      ]
    },
    "tags": {
      "maxItems": 32,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      }
    },
    "note": {
      "type": "string",
      "maxLength": 20000
    },
    "checklist": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "done": {
            "type": "boolean"
          },
          "order": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "createdAt": {
            "type": "string",
            "maxLength": 64
          },
          "completedAt": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "id",
          "text",
          "done",
          "order",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "planOverrides": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[0-9a-f]{16}$"
      },
      "additionalProperties": {
        "type": "boolean"
      }
    },
    "createdAt": {
      "type": "string",
      "maxLength": 64
    },
    "updatedAt": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "sessionId",
    "review",
    "tags",
    "note",
    "checklist",
    "planOverrides",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false
}

Settings

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "theme": {
      "type": "string",
      "enum": [
        "system",
        "light",
        "dark"
      ]
    },
    "adapters": {
      "type": "object",
      "properties": {
        "claude": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "home": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1024
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "enabled",
            "home"
          ],
          "additionalProperties": false
        },
        "codex": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "home": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1024
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "enabled",
            "home"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "claude",
        "codex"
      ],
      "additionalProperties": false
    },
    "monitoring": {
      "type": "object",
      "properties": {
        "activeWorktreePollMs": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 600000
        },
        "idleWorktreePollMs": {
          "type": "integer",
          "minimum": 5000,
          "maximum": 3600000
        },
        "sessionPollMs": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 600000
        },
        "watchWorkingTrees": {
          "type": "boolean"
        }
      },
      "required": [
        "activeWorktreePollMs",
        "idleWorktreePollMs",
        "sessionPollMs",
        "watchWorkingTrees"
      ],
      "additionalProperties": false
    },
    "status": {
      "type": "object",
      "properties": {
        "staleAfterMinutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        },
        "historicalAfterHours": {
          "type": "integer",
          "minimum": 1,
          "maximum": 8760
        }
      },
      "required": [
        "staleAfterMinutes",
        "historicalAfterHours"
      ],
      "additionalProperties": false
    },
    "privacy": {
      "type": "object",
      "properties": {
        "showMessageExcerpts": {
          "type": "boolean"
        },
        "readAgentPlans": {
          "type": "boolean"
        }
      },
      "required": [
        "showMessageExcerpts",
        "readAgentPlans"
      ],
      "additionalProperties": false
    },
    "github": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "pollMinutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        }
      },
      "required": [
        "enabled",
        "pollMinutes"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "theme",
    "adapters",
    "monitoring",
    "status",
    "privacy",
    "github"
  ],
  "additionalProperties": false
}

SettingsPatch

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "theme": {
      "type": "string",
      "enum": [
        "system",
        "light",
        "dark"
      ]
    },
    "adapters": {
      "type": "object",
      "properties": {
        "claude": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "home": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1024
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "codex": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "home": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1024
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "monitoring": {
      "type": "object",
      "properties": {
        "activeWorktreePollMs": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 600000
        },
        "idleWorktreePollMs": {
          "type": "integer",
          "minimum": 5000,
          "maximum": 3600000
        },
        "sessionPollMs": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 600000
        },
        "watchWorkingTrees": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "type": "object",
      "properties": {
        "staleAfterMinutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        },
        "historicalAfterHours": {
          "type": "integer",
          "minimum": 1,
          "maximum": 8760
        }
      },
      "additionalProperties": false
    },
    "privacy": {
      "type": "object",
      "properties": {
        "showMessageExcerpts": {
          "type": "boolean"
        },
        "readAgentPlans": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "github": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "pollMinutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Snapshot

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "generatedAt": {
      "type": "string",
      "maxLength": 64
    },
    "repositories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "registeredPath": {
            "type": "string"
          },
          "primaryPath": {
            "type": "string"
          },
          "commonGitDir": {
            "type": "string"
          },
          "isBare": {
            "type": "boolean"
          },
          "order": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "addedAt": {
            "type": "string",
            "maxLength": 64
          },
          "lastSuccessfulScanAt": {
            "type": "string",
            "maxLength": 64
          },
          "scanState": {
            "type": "string",
            "enum": [
              "pending",
              "ok",
              "error"
            ]
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 64
              },
              "message": {
                "type": "string",
                "maxLength": 500
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "displayName",
          "registeredPath",
          "primaryPath",
          "commonGitDir",
          "isBare",
          "order",
          "addedAt",
          "scanState"
        ],
        "additionalProperties": false
      }
    },
    "branches": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "repoId": {
            "type": "string"
          },
          "fullRef": {
            "type": "string"
          },
          "shortName": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "local",
              "remote_tracking"
            ]
          },
          "remoteName": {
            "type": "string"
          },
          "tipOid": {
            "type": "string"
          },
          "unborn": {
            "type": "boolean"
          },
          "upstream": {
            "type": "object",
            "properties": {
              "fullRef": {
                "type": "string"
              },
              "gone": {
                "type": "boolean"
              },
              "ahead": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "behind": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "fullRef",
              "gone"
            ],
            "additionalProperties": false
          },
          "classification": {
            "type": "string",
            "enum": [
              "checked_out",
              "local_tracking",
              "local_only",
              "remote_tracking",
              "remote_only"
            ]
          },
          "worktreeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "trackedByIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "repoId",
          "fullRef",
          "shortName",
          "kind",
          "tipOid",
          "unborn",
          "classification",
          "worktreeIds",
          "trackedByIds"
        ],
        "additionalProperties": false
      }
    },
    "worktrees": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "repoId": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "bare": {
            "type": "boolean"
          },
          "headOid": {
            "type": "string"
          },
          "branchFullRef": {
            "type": "string"
          },
          "detached": {
            "type": "boolean"
          },
          "locked": {
            "type": "boolean"
          },
          "lockReason": {
            "type": "string"
          },
          "prunable": {
            "type": "boolean"
          },
          "prunableReason": {
            "type": "string"
          },
          "missing": {
            "type": "boolean"
          },
          "status": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "ok",
                  "error",
                  "unavailable",
                  "pending"
                ]
              },
              "staged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "unstaged": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "untracked": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "conflicted": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "ahead": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "behind": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "gitOperation": {
                "type": "string",
                "enum": [
                  "merge",
                  "rebase",
                  "cherry_pick",
                  "revert",
                  "bisect"
                ]
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "state",
              "staged",
              "unstaged",
              "untracked",
              "conflicted"
            ],
            "additionalProperties": false
          },
          "lastStatusAt": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "id",
          "repoId",
          "path",
          "displayName",
          "isPrimary",
          "bare",
          "detached",
          "locked",
          "prunable",
          "missing",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "sessions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "claude",
              "codex"
            ]
          },
          "providerSessionId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "titleSource": {
            "type": "string",
            "enum": [
              "provider",
              "fallback"
            ]
          },
          "observedCwd": {
            "type": "string"
          },
          "worktreeId": {
            "type": "string"
          },
          "repoId": {
            "type": "string"
          },
          "association": {
            "type": "string",
            "enum": [
              "matched",
              "unassigned"
            ]
          },
          "unassignedReason": {
            "type": "string",
            "enum": [
              "cwd_missing",
              "worktree_removed",
              "no_matching_worktree",
              "source_missing"
            ]
          },
          "firstSeenAt": {
            "type": "string",
            "maxLength": 64
          },
          "lastActivityAt": {
            "type": "string",
            "maxLength": 64
          },
          "state": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "running",
                  "running_subagents",
                  "waiting_approval",
                  "waiting_user",
                  "idle_or_turn_finished",
                  "ended",
                  "unknown",
                  "error"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "direct",
                  "inferred",
                  "unknown"
                ]
              },
              "source": {
                "type": "string"
              },
              "observedAt": {
                "type": "string",
                "maxLength": 64
              },
              "detail": {
                "type": "string",
                "enum": [
                  "provider_reports_busy",
                  "provider_reports_idle",
                  "provider_reports_other",
                  "process_not_running",
                  "turn_in_progress",
                  "tool_pending",
                  "turn_completed",
                  "turn_aborted",
                  "approval_requested",
                  "user_input_requested",
                  "subagent_active",
                  "stale_evidence",
                  "no_lifecycle_records",
                  "unrecognized_records",
                  "provider_error_event",
                  "source_missing"
                ]
              },
              "possiblyAwaitingApproval": {
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "confidence",
              "source"
            ],
            "additionalProperties": false
          },
          "historical": {
            "type": "boolean"
          },
          "sourceAvailable": {
            "type": "boolean"
          },
          "subagents": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "active": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "total",
              "active"
            ],
            "additionalProperties": false
          },
          "providerVersion": {
            "type": "string"
          },
          "recordedBranch": {
            "type": "string"
          },
          "activityLabel": {
            "type": "string"
          },
          "parentSessionId": {
            "type": "string"
          },
          "agentType": {
            "type": "string"
          },
          "lastMessage": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "assistant",
                  "tool"
                ]
              },
              "text": {
                "type": "string",
                "maxLength": 400
              },
              "at": {
                "type": "string",
                "maxLength": 64
              }
            },
            "required": [
              "kind",
              "text"
            ],
            "additionalProperties": false
          },
          "plan": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "claude_task_list",
                  "claude_todo",
                  "claude_tasks",
                  "codex_update_plan"
                ]
              },
              "updatedAt": {
                "type": "string",
                "maxLength": 64
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "in_progress",
                        "completed"
                      ]
                    }
                  },
                  "required": [
                    "key",
                    "text",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "source",
              "items"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "provider",
          "providerSessionId",
          "title",
          "titleSource",
          "association",
          "state",
          "historical",
          "sourceAvailable",
          "subagents"
        ],
        "additionalProperties": false
      }
    },
    "annotations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "displayAlias": {
            "type": "string"
          },
          "review": {
            "type": "string",
            "enum": [
              "unreviewed",
              "needs_review",
              "reviewed",
              "complete",
              "flagged",
              "outdated"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hasNote": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          },
          "checklistOpen": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "checklistDone": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "checklist": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "done": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "text",
                "done"
              ],
              "additionalProperties": false
            }
          },
          "planOverrides": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "updatedAt": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "sessionId",
          "review",
          "tags",
          "hasNote",
          "note",
          "checklistOpen",
          "checklistDone",
          "checklist",
          "planOverrides",
          "updatedAt"
        ],
        "additionalProperties": false
      }
    },
    "pullRequests": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "repoId": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headRef": {
            "type": "string"
          },
          "baseRef": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "isDraft": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": "string",
            "maxLength": 64
          },
          "fetchedAt": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "id",
          "repoId",
          "number",
          "title",
          "url",
          "headRef",
          "baseRef",
          "state",
          "isDraft",
          "fetchedAt"
        ],
        "additionalProperties": false
      }
    },
    "pullRequestStatus": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "repoId": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "disabled",
              "ok",
              "error",
              "no_github_remote",
              "pending"
            ]
          },
          "remote": {
            "type": "string"
          },
          "fetchedAt": {
            "type": "string",
            "maxLength": 64
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 64
              },
              "message": {
                "type": "string",
                "maxLength": 500
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "repoId",
          "state"
        ],
        "additionalProperties": false
      }
    },
    "commitGraphs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "repoId": {
            "type": "string"
          },
          "commits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "oid": {
                  "type": "string"
                },
                "parents": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "time": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "subject": {
                  "type": "string"
                },
                "pushed": {
                  "type": "boolean"
                }
              },
              "required": [
                "oid",
                "parents",
                "time",
                "subject",
                "pushed"
              ],
              "additionalProperties": false
            }
          },
          "truncated": {
            "type": "boolean"
          },
          "scannedAt": {
            "type": "string",
            "maxLength": 64
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 64
              },
              "message": {
                "type": "string",
                "maxLength": 500
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "repoId",
          "commits",
          "truncated",
          "scannedAt"
        ],
        "additionalProperties": false
      }
    },
    "monitor": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "starting",
            "ok",
            "degraded"
          ]
        },
        "lastSyncAt": {
          "type": "string",
          "maxLength": 64
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 64
              },
              "message": {
                "type": "string",
                "maxLength": 500
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "state",
        "errors"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "version",
    "generatedAt",
    "repositories",
    "branches",
    "worktrees",
    "sessions",
    "annotations",
    "pullRequests",
    "pullRequestStatus",
    "commitGraphs",
    "monitor"
  ],
  "additionalProperties": false
}

SnapshotDiff

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fromVersion": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "toVersion": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "generatedAt": {
      "type": "string",
      "maxLength": 64
    },
    "upserts": {
      "type": "object",
      "properties": {
        "repositories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "registeredPath": {
                "type": "string"
              },
              "primaryPath": {
                "type": "string"
              },
              "commonGitDir": {
                "type": "string"
              },
              "isBare": {
                "type": "boolean"
              },
              "order": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "addedAt": {
                "type": "string",
                "maxLength": 64
              },
              "lastSuccessfulScanAt": {
                "type": "string",
                "maxLength": 64
              },
              "scanState": {
                "type": "string",
                "enum": [
                  "pending",
                  "ok",
                  "error"
                ]
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "displayName",
              "registeredPath",
              "primaryPath",
              "commonGitDir",
              "isBare",
              "order",
              "addedAt",
              "scanState"
            ],
            "additionalProperties": false
          }
        },
        "branches": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "repoId": {
                "type": "string"
              },
              "fullRef": {
                "type": "string"
              },
              "shortName": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "local",
                  "remote_tracking"
                ]
              },
              "remoteName": {
                "type": "string"
              },
              "tipOid": {
                "type": "string"
              },
              "unborn": {
                "type": "boolean"
              },
              "upstream": {
                "type": "object",
                "properties": {
                  "fullRef": {
                    "type": "string"
                  },
                  "gone": {
                    "type": "boolean"
                  },
                  "ahead": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "behind": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "fullRef",
                  "gone"
                ],
                "additionalProperties": false
              },
              "classification": {
                "type": "string",
                "enum": [
                  "checked_out",
                  "local_tracking",
                  "local_only",
                  "remote_tracking",
                  "remote_only"
                ]
              },
              "worktreeIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "trackedByIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "id",
              "repoId",
              "fullRef",
              "shortName",
              "kind",
              "tipOid",
              "unborn",
              "classification",
              "worktreeIds",
              "trackedByIds"
            ],
            "additionalProperties": false
          }
        },
        "worktrees": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "repoId": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "isPrimary": {
                "type": "boolean"
              },
              "bare": {
                "type": "boolean"
              },
              "headOid": {
                "type": "string"
              },
              "branchFullRef": {
                "type": "string"
              },
              "detached": {
                "type": "boolean"
              },
              "locked": {
                "type": "boolean"
              },
              "lockReason": {
                "type": "string"
              },
              "prunable": {
                "type": "boolean"
              },
              "prunableReason": {
                "type": "string"
              },
              "missing": {
                "type": "boolean"
              },
              "status": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "ok",
                      "error",
                      "unavailable",
                      "pending"
                    ]
                  },
                  "staged": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "unstaged": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "untracked": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "conflicted": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "ahead": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "behind": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "gitOperation": {
                    "type": "string",
                    "enum": [
                      "merge",
                      "rebase",
                      "cherry_pick",
                      "revert",
                      "bisect"
                    ]
                  },
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "message": {
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "state",
                  "staged",
                  "unstaged",
                  "untracked",
                  "conflicted"
                ],
                "additionalProperties": false
              },
              "lastStatusAt": {
                "type": "string",
                "maxLength": 64
              }
            },
            "required": [
              "id",
              "repoId",
              "path",
              "displayName",
              "isPrimary",
              "bare",
              "detached",
              "locked",
              "prunable",
              "missing",
              "status"
            ],
            "additionalProperties": false
          }
        },
        "sessions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "claude",
                  "codex"
                ]
              },
              "providerSessionId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "titleSource": {
                "type": "string",
                "enum": [
                  "provider",
                  "fallback"
                ]
              },
              "observedCwd": {
                "type": "string"
              },
              "worktreeId": {
                "type": "string"
              },
              "repoId": {
                "type": "string"
              },
              "association": {
                "type": "string",
                "enum": [
                  "matched",
                  "unassigned"
                ]
              },
              "unassignedReason": {
                "type": "string",
                "enum": [
                  "cwd_missing",
                  "worktree_removed",
                  "no_matching_worktree",
                  "source_missing"
                ]
              },
              "firstSeenAt": {
                "type": "string",
                "maxLength": 64
              },
              "lastActivityAt": {
                "type": "string",
                "maxLength": 64
              },
              "state": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "running",
                      "running_subagents",
                      "waiting_approval",
                      "waiting_user",
                      "idle_or_turn_finished",
                      "ended",
                      "unknown",
                      "error"
                    ]
                  },
                  "confidence": {
                    "type": "string",
                    "enum": [
                      "direct",
                      "inferred",
                      "unknown"
                    ]
                  },
                  "source": {
                    "type": "string"
                  },
                  "observedAt": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "detail": {
                    "type": "string",
                    "enum": [
                      "provider_reports_busy",
                      "provider_reports_idle",
                      "provider_reports_other",
                      "process_not_running",
                      "turn_in_progress",
                      "tool_pending",
                      "turn_completed",
                      "turn_aborted",
                      "approval_requested",
                      "user_input_requested",
                      "subagent_active",
                      "stale_evidence",
                      "no_lifecycle_records",
                      "unrecognized_records",
                      "provider_error_event",
                      "source_missing"
                    ]
                  },
                  "possiblyAwaitingApproval": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "confidence",
                  "source"
                ],
                "additionalProperties": false
              },
              "historical": {
                "type": "boolean"
              },
              "sourceAvailable": {
                "type": "boolean"
              },
              "subagents": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "active": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "total",
                  "active"
                ],
                "additionalProperties": false
              },
              "providerVersion": {
                "type": "string"
              },
              "recordedBranch": {
                "type": "string"
              },
              "activityLabel": {
                "type": "string"
              },
              "parentSessionId": {
                "type": "string"
              },
              "agentType": {
                "type": "string"
              },
              "lastMessage": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "assistant",
                      "tool"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 400
                  },
                  "at": {
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "required": [
                  "kind",
                  "text"
                ],
                "additionalProperties": false
              },
              "plan": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "enum": [
                      "claude_task_list",
                      "claude_todo",
                      "claude_tasks",
                      "codex_update_plan"
                    ]
                  },
                  "updatedAt": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "in_progress",
                            "completed"
                          ]
                        }
                      },
                      "required": [
                        "key",
                        "text",
                        "status"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "source",
                  "items"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "provider",
              "providerSessionId",
              "title",
              "titleSource",
              "association",
              "state",
              "historical",
              "sourceAvailable",
              "subagents"
            ],
            "additionalProperties": false
          }
        },
        "annotations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "sessionId": {
                "type": "string"
              },
              "displayAlias": {
                "type": "string"
              },
              "review": {
                "type": "string",
                "enum": [
                  "unreviewed",
                  "needs_review",
                  "reviewed",
                  "complete",
                  "flagged",
                  "outdated"
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "hasNote": {
                "type": "boolean"
              },
              "note": {
                "type": "string"
              },
              "checklistOpen": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "checklistDone": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "done": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "text",
                    "done"
                  ],
                  "additionalProperties": false
                }
              },
              "planOverrides": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "boolean"
                }
              },
              "updatedAt": {
                "type": "string",
                "maxLength": 64
              }
            },
            "required": [
              "sessionId",
              "review",
              "tags",
              "hasNote",
              "note",
              "checklistOpen",
              "checklistDone",
              "checklist",
              "planOverrides",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "pullRequests": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "repoId": {
                "type": "string"
              },
              "number": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "headRef": {
                "type": "string"
              },
              "baseRef": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "isDraft": {
                "type": "boolean"
              },
              "updatedAt": {
                "type": "string",
                "maxLength": 64
              },
              "fetchedAt": {
                "type": "string",
                "maxLength": 64
              }
            },
            "required": [
              "id",
              "repoId",
              "number",
              "title",
              "url",
              "headRef",
              "baseRef",
              "state",
              "isDraft",
              "fetchedAt"
            ],
            "additionalProperties": false
          }
        },
        "pullRequestStatus": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "repoId": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "disabled",
                  "ok",
                  "error",
                  "no_github_remote",
                  "pending"
                ]
              },
              "remote": {
                "type": "string"
              },
              "fetchedAt": {
                "type": "string",
                "maxLength": 64
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "repoId",
              "state"
            ],
            "additionalProperties": false
          }
        },
        "commitGraphs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "repoId": {
                "type": "string"
              },
              "commits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "oid": {
                      "type": "string"
                    },
                    "parents": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "time": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "subject": {
                      "type": "string"
                    },
                    "pushed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "oid",
                    "parents",
                    "time",
                    "subject",
                    "pushed"
                  ],
                  "additionalProperties": false
                }
              },
              "truncated": {
                "type": "boolean"
              },
              "scannedAt": {
                "type": "string",
                "maxLength": 64
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "repoId",
              "commits",
              "truncated",
              "scannedAt"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "repositories",
        "branches",
        "worktrees",
        "sessions",
        "annotations",
        "pullRequests",
        "pullRequestStatus",
        "commitGraphs"
      ],
      "additionalProperties": false
    },
    "removes": {
      "type": "object",
      "properties": {
        "repositories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "branches": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "worktrees": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sessions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "annotations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pullRequests": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pullRequestStatus": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "commitGraphs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "repositories",
        "branches",
        "worktrees",
        "sessions",
        "annotations",
        "pullRequests",
        "pullRequestStatus",
        "commitGraphs"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "fromVersion",
    "toVersion",
    "generatedAt",
    "upserts",
    "removes"
  ],
  "additionalProperties": false
}

UpdateRepositoryRequest

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "displayName"
  ],
  "additionalProperties": false
}