Integrate corrected char expressions into Liam code36
This commit is contained in:
@@ -52,6 +52,24 @@ fun main() {
|
||||
check(socket.sent.size==count)
|
||||
client.release();Handler.drain()
|
||||
}
|
||||
val unreviewed=System.getProperty("character.unreviewedPin","")
|
||||
if(unreviewed.isNotEmpty()) {
|
||||
check(unreviewed.matches(Regex("[0-9a-f]{64}")))
|
||||
for(mode in listOf("disabled","unknown_ready","unknown_pending")) {
|
||||
val client=DialogueClient("localhost",5011,{},persona="liam",
|
||||
actionPackSha={if(mode=="unknown_ready") unreviewed else null},
|
||||
pendingActionPackSha={if(mode=="unknown_pending") unreviewed else null})
|
||||
val socket=Socket();client.field("socket",socket);val listener=client.listener(0)
|
||||
listener.onMessage(socket,"""{"type":"auth","state":"ok"}""");Handler.drain()
|
||||
check(socket.sent.size==1);val hello=socket.sent.single()
|
||||
check("\"persona\":\"liam\"" in hello && "voice_id" !in hello && "conversation_id" !in hello)
|
||||
if(mode=="disabled")check("action_pack_sha256" !in hello && "action_pending_pack_sha256" !in hello)
|
||||
wires.add(hello)
|
||||
listener.onMessage(socket,"""{"type":"hello","action_available":false,"action_pending":false}""");Handler.drain()
|
||||
check(client.actionNegotiation=="unavailable" && !client.capabilitiesReady())
|
||||
client.disconnect();client.release();Handler.drain();check(socket.cancelled)
|
||||
}
|
||||
}
|
||||
java.io.File(checkNotNull(System.getProperty("character.helloFile"))).writeText(wires.joinToString("\n")+"\n")
|
||||
println("PASS: "+wires.size+" actual DialogueClient AUTH→production HELLO persona/media offers, pending readiness, duplicate AUTH and retired socket fences; transport/main/JSON adapters, device not_run")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user