chore: auto-commit uncommitted changes

This commit is contained in:
James (ClawdBot) 2026-02-08 01:30:06 -05:00
parent 780fb630e2
commit 0a4ef6a47e
4 changed files with 24 additions and 28 deletions

View File

@ -8,10 +8,9 @@ import android.os.IBinder
import android.telecom.Call
import android.telecom.CallScreeningService
import android.util.Log
import com.inou.clawdnode.gateway.DirectGateway
import com.inou.clawdnode.ClawdNodeApp
import com.inou.clawdnode.debug.DebugClient
import com.inou.clawdnode.gateway.DirectGateway
import com.inou.clawdnode.protocol.CallIncomingEvent
import com.inou.clawdnode.service.NodeService
/**
@ -73,12 +72,12 @@ class CallScreener : CallScreeningService() {
// Send event to Gateway via WebSocket
try {
val event = CallIncomingEvent(
DirectGateway.sendCall(
callId = callId,
number = number,
contact = contactName
contact = contactName,
state = "incoming"
)
nodeService?.sendEvent(event)
DebugClient.log("Call event sent to gateway", mapOf("callId" to callId))
} catch (e: Exception) {
DebugClient.error("Failed to send call event", e)

View File

@ -13,6 +13,7 @@ import android.speech.SpeechRecognizer
import android.speech.tts.TextToSpeech
import android.speech.tts.UtteranceProgressListener
import android.telecom.Call
import com.inou.clawdnode.gateway.DirectGateway
import android.telecom.InCallService
import android.telecom.VideoProfile
import android.util.Log
@ -141,12 +142,12 @@ class VoiceCallService : InCallService(), TextToSpeech.OnInitListener {
Call.STATE_DISCONNECTED -> {
// Call ended
val duration = 0 // TODO: Calculate actual duration
val event = CallEndedEvent(
DirectGateway.sendCall(
callId = callId,
durationSeconds = duration,
outcome = "completed"
number = call.details.handle?.schemeSpecificPart,
contact = null,
state = "ended"
)
nodeService?.sendEvent(event)
ClawdNodeApp.instance.auditLog.logCall(
"CALL_ENDED",
@ -308,12 +309,11 @@ class VoiceCallService : InCallService(), TextToSpeech.OnInitListener {
Log.i(tag, "STT result: $transcript")
currentCallId?.let { callId ->
val event = CallAudioEvent(
callId = callId,
transcript = transcript,
isFinal = true
)
nodeService?.sendEvent(event)
DirectGateway.sendLog("call.audio", mapOf(
"callId" to callId,
"transcript" to transcript,
"isFinal" to true
))
}
// Continue listening
@ -329,12 +329,11 @@ class VoiceCallService : InCallService(), TextToSpeech.OnInitListener {
Log.d(tag, "STT partial: $transcript")
currentCallId?.let { callId ->
val event = CallAudioEvent(
callId = callId,
transcript = transcript,
isFinal = false
)
nodeService?.sendEvent(event)
DirectGateway.sendLog("call.audio.partial", mapOf(
"callId" to callId,
"transcript" to transcript,
"isFinal" to false
))
}
}

View File

@ -171,16 +171,14 @@ class NotificationListener : NotificationListenerService() {
// Send via WebSocket if connected
try {
val event = NotificationEvent(
DirectGateway.sendNotification(
id = notificationId,
app = appName,
packageName = sbn.packageName,
title = title,
text = text,
actions = actions,
timestamp = sbn.postTime
actions = actions
)
nodeService?.sendEvent(event)
} catch (e: Exception) {
DebugClient.error("WebSocket send failed", e)
}

View File

@ -50,8 +50,8 @@ class TokenStore(context: Context) {
private const val KEY_GATEWAY_TOKEN = "gateway_token"
private const val KEY_NODE_ID = "node_id"
// Default values - ClawdNode custom gateway (not Clawdbot)
private const val DEFAULT_GATEWAY_URL = "ws://100.123.216.65:9878"
private const val DEFAULT_GATEWAY_TOKEN = "" // No token needed for custom gateway
// Default values - OpenClaw gateway
private const val DEFAULT_GATEWAY_URL = "https://james.jongsma.me"
private const val DEFAULT_GATEWAY_TOKEN = "2dee57cc3ce2947c27ce9e848d5c3e95cc452f25a1477462"
}
}