get_review

Read one released review whole, which is what the mail announcing a release tells you to do with the review id it names.

Agentread-onlyidempotentMCP tool

It comes back in reading order: the verdict and what the reviewer said about the work as a whole, then each thread with the file and lines it is pinned to, the lines it quoted, the code around them as the round's snapshot held it with the commented lines marked, and the messages that went out with this release, so on a later round only the new comments are here. Those line numbers are true of the snapshot rather than of your files now, so once you have edited, search for the quoted text rather than counting lines. Answer each thread with add_review_message, naming its id; list_review_threads is for looking a thread up again afterwards. You may read a review of your own work and of the work of the agent you are a child of, and anybody else's is refused as permission_denied. A review nobody has released is not_found for anyone but its author.

Calling it#

curl -X POST http://127.0.0.1:8787/agent.v1.AgentService/GetReview \
  -H 'Content-Type: application/json' \
  -d '{
  "reviewId": "<reviewId>"
}'

Request#

GetReviewRequest#

FieldTypeDescription
reviewIdstring

Which review to read, which the mail announcing a release names.

required

Response#

GetReviewResponse#

GetReviewResponse is one released review whole, in reading order: the verdict and what the reviewer said about the work, then each thread with its anchor, the code around it, and the messages that went out with this release.

FieldTypeDescription
reviewReview

The review, carrying its verdict and body.

roundReviewRound

The round the review was given against.

threadslist of ReviewThreadInContext

The threads this review wrote in, ordered by file and line.

Types#

Review#

Review is one author's batch of comments against one round, private while it is written and released as a whole, the way a pending review on a forge is.

FieldTypeDescription
idstring

The handle the threads in this batch name it by.

agentIdstring

Whose work is being read.

roundIdstring

The snapshot the batch was written against.

roundOrdinalint32

Which round that is, counting from one, so a caller need not fetch the round to say.

authorKindReviewAuthorKind

Whether a person or an agent wrote it.

authorAgentIdstring

The agent giving the review, absent when the person reviewing is.

verdictReviewVerdict

What the author concluded, unspecified while the review is still open.

releasedAtstring

When the review was let go of, empty while nothing in it has reached the agent.

pathstring

The absolute path the released review was written to.

deliveredAtstring

When the agent claimed the mail that told it the review was waiting.

createdAtstring

When the batch was opened, which is the first comment written into it.

updatedAtstring

When anything in it last moved.

bodystring

What the author said about the work as a whole rather than about any one line, empty when they said nothing.

openThreadsint32

How many of this review's comments nobody has settled. A released review with none left is finished, which the verdict does not say, since a verdict is what its author concluded at the time rather than what has happened since.

ReviewRound#

ReviewRound is one immutable snapshot of what an agent has written, which is what a review is given against. Nothing a comment is pinned to can move underneath the person reading it, because the snapshot is a commit rather than the worktree.

FieldTypeDescription
idstring

The handle a review or a viewed-file record names this round by.

agentIdstring

Whose work the snapshot was taken of.

ordinalint32

Which round this is for its agent, counting from one.

baseShastring

The commit the agent's branch left its base at when the round was taken.

snapshotShastring

The commit the whole worktree was written out as, tracked and untracked alike.

createdAtstring

When the snapshot was taken, in RFC 3339.

ReviewThreadInContext#

ReviewThreadInContext is one thread of a released review, with the code it was written about drawn from the round's snapshot.

FieldTypeDescription
threadReviewThread

The thread as list_review_threads renders it, holding only the messages that went out with this review.

contextlist of string

The snapshot's lines around the thread's range, each prefixed with its line number and ">>" on the lines the thread is about. Empty when the snapshot cannot be read, in which case the thread's quoted_lines are what there is.

ReviewThread#

ReviewThread is one conversation pinned to a place in a round of an agent's diff.

FieldTypeDescription
idstring

The handle a reply or a resolve names this thread by.

agentIdstring

Whose diff the thread is pinned to.

reviewIdstring

The batch this thread was opened as part of.

roundIdstring

The round the thread is anchored to, which never moves.

roundOrdinalint32

Which round that is, counting from one.

baseShastring

The commit the old side of these line numbers was read against, which is the round's own base unless the diff was narrowed to an earlier round when the thread was written.

filePathstring

Which file, relative to the checkout.

oldStartint32

Where the range begins on the old side of the diff, counting from one.

oldEndint32

Where it ends on the old side, inclusive.

newStartint32

Where the range begins on the new side.

newEndint32

Where it ends on the new side, inclusive.

quotedLineslist of string

The diff lines the thread was written against, each keeping its leading marker.

resolvedAtstring

When the person reviewing settled this thread, empty while it is still owed an answer. Whether a thread is settled is a different question from whether the code under it has moved, and it is this one that decides whether the thread is still asking for something.

unreadByHumanbool

Whether the agent has replied since the person reviewing last looked.

messageslist of ReviewMessage

Everything said in the thread, oldest first.

createdAtstring

When the thread was opened.

updatedAtstring

When anything in it last moved.

ReviewMessage#

ReviewMessage is one thing said in a review thread.

FieldTypeDescription
idstring

The handle an edit of this message names it by.

threadIdstring

Which conversation it belongs to.

authorKindReviewAuthorKind

Whether a person or an agent wrote it.

authorAgentIdstring

The agent that wrote it, absent for the person reviewing and cleared if that agent is deleted. author_kind, not this, is what says who wrote it.

bodystring

What the author wrote.

suggestionlist of string

Replacement lines the author proposes for the thread's range, empty for an ordinary comment. An agent applies these rather than reasoning about them.

createdAtstring

When it was written.

updatedAtstring

When it was last edited.

deliveryReviewDeliveryState

How far this comment has got towards the agent reading it.

sentAtstring

When the person reviewing released this comment, empty while it is only written down.

deliveredAtstring

When the agent claimed the doorbell raised for this comment, empty until it has.

reviewIdstring

The review this message went out with, absent for an answer written by the agent under review, which belongs to no batch.

ReviewAuthorKind#

ReviewAuthorKind is who wrote a review message.

ValueDescription
REVIEW_AUTHOR_KIND_HUMAN

The person running komrad.

REVIEW_AUTHOR_KIND_AGENT

The agent whose work is being read, or the reviewer reading it.

ReviewVerdict#

ReviewVerdict is what an author concluded about a round, which is what tells the agent whether it is done rather than leaving it to read that out of the prose.

ValueDescription
REVIEW_VERDICT_APPROVED

This round is good as it stands.

REVIEW_VERDICT_CHANGES_REQUESTED

The agent should keep working.

REVIEW_VERDICT_COMMENTED

Notes without a conclusion either way.

ReviewDeliveryState#

ReviewDeliveryState is how far one of the person's comments has got towards the agent reading it. It is no stored field: it is read off the comment's own sent stamp and the newest doorbell raised against it, since the stamp outlives mail the agent deletes or lets expire. Whether the comment has been answered is a different question, read off the messages of the thread.

ValueDescription
REVIEW_DELIVERY_STATE_UNSENT

Written down and not yet let go of.

REVIEW_DELIVERY_STATE_SENT

Released, with a doorbell still waiting to be claimed.

REVIEW_DELIVERY_STATE_DELIVERED

Released, and the agent has claimed the doorbell.