mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-11-19 03:55:59 +01:00
Add host lookup xpc service (#826)
* Add host lookup xpc service * Remove restriction that snuck in * Test fixes
This commit is contained in:
1 parent
e9a0ff31d3
commit
70e32dcf99
21 files changed
+1126
-42
No files matched your search
@@ -54,9 +54,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
Task {
|
||||
do {
|
||||
let inputParser = try await XPCAgentInputParser()
|
||||
let hostsReader = try? await XPCHostsfileReader()
|
||||
let hosts = try? await hostsReader?.read()
|
||||
for await message in session.messages {
|
||||
let request = try await inputParser.parse(data: message)
|
||||
let agentResponse = await agent.handle(request: request, provenance: session.provenance)
|
||||
let agentResponse = await agent.handle(request: request, provenance: session.provenance, hosts: hosts)
|
||||
try session.write(agentResponse)
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in new issue
Block a user