Para desarrolladores
API de docket
La API de docket es para herramientas distintas de Claude: scripts, ejecuciones de CI, tus propias interfaces. Cada herramienta tiene su propia dirección; la entrada va como JSON y el resultado vuelve como JSON.
Tu primera llamada en tres pasos
- Crear una API key. Crea la key en la app, en la página „API keys“. Solo puedes elegir derechos que tienes tú mismo y que necesita una herramienta de la API. Una key caduca; por defecto son 90 días. La app la muestra una sola vez.
- Autenticarse. Cada llamada lleva la key en la cabecera
Authorization: Bearer <key>. - Llamar a una herramienta. Cada herramienta tiene la dirección
POST /agent/tools/<name>; la entrada va como JSON en el cuerpo. El éxito es HTTP 200 con el resultado mismo. Un error llega con su estado HTTP real y{ error, errorCode, reason? }.
POST https://api.docket.xhub.io/agent/tools/<name>
Authorization: Bearer <key>
Content-Type: application/json
{ … }Descripción en OpenAPI
GET /agent/openapi.json describe todas las herramientas de todos los tipos de key en OpenAPI 3.1.0 y no requiere autenticación. La lista de abajo es la misma descripción, según el backend de docket 4.41.0.
Una API key solo llama a herramientas que indican api en tipos de key, y de ellas solo a las cuyo derecho tiene:
Límite de peticiones
Cada key tiene su propio límite de peticiones. Si se supera, docket responde con HTTP 429 y RATE_LIMITED: espera un momento y vuelve a enviar.
Regla de versiones
La ruta /agent es la versión 1 de la API.
Sin aviso llegan herramientas nuevas, campos de entrada opcionales nuevos y campos de salida nuevos.
Un cambio incompatible (una herramienta desaparece o cambia de nombre, un campo obligatorio nuevo, un campo desaparece o cambia de tipo) se anuncia primero con deprecated: true en esta descripción y una línea en el changelog, y se aplica como pronto dos versiones minor después.
Estados de error
Cada herramienta puede responder con estos estados. El cuerpo es { error, errorCode, reason? }; el errorCode es estable y legible por máquina.
| Estado | Significado |
|---|---|
400 | HTTP 400; errorCode: BAD_REQUEST, DOCKET_ACTION_NOTHING_TO_REVISE, DOCKET_ACTION_OPEN_ANNOTATIONS, DOCKET_ACTION_REPORT_NOT_ALLOWED, DOCKET_ACTION_WITHOUT_REPOS, DOCKET_ACTION_WRONG_KIND, DOCKET_ANCHOR_INVALID, DOCKET_ASSIGNEE_NOT_MEMBER, DOCKET_ATTACHMENT_INVALID_INPUT, DOCKET_CLAIM_ALL_NEEDS_PRIORITY, DOCKET_CLONE_NOTHING_SELECTED, DOCKET_CLONE_REPORT_MISMATCH, DOCKET_CLONE_TOO_MANY_REPOS, DOCKET_DESIGN_NOTHING_DERIVED, DOCKET_DESIGN_NOT_APPROVABLE, DOCKET_GATEKEEPER_ONLY_ON_GROUP, DOCKET_HANDOVER_REPO_UNKNOWN, DOCKET_ITEM_DUE_INVALID, DOCKET_ITEM_NOT_BEFORE_INVALID, DOCKET_ITEM_NOT_IN_PROJECT, DOCKET_KEY_TARGETS_FIXED, DOCKET_LINK_INVALID, DOCKET_PLANS_CREATED_INVALID, DOCKET_PROJECT_PATH_FORMAT, DOCKET_PR_REPOS_MISMATCH, DOCKET_QUESTION_PROJECT_NOT_IN_EPIC_GROUP, DOCKET_QUESTION_TARGET_AMBIGUOUS, DOCKET_RELEASE_REPOS_MISMATCH, DOCKET_REPORT_ALSO_ITEMS_DUPLICATE, DOCKET_REPO_PATH_INVALID, DOCKET_REVIEW_FINDINGS_MISMATCH, DOCKET_REVIEW_UNSUPPORTED, DOCKET_SLUG_FORMAT, DOCKET_SUBPROJECT_TOO_DEEP, DOCKET_TOOL_REQUIRED, DOCKET_TRAIN_REPORT_MISMATCH, KNOWLEDGE_CYCLE, KNOWLEDGE_ENTRY_INVALID, KNOWLEDGE_TOO_DEEP, KNOWLEDGE_TOO_MANY, PARSE_ERROR. |
401 | HTTP 401; errorCode: EXPIRED, INVALID_KEY, MISSING_API_KEY, REVOKED, UNAUTHORIZED. |
402 | HTTP 402; errorCode: PAYMENT_REQUIRED. |
403 | HTTP 403; errorCode: DOCKET_AUTHOR_MAY_NOT_APPROVE, DOCKET_DEPLOY_CANDIDATE_KEY_ADMIN_ONLY, DOCKET_DEPLOY_DONE_BY_OBSERVER, DOCKET_DEPLOY_DONE_BY_TORSTEN, DOCKET_FORBIDDEN, DOCKET_HUMAN_ONLY, DOCKET_IMPORT_SETUP_ONLY, DOCKET_ITEM_HELD_BY_LANE, DOCKET_KEY_REQUIRED, DOCKET_KEY_TARGET_FORBIDDEN, DOCKET_KEY_UNBOUND, DOCKET_MAINTENANCE_KEY_ADMIN_ONLY, DOCKET_MERGE_SESSION_KEY_ADMIN_ONLY, DOCKET_OBSERVER_KEY_ADMIN_ONLY, DOCKET_ORIGIN_FORBIDDEN, DOCKET_REVIEWER_KEY_ADMIN_ONLY, DOCKET_SETUP_KEY_ADMIN_ONLY, DOCKET_SETUP_KEY_CREATOR_NOT_ADMIN, DOCKET_SETUP_PACKAGE_AGENT_ONLY, DOCKET_TOOL_DENIED, ENTITLEMENT_DENIED, FORBIDDEN, organization-membership-001, organization-membership-002. |
404 | HTTP 404; errorCode: DOCKET_APPROVAL_RULE_NOT_FOUND, DOCKET_ASSIGNMENT_NOT_FOUND, DOCKET_ATTACHMENT_NOT_FOUND, DOCKET_COMMENT_NOT_FOUND, DOCKET_CUSTOMER_REQUEST_NOT_FOUND, DOCKET_DEPLOY_CANDIDATE_UNKNOWN, DOCKET_DEPLOY_SERVICE_UNKNOWN, DOCKET_EPIC_NOT_FOUND, DOCKET_GITHUB_REPO_NOT_FOUND, DOCKET_GROUP_NOT_FOUND, DOCKET_ITEM_NOT_FOUND, DOCKET_KEY_NOT_FOUND, DOCKET_LEASE_NOT_FOUND, DOCKET_MACHINE_NOT_FOUND, DOCKET_PROJECT_NOT_FOUND, DOCKET_PR_NOT_FOUND, DOCKET_QUESTION_NOT_FOUND, DOCKET_TARGET_NOT_FOUND, DOCKET_TARGET_UNKNOWN, DOCKET_TRAIN_NOT_FOUND, DOCKET_UNKNOWN_TOOL, KNOWLEDGE_NOT_FOUND, NOT_FOUND, ORGANIZATION_NOT_FOUND. |
405 | HTTP 405; errorCode: METHOD_NOT_SUPPORTED. |
408 | HTTP 408; errorCode: TIMEOUT. |
409 | HTTP 409; errorCode: CONFLICT, DOCKET_ACTION_PENDING, DOCKET_ACTION_WRONG_STATUS, DOCKET_ATTACHMENT_LIMIT_REACHED, DOCKET_COMMENT_ALREADY_RESOLVED, DOCKET_DEPLOY_APPROVAL_NOT_NEEDED, DOCKET_DEPLOY_CANDIDATE_CLOSED, DOCKET_DEPLOY_NOT_APPROVED, DOCKET_DEPLOY_SERVICE_EXISTS, DOCKET_GITHUB_REPO_BUSY, DOCKET_GITHUB_REPO_TAKEN, DOCKET_IMPORT_DEFER_CHANGED, DOCKET_IMPORT_DEFER_LEASED, DOCKET_IMPORT_DEFER_NOT_IMPORTED, DOCKET_IMPORT_DEFER_OPEN_PRS, DOCKET_IMPORT_STATUS_CHANGED, DOCKET_IMPORT_STATUS_LEASED, DOCKET_IMPORT_STATUS_NOT_IMPORTED, DOCKET_IMPORT_STATUS_OPEN_PRS, DOCKET_INVALID_TRANSITION, DOCKET_ITEM_BUSY, DOCKET_ITEM_CUSTOMER_REQUESTS_FULL, DOCKET_ITEM_REPOS_LEASED, DOCKET_KEY_ALREADY_ACTIVE, DOCKET_LEASE_ENDED, DOCKET_MACHINE_HAS_ACTIVE_KEY, DOCKET_MACHINE_IS_MERGE_SESSION, DOCKET_MACHINE_NAME_TAKEN, DOCKET_NEED_CYCLE, DOCKET_NO_OPEN_QUESTION, DOCKET_OPEN_COMMENTS, DOCKET_PR_NOT_LINKED, DOCKET_PR_TARGET_MISMATCH, DOCKET_QUESTION_ALREADY_ACKNOWLEDGED, DOCKET_QUESTION_ALREADY_ANSWERED, DOCKET_QUESTION_KIND, DOCKET_QUESTION_MESSAGES_FULL, DOCKET_QUESTION_NOT_OPEN, DOCKET_REGISTER_NUMBER_TAKEN, DOCKET_RELEASE_BY_MERGE, DOCKET_RELEASE_CORRECTION_HAD_VERSION, DOCKET_RELEASE_CORRECTION_NOT_RELEASED, DOCKET_RELEASE_CORRECTION_NOT_REPORTED, DOCKET_REPORT_ITEM_HAS_LEASE, DOCKET_REPORT_ITEM_NOT_RELEASED, DOCKET_REVIEW_HEAD_STALE, DOCKET_REVIEW_LEASE_ENDED, DOCKET_REVIEW_REQUIRED, DOCKET_SLUG_TAKEN, DOCKET_STALE_REVISION, DOCKET_TRAIN_LEASE_ENDED, KNOWLEDGE_IN_USE, KNOWLEDGE_REPO_TAKEN. |
412 | HTTP 412; errorCode: PRECONDITION_FAILED. |
413 | HTTP 413; errorCode: DOCKET_ATTACHMENT_QUOTA_EXCEEDED, DOCKET_ATTACHMENT_TOO_LARGE, PAYLOAD_TOO_LARGE. |
415 | HTTP 415; errorCode: DOCKET_ATTACHMENT_TYPE_NOT_ALLOWED, UNSUPPORTED_MEDIA_TYPE. |
422 | HTTP 422; errorCode: DOCKET_DEPLOY_NO_FRONTEND, DOCKET_EPIC_NOT_IN_GROUP, DOCKET_EPIC_UNKNOWN, DOCKET_IMPORT_PRIORITY_NOT_ALLOWED, DOCKET_ITEM_NOT_IN_GROUP, DOCKET_ITEM_REPO_UNKNOWN, DOCKET_QUESTION_ASSIGNEE_NO_ACCESS, UNPROCESSABLE_CONTENT. |
428 | HTTP 428; errorCode: PRECONDITION_REQUIRED. |
429 | HTTP 429; errorCode: QUOTA_EXCEEDED, RATE_LIMITED, TOO_MANY_REQUESTS. |
499 | HTTP 499; errorCode: CLIENT_CLOSED_REQUEST. |
500 | HTTP 500; errorCode: INTERNAL_SERVER_ERROR and any errorCode not listed in this document. |
501 | HTTP 501; errorCode: NOT_IMPLEMENTED. |
502 | HTTP 502; errorCode: BAD_GATEWAY. |
503 | HTTP 503; errorCode: DOCKET_ATTACHMENT_STORAGE_UNAVAILABLE, SERVICE_UNAVAILABLE. |
504 | HTTP 504; errorCode: GATEWAY_TIMEOUT. |
Herramientas
95 herramientas en 20 áreas. Las descripciones de las herramientas están en el original en inglés.
attachment.get
POST /agent/tools/attachment.get
Read one attachment: { attachment, url, grund }. Over MCP an image up to 5 MB comes as image content and a text file up to 256 KB as text content; otherwise url is a download link valid for 5 minutes. Without object storage url is null and grund is kein-object-storage. An unknown attachment is DOCKET_ATTACHMENT_NOT_FOUND.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
id | string (uuid) | sí |
Salida
| Campo | Tipo | Siempre presente | Descripción |
|---|---|---|---|
attachment | object | sí | |
attachment.id | string | sí | |
attachment.itemId | string | sí | |
attachment.fileName | string | sí | |
attachment.mimeType | "image/png" | "image/jpeg" | "image/webp" | "application/pdf" | "text/markdown" | "text/plain" | sí | |
attachment.sizeBytes | integer | sí | |
attachment.authorId | string | sí | |
attachment.createdAt | string | sí | ISO 8601 timestamp |
url | string | null | sí | |
grund | "kein-object-storage" | null | sí | |
mcpInhalt | any | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
attachment.list
POST /agent/tools/attachment.list
List the attachments of an item (screenshots, PDFs, text files), oldest first: { id, itemId, fileName, mimeType, sizeBytes, authorId, createdAt }. Read one with attachment.get.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Salida
| Campo | Tipo | Siempre presente | Descripción |
|---|---|---|---|
[].id | string | sí | |
[].itemId | string | sí | |
[].fileName | string | sí | |
[].mimeType | "image/png" | "image/jpeg" | "image/webp" | "application/pdf" | "text/markdown" | "text/plain" | sí | |
[].sizeBytes | integer | sí | |
[].authorId | string | sí | |
[].createdAt | string | sí | ISO 8601 timestamp |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
cloneRequest.next
POST /agent/tools/cloneRequest.next
Fetch the oldest open clone request of your machine and mark it claimed. Returns { request: { id, repos: [{ repo, path, knowledge? }] } } (path relative to your work root, "." = the root repo, null = none set; knowledge: true marks a knowledge base of the group, a code repo has no such field) or { nothing: true }. Clone each repo, then call cloneRequest.report.
Entrada
Sin campos; el cuerpo es {}.
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
cloneRequest.report
POST /agent/tools/cloneRequest.report
Report the result of a claimed clone request: one entry per repo of the request (result cloned, exists, exists-other-remote or failed; reason only with failed or exists-other-remote). A missing, doubled or foreign repo is DOCKET_CLONE_REPORT_MISMATCH. Returns { status } (failed as soon as one repo failed, otherwise done).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
requestId | string (uuid) | sí | |
results | object[] | sí | al menos 1 elementos, como máximo 100 elementos |
results[].repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
results[].result | "cloned" | "exists" | "exists-other-remote" | "failed" | sí | |
results[].reason | string | no | al menos 1 caracteres, como máximo 500 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
customerRequest.import
POST /agent/tools/customerRequest.import
Import a customer request (KW-n) from the register with its fixed number, title, optional description, received date and linked items of the same group. A number already taken is a conflict. Setup keys only.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
groupId | string (uuid) | sí | |
number | integer | sí | desde 1, hasta 999999 |
title | string | sí | al menos 1 caracteres, como máximo 300 caracteres |
description | string | no | como máximo 5000 caracteres |
receivedOn | string (date) | no | |
itemIds | string (uuid)[] | no | como máximo 500 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
dashboard.get
POST /agent/tools/dashboard.get
Dashboard of a project, a group or the whole organisation (target { kind: "org" } without id: all projects you can see; the answer names the organisation id): counts by status and priority, counts by status per project, epics, what waits for you, work in progress (item, item number, machine, lane, lease end, last report, last signal), machines (last heartbeat, load), usage of the last 7 days per project and approved items that cannot be claimed (without repos, open need, waiting for an answer), the latest merge train and merged version per repo of the group (organisation: of the groups of the projects you can see), and pull requests waiting for review with their item, project, effective priority and item status (oldest first, at most 100); questions for you and assigned to you carry the effective priority and status of their item (null without item).
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
target | object | sí |
target.kind | "org" | "project" | "project_group" | sí |
target.id | string (uuid) | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
deploy.list
POST /agent/tools/deploy.list
List the deploy services of the organisation by name, each with the running versions { backend, frontend }, the open candidate (ready or approved) and the last done candidate (null if none).
Entrada
Sin entrada.
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
deploy.markDone
POST /agent/tools/deploy.markDone
Mark a deploy candidate done after the deploy has run: only for a service deployed by the observer (else DOCKET_DEPLOY_DONE_BY_TORSTEN), and without standing approval only once a human approved it (else DOCKET_DEPLOY_NOT_APPROVED). The versions become the running versions of the packages; pull requests with "Needs-deployed:" on them are re-evaluated. Done or superseded ⇒ DOCKET_DEPLOY_CANDIDATE_CLOSED. Returns the candidate.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
candidateId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
deploy.reportCandidate
POST /agent/tools/deploy.reportCandidate
Report the versions of a service that are ready to deploy (service: its name; backendVersion and frontendVersion: SemVer up to 50; frontendVersion only for a service with a frontend package, else DOCKET_DEPLOY_NO_FRONTEND). The open candidate of the service becomes superseded. Unknown service ⇒ DOCKET_DEPLOY_SERVICE_UNKNOWN. Returns { candidate, supersededId }.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
service | string | sí | al menos 1 caracteres, como máximo 60 caracteres |
backendVersion | string | sí | como máximo 50 caracteres |
frontendVersion | string | no | como máximo 50 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
deploy.serviceCreate
POST /agent/tools/deploy.serviceCreate
Create a deploy service of the organisation (admin). name: slug up to 60 characters, stored lower-case and unique in the organisation (else DOCKET_DEPLOY_SERVICE_EXISTS); backendPackage and frontendPackage: npm names up to 214 characters (frontendPackage null = no frontend); deployedBy: observer (deployed with a deploy-candidate key) or torsten (deployed by a human, marked done in the browser); standingApproval: the observer deploys without a human approval of each candidate. Returns the service.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
name | string | sí | al menos 1 caracteres, como máximo 60 caracteres |
backendPackage | string | sí | como máximo 214 caracteres |
frontendPackage | string | null | no | |
deployedBy | "observer" | "torsten" | sí | |
standingApproval | boolean | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
deploy.serviceUpdate
POST /agent/tools/deploy.serviceUpdate
Change a deploy service (admin); only the given fields. name: slug up to 60 characters, stored lower-case and unique in the organisation (else DOCKET_DEPLOY_SERVICE_EXISTS); backendPackage and frontendPackage: npm names up to 214 characters (frontendPackage null = no frontend); deployedBy: observer (deployed with a deploy-candidate key) or torsten (deployed by a human, marked done in the browser); standingApproval: the observer deploys without a human approval of each candidate. Nothing changed ⇒ nothing is written. Returns { service, changed, fields }.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
id | string (uuid) | sí | |
name | string | no | al menos 1 caracteres, como máximo 60 caracteres |
backendPackage | string | no | como máximo 214 caracteres |
frontendPackage | string | null | no | |
deployedBy | "observer" | "torsten" | no | |
standingApproval | boolean | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
deployedVersion.report
POST /agent/tools/deployedVersion.report
Report the version of a package that runs now, after a deploy (package: npm name up to 214 characters, version: SemVer 2.0 up to 50). One row per package and organisation: the report replaces the previous version, also with a lower one (rollback); the same version again is no error. Pull requests with a "Needs-deployed:" line on the package are re-evaluated at once: a ready one whose need no longer holds returns to waiting for needs, one in a train stays. "Needs:" lines keep measuring published versions. Returns { id, package, version, reportedBy, at }.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
package | string | sí | como máximo 214 caracteres |
version | string | sí | como máximo 50 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
epic.import
POST /agent/tools/epic.import
Import an epic (EP-n) from the register: the epic with that number, else the one titled EP-NNN in the group, else a new one; sets number, title, description, area and start date and links the given items of the group. Setup keys only.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
groupId | string (uuid) | sí | |
number | integer | sí | desde 1, hasta 999999 |
title | string | sí | al menos 1 caracteres, como máximo 300 caracteres |
description | string | no | como máximo 5000 caracteres |
area | string | no | como máximo 200 caracteres |
startedOn | string (date) | no | |
itemIds | string (uuid)[] | no | como máximo 500 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
epic.list
POST /agent/tools/epic.list
List the epics you can see, optionally in one group, each with its number, area, start date and progress over its items.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
groupId | string (uuid) | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
githubRepo.add
POST /agent/tools/githubRepo.add
Register a GitHub repository (owner/name) for a project group; docket then accepts its webhooks.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroupId | string (uuid) | sí | |
fullName | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
githubRepo.list
POST /agent/tools/githubRepo.list
List the GitHub repositories of a project group, each with majorBacklog { count, oldestSince, due }: items merged to a branch other than main that wait for the major cut.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
projectGroupId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
githubRepo.listForOrg
POST /agent/tools/githubRepo.listForOrg
List every GitHub repository of the organisation (any of them can be added to an item): repo, path, groupId, and groupName (null for groups outside your access).
Entrada
Sin entrada.
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
githubRepo.move
POST /agent/tools/githubRepo.move
Move a registered repository to another project group of the organisation, together with its pull requests and merge trains; secret, path and lease lock stay. Same group ⇒ changed false. A running merge train of the repository ⇒ DOCKET_GITHUB_REPO_BUSY.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
id | string (uuid) | sí |
projectGroupId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
githubRepo.setLeaseLock
POST /agent/tools/githubRepo.setLeaseLock
Switch the lease lock of a registered repository (owner/name) of a project group: false ⇒ lanes may work on it at the same time, true ⇒ one lane at a time. Same value ⇒ changed false.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroupId | string (uuid) | sí | |
repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
leaseLock | boolean | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
githubRepo.webhookSecret
POST /agent/tools/githubRepo.webhookSecret
Return the webhook secret of a registered repository; creates it once if the repository has none.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroupId | string (uuid) | sí | |
repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.addNeed
POST /agent/tools/item.addNeed
Record that itemId needs needsItemId (P-n or uuid): lease.claim hands out itemId only once needsItemId is released or done. Owner of the project of itemId (an org admin only with a setup key; over an agent key the org role is always member); needsItemId must be visible to you. Already there ⇒ no change; a cycle (also the item itself) ⇒ DOCKET_NEED_CYCLE. Returns { itemId, needs }.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
needsItemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.addRepo
POST /agent/tools/item.addRepo
Add one GitHub repo (owner/name) to an item. The repo must be registered in the organisation, in any group (else DOCKET_ITEM_REPO_UNKNOWN; its reason names the repo and the way to register it: docket-cli github setup --repo <owner/name>, githubRepo.add); already there (case-insensitive) ⇒ changed false; while a lane holds the item ⇒ DOCKET_ITEM_REPOS_LEASED. Setup keys only.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.comment
POST /agent/tools/item.comment
Comment on an item as a whole (no anchor, any status). It does not block approval and shows in the item history. With toLane: true the comment goes to the lane: lease.claim returns the open lane comments of the item in comments, lease.renew those written since the last claim or renew.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
text | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
toLane | true | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.correctImportStatus
POST /agent/tools/item.correctImportStatus
Correct the status of an item that item.import set wrongly: approved becomes released. Only for an imported item that never left approved and has no active lease and no open pull request. reason says why (kept in the audit log). Setup keys only.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
status | "released" | sí | |
reason | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.correctReleasedStatus
POST /agent/tools/item.correctReleasedStatus
Set a released item back to approved when its release report carried no version (released without --version on an item with one repo). Only when the last lease of the item ended with a released report without versions; otherwise DOCKET_RELEASE_CORRECTION_HAD_VERSION, DOCKET_RELEASE_CORRECTION_NOT_REPORTED (released by the merge train or by import) or DOCKET_RELEASE_CORRECTION_NOT_RELEASED. Allowed for the owner of the project (an org admin only in the browser: over an agent key the org role is always member) and for the key whose lease ended with released; note is required and becomes a comment on the item. Returns { item }.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
status | "approved" | sí | |
note | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.create
POST /agent/tools/item.create
Create an item (design, plan or issue) in a project, optionally in an epic and with its GitHub repos (owner/name). The rank is set by a human. If the group does not require approval, the item starts approved.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId | string (uuid) | sí | |
kind | "issue" | "plan" | "design" | sí | |
title | string | sí | al menos 1 caracteres, como máximo 200 caracteres |
body | string | sí | al menos 1 caracteres, como máximo 256000 caracteres |
epicId | string (uuid) | null | no | |
rank | "🔴" | "🟠" | "🟡" | "⚪" | null | no | |
repos | string[] | no | como máximo 100 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.createDraft
POST /agent/tools/item.createDraft
Create a draft item (design, plan or issue) in a project, optionally with its GitHub repos (owner/name). The item starts in status "draft". A repo not registered in the organisation is a 422 DOCKET_ITEM_REPO_UNKNOWN whose reason names it; an org admin registers it with a setup key: docket-cli github setup --group <group> --machine <machine> --repo <owner/name> (githubRepo.add). The head of body (the text before the first line starting with "## ") may link customer requests and an epic: a line "**Kundenwunsch**: KW-12, KW-14" links every KW-n of the line, a line "**Epic**: EP-3" sets the epic; both must belong to the group of the project. The answer then carries customerRequests (id, number, title) and the inherited effectivePriority; two different epics are a 400 on body. A line "**Nicht vor**: YYYY-MM-DD" in the head sets the not-before date (Europe/Berlin): lease.claim hands the item out only from that day on (reason not-before); an invalid date or two dates is a 400 DOCKET_ITEM_NOT_BEFORE_INVALID on body. A line "**Fällig**: YYYY-MM-DD" in the head sets the due date of the item, optionally with "**Erinnern ab**: YYYY-MM-DD" (remind from, at most the due date; without it the dashboard reminds 14 days before); an invalid date, two due dates or a reminder without a due date is a 400 DOCKET_ITEM_DUE_INVALID on body. "**Frist**: YYYY-MM-DD" counts like "**Fällig**", but only with a plain date; any other value stays text. item.get and item.list return dueAt and remindFrom. derivedFrom (at most 10 designs, uuid or P-n) links a new plan to the designs it comes from; anything but design to plan is DOCKET_LINK_INVALID.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId | string (uuid) | sí | |
kind | "issue" | "plan" | "design" | sí | |
title | string | sí | al menos 1 caracteres, como máximo 200 caracteres |
body | string | sí | al menos 1 caracteres, como máximo 256000 caracteres |
repos | string[] | no | como máximo 100 elementos |
derivedFrom | (string (uuid) | string)[] | no | como máximo 10 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.deferImported
POST /agent/tools/item.deferImported
Defer an item that item.import created: lease.claim no longer hands it out until a human clears it (item.clearDeferred). Only for an imported item that never left approved and has no active lease and no open pull request; the status stays approved. reason says why (shown on the dashboard, kept in the audit log). Already deferred: the old reason stays and changed is false. Setup keys only.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
reason | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.delete
POST /agent/tools/item.delete
Delete an item with everything attached to it (author, owner or admin). A lane holds it or its pull request is in a running merge train ⇒ DOCKET_ITEM_BUSY; in progress ⇒ DOCKET_FORBIDDEN. Call item.deletePreview first: it counts what goes with it.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.deletePreview
POST /agent/tools/item.deletePreview
Count what item.delete would remove with the item and whether it is busy (never DOCKET_ITEM_BUSY); same rights as item.delete, also while the item is in progress.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.firstTrees
POST /agent/tools/item.firstTrees
For every precedence (first) set on an item, an epic or a customer request you can see, how much of its need tree could run in parallel now: [{ kind (item, epic or customerRequest), id, number, title, firstAt, parallel { startNow, waitingNeed, waitingRepo, waitingOther, inProgress }, truncated }], oldest firstAt first, at most 20. An epic or customer request counts only with at least one item you can see; nodes in projects you cannot see do not count. truncated: true if the tree has more than 500 nodes (only the loaded ones count). A hint only: lease.claim hands out as before.
Entrada
Sin entrada.
Salida
| Campo | Tipo | Siempre presente | Descripción |
|---|---|---|---|
[].kind | "item" | "epic" | "customerRequest" | sí | |
[].id | string | sí | |
[].number | integer | null | sí | |
[].title | string | sí | |
[].firstAt | string | sí | ISO 8601 timestamp |
[].parallel | object | sí | |
[].parallel.startNow | integer | sí | |
[].parallel.waitingNeed | integer | sí | |
[].parallel.waitingRepo | integer | sí | |
[].parallel.waitingOther | integer | sí | |
[].parallel.inProgress | integer | sí | |
[].truncated | boolean | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.get
POST /agent/tools/item.get
Read one item with all revisions and your effective roles in its project, plus its pull requests (repo, number, status, readiness reason, needs, train, review of the current head; at most 100) and neededBy (the items that need this one, with project and group; items you cannot read only as the count neededByHidden), and lastLeaseEndReason (why its last ended lease ended, e.g. waiting-for-answer or fulfilled; null if none), and prNeeds: the Needs/Needs-deployed lines of its open pull requests (not closed, merged or invalid) as one entry per package, op, version and deployed, each with resolved (the smallest published, or for deployed the running, version that satisfies it; null if none) and prs (<repo>#<n> of the open pull requests that carry it), and waitsForMajor: the target branch of a merged pull request of the current revision that went to a branch other than main and waits for the next major release of its repo (null if none; such an approved item is not claimable, reason waits-for-major), and latestStage: how far the item got, derived and never stored (null without any lease or report): stage started (a lease or a report), implemented (an open or draft pull request in its repos, also after a release, or a pr-opened report), merged (every repo of the item merged or unchanged), released (every repo done and at least one real version; releases lists { repo, package, version }, package null from a released report) or deployed (a deploy service with that package ran a version at least as high by semver; deployed { service, version, at } of the earliest such deploy, else null); noRelease lists the repos done without a release (no-release, no train, train expired). A pull request closed without merge does not count.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Salida
| Campo | Tipo | Siempre presente | Descripción |
|---|---|---|---|
item | object | sí | |
item.id | string | sí | |
item.number | integer | null | sí | |
item.projectId | string | sí | |
item.kind | "issue" | "plan" | "design" | sí | |
item.epicId | string | null | sí | |
item.title | string | sí | |
item.status | "draft" | "in review" | "approved" | "in progress" | "released" | "done" | "superseded" | sí | |
item.priority | "low" | "medium" | "high" | "immediately" | null | sí | |
item.effectivePriority | "low" | "medium" | "high" | "immediately" | "first" | sí | |
item.effectiveSource | "own" | "epic" | "kw" | "rank" | "default" | object | sí | |
item.effectiveSource.neededBy | object | sí | |
item.effectiveSource.neededBy.itemId | string | no | |
item.effectiveSource.neededBy.number | integer | no | |
item.effectiveSource.neededBy.hidden | true | no | |
item.firstAt | string | null | sí | |
item.rank | "🔴" | "🟠" | "🟡" | "⚪" | null | sí | |
item.currentRevision | integer | sí | |
item.createdBy | string | sí | |
item.createdAt | string | sí | ISO 8601 timestamp |
item.updatedAt | string | sí | ISO 8601 timestamp |
item.approvedRevision | integer | null | sí | |
item.approvedAt | string | null | sí | |
item.approvedByRule | boolean | sí | |
item.repos | string[] | sí | |
item.supersededBy | string | null | sí | |
item.supersededAt | string | null | sí | |
item.supersededByUserId | string | null | sí | |
item.supersededNote | string | null | sí | |
item.supersededRef | string | null | sí | |
item.deferredReason | string | null | sí | |
item.dueAt | string | null | sí | |
item.remindFrom | string | null | sí | |
item.notBefore | string | null | sí | |
item.requestedAction | "revise" | "plan" | null | sí | |
revisions | object[] | sí | |
revisions[].itemId | string | sí | |
revisions[].nr | integer | sí | |
revisions[].body | string | sí | |
revisions[].authorId | string | sí | |
revisions[].createdAt | string | sí | ISO 8601 timestamp |
myRoles | ("admin" | "gatekeeper" | "owner" | "contributor")[] | sí | |
needs | object[] | sí | |
needs[].itemId | string | sí | |
needs[].title | string | sí | |
needs[].status | "draft" | "in review" | "approved" | "in progress" | "released" | "done" | "superseded" | sí | |
needs[].met | boolean | sí | |
neededBy | object[] | sí | |
neededBy[].itemId | string | sí | |
neededBy[].title | string | sí | |
neededBy[].projectId | string | sí | |
neededBy[].groupId | string | sí | |
neededByHidden | integer | sí | |
pullRequests | object[] | sí | |
pullRequests[].id | string | sí | |
pullRequests[].repo | string | sí | |
pullRequests[].number | integer | sí | |
pullRequests[].revisionNr | integer | null | sí | |
pullRequests[].branch | string | sí | |
pullRequests[].headSha | string | sí | |
pullRequests[].status | "waiting for approval" | "waiting for review" | "waiting for needs" | "ready" | "in train" | "merged" | "red" | "conflict" | "closed" | "invalid" | sí | |
pullRequests[].readinessReason | "item-not-approved" | "repo-not-in-item" | "revision-mismatch" | "review-missing" | "review-findings" | "review-disabled" | "needs-unmet" | "draft" | "wip-quota" | null | sí | |
pullRequests[].invalidCode | "DOCKET_PR_LINE_INVALID" | "DOCKET_PR_FOREIGN_GROUP" | "DOCKET_DUPLICATE_PR" | "DOCKET_PR_LINE_MISSING" | null | sí | |
pullRequests[].endReason | string | null | sí | |
pullRequests[].needs | object[] | sí | |
pullRequests[].needs[].package | string | sí | |
pullRequests[].needs[].op | ">=" | ">" | sí | |
pullRequests[].needs[].version | string | sí | |
pullRequests[].needs[].deployed | true | no | |
pullRequests[].trainId | string | null | sí | |
pullRequests[].updatedAt | string | sí | ISO 8601 timestamp |
pullRequests[].review | object | null | sí | |
pullRequests[].review.result | "passed" | "findings" | sí | |
pullRequests[].review.headSha | string | sí | |
pullRequests[].review.at | string | sí | ISO 8601 timestamp |
lease | object | null | sí | |
lease.leaseId | string | sí | |
lease.machineId | string | sí | |
lease.machineName | string | sí | |
lease.lane | string | sí | |
lease.startedAt | string | sí | ISO 8601 timestamp |
lease.expiresAt | string | sí | ISO 8601 timestamp |
lastLeaseEndReason | "given-up" | "waiting-for-answer" | "expired" | "revoked" | "ended-by-owner" | "revision" | "released" | "pr-opened" | "fulfilled" | "deferred" | "superseded" | "quota" | null | sí | |
customerRequests | object[] | sí | |
customerRequests[].id | string | sí | |
customerRequests[].number | integer | sí | |
customerRequests[].title | string | sí | |
prNeeds | object[] | sí | |
prNeeds[].package | string | sí | |
prNeeds[].op | ">=" | ">" | sí | |
prNeeds[].version | string | sí | |
prNeeds[].deployed | true | no | |
prNeeds[].resolved | string | null | sí | |
prNeeds[].prs | string[] | sí | |
waitsForMajor | string | null | sí | |
latestStage | object | null | sí | |
latestStage.stage | "started" | "implemented" | "merged" | "released" | "deployed" | sí | |
latestStage.releases | object[] | sí | |
latestStage.releases[].repo | string | sí | |
latestStage.releases[].package | string | null | sí | |
latestStage.releases[].version | string | sí | |
latestStage.noRelease | string[] | sí | |
latestStage.deployed | object | null | sí | |
latestStage.deployed.service | string | sí | |
latestStage.deployed.version | string | sí | |
latestStage.deployed.at | string | sí | ISO 8601 timestamp |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.history
POST /agent/tools/item.history
Read the history of one item, newest first: status changes, leases (machineName, lane, endedAt, endReason, rework: true for a lease claimed to rework a pull request), reports (with prs [{ repo, number }] and versions of the report, also on an item named in alsoItems), revisions, audit events and free comments (comment with commentId, authorId, the whole text and toLane), at most limit entries (1–200, default 100). trackedSince is the oldest recorded status change of the organisation. Use it to read back a comment you wrote with item.comment.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
limit | integer | sí | desde 1, hasta 200, por defecto 100 |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
trackedSince | string | null | sí |
entries | any[] | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.import
POST /agent/tools/item.import
Import an item from its source file in its target status (approved, released or done) without review, optionally with rank, priority immediately (only with a KW-NNN entry in customerRequests), customerRequests naming customer requests KW-NNN of the group of the project (each linked to the item; never created, unknown is 404 DOCKET_CUSTOMER_REQUEST_NOT_FOUND, one of another group 403; tags is the deprecated old name of customerRequests with the same meaning, both at once is 400), an existing epic of the group of the project (epicTitle EP-NNN matches the epic number, any other text the exact title; never created, unknown is 422 DOCKET_EPIC_UNKNOWN), its GitHub repos and, only with status approved, deferredReason to create it deferred (lease.claim skips it until a human clears it). With sourceRef (REQUIREMENTS/….md@<sha>) a repeat is safe: the path without the sha is unique per organisation, and a known path writes nothing, runs no other check and answers imported false with the existing item, its current revision and status. Setup keys only.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId | string (uuid) | sí | |
kind | "issue" | "plan" | "design" | sí | |
title | string | sí | al menos 1 caracteres, como máximo 200 caracteres |
body | string | sí | al menos 1 caracteres, como máximo 256000 caracteres |
status | "approved" | "released" | "done" | sí | |
rank | "🔴" | "🟠" | "🟡" | "⚪" | null | no | |
priority | "immediately" | no | |
customerRequests | string[] | no | como máximo 5 elementos |
tags | string[] | no | como máximo 5 elementos |
epicTitle | string | no | al menos 1 caracteres, como máximo 300 caracteres |
repos | string[] | no | como máximo 100 elementos |
deferredReason | string | no | al menos 1 caracteres, como máximo 5000 caracteres |
sourceRef | string | no | como máximo 300 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.lineage
POST /agent/tools/item.lineage
Read where an item comes from and what came from it: derivedFrom (designs) and derived (plans), each with id, number, kind, title, status and projectId. Items you cannot see only count in hidden.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.link
POST /agent/tools/item.link
Link a plan to the design it comes from: from is the design, to the plan (uuid or P-n). You need write access to both projects; other kinds or the item itself ⇒ DOCKET_LINK_INVALID, more than 50 plans per design or 10 designs per plan as well. An existing link is no error.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
from | string (uuid) | string | sí |
to | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.list
POST /agent/tools/item.list
List items you can see, optionally filtered by project, group, status, kind, priority, epic or machine. Project, status, kind, priority, epic and machine take one value or a list (any of them); filters combine with AND; machine means an active lease on that machine. forGroup (a group id) lists the work for that group in projects of other groups: items that an item of the group needs. Each item lists its lease (machineId, machineName, lane of its active lease, or null) and lastLeaseEndReason (why its last ended lease ended, or null), plus notClaimable: why an approved item is not claimable (waits-for-major, deferred, without-repos, open-need, waiting-for-answer, given-up-recently; the same reasons as dashboard.get, [] if claimable or not approved), and givenUp: { until, note, lane, machineName } of the given-up-recently block (end of the block, the note, the lane and the machine name of the given-up lease, the same as dashboard.get) exactly when notClaimable has given-up-recently, otherwise null. notClaimable: true lists only items with a reason, false only items without one. Each item also lists prNeeds, waitsForMajor and latestStage as item.get does; needsPackage (an npm name) lists only items with an unresolved need for that package in an open pull request, needsVersion only those whose unresolved need names exactly that version.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId | string (uuid) | string (uuid)[] | no | |
groupId | string (uuid) | no | |
status | "draft" | "in review" | "approved" | "in progress" | "released" | "done" | "superseded" | ("draft" | "in review" | "approved" | "in progress" | "released" | "done" | "superseded")[] | no | |
kind | "issue" | "plan" | "design" | ("issue" | "plan" | "design")[] | no | |
priority | "low" | "medium" | "high" | "immediately" | "first" | ("low" | "medium" | "high" | "immediately" | "first")[] | no | |
epicId | string (uuid) | string (uuid)[] | no | |
machineId | string (uuid) | string (uuid)[] | no | |
forGroup | string (uuid) | no | |
notClaimable | boolean | no | |
needsPackage | string | no | al menos 1 caracteres, como máximo 214 caracteres |
needsVersion | string | no | al menos 1 caracteres, como máximo 50 caracteres |
Salida
| Campo | Tipo | Siempre presente | Descripción |
|---|---|---|---|
[].id | string | sí | |
[].number | integer | null | sí | |
[].projectId | string | sí | |
[].kind | "issue" | "plan" | "design" | sí | |
[].epicId | string | null | sí | |
[].title | string | sí | |
[].status | "draft" | "in review" | "approved" | "in progress" | "released" | "done" | "superseded" | sí | |
[].priority | "low" | "medium" | "high" | "immediately" | null | sí | |
[].effectivePriority | "low" | "medium" | "high" | "immediately" | "first" | sí | |
[].effectiveSource | "own" | "epic" | "kw" | "rank" | "default" | object | sí | |
[].effectiveSource.neededBy | object | sí | |
[].effectiveSource.neededBy.itemId | string | no | |
[].effectiveSource.neededBy.number | integer | no | |
[].effectiveSource.neededBy.hidden | true | no | |
[].firstAt | string | null | sí | |
[].rank | "🔴" | "🟠" | "🟡" | "⚪" | null | sí | |
[].currentRevision | integer | sí | |
[].createdBy | string | sí | |
[].createdAt | string | sí | ISO 8601 timestamp |
[].updatedAt | string | sí | ISO 8601 timestamp |
[].approvedRevision | integer | null | sí | |
[].approvedAt | string | null | sí | |
[].approvedByRule | boolean | sí | |
[].repos | string[] | sí | |
[].supersededBy | string | null | sí | |
[].supersededAt | string | null | sí | |
[].supersededByUserId | string | null | sí | |
[].supersededNote | string | null | sí | |
[].supersededRef | string | null | sí | |
[].deferredReason | string | null | sí | |
[].dueAt | string | null | sí | |
[].remindFrom | string | null | sí | |
[].notBefore | string | null | sí | |
[].requestedAction | "revise" | "plan" | null | sí | |
[].openAnnotations | integer | sí | |
[].derivedCount | integer | sí | |
[].lease | object | null | sí | |
[].lease.machineId | string | sí | |
[].lease.machineName | string | sí | |
[].lease.lane | string | sí | |
[].lastLeaseEndReason | "given-up" | "waiting-for-answer" | "expired" | "revoked" | "ended-by-owner" | "revision" | "released" | "pr-opened" | "fulfilled" | "deferred" | "superseded" | "quota" | null | sí | |
[].stuckReason | "waiting-for-approval" | "needs-item" | "open-question" | "no-machine" | "pr-red" | "lease-expired-without-progress" | null | sí | |
[].lastMovementAt | string | sí | ISO 8601 timestamp |
[].notClaimable | ("not-approved" | "in-progress" | "pr-open" | "waits-for-major" | "superseded" | "design-session-only" | "no-requested-action" | "deferred" | "not-before" | "not-in-target" | "not-in-key-targets" | "without-repos" | "open-need" | "waiting-for-answer" | "repo-leased" | "repos-unknown" | "given-up-recently")[] | sí | |
[].givenUp | object | null | sí | |
[].givenUp.note | string | null | sí | |
[].givenUp.until | string | sí | ISO 8601 timestamp |
[].givenUp.lane | string | sí | |
[].givenUp.machineName | string | sí | |
[].prNeeds | object[] | sí | |
[].prNeeds[].package | string | sí | |
[].prNeeds[].op | ">=" | ">" | sí | |
[].prNeeds[].version | string | sí | |
[].prNeeds[].deployed | true | no | |
[].prNeeds[].resolved | string | null | sí | |
[].prNeeds[].prs | string[] | sí | |
[].waitsForMajor | string | null | sí | |
[].latestStage | object | null | sí | |
[].latestStage.stage | "started" | "implemented" | "merged" | "released" | "deployed" | sí | |
[].latestStage.releases | object[] | sí | |
[].latestStage.releases[].repo | string | sí | |
[].latestStage.releases[].package | string | null | sí | |
[].latestStage.releases[].version | string | sí | |
[].latestStage.noRelease | string[] | sí | |
[].latestStage.deployed | object | null | sí | |
[].latestStage.deployed.service | string | sí | |
[].latestStage.deployed.version | string | sí | |
[].latestStage.deployed.at | string | sí | ISO 8601 timestamp |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.markDone
POST /agent/tools/item.markDone
Mark an item done: released → done, or in progress → done after a fulfilled lease (owner of the project). Returns the item. Not while the item is in progress over a maintenance key (DOCKET_FORBIDDEN).
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.markSuperseded
POST /agent/tools/item.markSuperseded
Mark an item as superseded, either by another item (by: the item that replaces it or already did the work; note optional) or by work outside docket (byRef: a plan path, tag/SHA or decision, 1-300 characters; note required). Exactly one of by and byRef. The item goes to the final status superseded and loses its deferredReason; lease.claim never hands it out again, and a need on it counts as met when the chain ends at a byRef. From draft, in review, approved, in progress or superseded; released is DOCKET_INVALID_TRANSITION, and so is done, except with byRef for an owner of the project when the last lease of the item ended fulfilled (closes an item that was only marked done because nothing replaced it). While a lease holds the item it is DOCKET_ITEM_BUSY, unless leaseId names your own active lease on this item: that lease then ends with superseded. Use this instead of lease.release with deferred when you find the item replaced. On a superseded item the same by or byRef changes nothing, another one overwrites. Returns { item, changed }.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
by | string (uuid) | string | no | |
byRef | string | no | al menos 1 caracteres, como máximo 300 caracteres |
note | string | no | al menos 1 caracteres, como máximo 2000 caracteres |
leaseId | string (uuid) | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.move
POST /agent/tools/item.move
Move an item to another project of the organisation (owner or admin at source and target). Number, revisions, history, comments, approvals, tags, needs, pull requests and leases stay; its questions and usage rows move along. Same project ⇒ changed false. An epic or customer request of another group than the target ⇒ DOCKET_EPIC_NOT_IN_GROUP / DOCKET_ITEM_NOT_IN_GROUP, unless unlink: true (then the link is removed and named in unlinkedEpic / unlinkedCustomerRequests). A lane holding the item or a running merge train of its PRs ⇒ DOCKET_ITEM_BUSY. Setup keys only.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
projectId | string (uuid) | sí |
unlink | boolean | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.needTree
POST /agent/tools/item.needTree
The tree of what an item, an epic or a customer request needs (exactly one of itemId, epicId, customerRequestId; an epic or customer request starts at its items you can see). Returns rootIds and flat nodes { itemId, number, title, status, priority, effective: { priority, source, firstAt }, met, notClaimable, stuckReason, children }: children are the item ids the node needs (a superseded item counts as the end of its replacement chain), met means released or done, and a met node comes without its children. effective is the priority with precedence (first) and what the node inherits from the open items that need it. Each node also has repos, wave (1 if no child is open, else 1 + the largest wave of its open children; null when met) and parallelNow (could start now without sharing a repo with a node chosen before it). parallel { startNow, waitingNeed, waitingRepo, waitingOther, inProgress } counts every open node once. A hint only: lease.claim hands out as before. At most 500 nodes, truncated: true if there were more.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | no |
epicId | string (uuid) | no |
customerRequestId | string (uuid) | no |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
rootIds | string[] | sí |
nodes | object[] | sí |
nodes[].itemId | string | sí |
nodes[].number | integer | null | sí |
nodes[].title | string | sí |
nodes[].status | "draft" | "in review" | "approved" | "in progress" | "released" | "done" | "superseded" | sí |
nodes[].priority | "low" | "medium" | "high" | "immediately" | null | sí |
nodes[].effective | object | sí |
nodes[].effective.priority | "low" | "medium" | "high" | "immediately" | "first" | sí |
nodes[].effective.source | "own" | "epic" | "kw" | "rank" | "default" | object | sí |
nodes[].effective.source.neededBy | object | sí |
nodes[].effective.source.neededBy.itemId | string | no |
nodes[].effective.source.neededBy.number | integer | no |
nodes[].effective.source.neededBy.hidden | true | no |
nodes[].effective.firstAt | string | null | sí |
nodes[].met | boolean | sí |
nodes[].notClaimable | ("not-approved" | "in-progress" | "pr-open" | "waits-for-major" | "superseded" | "design-session-only" | "no-requested-action" | "deferred" | "not-before" | "not-in-target" | "not-in-key-targets" | "without-repos" | "open-need" | "waiting-for-answer" | "repo-leased" | "repos-unknown" | "given-up-recently")[] | sí |
nodes[].stuckReason | "waiting-for-approval" | "needs-item" | "open-question" | "no-machine" | "pr-red" | "lease-expired-without-progress" | null | sí |
nodes[].children | string[] | sí |
nodes[].repos | string[] | sí |
nodes[].wave | integer | null | sí |
nodes[].parallelNow | boolean | sí |
truncated | boolean | sí |
parallel | object | sí |
parallel.startNow | integer | sí |
parallel.waitingNeed | integer | sí |
parallel.waitingRepo | integer | sí |
parallel.waitingOther | integer | sí |
parallel.inProgress | integer | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.removeNeed
POST /agent/tools/item.removeNeed
Remove the need itemId → needsItemId (P-n or uuid). Owner of the project of itemId (an org admin only with a setup key; over an agent key the org role is always member); missing ⇒ no change. Returns { itemId, needs }.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
needsItemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.removeRepo
POST /agent/tools/item.removeRepo
Remove one GitHub repo (owner/name) from an item (case-insensitive). Not on the item ⇒ changed false; while a lane holds the item ⇒ DOCKET_ITEM_REPOS_LEASED. Setup keys only.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.rename
POST /agent/tools/item.rename
Change the title of an item (author, owner or admin; any status, no new revision). The same title after trimming ⇒ changed false. Not while the item is in progress (DOCKET_FORBIDDEN). Returns { item, changed }.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
title | string | sí | al menos 1 caracteres, como máximo 200 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.revise
POST /agent/tools/item.revise
Add a new revision (full text) to an item. Through a key only in status "draft" or "in review"; "repos" (owner/name) only in status "draft". A repo not registered in the organisation is a 422 DOCKET_ITEM_REPO_UNKNOWN whose reason names it; an org admin registers it with a setup key: docket-cli github setup --group <group> --machine <machine> --repo <owner/name> (githubRepo.add). A line "**Nicht vor**: YYYY-MM-DD" in the head sets the not-before date (Europe/Berlin): lease.claim hands the item out only from that day on (reason not-before); an invalid date or two dates is a 400 DOCKET_ITEM_NOT_BEFORE_INVALID on body. A line "**Fällig**: YYYY-MM-DD" in the head sets the due date of the item, optionally with "**Erinnern ab**: YYYY-MM-DD" (remind from, at most the due date; without it the dashboard reminds 14 days before); an invalid date, two due dates or a reminder without a due date is a 400 DOCKET_ITEM_DUE_INVALID on body. "**Frist**: YYYY-MM-DD" counts like "**Fällig**", but only with a plain date; any other value stays text. item.get and item.list return dueAt and remindFrom. A revision without the marker keeps the stored dates. While you hold the action lease "revise" of the item the revision also works in status "in progress" and ends the lease (status "in review"). A lease of another lane on an action ⇒ DOCKET_ITEM_HELD_BY_LANE with its name.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
body | string | sí | al menos 1 caracteres, como máximo 256000 caracteres |
repos | string[] | no | como máximo 100 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.setDue
POST /agent/tools/item.setDue
Set or clear the due date of an item (dueAt and remindFrom as YYYY-MM-DD or null; owner or admin; no new revision). Invalid ⇒ DOCKET_ITEM_DUE_INVALID; the same values ⇒ changed false. Not while the item is in progress (DOCKET_FORBIDDEN).
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
dueAt | string | null | sí |
remindFrom | string | null | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.setNotBefore
POST /agent/tools/item.setNotBefore
Set or clear the not-before date of an item (YYYY-MM-DD or null; lease.claim hands it out only from that day; owner or admin; no new revision). Invalid ⇒ DOCKET_ITEM_NOT_BEFORE_INVALID; the same value ⇒ changed false. Not while the item is in progress (DOCKET_FORBIDDEN).
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
notBefore | string | null | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
item.unlink
POST /agent/tools/item.unlink
Remove a link between a design and a plan (uuid or P-n). Same rights as item.link; removing a link that does not exist is no error.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
from | string (uuid) | string | sí |
to | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
knowledgeRepo.add
POST /agent/tools/knowledgeRepo.add
Register a knowledge base repository of the organisation: { repo, path?, entry? } (path relative to the work root, entry the file to read first, default wiki/index.md). Returns { id, repo, path, entry, uses }. A repository already registered is KNOWLEDGE_REPO_TAKEN.
Entrada
Sin entrada.
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
id | string | sí |
repo | string | sí |
path | string | null | sí |
entry | string | sí |
uses | string[] | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
knowledgeRepo.list
POST /agent/tools/knowledgeRepo.list
List the knowledge bases of the organisation, each { id, repo, path, entry, uses }, sorted by repo.
Entrada
Sin entrada.
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
[].id | string | sí |
[].repo | string | sí |
[].path | string | null | sí |
[].entry | string | sí |
[].uses | string[] | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
knowledgeRepo.listForGroup
POST /agent/tools/knowledgeRepo.listForGroup
Read the knowledge of a project group: { assigned, knowledge }. knowledge is the resolved chain over uses, each { repo, path, entry }, base first; read the entry files in this order before you work.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
projectGroupId | string (uuid) | sí |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
assigned | string[] | sí |
knowledge | object[] | sí |
knowledge[].repo | string | sí |
knowledge[].path | string | null | sí |
knowledge[].entry | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
knowledgeRepo.setForGroup
POST /agent/tools/knowledgeRepo.setForGroup
Assign knowledge bases to a project group: { projectGroupId, repos } replaces the whole list (at most 20; usually one, the lowest). Returns { changed, knowledge } with the resolved chain, base first. Same errors as knowledgeRepo.setUses.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroupId | string (uuid) | sí | |
repos | string[] | sí | como máximo 20 elementos |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
changed | boolean | sí |
knowledge | object[] | sí |
knowledge[].repo | string | sí |
knowledge[].path | string | null | sí |
knowledge[].entry | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
knowledgeRepo.setUses
POST /agent/tools/knowledgeRepo.setUses
Set the knowledge bases a knowledge base builds on: { repo, uses } replaces the whole list (at most 20). A cycle is KNOWLEDGE_CYCLE, a chain deeper than 5 KNOWLEDGE_TOO_DEEP, more than 20 resolved knowledge bases at a group KNOWLEDGE_TOO_MANY, an unknown name KNOWLEDGE_NOT_FOUND. Returns { knowledgeRepo, changed }.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
uses | string[] | sí | como máximo 20 elementos |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
knowledgeRepo | object | sí |
knowledgeRepo.id | string | sí |
knowledgeRepo.repo | string | sí |
knowledgeRepo.path | string | null | sí |
knowledgeRepo.entry | string | sí |
knowledgeRepo.uses | string[] | sí |
changed | boolean | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
lease.claim
POST /agent/tools/lease.claim
Claim the next approved item of a project, a group or all your targets (target "all" needs a priority) for a lane, or exactly one item by id (target { item }); target { item } also claims an item in progress without a lease whose last lease ended pr-opened, so you can report released or rework the pull request (the status stays in progress). Name the project by id or as "<group-slug>/<project-slug>", the group by id or slug; a target that is unknown or outside your targets is DOCKET_TARGET_UNKNOWN. Returns the item, its approved revision, repos, answered lane questions, openPrs (the open pull requests of the item with repo, number, branch, status and reason; keep working on those branches instead of opening new ones; [] if none), comments (the open lane comments of the item: id, text, authorId, createdAt; [] if none), webhookMissing (the repos of the item docket never received a webhook from, so no merge train will pick up their pull requests; absent if none; the claim is not refused) and a lease of 30 minutes, or { nothing: true }; for target { item } with reasons (the blocks: not-approved, in-progress (in progress and leased, or not after pr-opened), pr-open (after pr-opened the merge train still has an open pull request of the item and reports the release), superseded, design-session-only (designs and items with a requested action are only handed to design sessions), no-requested-action (a design session only gets items with a requested action), deferred, without-repos, open-need, waiting-for-answer, repo-leased, repos-unknown, not-in-key-targets); with repo-leased also leasedRepos ([{ repo, leaseId, itemId, itemNumber, lane, since }]: each repo of the item an active lease holds, the holding lease, its item (itemNumber = P-n, null without a number), lane and start). Optional repos (owner/name, case-insensitive) lists the repos your lane can start: items with a repo outside the list are skipped, and the answer names them in skipped ([{ itemId, repos }] with the missing repos, also with { nothing: true }); for target { item } a missing repo is the block repos-unknown. With rework: true (only with target { item }, otherwise BAD_REQUEST) the claim also takes an item in progress whose merge train still has its pull request open (no block pr-open), so you can rework that pull request; end the lease with pr-opened for the same pull request. The lease carries rework. Optional session is work (the default) or design: a design session gets only items with a requested action, a work session never gets those and never a design. The answer carries action (revise, plan or null) and, for revise, annotations (the open anchored annotations: id, revision, startLine, endLine, quote, text, authorId, createdAt, anchorLost; oldest first, at most 100; [] otherwise) with annotationsTruncated. knowledge lists the knowledge bases of the group of the item in reading order, base first ([{ repo, path, entry }]: path relative to your work root like a repo path, null = none set; entry is the file to read first; [] if the group has none). plugins lists the Claude Code plugins of the group of the item ([{ package, plugin, version }]: an npm package, a plugin in it and latest or a fixed version; sorted by package and plugin; [] if the group has none). docketPlugin says whether the lane loads the docket plugin of docket-cli before plugins (a switch of the group, true by default and without a group).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
target | object | "all" | sí | |
target.project | string (uuid) | string | no | |
target.projectGroup | string (uuid) | string | no | |
target.item | string (uuid) | string | no | |
priority | "low" | "medium" | "high" | "immediately" | "first" | no | |
lane | string | sí | al menos 1 caracteres, como máximo 100 caracteres |
repos | string[] | no | como máximo 100 elementos |
rework | boolean | no | |
session | "work" | "design" | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
lease.release
POST /agent/tools/lease.release
Give your lease back with a note; the item returns to "approved". With waitingForAnswer only if a lane question of this lease is open. With deferred the note becomes the reason the item is deferred: lease.claim skips it (block deferred) until a human clears it; no question, no mail. deferred and waitingForAnswer together are invalid. With quota you hand the item over because your account quota is nearly used up (report kind handover first): the lease ends with "quota" and the item returns to "approved" for the next lane; quota is invalid together with deferred or waitingForAnswer.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
leaseId | string (uuid) | sí | |
note | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
waitingForAnswer | boolean | no | |
deferred | boolean | no | |
quota | boolean | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
lease.renew
POST /agent/tools/lease.renew
Renew your lease to now + 30 minutes. Returns comments: the lane comments of the item written since your claim or last renew (id, text, authorId, createdAt; [] if none), and annotations: on a lease with the action revise the open annotations written since then, in the form of lease.claim ([] otherwise). An ended lease answers DOCKET_LEASE_ENDED with the reason.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
leaseId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
machine.create
POST /agent/tools/machine.create
Register a machine for the owner of the key (name, unique per owner regardless of case).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
name | string | sí | al menos 1 caracteres, como máximo 100 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
machine.heartbeat
POST /agent/tools/machine.heartbeat
Heartbeat of your machine with its load (cpu = load average 1 min per core, free memory and free disk in GB). Send it every 5 minutes.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
load | object | sí | |
load.cpu | number | sí | desde 0, hasta 1000 |
load.memFreeGb | number | sí | desde 0, hasta 1000000 |
load.diskFreeGb | number | sí | desde 0, hasta 1000000 |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
machine.list
POST /agent/tools/machine.list
List machines with their keys (never the key secret).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
scope | "mine" | "org" | sí | por defecto "mine" |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
merge.claim
POST /agent/tools/merge.claim
Claim the next merge train in the named project groups (id or slug) whose merge session runs on your machine: one repo, up to 100 ready pull requests in the order they became ready (prId, number, branch, headSha, itemId, needs; each need carries resolved, the smallest published version that satisfies it; for a need with deployed: true from a Needs-deployed: line the version that runs now, reported by deployedVersion.report; checks: unknown when GitHub reported no check_run or status at its head, pending while one is open, else success), and a train lease of 60 minutes, or { nothing: true }. A ready pull request with a failed check_run or status at its current head stays ready and out of the train with reason checks-failed: <names> (the failed check names, sorted, comma separated). A ready pull request whose target branch is not main (the release branch; no base counts as main) stays ready and out of the train with reason target-branch: <branch>; its checks are not read, and an active lease of its item still wins with lease-active. When a train goes, it carries skipped (up to 50 such pull requests of the train repo, ordered by repo and number, each with repo, number and reason) only when there is one. Optional repos (owner/name, 1 to 100, no duplicates ignoring case) limits the claim to ready pull requests of these repos in the named groups; the comparison ignores case, and a repo outside the groups is no error, only no match. With repos, { nothing: true } carries skipped: up to 50 pull requests of these repos in the named groups that did not go (not closed or merged), ordered by repo and number, each with repo, number and reason (its invalid code such as DOCKET_PR_LINE_MISSING for a pull request on a branch docket/<item id>-… without a Docket line, else its readiness reason such as draft or revision-mismatch while it waits, else its status such as red; a pull request in a train has reason in train with trainId); a ready pull request whose item a lane still holds under an active lease has reason lease-active, a ready one whose repo already has a running train has reason train-running (with trainId when that train runs in one of the named groups), and a ready one whose row a concurrent claim held has reason locked. Without repos, { nothing: true } carries passedOver instead when ready pull requests did not go: per repo (lower case, ordered) the count of them. A ready pull request with a need that is not satisfied stays out of the train and goes back to waiting for needs; so does one whose item changed since it became ready (no longer approved or in progress, a new revision, or its repo removed), back to waiting for approval. A ready pull request whose item has an active lease (a lane still works on it, also with rework) stays ready and out of the train; expired leases end first. A group whose merge session is on another machine (or has none) is DOCKET_FORBIDDEN; an unknown group or one outside your targets is DOCKET_TARGET_UNKNOWN.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroups | (string (uuid) | string)[] | sí | al menos 1 elementos, como máximo 100 elementos |
repos | string[] | no | al menos 1 elementos, como máximo 100 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
merge.reconcile
POST /agent/tools/merge.reconcile
Before you merge, tell docket what GitHub shows for pull requests of your running merge train: per pull request (1 to 100) prId, draft, state ("open" or "closed"), merged, headSha and baseRef. A closed pull request becomes closed (merged: true makes it merged and checks its item) at once. An open one stays in the train; docket stores draft, head (a new head drops its review) and base branch, and the report weighs them: a pull request you skip and do not name in merge.report returns to the queue and is judged again (a draft waits with reason draft). A pull request that is no longer in the train (already closed or invalid) stays as it is. Returns { trainId, prs: [{ prId, status }] }. A prId that is not in the train is DOCKET_TRAIN_REPORT_MISMATCH pr-not-in-train and nothing is stored; a train of another key, a reported train or a lease that ran out is DOCKET_TRAIN_LEASE_ENDED; an unknown train is DOCKET_TRAIN_NOT_FOUND.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
trainId | string (uuid) | sí | |
prs | object[] | sí | al menos 1 elementos, como máximo 100 elementos |
prs[].prId | string (uuid) | sí | |
prs[].draft | boolean | sí | |
prs[].state | "open" | "closed" | sí | |
prs[].merged | boolean | sí | |
prs[].headSha | string | sí | al menos 40 caracteres, como máximo 40 caracteres |
prs[].baseRef | string | sí | al menos 1 caracteres, como máximo 255 caracteres |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
trainId | string | sí |
prs | object[] | sí |
prs[].prId | string | sí |
prs[].status | "waiting for approval" | "waiting for review" | "waiting for needs" | "ready" | "in train" | "merged" | "red" | "conflict" | "closed" | "invalid" | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
merge.renew
POST /agent/tools/merge.renew
Extend the lease of your running merge train by 60 minutes; call it every 20 minutes. A train of another key, a reported train or a lease that ran out is DOCKET_TRAIN_LEASE_ENDED; an unknown train is DOCKET_TRAIN_NOT_FOUND.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
trainId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
merge.report
POST /agent/tools/merge.report
Report the result of your merge train: merged, conflict, culprit and dropped (each with a reason of up to 5000 characters) name pull requests of the train, each at most once; pull requests not named return to the queue; what merge.reconcile stored before the report (draft, head, base branch) counts there. If the item of a pull request changed since the claim (no longer approved or in progress, a new revision, or its repo removed), a pull request not named turns red and a merged one stays merged, both with end reason item-not-ready. releaseState is "released" (then package and version), "no-release" or "release-red". log is the tail of the run (up to 65 535 characters). After the train lease ended (until the train is reported) the key of the train still reports, if every pull request in merged is already merged on docket (GitHub webhook), otherwise DOCKET_TRAIN_REPORT_MISMATCH merged-not-on-github. The same report again (releaseState, package, version; log does not count) changes nothing and returns empty items; a different one is DOCKET_TRAIN_REPORT_MISMATCH report-differs. A report that does not fit the train is DOCKET_TRAIN_REPORT_MISMATCH; a train of another key is DOCKET_TRAIN_LEASE_ENDED. Nothing is stored in either case.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
trainId | string (uuid) | sí | |
merged | string (uuid)[] | sí | como máximo 100 elementos |
conflict | string (uuid)[] | sí | como máximo 100 elementos |
culprit | string (uuid) | no | |
dropped | object[] | sí | como máximo 100 elementos |
dropped[].prId | string (uuid) | sí | |
dropped[].reason | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
releaseState | "released" | "no-release" | "release-red" | sí | |
package | string | no | como máximo 214 caracteres |
version | string | no | como máximo 50 caracteres |
log | string | sí | como máximo 65535 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
merge.sync
POST /agent/tools/merge.sync
Before you claim, bring docket in line with GitHub for pull requests a webhook delivery may have missed. Name the project groups (id or slug) like merge.claim and send prs (0 to 100, each repo and number once): repo, number, state ("open" or "closed"), merged, draft, headSha, branch, baseRef and body (up to 65 536 characters, null for none) as GitHub shows them now. docket books each like the webhook would, without a delivery, and writes only when something differs: a closed one becomes closed (merged: true makes it merged and checks its item); an open one gets its Docket line, draft, head (a new head drops its review), branch and base branch, and its readiness is weighed again. A pull request in a train stays as it is (status in train); one docket does not store or whose repo is not in the named groups gets status null and is not created. Returns { prs: [{ repo, number, status, changed }], held, heldTruncated }: held are the open pull requests of the groups that wait (not ready, in train, closed or merged), ordered by repo and number, up to 100, each with repo, number, status and reason (readiness reason, else invalid code, else end reason); heldTruncated is true when there are more. Call it with prs: [] first, read each held pull request on GitHub, then call it again with what you read. A group whose merge session is on another machine (or has none) is DOCKET_FORBIDDEN; an unknown group or one outside your targets is DOCKET_TARGET_UNKNOWN.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroups | (string (uuid) | string)[] | sí | al menos 1 elementos, como máximo 100 elementos |
prs | object[] | sí | como máximo 100 elementos |
prs[].repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
prs[].number | integer | sí | desde 1, hasta 2147483647 |
prs[].state | "open" | "closed" | sí | |
prs[].merged | boolean | sí | |
prs[].draft | boolean | sí | |
prs[].headSha | string | sí | al menos 40 caracteres, como máximo 40 caracteres |
prs[].branch | string | sí | al menos 1 caracteres, como máximo 255 caracteres |
prs[].baseRef | string | sí | al menos 1 caracteres, como máximo 255 caracteres |
prs[].body | string | null | sí |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
prs | object[] | sí |
prs[].repo | string | sí |
prs[].number | number | sí |
prs[].status | "waiting for approval" | "waiting for review" | "waiting for needs" | "ready" | "in train" | "merged" | "red" | "conflict" | "closed" | "invalid" | null | sí |
prs[].changed | boolean | sí |
held | object[] | sí |
held[].repo | string | sí |
held[].number | number | sí |
held[].status | "waiting for approval" | "waiting for review" | "waiting for needs" | "ready" | "in train" | "merged" | "red" | "conflict" | "closed" | "invalid" | sí |
held[].reason | string | null | sí |
heldTruncated | boolean | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.assign
POST /agent/tools/org.assign
Give a member a role on a project or group.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
userId | string | sí | al menos 1 caracteres, como máximo 64 caracteres |
targetKind | "project" | "project_group" | sí | |
targetId | string (uuid) | sí | |
role | "gatekeeper" | "owner" | "contributor" | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.changeAssignmentRole
POST /agent/tools/org.changeAssignmentRole
Change the role of an existing assignment.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
assignmentId | string (uuid) | sí |
role | "gatekeeper" | "owner" | "contributor" | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.createGroup
POST /agent/tools/org.createGroup
Create a project group (slug and name).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
slug | string | sí | al menos 1 caracteres, como máximo 60 caracteres |
name | string | sí | al menos 1 caracteres, como máximo 100 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.createProject
POST /agent/tools/org.createProject
Create a project in a group (slug and name).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
groupId | string (uuid) | sí | |
slug | string | sí | al menos 1 caracteres, como máximo 60 caracteres |
name | string | sí | al menos 1 caracteres, como máximo 100 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.createSubproject
POST /agent/tools/org.createSubproject
Create a subproject below a project.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
parentProjectId | string (uuid) | sí | |
slug | string | sí | al menos 1 caracteres, como máximo 60 caracteres |
name | string | sí | al menos 1 caracteres, como máximo 100 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.deletePreview
POST /agent/tools/org.deletePreview
Count what deleting a group or project would remove. Deleting itself is browser only.
Entrada
Exactamente una de estas formas:
Forma 1
| Campo | Tipo | Obligatorio |
|---|---|---|
groupId | string (uuid) | sí |
Forma 2
| Campo | Tipo | Obligatorio |
|---|---|---|
projectId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.listAssignments
POST /agent/tools/org.listAssignments
List role assignments.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
targetKind | "project" | "project_group" | no |
targetId | string (uuid) | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.listGroups
POST /agent/tools/org.listGroups
List the project groups you can see, with the time of the latest change to an item in a project you can see (lastActivityAt, null without one).
Entrada
Sin entrada.
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.listProjects
POST /agent/tools/org.listProjects
List projects and subprojects you can see, with your effective roles.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
groupId | string (uuid) | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.renameGroup
POST /agent/tools/org.renameGroup
Rename a project group or change its slug (name, slug or both; slug unique per organisation). A freed slug can be reused by a new group, so update docket-cli configs that still name the old slug.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
groupId | string (uuid) | sí | |
name | string | no | al menos 1 caracteres, como máximo 100 caracteres |
slug | string | no | al menos 1 caracteres, como máximo 60 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.renameProject
POST /agent/tools/org.renameProject
Rename a project or subproject or change its slug (name, slug or both; slug unique per group). A freed slug can be reused, so update docket-cli configs that still name the old slug.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId | string (uuid) | sí | |
name | string | no | al menos 1 caracteres, como máximo 100 caracteres |
slug | string | no | al menos 1 caracteres, como máximo 60 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.unassign
POST /agent/tools/org.unassign
Remove a role assignment.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
assignmentId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
org.updateApprovalRule
POST /agent/tools/org.updateApprovalRule
Set the approval rule of a group: approver role, number of approvals, whether the author may approve, optionally whether review is required (false: items are approved without review in the browser), whether pull requests need a review before they are merged (prReviewRequired, false: a pull request is ready without one), whether approval is required (approvalRequired, false: new items and new revisions are approved immediately) and whether acceptance is required (acceptanceRequired, false: an item reported released becomes done at once).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
groupId | string (uuid) | sí | |
approverRole | "owner" | "contributor" | sí | |
count | integer | sí | desde 1 |
authorMayApprove | boolean | sí | |
reviewRequired | boolean | no | |
prReviewRequired | boolean | no | |
approvalRequired | boolean | no | |
acceptanceRequired | boolean | no |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
pluginAssignment.listForGroup
POST /agent/tools/pluginAssignment.listForGroup
Read the Claude Code plugins of a project group: { docketPlugin, plugins: [{ package, plugin, version }] }, plugins sorted by package and plugin; docketPlugin says whether lanes of the group load the docket plugin of docket-cli. lease.claim delivers the same values. An empty list is no error.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
projectGroupId | string (uuid) | sí |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
docketPlugin | boolean | sí |
plugins | object[] | sí |
plugins[].package | string | sí |
plugins[].plugin | string | sí |
plugins[].version | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
pluginAssignment.setDocketPlugin
POST /agent/tools/pluginAssignment.setDocketPlugin
Switch the docket plugin of docket-cli on or off for the lanes of a project group: { projectGroupId, enabled }. On (the default) a lane of the group loads the docket plugin before the group plugins; off it does not. Returns { changed, docketPlugin }; an unknown group is DOCKET_GROUP_NOT_FOUND.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
projectGroupId | string (uuid) | sí |
enabled | boolean | sí |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
changed | boolean | sí |
docketPlugin | boolean | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
pluginAssignment.setForGroup
POST /agent/tools/pluginAssignment.setForGroup
Assign Claude Code plugins to a project group: { projectGroupId, plugins: [{ package, plugin, version? }] } replaces the whole list (at most 10; version defaults to latest). package is an npm package such as @xhubio-saas/claude-skills, plugin a plugin in it such as xhub-core. Returns { changed, plugins }; an unknown group is DOCKET_GROUP_NOT_FOUND.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroupId | string (uuid) | sí | |
plugins | object[] | sí | como máximo 10 elementos |
plugins[].package | string | sí | como máximo 214 caracteres |
plugins[].plugin | string | sí | como máximo 64 caracteres |
plugins[].version | string | sí | como máximo 64 caracteres, por defecto "latest" |
Salida
| Campo | Tipo | Siempre presente |
|---|---|---|
changed | boolean | sí |
plugins | object[] | sí |
plugins[].package | string | sí |
plugins[].plugin | string | sí |
plugins[].version | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
prReview.claim
POST /agent/tools/prReview.claim
Claim the next open pull request to review in one of the named project groups (id or slug): linked to an item in your targets, not invalid, closed, merged or in a train, no review for its current head yet, and no running review lease. Returns the pull request (id, repo, number, branch, headSha, status), its item, the revision it points to, plugins (the Claude Code plugins of the group of the item: [{ package, plugin, version }], sorted by package and plugin; [] if none), docketPlugin (whether the review session loads the docket plugin of docket-cli; a switch of that group, true by default) and a review lease of 30 minutes (no renewal), or { nothing: true }. An unknown group or one outside your targets is DOCKET_TARGET_UNKNOWN.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectGroups | (string (uuid) | string)[] | sí | al menos 1 elementos, como máximo 100 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
prReview.report
POST /agent/tools/prReview.report
Report the review of the pull request you claimed: headSha is the head you reviewed, result "passed" with findings [] or "findings" with 1 to 50 findings (each 1 to 5000 characters). Stores the review and ends the review lease. A head that moved on is DOCKET_REVIEW_HEAD_STALE (nothing stored, the lease ends); a lease of another key or one that ran out is DOCKET_REVIEW_LEASE_ENDED.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
prId | string (uuid) | sí | |
headSha | string | sí | al menos 40 caracteres, como máximo 40 caracteres |
result | "passed" | "findings" | sí | |
findings | string[] | sí | como máximo 50 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
question.ask
POST /agent/tools/question.ask
Ask a project a question, optionally about one item or about one epic (epicId; the project must be in the group of the epic), never both. It goes to the team (owners and contributors, default), the owners or the gatekeepers. With kind notice it is a notice instead: it does not block the item, a human acknowledges it.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId | string (uuid) | sí | |
itemId | string (uuid) | string | null | no | |
epicId | string (uuid) | null | no | |
addressedRole | "owner" | "gatekeeper" | "team" | sí | por defecto "team" |
text | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
kind | "question" | "notice" | sí | por defecto "question" |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
question.assignees
POST /agent/tools/question.assignees
List the users a question can be assigned to (members with access to its project), sorted by user id.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
questionId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
question.clarify
POST /agent/tools/question.clarify
Clarify a question or notice in status clarification: read the follow-up in the messages of question.get, answer it with what you measured, and it returns to its start status (open or info). Allowed for the asker and anyone with a write role on its project; never ask a new question instead. Not in clarification is DOCKET_INVALID_TRANSITION; more than 50 messages is DOCKET_QUESTION_MESSAGES_FULL; a project outside your targets is DOCKET_TARGET_UNKNOWN.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
questionId | string (uuid) | string | sí | |
text | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
question.followUp
POST /agent/tools/question.followUp
Ask back on a question or notice you do not understand instead of guessing: your text goes into its messages and it waits in status clarification until the asker or a write role clarifies it. Any role on its project may ask back, from the start status or clarification. Answered, acknowledged or withdrawn is DOCKET_INVALID_TRANSITION; more than 50 messages is DOCKET_QUESTION_MESSAGES_FULL; a project outside your targets is DOCKET_TARGET_UNKNOWN.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
questionId | string (uuid) | string | sí | |
text | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
question.get
POST /agent/tools/question.get
Read one question with its answer, if there is one yet, and its messages (follow-ups and clarifications, oldest first).
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
questionId | string (uuid) | string | sí |
Salida
| Campo | Tipo | Siempre presente | Descripción |
|---|---|---|---|
id | string | sí | |
number | integer | null | sí | |
projectId | string | sí | |
itemId | string | null | sí | |
epicId | string | null | sí | |
askedBy | string | sí | |
addressedRole | "owner" | "gatekeeper" | "team" | sí | |
text | string | sí | |
kind | "question" | "notice" | sí | |
status | "open" | "answered" | "info" | "acknowledged" | "withdrawn" | "clarification" | sí | |
answer | string | null | sí | |
answeredBy | string | null | sí | |
answeredByName | string | null | sí | |
answeredAt | string | null | sí | |
answerChangedAt | string | null | sí | |
acknowledgedBy | string | null | sí | |
acknowledgedAt | string | null | sí | |
withdrawnBy | string | null | sí | |
withdrawnAt | string | null | sí | |
withdrawReason | string | null | sí | |
createdAt | string | sí | ISO 8601 timestamp |
leaseId | string | null | sí | |
addressedToMe | boolean | sí | |
assignedTo | string | null | sí | |
assignedBy | string | null | sí | |
assignedAt | string | null | sí | |
itemTitle | string | null | sí | |
epicNumber | integer | null | sí | |
epicTitle | string | null | sí | |
messages | object[] | sí | |
messages[].authorId | string | sí | |
messages[].authorName | string | null | sí | |
messages[].kind | "follow-up" | "clarify" | "answer-change" | sí | |
messages[].text | string | sí | |
messages[].createdAt | string | sí | ISO 8601 timestamp |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
question.list
POST /agent/tools/question.list
List the questions and notices you can see, optionally by project, group, item, epic (epicId), kind, status or assignee (assignedTo: me, none or a user id).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
projectId | string (uuid) | no | |
groupId | string (uuid) | no | |
itemId | string (uuid) | string | no | |
epicId | string (uuid) | no | |
kind | "question" | "notice" | no | |
status | "open" | "answered" | "info" | "acknowledged" | "withdrawn" | "clarification" | no | |
assignedTo | string | no | al menos 1 caracteres, como máximo 64 caracteres |
Salida
| Campo | Tipo | Siempre presente | Descripción |
|---|---|---|---|
[].id | string | sí | |
[].number | integer | null | sí | |
[].projectId | string | sí | |
[].itemId | string | null | sí | |
[].epicId | string | null | sí | |
[].askedBy | string | sí | |
[].addressedRole | "owner" | "gatekeeper" | "team" | sí | |
[].text | string | sí | |
[].kind | "question" | "notice" | sí | |
[].status | "open" | "answered" | "info" | "acknowledged" | "withdrawn" | "clarification" | sí | |
[].answer | string | null | sí | |
[].answeredBy | string | null | sí | |
[].answeredByName | string | null | sí | |
[].answeredAt | string | null | sí | |
[].answerChangedAt | string | null | sí | |
[].acknowledgedBy | string | null | sí | |
[].acknowledgedAt | string | null | sí | |
[].withdrawnBy | string | null | sí | |
[].withdrawnAt | string | null | sí | |
[].withdrawReason | string | null | sí | |
[].createdAt | string | sí | ISO 8601 timestamp |
[].leaseId | string | null | sí | |
[].addressedToMe | boolean | sí | |
[].assignedTo | string | null | sí | |
[].assignedBy | string | null | sí | |
[].assignedAt | string | null | sí | |
[].itemTitle | string | null | sí | |
[].epicNumber | integer | null | sí | |
[].epicTitle | string | null | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
question.withdraw
POST /agent/tools/question.withdraw
Withdraw an open question or an unacknowledged notice that the current state has made obsolete, with the measurement as reason. Allowed for the asker and anyone with a write role on its project; it then no longer counts as open and no longer blocks the item. Not open (answered, acknowledged or withdrawn) is DOCKET_QUESTION_NOT_OPEN; a project outside your targets is DOCKET_TARGET_UNKNOWN.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
questionId | string (uuid) | string | sí | |
reason | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
report.submit
POST /agent/tools/report.submit
Report on your lease: progress, blocked, done-criterion (the result of the done criterion; a human sets "done"), released (with the versions; ends the lease and sets the item to "released"; for an item with more than one repo every version is <owner/name>@<version>, and the repos of the versions plus unchanged are together exactly the repos of the item, else DOCKET_RELEASE_REPOS_MISMATCH and the lease stays; with one repo at least one version is required, a bare version stays valid, and without a version (also with unchanged) it is DOCKET_RELEASE_REPOS_MISMATCH and the lease stays: without a release report done-criterion with fulfilled) or pr-opened (after you opened your pull requests: prs with repo and number, unchanged lists the repos of the item you did not change, pending the repos a later step of this item delivers (not stored, echoed in the response; the merge train releases the item only once every repo is delivered); prs, unchanged and pending are disjoint and together exactly the repos of the item, else DOCKET_PR_REPOS_MISMATCH; for the later step claim the item again with target { item } and report pr-opened again, naming a repo delivered earlier with its merged pull request in prs; a named pull request that is already stored but invalid or linked to another item is DOCKET_PR_NOT_LINKED (DOCKET_PR_LINE_MISSING: its branch is docket/<item id>-… but the body has no Docket line), and after DOCKET_PR_LINE_INVALID and DOCKET_PR_LINE_MISSING its reason names the expected body lines: "Docket: <item id>@<revision>" and, only for a package, "Needs: <npm name> >= <version>"; a placeholder such as "Needs: none" or a pull request such as "Needs: owner/repo#6" is invalid; ends the lease, the item stays "in progress"; if docket never received a webhook from a repo of a named pull request, the report still succeeds, webhookMissing names those repos in the response and a comment on the item names them too: no merge train will pick up such a pull request; a named pull request docket has not stored (its body had no valid "Docket: <item id>@<revision>" line, or the webhook has not arrived yet) does not fail the report either, prNotStored names it as <repo>#<number> in the response and a comment on the item names it with the expected body lines: no merge train picks it up until docket stores it; a named pull request of this item that is "red" goes back to readiness, like after a webhook, and requeued names it as <repo>#<number> in the response; targetBranch (optional) is the base branch of the named pull requests and is only checked, never stored: a named pull request docket has stored with another base branch (none stored = main) is DOCKET_PR_TARGET_MISMATCH and the lease stays, reason <repo>#<number>: <stored branch>; a pull request docket has not stored is not checked). done-criterion with fulfilled: true says the item is done without a release (no repo was changed or nothing is released): ends the lease with "fulfilled", the item stays "in progress" until a human sets "done" (at once "done" if the group needs no acceptance). progress, blocked and done-criterion are accepted after the lease ended. A done-criterion without a lease (e.g. the done criterion checked after the release) takes itemId (uuid or P-n) instead of leaseId, never both and never with fulfilled: only for a released item the key may read and that no lane holds; else DOCKET_REPORT_ITEM_NOT_RELEASED, DOCKET_REPORT_ITEM_HAS_LEASE or DOCKET_ITEM_NOT_FOUND. It changes neither the item nor a lease; the answer carries leaseId null. handover (only on your active lease, before lease.release with quota when your account quota is nearly used up) hands your work to the next lane: branches lists per repo of the item at most one { repo, branch, sha (40 hex), sicherung } with the pushed branch and its head; sicherung: true marks a safety push whose tests are not green. A repo that is not a repo of the item is DOCKET_HANDOVER_REPO_UNKNOWN; branches only with handover; prs, unchanged and pending are not for handover; the lease stays. plans-created (only on a lease with the action plan, text and planIds with 1 to 10 ids or P-n, each a plan linked from the design; planIds with no other kind) ends the lease with "fulfilled", sets the design to "done" and clears the action; a plan that does not fit is DOCKET_PLANS_CREATED_INVALID with its id and the lease stays. A lease with an action reports only progress and blocked, and plans-created with the action plan; any other kind on it, and plans-created on any other lease, is DOCKET_ACTION_REPORT_NOT_ALLOWED and the lease stays. alsoItems (optional, only with progress, blocked, pr-opened and released, at most 20 ids or P-n) names further items the same report is for, e.g. a pull request that delivers several items: each gets the same report row (same lease, kind, text, prs and versions) and shows the stage in its history and latestStage, while its status and lease never change. All or nothing: an item that is unknown, in another organisation or outside the projects your key may read is DOCKET_ITEM_NOT_FOUND, the item itself or an id twice is DOCKET_REPORT_ALSO_ITEMS_DUPLICATE, the reason names the id as written, nothing is stored and the lease stays. The answer carries itemIds: the item of the lease first, then the items of alsoItems.
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
leaseId | string (uuid) | no | |
itemId | string (uuid) | string | no | |
kind | "progress" | "released" | "done-criterion" | "blocked" | "pr-opened" | "handover" | "plans-created" | sí | |
text | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
versions | string[] | no | como máximo 100 elementos |
prs | object[] | no | como máximo 100 elementos |
prs[].repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
prs[].number | integer | sí | desde 1, hasta 2147483647 |
unchanged | string[] | no | como máximo 100 elementos |
pending | string[] | no | como máximo 100 elementos |
targetBranch | string | no | al menos 1 caracteres, como máximo 255 caracteres |
fulfilled | boolean | no | |
branches | object[] | no | como máximo 100 elementos |
branches[].repo | string | sí | al menos 1 caracteres, como máximo 140 caracteres |
branches[].branch | string | sí | al menos 1 caracteres, como máximo 255 caracteres |
branches[].sha | string | sí | al menos 40 caracteres, como máximo 40 caracteres |
branches[].sicherung | boolean | sí | |
planIds | (string (uuid) | string)[] | no | al menos 1 elementos, como máximo 10 elementos |
alsoItems | (string (uuid) | string)[] | no | como máximo 20 elementos |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
review.comment
POST /agent/tools/review.comment
Comment on lines of a revision of an item (anchor: start line, end line, quoted text).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
itemId | string (uuid) | string | sí | |
revisionNr | integer | sí | desde 1 |
anchorStartLine | integer | sí | desde 1, hasta 256000 |
anchorEndLine | integer | sí | desde 1, hasta 256000 |
anchorQuote | string | sí | al menos 1 caracteres, como máximo 300 caracteres |
text | string | sí | al menos 1 caracteres, como máximo 5000 caracteres |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
review.get
POST /agent/tools/review.get
Read the review state of an item: lifecycle, comments, approvals and the approval rule.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
review.resolveComment
POST /agent/tools/review.resolveComment
Resolve an open annotation of the current revision. A lane may do this while it holds the action lease of the item (lease.claim with session "design"); otherwise the rights of the browser apply. Already resolved ⇒ DOCKET_COMMENT_ALREADY_RESOLVED.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
commentId | string (uuid) | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
review.submit
POST /agent/tools/review.submit
Submit a draft item for approval (itemId: uuid or number). Under a group without required approval it is approved at once. Submit only when the item has no open question; otherwise leave it in draft and ask with question.ask.
Entrada
| Campo | Tipo | Obligatorio |
|---|---|---|
itemId | string (uuid) | string | sí |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504
usage.report
POST /agent/tools/usage.report
Report the usage of your lease since the last report (dollars with up to 4 decimals, tokens in and out).
Entrada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
leaseId | string (uuid) | sí | |
dollars | number | sí | desde 0, hasta 999999.9999 |
tokensIn | integer | sí | desde 0, hasta 2147483647 |
tokensOut | integer | sí | desde 0, hasta 2147483647 |
Códigos de estado: 200 400 401 402 403 404 405 408 409 412 413 415 422 428 429 499 500 501 502 503 504