a2acalling 0.6.43 → 0.6.45

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
@@ -49,6 +49,32 @@ a2a call "Alice's Agent" "Hey! Want to collaborate on the a2a protocol?"
49
49
  a2a call "a2a://their-host.com/fed_xyz789" "Hello!"
50
50
  ```
51
51
 
52
+ ## 🖥️ Native macOS App
53
+
54
+ A2A Callbook is also available as a native macOS app that wraps the dashboard in a proper macOS window with native integrations.
55
+
56
+ **Features:**
57
+ - Native macOS notifications for incoming calls
58
+ - Keyboard shortcuts: Cmd+1–5 for tab switching, Cmd+R to refresh
59
+ - Menu bar tray icon with server status
60
+ - Deep link support (`a2a://` URLs open in the app)
61
+ - Cmd+W hides the window (stays in tray), Cmd+Q quits
62
+
63
+ **Auto-installed** on macOS when you run `npm install -g a2acalling`. The app is placed in `~/Applications/`.
64
+
65
+ **Manual install:** Download the `.dmg` from [GitHub Releases](https://github.com/onthegonow/a2a_calling/releases).
66
+
67
+ **Build from source:**
68
+
69
+ ```bash
70
+ # Requires Rust: https://rustup.rs
71
+ cargo install tauri-cli --version "^2"
72
+ cd native/macos/src-tauri
73
+ cargo tauri build --target universal-apple-darwin
74
+ ```
75
+
76
+ To open the app via CLI: `a2a gui` (prefers native app; use `--browser` to force browser).
77
+
52
78
  ## 📦 Installation
53
79
 
54
80
  ```bash
@@ -410,11 +436,7 @@ app.listen(3001);
410
436
  | `A2A_PORT` | Server port (default: 3001) |
411
437
  | `A2A_CONFIG_DIR` | Config directory (default: `~/.config/openclaw`) |
412
438
  | `A2A_WORKSPACE` | Workspace root for context files like `USER.md` (default: current directory) |
413
- | `A2A_RUNTIME` | Runtime mode: `auto` (default), `openclaw`, or `generic` |
414
- | `A2A_RUNTIME_FAILOVER` | Fallback to generic runtime if OpenClaw runtime errors (default: `true`) |
415
- | `A2A_AGENT_COMMAND` | Generic runtime command for inbound turn handling (reads JSON from stdin) |
416
- | `A2A_SUMMARY_COMMAND` | Generic runtime command for call summaries (reads JSON from stdin) |
417
- | `A2A_NOTIFY_COMMAND` | Generic runtime command for owner notifications (reads JSON from stdin) |
439
+ | `A2A_RUNTIME` | Runtime mode: `auto` (default), `openclaw`, or `claude` |
418
440
  | `A2A_AGENT_NAME` | Override local agent display name |
419
441
  | `A2A_OWNER_NAME` | Override owner display name |
420
442
  | `A2A_COLLAB_MODE` | Conversation style: `adaptive` (default) or `deep_dive` |
package/bin/cli.js CHANGED
@@ -149,6 +149,23 @@ function openInBrowser(url) {
149
149
  }
150
150
  }
151
151
 
152
+ function findNativeApp() {
153
+ if (os.platform() !== 'darwin') return null;
154
+
155
+ const candidates = [
156
+ path.join(os.homedir(), 'Applications', 'A2A Callbook.app'),
157
+ '/Applications/A2A Callbook.app',
158
+ ];
159
+
160
+ for (const appPath of candidates) {
161
+ try {
162
+ if (fs.existsSync(appPath)) return appPath;
163
+ } catch (_) {}
164
+ }
165
+
166
+ return null;
167
+ }
168
+
152
169
  async function findLocalServerPort(preferredPorts = []) {
153
170
  const http = require('http');
154
171
 
@@ -518,8 +535,7 @@ async function handleDisclosureSubmit(args, commandLabel = 'onboard') {
518
535
  return tierData.topics.map(t => String(t && t.topic || '').trim()).filter(Boolean);
519
536
  }
520
537
 
521
- // Get tiers data (support both new 'tiers' key and legacy 'topics' key)
522
- const tiersData = manifest.tiers || manifest.topics || {};
538
+ const tiersData = manifest.tiers || {};
523
539
 
524
540
  try {
525
541
  config.setTier('public', {
@@ -1477,6 +1493,18 @@ a2a add "${inviteUrl}" "${ownerText || 'friend'}" && a2a call "${ownerText || 'f
1477
1493
  return;
1478
1494
  }
1479
1495
 
1496
+ // Prefer native app on macOS (--browser flag forces browser)
1497
+ if (!args.flags.browser) {
1498
+ const nativeApp = findNativeApp();
1499
+ if (nativeApp) {
1500
+ console.log('Opening A2A Callbook native app...');
1501
+ const result = openInBrowser(nativeApp);
1502
+ if (result.attempted) {
1503
+ return;
1504
+ }
1505
+ }
1506
+ }
1507
+
1480
1508
  const preferred = [];
1481
1509
  if (args.flags.port || args.flags.p) preferred.push(args.flags.port || args.flags.p);
1482
1510
  if (process.env.A2A_PORT) preferred.push(process.env.A2A_PORT);
@@ -2245,6 +2273,24 @@ a2a add "${inviteUrl}" "${ownerText || 'friend'}" && a2a call "${ownerText || 'f
2245
2273
  console.log('Removing database... ⏭️');
2246
2274
  }
2247
2275
 
2276
+ // Remove native macOS app if present
2277
+ if (os.platform() === 'darwin') {
2278
+ const appCandidates = [
2279
+ path.join(os.homedir(), 'Applications', 'A2A Callbook.app'),
2280
+ '/Applications/A2A Callbook.app',
2281
+ ];
2282
+ for (const appPath of appCandidates) {
2283
+ if (fs.existsSync(appPath)) {
2284
+ try {
2285
+ fs.rmSync(appPath, { recursive: true, force: true });
2286
+ console.log(`Removed ${appPath}`);
2287
+ } catch (err) {
2288
+ console.log(`Could not remove ${appPath}: ${err.message}`);
2289
+ }
2290
+ }
2291
+ }
2292
+ }
2293
+
2248
2294
  console.log('\nTo complete removal:');
2249
2295
  console.log(' npm uninstall -g a2acalling\n');
2250
2296
  console.log(`Config preserved: ${keepConfig ? 'yes' : 'no'}`);