Commit Graph

21 Commits

Author SHA1 Message Date
James (ClawdBot) 4462bf4cdf fix: Resolve NotificationManager import conflict
Use alias for our custom NotificationManager to avoid conflict with android.app.NotificationManager
2026-01-28 22:25:38 +00:00
James (ClawdBot) e3b68c9c21 feat: Add DirectGateway - our own WebSocket server
- DirectGateway.kt: bidirectional WebSocket to ws://100.123.216.65:9878
- No auth, no restrictions - full control
- Sends notifications and calls
- Receives commands: notification.action, call.answer/reject/hangup
- App sets up command handlers and auto-connects
- NotificationListener & CallScreener now send to both debug + gateway

Server: /home/johan/dev/clawdnode-gateway/server.js
HTTP API: http://100.123.216.65:9877
WebSocket: ws://100.123.216.65:9878
2026-01-28 21:55:50 +00:00
James (ClawdBot) e0835e0626 feat: Add direct HTTP debug logging
- Add DebugClient that POSTs directly to debug server (100.123.216.65:9876)
- NotificationListener: POST all events directly, full lifecycle logging
- CallScreener: POST all calls directly, full lifecycle logging
- App: Log startup and initialization
- Bypass WebSocket complexity for debugging visibility

Debug server: node /home/johan/dev/clawdnode-debug-server/server.js
Tail: tail -f /tmp/clawdnode-debug.log
2026-01-28 21:15:11 +00:00
James (ClawdBot) 5eb13b01b5 debug: Add early logging to NotificationListener
Log immediately when onNotificationPosted is called to diagnose
if the listener is firing at all.
2026-01-28 20:13:13 +00:00
James (ClawdBot) a1e94f559f fix: Use correct device auth payload format for signature
The signature payload was incorrect. Changed from:
  $nonce:$signedAt

To gateway's expected v2 format:
  v2|deviceId|clientId|clientMode|role|scopes|signedAtMs|token|nonce

This matches the buildDeviceAuthPayload() function in Clawdbot's
gateway/device-auth.js module.
2026-01-28 19:33:39 +00:00
James (ClawdBot) 1f58f36470 Switch from i2p/eddsa to Bouncy Castle for Ed25519
The i2p eddsa library produces non-standard Ed25519 signatures that
Node.js crypto doesn't accept. Bouncy Castle is more widely tested
and should produce standard-compliant signatures.
2026-01-28 19:25:57 +00:00
James (ClawdBot) 5b140362bf Show key debug info in visible Connection Log 2026-01-28 18:59:32 +00:00
James (ClawdBot) 661a668169 Add debug logging to verify public key derivation 2026-01-28 18:57:50 +00:00
James (ClawdBot) 94f1da3ff1 Fix Ed25519 signature: use standard mode, not prehashed
EdDSAEngine(MessageDigest) is for Ed25519ph (prehashed mode).
Standard Ed25519 requires EdDSAEngine() with no arguments.
2026-01-28 18:53:47 +00:00
James (ClawdBot) 56120a9b6b UI improvements for testing
- Prefill gateway URL and token with defaults
- Make connection log window larger (400dp)
- Smaller font (10sp) to fit more text
2026-01-28 18:47:49 +00:00
James (ClawdBot) 95a360354c Fix device identity: switch from ECDSA to Ed25519
- Add net.i2p.crypto:eddsa library for pure-Java Ed25519
- Rewrite DeviceIdentity to use Ed25519 (matches gateway protocol)
- Keys stored in EncryptedSharedPreferences instead of Android Keystore
- Public key format: 32 bytes raw, base64url-encoded
- Device ID: SHA-256 hash of raw public key
- Improved error handling in GatewayClient challenge flow
2026-01-28 18:42:31 +00:00
James (ClawdBot) e981f84c3c Allow cleartext HTTP for development (Tailscale/local IPs) 2026-01-28 08:34:46 +00:00
James (ClawdBot) 99e86390c4 Make token field visible (not masked) 2026-01-28 08:29:39 +00:00
James (ClawdBot) 9811d73d3f Add .gitignore, remove build artifacts from repo 2026-01-28 08:29:16 +00:00
James (ClawdBot) 16d2f2164c Add live connection log to UI for debugging 2026-01-28 08:29:01 +00:00
James (ClawdBot) fd559ffcbc Fix: Add explicit Protocol import (wildcard import wasn't resolving it) 2026-01-28 08:11:58 +00:00
James (ClawdBot) 047ef52225 Fix: Remove duplicate Protocol.kt, fix CLIENT_ID in Messages.kt 2026-01-28 08:04:34 +00:00
James (ClawdBot) 69f39ef3a3 Add Protocol constants and enable buildConfig generation 2026-01-28 06:22:25 +00:00
James (ClawdBot) 97a095e073 Fix: Implement proper Gateway WebSocket protocol
- Connect to /ws endpoint instead of /ws/node?token=...
- Handle connect.challenge event and send proper handshake
- Implement protocol v3 frame types (req/res/event)
- Add node.invoke command handling for gateway RPC
- Create DeviceIdentity for challenge signing (EC P-256 via Keystore)
- Declare caps: notifications, calls, voice
- Declare commands: notification.action/dismiss, call.answer/reject/speak/hangup
- Send proper responses for node.invoke requests
2026-01-28 05:24:48 +00:00
James (ClawdBot) 16c0fce034 Fix: Remove BuildConfig reference (generated at build time) 2026-01-28 03:53:48 +00:00
James (ClawdBot) 003d26cd4d v0.1 - Initial ClawdNode Android app 2026-01-28 03:49:06 +00:00