feat(review-story): add model-backed review story

This commit is contained in:
Felipe Coury
2026-05-23 18:05:09 -03:00
parent 7924743c38
commit 5e8a5b2c7c
58 changed files with 6544 additions and 5 deletions
@@ -2946,6 +2946,294 @@
},
"type": "object"
},
"ReviewStoryAnchor": {
"properties": {
"anchorId": {
"type": "string"
},
"changeKind": {
"$ref": "#/definitions/ReviewStoryAnchorKind"
},
"diff": {
"type": "string"
},
"filePath": {
"type": "string"
},
"summary": {
"type": "string"
}
},
"required": [
"anchorId",
"changeKind",
"diff",
"filePath",
"summary"
],
"type": "object"
},
"ReviewStoryAnchorKind": {
"enum": [
"added",
"modified",
"deleted",
"renamed",
"copied",
"unknown"
],
"type": "string"
},
"ReviewStorySnapshot": {
"properties": {
"anchors": {
"items": {
"$ref": "#/definitions/ReviewStoryAnchor"
},
"type": "array"
},
"createdAt": {
"format": "int64",
"type": "integer"
},
"overview": {
"type": "string"
},
"previousStorySnapshotId": {
"type": [
"string",
"null"
]
},
"sourceFingerprint": {
"type": "string"
},
"stale": {
"type": "boolean"
},
"status": {
"$ref": "#/definitions/ReviewStorySnapshotStatus"
},
"steps": {
"items": {
"$ref": "#/definitions/ReviewStoryStep"
},
"type": "array"
},
"storySnapshotId": {
"type": "string"
},
"target": {
"$ref": "#/definitions/ReviewTarget"
},
"threadId": {
"type": "string"
},
"title": {
"type": "string"
},
"updatedAt": {
"format": "int64",
"type": "integer"
}
},
"required": [
"anchors",
"createdAt",
"overview",
"sourceFingerprint",
"stale",
"status",
"steps",
"storySnapshotId",
"target",
"threadId",
"title",
"updatedAt"
],
"type": "object"
},
"ReviewStorySnapshotStatus": {
"enum": [
"building",
"ready",
"partial",
"failed"
],
"type": "string"
},
"ReviewStorySnapshotUpdatedNotification": {
"properties": {
"snapshot": {
"$ref": "#/definitions/ReviewStorySnapshot"
},
"threadId": {
"type": "string"
}
},
"required": [
"snapshot",
"threadId"
],
"type": "object"
},
"ReviewStoryStep": {
"properties": {
"anchorIds": {
"items": {
"type": "string"
},
"type": "array"
},
"dependencyRationale": {
"type": "string"
},
"error": {
"type": [
"string",
"null"
]
},
"goal": {
"type": "string"
},
"index": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"readiness": {
"$ref": "#/definitions/ReviewStoryStepReadiness"
},
"reviewFocus": {
"items": {
"type": "string"
},
"type": "array"
},
"stepId": {
"type": "string"
},
"summary": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"anchorIds",
"dependencyRationale",
"goal",
"index",
"readiness",
"reviewFocus",
"stepId",
"summary",
"title"
],
"type": "object"
},
"ReviewStoryStepReadiness": {
"enum": [
"outline",
"enriching",
"ready",
"failed"
],
"type": "string"
},
"ReviewTarget": {
"oneOf": [
{
"description": "Review the working tree: staged, unstaged, and untracked files.",
"properties": {
"type": {
"enum": [
"uncommittedChanges"
],
"title": "UncommittedChangesReviewTargetType",
"type": "string"
}
},
"required": [
"type"
],
"title": "UncommittedChangesReviewTarget",
"type": "object"
},
{
"description": "Review changes between the current branch and the given base branch.",
"properties": {
"branch": {
"type": "string"
},
"type": {
"enum": [
"baseBranch"
],
"title": "BaseBranchReviewTargetType",
"type": "string"
}
},
"required": [
"branch",
"type"
],
"title": "BaseBranchReviewTarget",
"type": "object"
},
{
"description": "Review the changes introduced by a specific commit.",
"properties": {
"sha": {
"type": "string"
},
"title": {
"description": "Optional human-readable label (e.g., commit subject) for UIs.",
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"commit"
],
"title": "CommitReviewTargetType",
"type": "string"
}
},
"required": [
"sha",
"type"
],
"title": "CommitReviewTarget",
"type": "object"
},
{
"description": "Arbitrary instructions, equivalent to the old free-form prompt.",
"properties": {
"instructions": {
"type": "string"
},
"type": {
"enum": [
"custom"
],
"title": "CustomReviewTargetType",
"type": "string"
}
},
"required": [
"instructions",
"type"
],
"title": "CustomReviewTarget",
"type": "object"
}
]
},
"SandboxPolicy": {
"oneOf": [
{
@@ -5557,6 +5845,26 @@
"title": "Turn/completedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"reviewStory/snapshot/updated"
],
"title": "ReviewStory/snapshot/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ReviewStorySnapshotUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "ReviewStory/snapshot/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {