This commit is contained in:
Max Goedjen
2025-09-06 14:06:32 -07:00
parent 9c8810cc56
commit 40438076e9
11 changed files with 426 additions and 91 deletions

View File

@@ -36,9 +36,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
Task {
for await session in socketController.sessions {
Task {
let inputParser = SSHAgentInputParser()
do {
for await message in session.messages {
let agentResponse = try await agent.handle(data: message, provenance: session.provenance)
let request = try await inputParser.parse(data: message)
let agentResponse = await agent.handle(request: request, provenance: session.provenance)
try await session.write(agentResponse)
}
} catch {

View File

@@ -0,0 +1,10 @@
import Foundation
import SecretAgentKit
struct XPCAgentInputParser: SSHAgentInputParserProtocol {
func parse(data: Data) async throws -> SSHAgent.Request {
fatalError()
}
}