clawleash 0.1.1 → 0.1.2

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
@@ -64,6 +64,8 @@ The `PermissionRequest` hook **blocks** while clawleash holds the HTTP request o
64
64
 
65
65
  **Push notifications (optional):** set an [ntfy](https://ntfy.sh) topic and subscribe to it in the ntfy app to get pinged the moment a prompt needs you.
66
66
 
67
+ 📖 **Step-by-step:** see **[docs/SETUP.md](docs/SETUP.md)** for the full Tailscale and ntfy walkthrough (with the same-tailnet gotcha) and troubleshooting.
68
+
67
69
  ## clawleash vs the alternatives
68
70
 
69
71
  | | **clawleash** | ntfy-only hook | Anthropic Remote Control | clawd-on-desk |
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawleash",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Approve or deny Claude Code permission prompts from your phone — so long autonomous runs never stall while you're away from the desk. Self-hosted, token-gated, over Tailscale or LAN.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -32,6 +32,7 @@
32
32
  "bin/",
33
33
  "src/",
34
34
  "skill/",
35
+ "assets/",
35
36
  "README.md",
36
37
  "LICENSE"
37
38
  ],
package/src/daemon.js CHANGED
@@ -8,6 +8,17 @@ const { renderPage, manifestFor } = require("./mobile");
8
8
  const { createRegistry } = require("./permissions");
9
9
  const { createStatus } = require("./status");
10
10
  const { pushNtfy } = require("./notify");
11
+ const fs = require("fs");
12
+ const path = require("path");
13
+
14
+ // The home-screen / favicon image, served publicly (not sensitive).
15
+ const ICON_PATH = path.join(__dirname, "..", "assets", "icon.png");
16
+ let _iconBuf = null;
17
+ function readIcon() {
18
+ if (_iconBuf) return _iconBuf;
19
+ try { _iconBuf = fs.readFileSync(ICON_PATH); } catch { _iconBuf = Buffer.alloc(0); }
20
+ return _iconBuf;
21
+ }
11
22
 
12
23
  // Settle a held permission well before Claude Code's 600s hook timeout so we
13
24
  // can cleanly fall back to the terminal prompt if nobody answers.
@@ -76,6 +87,13 @@ function startDaemon({ getConfig, onLog } = {}) {
76
87
  return;
77
88
  }
78
89
 
90
+ // ── Public app icon (no token) — apple-touch-icon / favicon / manifest icon ──
91
+ if (p === "/icon.png") {
92
+ res.writeHead(200, { "Content-Type": "image/png", "Cache-Control": "public, max-age=86400" });
93
+ res.end(readIcon());
94
+ return;
95
+ }
96
+
79
97
  // ── Token gate for everything phone-facing ──
80
98
  const token = cfg().token || "";
81
99
  if (!token || url.searchParams.get("k") !== token) {
package/src/mobile.js CHANGED
@@ -3,8 +3,6 @@
3
3
  // renders pending allow/deny permission cards + live session bubbles. Tapping a
4
4
  // button POSTs to /api/permission.
5
5
 
6
- const FAVICON = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='88'%3E%F0%9F%A6%80%3C/text%3E%3C/svg%3E";
7
-
8
6
  function manifestFor(token) {
9
7
  return JSON.stringify({
10
8
  name: "clawleash",
@@ -16,7 +14,7 @@ function manifestFor(token) {
16
14
  // Bake the token in: the Home Screen launch uses start_url, NOT the URL you
17
15
  // added — without it the launched PWA would hit a tokenless URL and 403.
18
16
  start_url: "/?k=" + encodeURIComponent(token || ""),
19
- icons: [{ src: FAVICON, sizes: "any", type: "image/svg+xml" }],
17
+ icons: [{ src: "/icon.png", sizes: "512x512", type: "image/png", purpose: "any" }],
20
18
  });
21
19
  }
22
20
 
@@ -24,8 +22,8 @@ function renderPage(token) {
24
22
  return `<!doctype html><html lang="en"><head>
25
23
  <meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
26
24
  <title>clawleash</title>
27
- <link rel="icon" href="${FAVICON}">
28
- <link rel="apple-touch-icon" href="${FAVICON}">
25
+ <link rel="icon" href="/icon.png">
26
+ <link rel="apple-touch-icon" href="/icon.png">
29
27
  <link rel="manifest" href="/manifest.webmanifest?k=${encodeURIComponent(token || "")}">
30
28
  <meta name="theme-color" content="#1c1c1f">
31
29
  <meta name="apple-mobile-web-app-capable" content="yes">