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.Call
import android.telecom.CallScreeningService import android.telecom.CallScreeningService
import android.util.Log import android.util.Log
import com.inou.clawdnode.gateway.DirectGateway
import com.inou.clawdnode.ClawdNodeApp import com.inou.clawdnode.ClawdNodeApp
import com.inou.clawdnode.debug.DebugClient import com.inou.clawdnode.debug.DebugClient
import com.inou.clawdnode.gateway.DirectGateway
import com.inou.clawdnode.protocol.CallIncomingEvent
import com.inou.clawdnode.service.NodeService import com.inou.clawdnode.service.NodeService
/** /**
@ -73,12 +72,12 @@ class CallScreener : CallScreeningService() {
// Send event to Gateway via WebSocket // Send event to Gateway via WebSocket
try { try {
val event = CallIncomingEvent( DirectGateway.sendCall(
callId = callId, callId = callId,
number = number, number = number,
contact = contactName contact = contactName,
state = "incoming"
) )
nodeService?.sendEvent(event)
DebugClient.log("Call event sent to gateway", mapOf("callId" to callId)) DebugClient.log("Call event sent to gateway", mapOf("callId" to callId))
} catch (e: Exception) { } catch (e: Exception) {
DebugClient.error("Failed to send call event", e) 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.TextToSpeech
import android.speech.tts.UtteranceProgressListener import android.speech.tts.UtteranceProgressListener
import android.telecom.Call import android.telecom.Call
import com.inou.clawdnode.gateway.DirectGateway
import android.telecom.InCallService import android.telecom.InCallService
import android.telecom.VideoProfile import android.telecom.VideoProfile
import android.util.Log import android.util.Log
@ -141,12 +142,12 @@ class VoiceCallService : InCallService(), TextToSpeech.OnInitListener {
Call.STATE_DISCONNECTED -> { Call.STATE_DISCONNECTED -> {
// Call ended // Call ended
val duration = 0 // TODO: Calculate actual duration val duration = 0 // TODO: Calculate actual duration
val event = CallEndedEvent( DirectGateway.sendCall(
callId = callId, callId = callId,
durationSeconds = duration, number = call.details.handle?.schemeSpecificPart,
outcome = "completed" contact = null,
state = "ended"
) )
nodeService?.sendEvent(event)
ClawdNodeApp.instance.auditLog.logCall( ClawdNodeApp.instance.auditLog.logCall(
"CALL_ENDED", "CALL_ENDED",
@ -308,12 +309,11 @@ class VoiceCallService : InCallService(), TextToSpeech.OnInitListener {
Log.i(tag, "STT result: $transcript") Log.i(tag, "STT result: $transcript")
currentCallId?.let { callId -> currentCallId?.let { callId ->
val event = CallAudioEvent( DirectGateway.sendLog("call.audio", mapOf(
callId = callId, "callId" to callId,
transcript = transcript, "transcript" to transcript,
isFinal = true "isFinal" to true
) ))
nodeService?.sendEvent(event)
} }
// Continue listening // Continue listening
@ -329,12 +329,11 @@ class VoiceCallService : InCallService(), TextToSpeech.OnInitListener {
Log.d(tag, "STT partial: $transcript") Log.d(tag, "STT partial: $transcript")
currentCallId?.let { callId -> currentCallId?.let { callId ->
val event = CallAudioEvent( DirectGateway.sendLog("call.audio.partial", mapOf(
callId = callId, "callId" to callId,
transcript = transcript, "transcript" to transcript,
isFinal = false "isFinal" to false
) ))
nodeService?.sendEvent(event)
} }
} }

View File

@ -171,16 +171,14 @@ class NotificationListener : NotificationListenerService() {
// Send via WebSocket if connected // Send via WebSocket if connected
try { try {
val event = NotificationEvent( DirectGateway.sendNotification(
id = notificationId, id = notificationId,
app = appName, app = appName,
packageName = sbn.packageName, packageName = sbn.packageName,
title = title, title = title,
text = text, text = text,
actions = actions, actions = actions
timestamp = sbn.postTime
) )
nodeService?.sendEvent(event)
} catch (e: Exception) { } catch (e: Exception) {
DebugClient.error("WebSocket send failed", e) 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_GATEWAY_TOKEN = "gateway_token"
private const val KEY_NODE_ID = "node_id" private const val KEY_NODE_ID = "node_id"
// Default values - ClawdNode custom gateway (not Clawdbot) // Default values - OpenClaw gateway
private const val DEFAULT_GATEWAY_URL = "ws://100.123.216.65:9878" private const val DEFAULT_GATEWAY_URL = "https://james.jongsma.me"
private const val DEFAULT_GATEWAY_TOKEN = "" // No token needed for custom gateway private const val DEFAULT_GATEWAY_TOKEN = "2dee57cc3ce2947c27ce9e848d5c3e95cc452f25a1477462"
} }
} }