@slush-openclaw/garmin-messenger 1.2.5

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 ADDED
@@ -0,0 +1,123 @@
1
+ # Garmin Messenger Plugin for OpenClaw
2
+
3
+ Channel plugin that connects [OpenClaw](https://github.com/openclaw/openclaw) to Garmin Messenger (Hermes) — let your AI agent send and receive satellite messages.
4
+
5
+ Built on the [Go CLI](../go-cli/) via MCP stdio.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # 1. Install the plugin
11
+ openclaw plugins install @slush-openclaw/garmin-messenger
12
+
13
+ # 2. Add and authenticate (interactive wizard)
14
+ openclaw channels add
15
+ # Select "Garmin Messenger" from the list — the wizard handles SMS login automatically.
16
+ ```
17
+
18
+ To install a specific version:
19
+
20
+ ```bash
21
+ openclaw plugins install @slush-openclaw/garmin-messenger@1.0.0
22
+ ```
23
+
24
+ <details>
25
+ <summary>Alternative: install from GitHub Release tarball</summary>
26
+
27
+ ```bash
28
+ curl -LO https://github.com/slush-dev/garmin-messenger/releases/latest/download/garmin-messenger-openclaw-plugin.tgz
29
+ openclaw plugins install ./garmin-messenger-openclaw-plugin.tgz
30
+ ```
31
+
32
+ </details>
33
+
34
+ The postinstall script downloads the `garmin-messenger` binary for your platform from the same GitHub release.
35
+
36
+ ## Authentication
37
+
38
+ ### Interactive wizard (recommended)
39
+
40
+ ```bash
41
+ openclaw channels add
42
+ ```
43
+
44
+ Select Garmin Messenger from the channel list. The wizard prompts for your phone number, sends an SMS verification code, and saves the session.
45
+
46
+ > **Note:** `openclaw channels add --channel garmin-messenger` uses the non-interactive path — it enables the channel in config but does not start the login wizard. Use the bare `openclaw channels add` for the full setup experience.
47
+
48
+ ### Re-login
49
+
50
+ ```bash
51
+ openclaw channels login --channel garmin-messenger
52
+ ```
53
+
54
+ Prompts for phone number and SMS code via stdin.
55
+
56
+ ### Agent-driven login
57
+
58
+ If the channel is enabled but not logged in, the AI agent can authenticate during conversation using the `garmin_login` tool. The agent will ask for your phone number and SMS code.
59
+
60
+ ### Non-interactive (flags only)
61
+
62
+ ```bash
63
+ openclaw channels add --channel garmin-messenger --auth-dir ~/.garmin-messenger --cli-path /usr/bin/garmin-messenger
64
+ ```
65
+
66
+ Enables the channel without logging in. Authenticate afterwards with `openclaw channels login` or let the agent handle it.
67
+
68
+ ## Configuration
69
+
70
+ | Option | Type | Default | Description |
71
+ |--------|------|---------|-------------|
72
+ | `binaryPath` | string | auto-detect | Path to `garmin-messenger` binary |
73
+ | `sessionDir` | string | `~/.garmin-messenger` | Directory for saved credentials |
74
+ | `verbose` | boolean | `false` | Enable debug logging for the MCP binary |
75
+ | `dmPolicy` | string | `pairing` | DM policy: `open`, `pairing`, or `allowlist` |
76
+ | `allowFrom` | string[] | — | Phone numbers allowed to send messages (allowlist policy) |
77
+
78
+ ### DM Policies
79
+
80
+ - **open** — accept messages from anyone
81
+ - **pairing** — accept messages from existing conversations
82
+ - **allowlist** — only accept messages from numbers in `allowFrom`
83
+
84
+ ## How It Works
85
+
86
+ The plugin spawns the `garmin-messenger mcp` binary as a subprocess and communicates via MCP (Model Context Protocol) over stdio:
87
+
88
+ 1. **Outbound** — OpenClaw calls `send_message` / `send_media_message` MCP tools
89
+ 2. **Inbound** — the MCP server pushes `notifications/resources/updated` when new messages arrive via FCM
90
+ 3. **Binary resolution** — checks config path, then bundled `bin/` directory (populated by postinstall), then `PATH`
91
+
92
+ ## Development
93
+
94
+ ```bash
95
+ cd apps/openclaw-plugin
96
+
97
+ # Install dependencies
98
+ npm install --ignore-scripts
99
+
100
+ # Run tests
101
+ npm test
102
+
103
+ # Run tests in watch mode
104
+ npm run test:watch
105
+
106
+ # Build tarball
107
+ make build-openclaw-plugin # outputs build/openclaw-plugin/*.tgz
108
+ ```
109
+
110
+ ## Project Structure
111
+
112
+ | File | Purpose |
113
+ |------|---------|
114
+ | `index.ts` | Plugin entry point — `register(api)` |
115
+ | `src/channel.ts` | Channel plugin implementation (gateway, outbound, security, directory, setup, auth) |
116
+ | `src/onboarding.ts` | Interactive onboarding wizard for `openclaw channels add` |
117
+ | `src/agent-tools.ts` | `garmin_login` agent tool for LLM-driven authentication |
118
+ | `src/mcp-bridge.ts` | MCP client wrapper for the Go binary |
119
+ | `src/binary.ts` | Binary resolution (config / bundled / PATH) |
120
+ | `src/platform.ts` | Shared platform constants and helpers |
121
+ | `src/postinstall.ts` | Downloads platform binary from GitHub Releases |
122
+ | `src/types.ts` | TypeScript type definitions |
123
+ | `openclaw.plugin.json` | Plugin manifest for OpenClaw |
package/checksums.json ADDED
@@ -0,0 +1 @@
1
+ {"garmin-messenger-darwin-amd64":"sha256:a12864885a016d008784ee5f71c8fc4e51b81cbd80f92f743671f458d40ab540","garmin-messenger-darwin-arm64":"sha256:ee17b5664854375333faf28ef658ef4fd42e2986d5388da394b21b7c8f4217e6","garmin-messenger-linux-amd64":"sha256:ea6d05b2bcaf3f9a35706e32665601f5be6d95fc5e88198cb803c57770e6be73","garmin-messenger-linux-arm64":"sha256:2bd0a303e6ac5e148575bc2dc896677c84343dcd0e2428cfda7a39958029958b","garmin-messenger-windows-amd64.exe":"sha256:732f26ebd81e7cd52cca843d15c7e270546231a7dc4c5365e5fcb491f42f7daf"}