@agentvault/secure-channel 0.5.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/README.md +37 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,28 +2,21 @@
2
2
 
3
3
  End-to-end encrypted communication channel for AI agents on the [AgentVault](https://agentvault.chat) platform. Connect your agent to its owner with XChaCha20-Poly1305 encryption and Double Ratchet forward secrecy.
4
4
 
5
- ## What's New in v0.4.0
5
+ ## What's New in v0.5.0
6
6
 
7
- **Webhook Notifications** — Your agent can now receive HTTP webhook callbacks when a new message arrives, even when it's not connected via WebSocket. This is ideal for serverless agents, agents that poll on a schedule, or any agent that isn't always online.
7
+ **Desktop Notifications** — Incoming messages now trigger native OS notifications (macOS Notification Center, Windows Toast, Linux notify-send) when using the CLI. Enabled by default disable with `--no-notifications`.
8
8
 
9
- ### Upgrading from v0.3.x
9
+ **Webhook URL CLI Flag** (v0.4.4) — `--webhook-url` flag and `AGENTVAULT_WEBHOOK_URL` env var for programmatic webhook registration.
10
10
 
11
- ```bash
12
- npm install @agentvault/secure-channel@latest
13
- ```
11
+ **Webhook Notifications** (v0.4.0) — HTTP webhook callbacks when a new message arrives, even when not connected via WebSocket.
14
12
 
15
- Add `webhookUrl` to your config to enable:
13
+ ### Upgrading
16
14
 
17
- ```js
18
- const channel = new SecureChannel({
19
- inviteToken: "your-token",
20
- dataDir: "./agentvault-data",
21
- apiUrl: "https://api.agentvault.chat",
22
- webhookUrl: "https://your-server.com/webhook/agentvault", // NEW in 0.4.0
23
- });
15
+ ```bash
16
+ npm install @agentvault/secure-channel@latest
24
17
  ```
25
18
 
26
- No other code changes required — fully backward-compatible.
19
+ No code changes required — fully backward-compatible.
27
20
 
28
21
  ---
29
22
 
@@ -58,8 +51,10 @@ The CLI will:
58
51
  | `--name` | `"CLI Agent"` | Agent display name |
59
52
  | `--data-dir` | `./agentvault-data` | Directory for persistent state |
60
53
  | `--api-url` | `https://api.agentvault.chat` | API endpoint |
54
+ | `--webhook-url` | (none) | URL for HTTP webhook notifications |
55
+ | `--no-notifications` | (notifications on) | Disable OS desktop notifications |
61
56
 
62
- Environment variables (`AGENTVAULT_INVITE_TOKEN`, `AGENTVAULT_AGENT_NAME`, `AGENTVAULT_DATA_DIR`, `AGENTVAULT_API_URL`) work as alternatives to flags.
57
+ Environment variables (`AGENTVAULT_INVITE_TOKEN`, `AGENTVAULT_AGENT_NAME`, `AGENTVAULT_DATA_DIR`, `AGENTVAULT_API_URL`, `AGENTVAULT_WEBHOOK_URL`, `AGENTVAULT_NO_NOTIFICATIONS`) work as alternatives to flags.
63
58
 
64
59
  ### Option 2: SDK (Programmatic)
65
60
 
@@ -216,6 +211,32 @@ AgentVault supports multiple owner devices (e.g., desktop + mobile). The channel
216
211
 
217
212
  No additional configuration needed — multi-device is handled transparently.
218
213
 
214
+ ## Running as a Service
215
+
216
+ The agent process must stay running to receive messages and desktop notifications. Use [pm2](https://pm2.keymetrics.io/) to keep it alive:
217
+
218
+ ```bash
219
+ # Install pm2 globally
220
+ npm install -g pm2
221
+
222
+ # Start your agent as a background service
223
+ pm2 start npx --name "my-agent" -- @agentvault/secure-channel \
224
+ --token=YOUR_TOKEN --name="My Agent"
225
+
226
+ # View logs
227
+ pm2 logs my-agent
228
+
229
+ # Auto-restart on crash
230
+ pm2 save
231
+
232
+ # Stop the agent
233
+ pm2 stop my-agent
234
+ ```
235
+
236
+ pm2 keeps the process running if the terminal closes and auto-restarts on crashes. Desktop notifications continue to work as long as pm2 was started from your desktop session.
237
+
238
+ For headless servers (no desktop), use `--no-notifications` and configure `--webhook-url` instead.
239
+
219
240
  ## Security
220
241
 
221
242
  - **XChaCha20-Poly1305** symmetric encryption (192-bit nonces)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvault/secure-channel",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",