komrad

get_review_thread

Get one thread on a task's diff by id, with its quoted lines and every comment whole.

read-onlyidempotentMCP toolAgent

An agent sees only released comments.

Calling it#

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

Request#

GetReviewThreadRequest#

FieldTypeDescription
iduuid*

The thread to get, by id.

Response#

GetReviewThreadResponse#

FieldTypeDescription
review_threadReviewThread

The thread, with its quoted lines and every comment whole.

Types#

ReviewThread#

ReviewThread is a conversation pinned to a range of lines in a snapshot, or on the change as a whole.

FieldTypeDescription
iduuid*

The thread's id.

task_iduuid*

The id of the task whose diff the thread is on.

review_iduuid

The id of the review a reviewer agent opened the thread in. Unset for a thread the person opened.

snapshot_iduuid*

The id of the snapshot the thread is pinned to.

snapshot_ordinalint32

The number of the snapshot the thread is pinned to.

base_shastring

The commit the old side of the line numbers is read against. This is the snapshot's base unless the diff was narrowed to an earlier snapshot.

file_pathstring

The file's path, relative to the checkout. Empty for a thread on the change as a whole.

old_startint32

The first line of the range on the old side of the diff, counting from one.

old_endint32

The last line of the range on the old side of the diff.

new_startint32

The first line of the range on the new side of the diff, counting from one.

new_endint32

The last line of the range on the new side of the diff.

quoted_linesstring[]

The diff lines the thread is about, each with its leading marker.

resolved_attimestamp

When the thread was resolved. Unset while the thread is open.

unread_by_humanbool

Whether an agent has replied since the person last read the thread.

messagesReviewMessage[]

The thread's comments, oldest first.

created_attimestamp

When the thread was created.

updated_attimestamp

When the thread last changed.

mirrors_forgebool

Whether the thread is copied from a pull request, where replies are public.

forge_repliesForgeReply[]

The replies komrad has drafted, posted or failed to post to the forge thread, oldest first. Only the person sees these.

author_kindReviewAuthorKind

Who opened the thread.

author_agent_iduuid

The id of the agent that opened the thread. Unset when the person or a forge user opened it.

forge_urlstring

The web address of the thread's first comment on the forge. Empty for a thread opened in komrad.

ReviewMessage#

ReviewMessage is one comment in a review thread.

FieldTypeDescription
iduuid*

The comment's id.

thread_iduuid*

The id of the comment's thread.

author_kindReviewAuthorKind

Who wrote the comment.

author_agent_iduuid

The id of the agent that wrote the comment. Unset when the person or a forge user wrote it, or when the agent was deleted.

bodystring

The comment's text.

suggestionstring[]

The lines the author proposes in place of the thread's range. Empty for a plain comment.

created_attimestamp

When the comment was written.

updated_attimestamp

When the comment was last edited.

review_iduuid

The id of the review a reviewer agent released the comment with. Unset for the person's comments and the writer's replies.

snapshot_iduuid

The id of the snapshot saved with an addressed reply. Unset on every other comment.

forgeForgeOrigin

The forge comment this comment was copied from. Unset for a comment written in komrad.

accepted_fromuuid

The id of the held forge comment the person accepted this comment as a copy of. Unset otherwise.

heldbool

Whether the comment is kept from the agent, because a forge user without write access wrote the comment or its thread, or the person held it or its thread from the writer when posting it.

read_attimestamp

When the agent read the person's comment. Unset until then, and on every other comment.

read_snapshot_iduuid

The id of the snapshot taken as the agent read the person's comment, which an addressed reply is compared against. Unset until then, and on every other comment.

held_by_personbool

Whether the person held this forge comment from the writer when posting it, which keeps it, and the thread it opens, from the agent for good.

ForgeReply#

ForgeReply is a reply komrad posts for the person on a thread copied from the forge.

FieldTypeDescription
iduuid*

The reply's id.

thread_iduuid*

The id of the review thread the reply answers.

stateForgeReplyState

How far the reply has got toward the forge.

bodystring

The reply's text.

approved_attimestamp

When the person approved the reply for posting.

sending_started_attimestamp

When komrad last started posting the reply. Unset until then.

sent_attimestamp

When the forge accepted the reply. Unset until then.

forge_comment_iduuid

The id of the comment komrad copied back from the forge for the reply. Unset until komrad copies it.

errorstring

What the forge said when it last refused the reply. Unset unless posting failed.

created_attimestamp

When the reply was written.

ForgeOrigin#

ForgeOrigin is the forge comment a review comment was copied from.

FieldTypeDescription
loginstring

The forge login of the comment's author. Empty when the forge no longer has the account.

comment_iduuid*

The forge comment's id. The forge may have deleted the comment since.

edited_attimestamp

When the forge comment was last edited. Unset when it was never edited.

yoursbool

Whether the person wrote the forge comment, as the account komrad connects to the forge with. Always false on a connection made from a GitHub App.

ReviewAuthorKind#

ReviewAuthorKind is who wrote a review or comment.

ValueDescription
human

The person.

agent

An agent, either the writer or a reviewer.

forge

A forge user, whose comment komrad copied from the pull request.

ForgeReplyState#

ForgeReplyState is how far a reply komrad posts to the forge has got.

ValueDescription
approved

Approved and waiting to be posted.

sending

Being posted. The forge may already have it.

sent

Accepted by the forge.

failed

Refused by the forge on the latest attempt, waiting for the person to retry or discard it.