Linux + iPhone Continuity / iMessage / SMS
add docs and LICENSE
Zack Bartel18f6c5733dd4
diff --git a/LICENSE b/LICENSEnew file mode 100644index 0000000..847aaa2--- /dev/null+++ b/LICENSE@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2026 Zack Bartel++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.diff --git a/DESIGN.md b/docs/DESIGN.mdsimilarity index 100%rename from DESIGN.mdrename to docs/DESIGN.mddiff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.mdnew file mode 100644index 0000000..4dda37b--- /dev/null+++ b/docs/PROTOCOL.md@@ -0,0 +1,47 @@+# Tether Communication Protocol++The `tetherd` daemon communicates with its clients (the `tether` CLI, the browser extension via native messaging, and the iPhone App via TCP) using a simple, unified protocol over standard sockets.++## Protocol Structure++All communication happens via **newline-delimited JSON**. Every individual command or broadcast must:+1. Be a valid JSON object.+2. Terminate with a literal `\n` character.++If a payload arrives that cannot be parsed as JSON, the daemon will gracefully ignore it. After successfully processing a message, the server currently sends an ad-hoc text response `OK\n`, though standard JSON responses may replace this over time.++---++## 1. Clipboard Sync++The clipboard capabilities allow seamless copying and pasting between the Host (Linux / Wayland) and Clients (iPhone / Browser).++### `clipboard_set` (Client -> Daemon)++**Description**: Sent by the client when it wants to update the Host's Wayland clipboard.++**Payload**:+```json+{+ "command": "clipboard_set",+ "content": "The text you want to place directly onto the wayland clipboard."+}+```++**Daemon Behavior**: The daemon writes the `content` out to the immediate active Wayland session by creating a `wlr_data_control_source_v1` offer.++---++### `clipboard_updated` (Daemon -> Clients)++**Description**: Broadcasted from the daemon to *all connected active clients* when the Host's clipboard text natively changes (e.g., when the user highlights and presses `Ctrl-C` in a desktop app).++**Payload**:+```json+{+ "command": "clipboard_updated",+ "content": "The newly detected clipboard text."+}+```++**Daemon Behavior**: Fired asynchronously whenever the `wlr_data_control_device` `setDataOffer` informs the daemon that the primary clipboard selection has rotated.