feat(agent): add rpc status command and tests; rpc only path

This commit is contained in:
Peter Steinberger
2025-12-07 05:20:50 +01:00
parent fb1de5c1c6
commit 32720bd372
5 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import Clawdis
import Testing
@testable import ClawdisIPC
@Suite(.serialized) struct AgentRPCTests {
@Test func statusFailsWhenProcessMissing() async {
let result = await AgentRPC.shared.status()
// We don't assert ok because the worker may not be available in CI.
// Instead, ensure the call returns without throwing and provides a message.
#expect(result.ok == true || result.error != nil)
}
@Test func rejectEmptyMessage() async {
let result = await AgentRPC.shared.send(text: "", thinking: nil, session: "main")
#expect(result.ok == false)
}
}