Skip to content

client.projects.expert_queue

View as Markdown

client.projects.expert_queue — the projects.expertQueue operations.

On AsyncKindgi every method is the same, awaited.

list(
project_id: str | UUID,
/,
*,
state: Literal['open', 'corrected', 'dismissed', 'erased'] | None = None,
agent_id: str | UUID | None = None,
rule_id: str | UUID | None = None,
corrector_group_id: str | UUID | None = None,
for_me: bool | None = None,
added_after: str | None = None,
closed_after: str | None = None,
limit: int | None = None,
cursor: str | None = None,
timeout: float | None = None,
) -> ExpertQueuePage
Signature

The project's expert queue. GET /v1/projects/{projectId}/expert-queue

Queued runs, oldest first: never a run's content, only what it was, which rules queued it, whose correction they want and the corrections so far, and what the caller may do with it (can). An item closes as corrections once every rule that queued it has the correction it wants. forMe=true: the items any correction closes, or that want a group the caller may assert. limit=0 answers only the total. Needs read on the project.

dismiss(
project_id: str | UUID,
run_id: str | UUID,
body: ExpertQueueDismissBody | Mapping[str, Any] | None = None,
/,
*,
timeout: float | None = None,
**fields: Any,
) -> ExpertQueueItem
Signature

Dismiss a queued run. POST /v1/projects/{projectId}/expert-queue/{runId}/dismiss

Not worth correcting: it leaves the open queue, with who dismissed it and why. reopen undoes it. Needs write on the project, as correcting the run does.

reopen(
project_id: str | UUID,
run_id: str | UUID,
/,
*,
timeout: float | None = None,
) -> ExpertQueueItem
Signature

Reopen a dismissed run. POST /v1/projects/{projectId}/expert-queue/{runId}/reopen

Back in the open queue. Only a dismissed item reopens: a corrected one was closed by its corrections. Needs write on the project.