@beachviber/agent 1.10.4 → 1.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ Phone App ←—(encrypted)—→ Relay Server ←—(encrypted)—→ Computer
12
12
  npm install -g @beachviber/agent
13
13
  ```
14
14
 
15
- Requires Node.js 20+ and [Claude Code](https://docs.anthropic.com/en/docs/claude-code) on your PATH.
15
+ Requires Node.js 20+ and [Claude Code](https://docs.anthropic.com/en/docs/claude-code) 2.0.0+ on your PATH.
16
16
 
17
17
  ## Quick Start
18
18
 
@@ -23,8 +23,8 @@ beachviber
23
23
  On first run:
24
24
 
25
25
  1. A QR code appears — scan it with the [BeachViber App](https://app.beachviber.com)
26
- 3. In your terminal, enter the verification code shown on your BeachViber App
27
- 4. Done — you're paired and encrypted end-to-end
26
+ 2. In your terminal, enter the verification code shown on your BeachViber App
27
+ 3. Done — you're paired and encrypted end-to-end
28
28
 
29
29
  On subsequent runs, the agent reconnects automatically.
30
30
 
@@ -44,24 +44,18 @@ From your phone:
44
44
 
45
45
  **Keys stay on your machine.** Private keys are stored in the OS keychain (macOS Keychain, Linux Secret Service, or Windows DPAPI fallback) as PKCS8 DER — never in plaintext config files.
46
46
 
47
- **Tool approval.** A `PreToolUse` hook intercepts Claude Code tool calls. Tools already in your Claude allow list are auto-approved. Everything else is sent to your phone for approval. If the agent isn't running, the hook is a no-op.
47
+ **Tool approval via control protocol.** The agent uses Claude Code's `--permission-prompt-tool stdio` protocol to intercept tool calls in real time. Tools already in your Claude allow list are auto-approved. Everything else is sent to your phone for approval.
48
48
 
49
49
  ## Configuration
50
50
 
51
51
  The agent stores config in `~/.beachviber/`.
52
52
 
53
- ```
54
- .beachviber/
55
- ```
56
-
57
53
  ## Uninstall
58
54
 
59
55
  ```bash
60
56
  npm uninstall -g @beachviber/agent
61
57
  ```
62
58
 
63
- This removes the `PreToolUse` hook from `~/.claude/settings.json` automatically.
64
-
65
59
  ## Protocol
66
60
 
67
61
  The agent communicates over WebSocket using JSON messages. Each message has a `type`, optional `sessionId`, `timestamp`, and `payload`. When paired, the `payload` is replaced with an `encrypted` field containing an AES-256-GCM envelope.
@@ -70,21 +64,29 @@ The agent communicates over WebSocket using JSON messages. Each message has a `t
70
64
  |------|-----------|-------------|
71
65
  | `register` | Desktop → Relay | Register with device token and public key |
72
66
  | `registered` | Relay → Desktop | Registration confirmed |
67
+ | `hello` | Phone → Desktop | Phone handshake with version info |
68
+ | `hello_ack` | Desktop → Phone | Handshake response with capabilities |
73
69
  | `projects_request` | Phone → Desktop | List available projects |
74
70
  | `projects_response` | Desktop → Phone | Project list with git info |
75
71
  | `session_create` | Phone → Desktop | Start a Claude Code session |
76
72
  | `session_created` | Desktop → Phone | Session started confirmation |
77
73
  | `session_end` | Phone → Desktop | End a session |
74
+ | `sessions_request` | Phone → Desktop | List all sessions |
75
+ | `sessions_response` | Desktop → Phone | Session list with metadata |
78
76
  | `prompt` | Phone → Desktop | Send a prompt to Claude |
79
77
  | `stream_start` | Desktop → Phone | Claude started responding |
80
78
  | `stream_delta` | Desktop → Phone | Streaming text/tool-use chunk |
79
+ | `stream_meta` | Desktop → Phone | Status metadata (thinking, compacting, usage) |
81
80
  | `stream_end` | Desktop → Phone | Claude finished responding |
82
81
  | `tool_approval_request` | Desktop → Phone | Tool needs approval |
83
82
  | `tool_approval_response` | Phone → Desktop | Approve/deny tool use |
84
- | `sessions_request` | Phone → Desktop | List all sessions |
85
- | `sessions_response` | Desktop → Phone | Session list with metadata |
86
83
  | `session_history_request` | Phone → Desktop | Get session transcript |
87
84
  | `session_history_response` | Desktop → Phone | Transcript messages |
85
+ | `stop` | Phone → Desktop | Interrupt current Claude response |
86
+ | `rename_session` | Phone → Desktop | Rename a session |
87
+ | `process_spawned` | Desktop → Phone | Claude process started for session |
88
+ | `wake` | Phone → Desktop | Unlock the agent remotely |
89
+ | `sleep_notify` | Desktop → Phone | Agent locked (timer expired) |
88
90
  | `verify_code` | Desktop → Phone | Pairing verification code |
89
91
  | `verify_code_ack` | Phone → Desktop | Verification result + public key |
90
92
  | `heartbeat` | Desktop → Relay | Keep-alive |