komrad

add_review_message

Reply in a thread on the caller's own diff.

writesnot idempotentMCP toolAgent

With addressed set, the reply pins a new snapshot of the worktree. The reply leaves the thread open. Komrad refuses addressed when the worktree has not changed since the thread's snapshot.

Calling it#

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

Request#

AddReviewMessageRequest#

FieldTypeDescription
thread_iduuid*

The thread to reply in, by id.

bodystring*

at most 1000 characters

The reply's text.

suggestionstring[]

The lines proposed in place of the thread's range. Empty for a plain reply.

addressedbool

Whether the reply says the change the thread asks for is made. Komrad then saves a snapshot of the worktree and pins it to the reply.

Response#

AddReviewMessageResponse#

FieldTypeDescription
messageReviewMessage

The comment as written.

hintstring

A reminder to set addressed, given when a plain reply goes on a thread whose worktree has changed since the thread was created. Empty otherwise.

Types#

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.

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.