mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-02 23:51:34 +00:00
feat(codex): share sessions across terminal and web
Use one native app-server for terminal, Web and phone clients while retaining the existing CLI and Runner lifecycle. Synchronize native queues, permissions, question history and steering state; preserve explicit permission precedence and per-turn usage models. Resume inactive clear commands through Runner and reject independent child cold resumes. Add shared-runtime regression tests, generated protocol fixtures and lifecycle documentation.
This commit is contained in:
@@ -97,6 +97,10 @@ object PermissionModes {
|
||||
/** `isPermissionModeAllowedForFlavor`. */
|
||||
fun isAllowedForFlavor(mode: PermissionMode, flavor: String?): Boolean =
|
||||
mode in forFlavor(flavor)
|
||||
|
||||
/** New Codex sessions use the shared runtime, without HAPI Safe Yolo. */
|
||||
fun forLaunch(flavor: String?): List<PermissionMode> =
|
||||
forFlavor(flavor).filter { flavor != "codex" || it != PermissionMode.SafeYolo }
|
||||
}
|
||||
|
||||
/** `CODEX_COLLABORATION_MODES` + labels. */
|
||||
|
||||
@@ -67,6 +67,7 @@ data class WorktreeMetadata(
|
||||
/** `SessionCapabilitiesSchema`. */
|
||||
@Serializable
|
||||
data class SessionCapabilities(
|
||||
val concurrentClients: Boolean? = null,
|
||||
val terminal: Boolean? = null,
|
||||
val conversationHistory: ConversationHistoryCapabilities? = null,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user