feat(codex): fork running sessions through the last completed turn (#2369)

This commit is contained in:
Ananovo
2026-11-11 13:04:43 +08:00
committed by GitHub
parent f11f7097ef
commit 5e76af5615
23 changed files with 444 additions and 23 deletions
+4 -2
View File
@@ -659,8 +659,9 @@ export const SendMessageRequestSchema = z.object({
export type SendMessageRequest = z.infer<typeof SendMessageRequestSchema>
export const ForkConversationRequestSchema = z.object({
messageLocalId: z.string().min(1).optional()
})
messageLocalId: z.string().min(1).optional(),
latestCompleted: z.boolean().optional()
}).refine(value => !(value.messageLocalId && value.latestCompleted), { message: 'Choose one fork boundary mode' })
export type ForkConversationRequest = z.infer<typeof ForkConversationRequestSchema>
@@ -692,6 +693,7 @@ export type RewindConversationResponse = {
/** CLI → hub RPC result for native fork (before HAPI child binding). */
export type ForkConversationRpcResult = {
completedTurnId?: string
nativeSessionId: string
/** Shared runtimes bind the child themselves; hub must not spawn another engine. */
sessionId?: string