poke-gate 0.1.0 → 0.1.4

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.
@@ -0,0 +1,56 @@
1
+ # How It Works
2
+
3
+ Poke Gate bridges your machine to Poke's cloud so your AI assistant can execute tasks locally.
4
+
5
+ ## Architecture
6
+
7
+ ```mermaid
8
+ flowchart LR
9
+ A["You (iMessage)"] --> B["Poke Agent"]
10
+ B --> C["MCP Tunnel"]
11
+ C --> D["Poke Gate"]
12
+ D --> E["Executes locally"]
13
+ E --> C
14
+ C --> B
15
+ B --> A
16
+ ```
17
+
18
+ ## Step by step
19
+
20
+ 1. **You send a message** to Poke from iMessage, Telegram, or SMS — e.g. "What's running on port 3000?"
21
+
22
+ 2. **Poke's agent processes it** and decides it needs your machine to answer. It picks a tool like `run_command`.
23
+
24
+ 3. **The tool call travels through the MCP tunnel** — a WebSocket connection from Poke's cloud to your machine via the Piko protocol.
25
+
26
+ 4. **Poke Gate receives the call** on your local MCP server (a lightweight HTTP server running on localhost).
27
+
28
+ 5. **The tool executes locally** — runs the shell command, reads the file, takes the screenshot, etc.
29
+
30
+ 6. **The result flows back** through the tunnel to Poke's agent, which formats it and replies to you.
31
+
32
+ ## Key components
33
+
34
+ ### MCP Server
35
+
36
+ A local HTTP server that implements the [Model Context Protocol](https://modelcontextprotocol.io) (MCP) using raw JSON-RPC over HTTP. It exposes tools like `run_command`, `read_file`, etc.
37
+
38
+ ### PokeTunnel
39
+
40
+ A WebSocket-based tunnel from the [Poke SDK](https://www.npmjs.com/package/poke) that connects your local MCP server to Poke's cloud. Uses the Piko protocol with Yamux multiplexing for reliable, multiplexed communication.
41
+
42
+ ### Connection lifecycle
43
+
44
+ - On startup, Poke Gate creates a connection via `POST /mcp/connections/cli`
45
+ - A WebSocket tunnel is established to the upstream URL
46
+ - Poke's cloud can now route tool calls through the tunnel to your machine
47
+ - If the connection drops, it reconnects automatically
48
+ - Old connections are cleaned up before creating new ones to prevent duplicates
49
+
50
+ ## On-connect notification
51
+
52
+ When the tunnel connects, Poke Gate sends a message to your Poke agent:
53
+
54
+ > "Hey! I've connected my computer to you via Poke Gate. You can now run commands, read and write files, list directories, take screenshots, and check system info on my machine."
55
+
56
+ This ensures the agent knows your machine is available and which tools it can use.
package/docs/index.md ADDED
@@ -0,0 +1,63 @@
1
+ ---
2
+ layout: home
3
+
4
+ hero:
5
+ name: Poke Gate
6
+ text: Your Mac, controlled by AI — from anywhere.
7
+ tagline: Give your Poke AI assistant access to your machine. Run commands, read files, take screenshots — all from iMessage, Telegram, or SMS.
8
+ image:
9
+ src: /logo.png
10
+ alt: Poke Gate
11
+ actions:
12
+ - theme: brand
13
+ text: Get Started
14
+ link: /getting-started
15
+ - theme: alt
16
+ text: View on GitHub
17
+ link: https://github.com/f/poke-gate
18
+
19
+ features:
20
+ - icon: 🖥️
21
+ title: Full Shell Access
22
+ details: Run any terminal command on your machine — ls, git, brew, python, curl, and more.
23
+ - icon: 📁
24
+ title: File Operations
25
+ details: Read, write, and list files and directories. Your Poke agent sees your filesystem.
26
+ - icon: 📸
27
+ title: Screenshots
28
+ details: Capture your screen remotely. Poke can see what you see.
29
+ - icon: 🤖
30
+ title: Agents
31
+ details: Scheduled scripts that run in the background — automate message digests, backups, health checks.
32
+ - icon: 🌴
33
+ title: macOS Menu Bar App
34
+ details: Native SwiftUI app that lives in your menu bar. Auto-connects, auto-restarts, shows real-time status.
35
+ - icon: ⚡
36
+ title: MCP Tunnel
37
+ details: Secure WebSocket tunnel powered by the Poke SDK. Only your authenticated agent can reach your machine.
38
+ ---
39
+
40
+ ## Quick install
41
+
42
+ ::: code-group
43
+
44
+ ```bash [Homebrew]
45
+ brew install f/tap/poke-gate
46
+ ```
47
+
48
+ ```bash [npm]
49
+ npx poke-gate
50
+ ```
51
+
52
+ ```bash [Manual]
53
+ # Download from GitHub Releases
54
+ # https://github.com/f/poke-gate/releases/latest
55
+ ```
56
+
57
+ :::
58
+
59
+ <br>
60
+
61
+ ::: tip Community project
62
+ Poke Gate is open source and not affiliated with Poke or The Interaction Company of California.
63
+ :::
@@ -0,0 +1,74 @@
1
+ # macOS App
2
+
3
+ Poke Gate includes a native SwiftUI menu bar app for macOS.
4
+
5
+ ## Menu bar
6
+
7
+ The app runs in the menu bar only — no Dock icon. Click the door icon to see the popover:
8
+
9
+ - **Status** — green dot when connected, yellow when connecting, red on error
10
+ - **Personalized** — shows "Connected to your Poke, [name]"
11
+ - **Recent activity** — last few log entries
12
+ - **Action buttons** — Logs, Agents, Settings, Restart/Start, Quit
13
+ - **About** — version, GitHub link
14
+
15
+ ### Status icons
16
+
17
+ | Icon | Meaning |
18
+ |------|---------|
19
+ | 🚪 (open) | Connected |
20
+ | 🚪 (closed) | Stopped or connecting |
21
+ | ⚠️ | Error |
22
+
23
+ ## Settings
24
+
25
+ Open Settings from the popover. The settings window shows:
26
+
27
+ - **Authentication status** — whether you're signed in via Poke OAuth
28
+ - **Sign in button** — runs `npx poke login` and opens a browser window
29
+ - **Connection status** — current state with a Reconnect button
30
+
31
+ ## Logs
32
+
33
+ The Logs window shows real-time activity:
34
+
35
+ - Tool calls are highlighted
36
+ - Errors appear in red
37
+ - Copy all logs to clipboard
38
+ - Clear logs
39
+
40
+ ## Agents Editor
41
+
42
+ The Agents window provides a built-in editor for managing agent scripts — no external editor needed.
43
+
44
+ <img src="/agents-editor.png" alt="Agents Editor" style="border-radius: 8px; border: 1px solid var(--vp-c-divider); margin: 16px 0;" />
45
+
46
+ - **Sidebar** — lists agents by `@name` from frontmatter, with interval badges and descriptions
47
+ - **Editor** — native syntax-highlighted code editor for JavaScript and env files
48
+ - **Tab bar** — switch between `.js` file and `.env` file
49
+ - **Interval editor** — change the schedule by typing a new interval (renames the file automatically)
50
+ - **New Agent** — creates a template agent with frontmatter
51
+ - **Delete** — right-click to remove an agent and its env file
52
+
53
+ Learn more about agents in the [Agents documentation](/agents/).
54
+
55
+ ## Auto-start
56
+
57
+ The app connects automatically on launch if you've previously signed in. If the connection drops, it reconnects after 2 seconds.
58
+
59
+ ## Building from source
60
+
61
+ Requires macOS 15+ and Xcode 26+.
62
+
63
+ ```bash
64
+ git clone https://github.com/f/poke-gate.git
65
+ cd poke-gate/clients/Poke\ macOS\ Gate
66
+ open Poke\ macOS\ Gate.xcodeproj
67
+ ```
68
+
69
+ Hit **Run** in Xcode, or build a universal DMG:
70
+
71
+ ```bash
72
+ cd poke-gate
73
+ ./build.sh
74
+ ```