feat(app): define trusted rewind branch flow

This commit is contained in:
Codex
2026-07-28 03:23:57 -04:00
parent cf9507a9dd
commit 497c127e87
15 changed files with 671 additions and 26 deletions
@@ -0,0 +1,30 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ForkBranchRequest",
"description": "Requests a new playable branch rooted at an already committed story node.\n\nThe caller identifies the branch head it observed so the trusted runtime can\nreject a rewind racing with a newer turn. The new branch id is generated by\nthe runtime from these trusted inputs and is never supplied by the UI or the\nmodel.",
"type": "object",
"properties": {
"actionId": {
"type": "string"
},
"currentBranchId": {
"type": "string"
},
"expectedCurrentNodeId": {
"type": "string"
},
"sourceNodeId": {
"type": "string"
},
"storyId": {
"type": "string"
}
},
"required": [
"storyId",
"currentBranchId",
"expectedCurrentNodeId",
"sourceNodeId",
"actionId"
]
}