API Хаба
Свои скрипты и сервисы работают от вашего имени с теми же правами, что и агент.
Базовый адрес: https://hub.n1.team/api/v1. Сохраняйте ключ только на сервере или в локальном скрипте. Это API для серверных клиентов: браузерные cross-origin запросы не поддерживаются. Внутренний /api приложения не является публичным контрактом.
Начать
Создайте личный ключ на странице «Агенты». Сохраните его в переменную N1_HUB_KEY там, где запускается скрипт. Используется тот же ключ, что и для MCP; cookie и аварийный bootstrap-токен не подходят.
Создать задачу
curl --fail-with-body -X POST 'https://hub.n1.team/api/v1/tasks' \
-H "Authorization: Bearer $N1_HUB_KEY" \
-H 'Content-Type: application/json' \
--data '{"title":"Проверить путь пользователя"}'HTTP 200 возвращает карточку задачи. Повтор того же названия от того же человека в течение 10 минут возвращает существующую задачу. Без основания для принятия агентская задача попадает в разбор.
Прочитать задачу
curl --fail-with-body -X GET 'https://hub.n1.team/api/v1/tasks/HUB-123' \
-H "Authorization: Bearer $N1_HUB_KEY"Изменить задачу
curl --fail-with-body -X PATCH 'https://hub.n1.team/api/v1/tasks/HUB-123' \
-H "Authorization: Bearer $N1_HUB_KEY" \
-H 'Content-Type: application/json' \
--data '{"plannedStart":"2026-11-02","dueDate":"2026-11-06"}'Плановое начало plannedStart и срок dueDate — даты без времени; null убирает дату. Начало не может быть позже срока, даты не сдвигаются автоматически. Для защиты текста от чужой правки передайте expectedDescription с исходным описанием. Для дат передайте expectedDates с обоими исходными значениями plannedStart/dueDate. 409 оставляет все поля задачи неизменными.
Прочитать метрику
curl --fail-with-body -X POST 'https://hub.n1.team/api/v1/metrics/query' \
-H "Authorization: Bearer $N1_HUB_KEY" \
-H 'Content-Type: application/json' \
--data '{"product":"your-product","ref":"events.count:open","days":28}'Замените product на код своего продукта, ref — на ссылку метрики из Хаба. days: 28 по умолчанию, максимум 730. Вместо days можно передать обе даты from и to (YYYY-MM-DD), не более 730 дней включительно. Источник, дата данных, пропуски и оговорки приходят вместе с числами. Пропуск — null, а не ноль. Денежные метрики используют major units; масштаб указан в amounts.
Процесс команды
curl --fail-with-body -X GET 'https://hub.n1.team/api/v1/workflow' \
-H "Authorization: Bearer $N1_HUB_KEY"PUT /workflow сохраняет полный config и обязательный expectedVersion из чтения. Меняет owner или его агент с reason; stale409 не создаёт частичную версию. Можно добавлять, переименовывать и переставлять колонки/типы. Удаление ID и смена категории существующей колонки отклоняются. columnId и taskTypeId доступны в задачах; status сохраняет категорию для старых клиентов. Конфигурация не запускает и не переназначает агентов.
Контракт и ограничения
До 120 запросов в минуту на ключ совместно с MCP. Размер тела — до 256 КиБ; Content-Type: application/json. Квоты команды и права продуктов действуют без изменений. Отзыв ключа, исключение участника и сужение доступа учитываются при следующем запросе. Приватные ответы не предназначены для кеширования.
Версия v1: создание, чтение и изменение задачи, числовая метрика, процесс команды и спринты. GET /planning читает настройки, PUT /planning меняет их от имени owner; GET /cycles и /cycles/{ref} читают циклы, PATCH /cycles/{ref} меняет цель. Права те же, что в MCP. Карточка содержит счётчики, но не историю, комментарии и вложения; метрика не содержит аннотаций задач. Коллекции с курсорами и остальные операции появятся отдельно. В v1 возможны новые поля; несовместимые изменения получат новую версию.
Ошибки
Ответ содержит code, message и hint (строка или null). 400 — неверный запрос; 401 — ключ не принят; 403 — действие запрещено; 404 — объект недоступен; 409 — исходное описание, даты или версия процесса уже изменились; 413/415 — тело или формат; 429 — лимит или квота (Retry-After при ограничении частоты); 500 — внутренняя ошибка. Не повторяйте запись вслепую после неизвестного результата.
{"code":"unauthorized","message":"…","hint":null}Автоматический повтор допустим для чтения: учитывайте Retry-After при 429 и используйте задержку с разбросом при временных 5xx. Создание задач не поддерживает Idempotency-Key: защита от недавних дублей по названию не является общей гарантией идемпотентности. После таймаута записи сначала проверьте результат в Хабе.
Справочник полей
Полные имена полей, обязательность, допустимые значения и ограничения ниже получены из тех же схем, что валидируют запросы. OpenAPI можно импортировать в Postman или генератор клиента. Ответы JSON; даты и время — строки ISO. При обращении в поддержку передайте X-Request-Id, но не ключ.
PlanningInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"kanban",
"cycles"
]
},
"cycleWeeks": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleStartDay": {
"type": "integer",
"minimum": 1,
"maximum": 7
},
"timeZone": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"triage": {
"type": "boolean"
},
"staleDays": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
}
},
"additionalProperties": false
}CycleGoalInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"goal": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
}
},
"required": [
"goal"
],
"additionalProperties": false
}Roadmap
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"productId": {
"type": "string"
},
"product": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"updatedAt": {
"type": [
"string",
"null"
]
},
"author": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"avatarUrl": {
"type": [
"string",
"null"
]
},
"agent": {
"type": [
"string",
"null"
]
}
},
"required": [
"userId",
"name",
"email",
"avatarUrl",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"items": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"feature",
"release"
]
},
"title": {
"type": "string"
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"targetDate": {
"type": [
"string",
"null"
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"taskCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"archived": {
"type": "boolean"
}
},
"required": [
"id",
"kind",
"title",
"plannedStart",
"targetDate",
"goal",
"taskCount",
"archived"
],
"additionalProperties": false
}
},
"nextOffset": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"total": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"productId",
"product",
"version",
"updatedAt",
"author",
"items",
"nextOffset",
"total"
],
"additionalProperties": false
}RoadmapItem
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"feature",
"release"
]
},
"title": {
"type": "string"
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"targetDate": {
"type": [
"string",
"null"
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"taskCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"archived": {
"type": "boolean"
},
"productId": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"description": {
"type": "string"
},
"taskKeys": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string"
}
},
"tasks": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"key",
"title",
"status"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"kind",
"title",
"plannedStart",
"targetDate",
"goal",
"taskCount",
"archived",
"productId",
"version",
"description",
"taskKeys",
"tasks"
],
"additionalProperties": false
}RoadmapSave
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"feature",
"release"
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"default": "",
"type": "string",
"maxLength": 5000
},
"goal": {
"default": null,
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 80
},
{
"type": "null"
}
]
},
"plannedStart": {
"default": null,
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"targetDate": {
"default": null,
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"tasks": {
"default": [],
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"archived": {
"default": false,
"type": "boolean"
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"expectedVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"expectedProductId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"kind",
"title",
"description",
"goal",
"plannedStart",
"targetDate",
"tasks",
"archived",
"expectedVersion"
],
"additionalProperties": false
}TaskTransitionPreviewInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"expectedStageRevision": {
"description": "Read the task first and pass its stageRevision to reject a changed stage, executor, assignment source, task type, product or site context. Legacy omission remains unconditional.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"assignmentMode": {
"type": "string",
"const": "process"
},
"comment": {
"type": "string",
"maxLength": 10000
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"progression": {
"type": "string",
"const": "next"
},
"reviewDecision": {
"description": "Preview the common Review decision, including restoration of the previous working executor. Do not combine with status, taskTypeId, assignmentMode or estimate.",
"type": "string",
"enum": [
"approve",
"request_changes"
]
}
},
"additionalProperties": false
}TaskTransitionPreview
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"workflowVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"current": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"responsibleUserId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"status",
"columnId",
"taskTypeId",
"assignee",
"responsibleUserId"
],
"additionalProperties": false
},
"next": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"responsibleUserId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"status",
"columnId",
"taskTypeId",
"assignee",
"responsibleUserId"
],
"additionalProperties": false
},
"assignment": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"manual",
"process",
"inherited"
]
},
"ruleId": {
"type": [
"string",
"null"
]
},
"ruleKind": {
"anyOf": [
{
"type": "string",
"enum": [
"type_column",
"column",
"type",
"default"
]
},
{
"type": "null"
}
]
},
"workflowVersion": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"ruleId",
"ruleKind",
"workflowVersion"
],
"additionalProperties": false
}
},
"required": [
"key",
"stageRevision",
"workflowVersion",
"current",
"next",
"assignment"
],
"additionalProperties": false
}ReviewInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"progression": {
"description": "Approve only the current Review stage and advance to the next configured active/review/done column. Omitted preserves legacy approve-to-Done semantics. Explicit columnId wins.",
"type": "string",
"const": "next"
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"expectedStageRevision": {
"description": "Read the task first and pass its stageRevision to reject a changed stage, executor, assignment source, task type, product or site context. Legacy omission remains unconditional.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"decision": {
"type": "string",
"enum": [
"approve",
"request_changes"
]
},
"comment": {
"type": "string",
"maxLength": 10000
}
},
"required": [
"decision"
],
"additionalProperties": false
}CompleteStageInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"runId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"action": {
"type": "string",
"enum": [
"submit",
"approve",
"request_changes"
]
},
"comment": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"links": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"pattern": "^https?:\\/\\/"
},
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
}
},
"required": [
"runId",
"stageRevision",
"action",
"comment"
],
"additionalProperties": false
}NextTaskInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}StageResult
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"task": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"type": [
"string",
"null"
]
},
"taskTypeId": {
"type": [
"string",
"null"
]
},
"responsible": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"assignment": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"manual",
"process",
"inherited"
]
},
"ruleId": {
"type": [
"string",
"null"
]
},
"ruleKind": {
"anyOf": [
{
"type": "string",
"enum": [
"type_column",
"column",
"type",
"default"
]
},
{
"type": "null"
}
]
},
"workflowVersion": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"ruleId",
"ruleKind",
"workflowVersion"
],
"additionalProperties": false
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"deliveryMode": {
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"product": {
"type": [
"string",
"null"
]
},
"site": {
"type": [
"string",
"null"
]
},
"pageUrl": {
"type": [
"string",
"null"
]
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"dueDate": {
"type": [
"string",
"null"
]
},
"reviewAfter": {
"type": [
"string",
"null"
]
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "object",
"properties": {
"key": {
"type": [
"string",
"null"
]
},
"title": {
"type": "string"
}
},
"required": [
"key",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"checklist": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"subtasks": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"comments": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"linkList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
"url",
"title"
],
"additionalProperties": false
}
},
"queries": {
"type": "array",
"items": {
"type": "string"
}
},
"outcome": {
"type": [
"string",
"null"
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"createdBy": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"agent": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"completedAt": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"type": [
"string",
"null"
]
},
"workingAgent": {
"type": [
"string",
"null"
]
},
"activeRun": {
"anyOf": [
{
"type": "object",
"properties": {
"runId": {
"type": "string"
},
"keyId": {
"type": "string"
},
"columnId": {
"type": [
"string",
"null"
]
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"startedAt": {
"type": "string"
},
"lastSeenAt": {
"type": "string"
}
},
"required": [
"runId",
"keyId",
"columnId",
"stageRevision",
"startedAt",
"lastSeenAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"key",
"title",
"description",
"status",
"columnId",
"taskTypeId",
"responsible",
"assignment",
"stageRevision",
"deliveryMode",
"deliveryReason",
"priority",
"labels",
"assignee",
"product",
"site",
"pageUrl",
"plannedStart",
"dueDate",
"reviewAfter",
"estimate",
"goal",
"parent",
"cycle",
"checklist",
"subtasks",
"comments",
"linkList",
"queries",
"outcome",
"hypothesis",
"createdBy",
"createdAt",
"updatedAt",
"completedAt",
"archivedAt",
"workingAgent",
"activeRun"
],
"additionalProperties": false
},
"runId": {
"type": "string"
},
"replayed": {
"type": "boolean"
}
},
"required": [
"task",
"runId",
"replayed"
],
"additionalProperties": false
}Workflow
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"columns": {
"minItems": 5,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"status": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"label": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 60
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"label"
],
"additionalProperties": false
}
},
"types": {
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"required": [
"id",
"label"
],
"additionalProperties": false
}
},
"primaryColumns": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"additionalProperties": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"required": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
}
},
"required": [
"columns",
"types",
"primaryColumns"
],
"additionalProperties": false
},
"routing": {
"type": "object",
"properties": {
"defaultAssignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"rules": {
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"assignee"
],
"additionalProperties": false
}
}
},
"required": [
"rules"
],
"additionalProperties": false
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"updatedAt": {
"type": [
"string",
"null"
]
},
"author": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"avatarUrl": {
"type": [
"string",
"null"
]
},
"agent": {
"type": [
"string",
"null"
]
}
},
"required": [
"userId",
"name",
"email",
"avatarUrl",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"reason": {
"type": [
"string",
"null"
]
},
"canManage": {
"type": "boolean"
},
"history": {
"type": "array",
"items": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string"
},
"author": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"avatarUrl": {
"type": [
"string",
"null"
]
},
"agent": {
"type": [
"string",
"null"
]
}
},
"required": [
"userId",
"name",
"email",
"avatarUrl",
"agent"
],
"additionalProperties": false
},
"via": {
"type": "string",
"enum": [
"web",
"agent"
]
},
"reason": {
"type": [
"string",
"null"
]
}
},
"required": [
"version",
"createdAt",
"author",
"via",
"reason"
],
"additionalProperties": false
}
}
},
"required": [
"config",
"version",
"updatedAt",
"author",
"reason",
"canManage",
"history"
],
"additionalProperties": false
}WorkflowSave
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"columns": {
"minItems": 5,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"status": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"label": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 60
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"label"
],
"additionalProperties": false
}
},
"types": {
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"required": [
"id",
"label"
],
"additionalProperties": false
}
},
"primaryColumns": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"additionalProperties": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"required": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
}
},
"required": [
"columns",
"types",
"primaryColumns"
],
"additionalProperties": false
},
"routing": {
"type": "object",
"properties": {
"defaultAssignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"rules": {
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"assignee"
],
"additionalProperties": false
}
}
},
"required": [
"rules"
],
"additionalProperties": false
},
"expectedVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"config",
"expectedVersion"
],
"additionalProperties": false
}TaskInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"deliveryMode": {
"description": "deploy by default; no_deploy for results needing no deployment. An explicit decision requires deliveryReason.",
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 20000
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,23}$"
}
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"responsible": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"site": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"pageUrl": {
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"pattern": "^https?:\\/\\/"
},
{
"type": "null"
}
]
},
"queries": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"plannedStart": {
"description": "Intended date-only start of work; null clears it. Never inferred from creation or actual execution timestamps. Must not follow dueDate when both dates exist.",
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"dueDate": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"reviewAfter": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"goal": {
"description": "Product objective or key result id; null unlinks. An objective without a metric does not create a hypothesis or measurement.",
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"current",
"next",
"previous"
]
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
{
"type": "null"
}
]
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"links": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"pattern": "^https?:\\/\\/"
},
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"comment": {
"description": "Added with the change. An agent closing a task (status \"done\") must give the grounds here: who approved it, what was checked.",
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
}
},
"required": [
"title"
],
"additionalProperties": false
}TaskUpdate
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedDelivery": {
"type": "object",
"properties": {
"deliveryMode": {
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"deliveryMode",
"deliveryReason"
],
"additionalProperties": false
},
"expectedStageRevision": {
"description": "Read the task first and pass its stageRevision to reject a changed stage, executor, assignment source, task type, product or site context. Legacy omission remains unconditional.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"assignmentMode": {
"type": "string",
"const": "process"
},
"expectedDescription": {
"description": "Original description baseline. A mismatch rejects the entire update atomically with 409; omitted preserves last-writer behaviour.",
"type": "string",
"maxLength": 20000
},
"expectedDates": {
"description": "Both original nullable planning dates. A mismatch rejects the entire update atomically with 409; omitted preserves last-writer behaviour.",
"type": "object",
"properties": {
"plannedStart": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"dueDate": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
}
},
"required": [
"plannedStart",
"dueDate"
],
"additionalProperties": false
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"deliveryMode": {
"description": "deploy by default; no_deploy for results needing no deployment. An explicit decision requires deliveryReason.",
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 20000
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,23}$"
}
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"responsible": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"site": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"pageUrl": {
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"pattern": "^https?:\\/\\/"
},
{
"type": "null"
}
]
},
"queries": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"plannedStart": {
"description": "Intended date-only start of work; null clears it. Never inferred from creation or actual execution timestamps. Must not follow dueDate when both dates exist.",
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"dueDate": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"reviewAfter": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"goal": {
"description": "Product objective or key result id; null unlinks. An objective without a metric does not create a hypothesis or measurement.",
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"current",
"next",
"previous"
]
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
{
"type": "null"
}
]
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"links": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"pattern": "^https?:\\/\\/"
},
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"comment": {
"description": "Added with the change. An agent closing a task (status \"done\") must give the grounds here: who approved it, what was checked.",
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "null"
}
]
},
"archived": {
"type": "boolean"
}
},
"additionalProperties": false
}Task
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"type": [
"string",
"null"
]
},
"taskTypeId": {
"type": [
"string",
"null"
]
},
"responsible": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"assignment": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"manual",
"process",
"inherited"
]
},
"ruleId": {
"type": [
"string",
"null"
]
},
"ruleKind": {
"anyOf": [
{
"type": "string",
"enum": [
"type_column",
"column",
"type",
"default"
]
},
{
"type": "null"
}
]
},
"workflowVersion": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"ruleId",
"ruleKind",
"workflowVersion"
],
"additionalProperties": false
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"deliveryMode": {
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"product": {
"type": [
"string",
"null"
]
},
"site": {
"type": [
"string",
"null"
]
},
"pageUrl": {
"type": [
"string",
"null"
]
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"dueDate": {
"type": [
"string",
"null"
]
},
"reviewAfter": {
"type": [
"string",
"null"
]
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "object",
"properties": {
"key": {
"type": [
"string",
"null"
]
},
"title": {
"type": "string"
}
},
"required": [
"key",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"checklist": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"subtasks": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"comments": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"linkList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
"url",
"title"
],
"additionalProperties": false
}
},
"queries": {
"type": "array",
"items": {
"type": "string"
}
},
"outcome": {
"type": [
"string",
"null"
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"createdBy": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"agent": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"completedAt": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"type": [
"string",
"null"
]
},
"workingAgent": {
"type": [
"string",
"null"
]
},
"activeRun": {
"anyOf": [
{
"type": "object",
"properties": {
"runId": {
"type": "string"
},
"keyId": {
"type": "string"
},
"columnId": {
"type": [
"string",
"null"
]
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"startedAt": {
"type": "string"
},
"lastSeenAt": {
"type": "string"
}
},
"required": [
"runId",
"keyId",
"columnId",
"stageRevision",
"startedAt",
"lastSeenAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"key",
"title",
"description",
"status",
"columnId",
"taskTypeId",
"responsible",
"assignment",
"stageRevision",
"deliveryMode",
"deliveryReason",
"priority",
"labels",
"assignee",
"product",
"site",
"pageUrl",
"plannedStart",
"dueDate",
"reviewAfter",
"estimate",
"goal",
"parent",
"cycle",
"checklist",
"subtasks",
"comments",
"linkList",
"queries",
"outcome",
"hypothesis",
"createdBy",
"createdAt",
"updatedAt",
"completedAt",
"archivedAt",
"workingAgent",
"activeRun"
],
"additionalProperties": false
}MetricQuery
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ref": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"from": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"to": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 730
},
"granularity": {
"type": "string",
"enum": [
"day",
"week"
]
},
"compare": {
"type": "boolean"
},
"product": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"ref",
"product"
],
"additionalProperties": false
}MetricSeries
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ref": {
"type": "string"
},
"label": {
"type": "string"
},
"definition": {
"type": "string"
},
"sourceName": {
"type": "string"
},
"caveats": {
"type": "array",
"items": {
"type": "string"
}
},
"kind": {
"type": "string"
},
"lowerIsBetter": {
"type": "boolean"
},
"unit": {
"type": "string",
"const": "currency"
},
"currency": {
"type": "string"
},
"amounts": {
"type": "string",
"enum": [
"major",
"minor"
]
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"granularity": {
"type": "string",
"enum": [
"day",
"week"
]
},
"points": {
"maxItems": 730,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"value": {
"type": [
"number",
"null"
]
}
},
"required": [
"date",
"value"
],
"additionalProperties": false
}
},
"total": {
"type": [
"number",
"null"
]
},
"previous": {
"anyOf": [
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"total": {
"type": [
"number",
"null"
]
},
"points": {
"maxItems": 730,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"value": {
"type": [
"number",
"null"
]
}
},
"required": [
"date",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"from",
"to",
"total",
"points"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"dataThrough": {
"type": [
"string",
"null"
]
},
"band": {
"anyOf": [
{
"type": "object",
"properties": {
"low": {
"type": "number"
},
"high": {
"type": "number"
},
"weeks": {
"type": "number"
},
"latest": {
"type": "object",
"properties": {
"week": {
"type": "string"
},
"start": {
"type": "string"
},
"value": {
"type": [
"number",
"null"
]
}
},
"required": [
"week",
"start",
"value"
],
"additionalProperties": false
},
"outside": {
"type": "boolean"
}
},
"required": [
"low",
"high",
"weeks",
"latest",
"outside"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"note": {
"type": "string"
}
},
"required": [
"ref",
"label",
"definition",
"sourceName",
"caveats",
"kind",
"lowerIsBetter",
"from",
"to",
"granularity",
"points",
"total",
"previous",
"dataThrough"
],
"additionalProperties": false
}Problem
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthorized",
"forbidden",
"not_found",
"invalid_request",
"conflict",
"invalid_json",
"unsupported_media_type",
"payload_too_large",
"rate_limited",
"quota_exceeded",
"internal_error"
]
},
"message": {
"type": "string"
},
"hint": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"message",
"hint"
],
"additionalProperties": false
}Для полного рабочего цикла агента используйте MCP.