mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-18 03:27:08 +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:
@@ -29,6 +29,7 @@ public struct AgentStateRequest: Codable, Equatable, Sendable {
|
||||
/// Mirrors `AgentStateCompletedRequestSchema` (`shared/src/schemas.ts`).
|
||||
public struct AgentStateCompletedRequest: Codable, Equatable, Sendable {
|
||||
public enum Status: String, Codable, Sendable {
|
||||
case resolved
|
||||
case canceled
|
||||
case denied
|
||||
case approved
|
||||
|
||||
@@ -63,13 +63,16 @@ public struct ConversationHistoryCapabilities: Codable, Equatable, Sendable {
|
||||
|
||||
/// Per-session capability flags advertised by the CLI.
|
||||
public struct SessionCapabilities: Codable, Equatable, Sendable {
|
||||
public var concurrentClients: Bool?
|
||||
public var terminal: Bool?
|
||||
public var conversationHistory: ConversationHistoryCapabilities?
|
||||
|
||||
public init(
|
||||
terminal: Bool? = nil,
|
||||
concurrentClients: Bool? = nil,
|
||||
conversationHistory: ConversationHistoryCapabilities? = nil
|
||||
) {
|
||||
self.concurrentClients = concurrentClients
|
||||
self.terminal = terminal
|
||||
self.conversationHistory = conversationHistory
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user