komrad

plan_rebase

Preview a rebase of a task's branch onto its base branch without moving anything: what would be replayed, dropped and flattened, and which paths may conflict.

writesidempotentMCP toolAgent

Calling it#

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

Request#

PlanRebaseRequest#

PlanRebaseRequest asks what a rebase of a task's branch would do, without doing it.

FieldTypeDescription
one of*

The task whose branch to plan a rebase of.

task_iduuid

The task, by id.

task_slugstring

not empty

The task, by slug.

onto_basebool

Plan a re-target of a child onto the workflow's base branch, rebasing only its own commits, in place of a rebase onto its parent.

Response#

PlanRebaseResponse#

FieldTypeDescription
base_refstring

The ref the branch would move onto.

base_shastring

The commit base_ref named when komrad read it.

commitsint32

How many commits the branch has that the base branch does not.

branchstring

The branch that would move.

landed_commitsint32

How many of the branch's commits have landed. The rebase would drop them.

replay_commitsint32

How many of the branch's commits the rebase would replay.

mergesint32

How many merge commits the rebase would flatten.

conflict_pathsstring[]

The paths a merge of the base branch would conflict on. A rebase can conflict where a merge does not, so this is a warning only.