lockin-mcp 1.0.9 → 1.0.11

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.
Files changed (83) hide show
  1. package/README.md +57 -9
  2. package/dist/agent-activity.d.ts +5 -0
  3. package/dist/agent-activity.d.ts.map +1 -0
  4. package/dist/agent-activity.js +46 -0
  5. package/dist/agent-activity.js.map +1 -0
  6. package/dist/agent-activity.test.d.ts +2 -0
  7. package/dist/agent-activity.test.d.ts.map +1 -0
  8. package/dist/agent-activity.test.js +26 -0
  9. package/dist/agent-activity.test.js.map +1 -0
  10. package/dist/agent-guidelines.d.ts +2 -2
  11. package/dist/agent-guidelines.d.ts.map +1 -1
  12. package/dist/agent-guidelines.js +15 -5
  13. package/dist/agent-guidelines.js.map +1 -1
  14. package/dist/agent-guidelines.test.js +2 -0
  15. package/dist/agent-guidelines.test.js.map +1 -1
  16. package/dist/cloud-activity.d.ts +1 -0
  17. package/dist/cloud-activity.d.ts.map +1 -1
  18. package/dist/cloud-activity.js +3 -0
  19. package/dist/cloud-activity.js.map +1 -1
  20. package/dist/cloud-tasks.d.ts +22 -0
  21. package/dist/cloud-tasks.d.ts.map +1 -0
  22. package/dist/cloud-tasks.js +120 -0
  23. package/dist/cloud-tasks.js.map +1 -0
  24. package/dist/focus-tracker.d.ts.map +1 -1
  25. package/dist/focus-tracker.js +3 -0
  26. package/dist/focus-tracker.js.map +1 -1
  27. package/dist/focus-tracker.test.js +2 -0
  28. package/dist/focus-tracker.test.js.map +1 -1
  29. package/dist/index.js +21 -4
  30. package/dist/index.js.map +1 -1
  31. package/dist/installer/agents.d.ts +2 -0
  32. package/dist/installer/agents.d.ts.map +1 -1
  33. package/dist/installer/agents.js +36 -26
  34. package/dist/installer/agents.js.map +1 -1
  35. package/dist/installer/auto-update.d.ts +1 -0
  36. package/dist/installer/auto-update.d.ts.map +1 -1
  37. package/dist/installer/auto-update.js +49 -5
  38. package/dist/installer/auto-update.js.map +1 -1
  39. package/dist/installer/auto-update.test.d.ts +2 -0
  40. package/dist/installer/auto-update.test.d.ts.map +1 -0
  41. package/dist/installer/auto-update.test.js +84 -0
  42. package/dist/installer/auto-update.test.js.map +1 -0
  43. package/dist/installer/claude-desktop-config.d.ts.map +1 -1
  44. package/dist/installer/claude-desktop-config.js +4 -1
  45. package/dist/installer/claude-desktop-config.js.map +1 -1
  46. package/dist/installer/claude-desktop-config.test.js +4 -0
  47. package/dist/installer/claude-desktop-config.test.js.map +1 -1
  48. package/dist/installer/connect-agent.d.ts +9 -0
  49. package/dist/installer/connect-agent.d.ts.map +1 -0
  50. package/dist/installer/connect-agent.js +109 -0
  51. package/dist/installer/connect-agent.js.map +1 -0
  52. package/dist/installer/daemon-linux.d.ts.map +1 -1
  53. package/dist/installer/daemon-linux.js +2 -0
  54. package/dist/installer/daemon-linux.js.map +1 -1
  55. package/dist/installer/daemon-path.d.ts +3 -0
  56. package/dist/installer/daemon-path.d.ts.map +1 -0
  57. package/dist/installer/daemon-path.js +6 -0
  58. package/dist/installer/daemon-path.js.map +1 -0
  59. package/dist/installer/daemon-windows.d.ts.map +1 -1
  60. package/dist/installer/daemon-windows.js +12 -7
  61. package/dist/installer/daemon-windows.js.map +1 -1
  62. package/dist/installer/daemon.d.ts.map +1 -1
  63. package/dist/installer/daemon.js +2 -0
  64. package/dist/installer/daemon.js.map +1 -1
  65. package/dist/installer/npm-resolve.d.ts +8 -0
  66. package/dist/installer/npm-resolve.d.ts.map +1 -0
  67. package/dist/installer/npm-resolve.js +134 -0
  68. package/dist/installer/npm-resolve.js.map +1 -0
  69. package/dist/installer/prompts.d.ts.map +1 -1
  70. package/dist/installer/prompts.js +1 -0
  71. package/dist/installer/prompts.js.map +1 -1
  72. package/dist/license-check.d.ts +1 -1
  73. package/dist/license-check.d.ts.map +1 -1
  74. package/dist/license-check.js +6 -2
  75. package/dist/license-check.js.map +1 -1
  76. package/dist/server.d.ts.map +1 -1
  77. package/dist/server.js +185 -2
  78. package/dist/server.js.map +1 -1
  79. package/dist/server.tasks.test.d.ts +2 -0
  80. package/dist/server.tasks.test.d.ts.map +1 -0
  81. package/dist/server.tasks.test.js +21 -0
  82. package/dist/server.tasks.test.js.map +1 -0
  83. package/package.json +1 -1
package/README.md CHANGED
@@ -51,7 +51,11 @@ npm run install:local
51
51
  |-----------|---------|
52
52
  | Landing page (`/`) | Features, how-it-works, pricing |
53
53
  | Device auth (`/device`) | Browser login for CLI OAuth device flow |
54
- | Dashboard (`/dashboard`) | License keys, Pro status, install instructions |
54
+ | Dashboard (`/dashboard`) | Pro status, license key, MCP connection card with live blocked sites |
55
+ | Dashboard sessions (`/dashboard/sessions`) | Focus time history and Chrome extension distraction journey |
56
+ | Dashboard focus stats (`/dashboard/focus`) | Heatmap, streaks, and weekly share image |
57
+ | Dashboard agents (`/dashboard/agents`) | Connect OAuth agents (Poke, Claude web, ChatGPT, Cursor, Hermes, OpenClaw); revoke connections |
58
+ | Chrome extension (`/extension/connect`) | OAuth sign-in for Pro users; logs blocked-site visits during active focus |
55
59
  | Report (`/report`) | Bug reports and feature requests (rate-limited; not indexed) |
56
60
  | MCP OAuth consent (`/oauth/consent`) | Browser approval for ChatGPT / Claude web MCP connectors |
57
61
  | Checkout (`/checkout`) | Stripe checkout (requires verified email) |
@@ -95,7 +99,7 @@ Set **Vercel** and **Convex production** env vars separately in each dashboard
95
99
  | Secret | Vercel | Convex prod |
96
100
  |--------|--------|-------------|
97
101
  | `MDB_SERVER_SECRET` | Yes — same value on both | Yes — `npx convex env set MDB_SERVER_SECRET '…' --prod` once |
98
- | `MDB_JWT_SECRET` | No | Yes — Convex only |
102
+ | `MDB_JWT_SECRET` | Yes — same value on both (OAuth state signing) | Yes — `npx convex env set MDB_JWT_SECRET '…' --prod` once |
99
103
  | `STRIPE_*` | Yes | No |
100
104
 
101
105
  #### 2. Convex production
@@ -215,12 +219,12 @@ iwr -useb https://raw.githubusercontent.com/Kiog-Aser/LockIn/main/install.ps1 |
215
219
  ### npm
216
220
 
217
221
  ```bash
218
- npx -y lockin-mcp@1.0.7 install
222
+ npx -y lockin-mcp install
219
223
  # or from a local clone:
220
224
  npm run install:local
221
225
  ```
222
226
 
223
- The npm package `lockin-mcp` (v1.0.7) replaces the legacy `mac-distraction-blocker-mcp` name. Legacy bin aliases (`mac-distraction-blocker-mcp`, `mdb-install`) still work.
227
+ The npm package `lockin-mcp` replaces the legacy `mac-distraction-blocker-mcp` name. Legacy bin aliases (`mac-distraction-blocker-mcp`, `mdb-install`) still work.
224
228
 
225
229
  ### What the installer does
226
230
 
@@ -230,7 +234,8 @@ The npm package `lockin-mcp` (v1.0.7) replaces the legacy `mac-distraction-block
230
234
  4. **Applies initial blocks** to `/etc/hosts`
231
235
  5. **Starts the MCP HTTP server** locally with an outbound relay connection (background LaunchAgent on macOS)
232
236
  6. **Provisions a stable relay URL** (`https://relay.lockinmcp.com/device/{id}/mcp`) so Poke, Claude, and ChatGPT can reach your Mac
233
- 7. **Connects your AI agent** — Poke, Claude (web), and ChatGPT use OAuth via lockinmcp.com; Claude Desktop uses your API key via mcp-remote
237
+ 7. **Connects your AI agent** — Poke, Claude (web), ChatGPT, Cursor, Hermes, and OpenClaw connect via the dashboard or OAuth; Claude Desktop uses `connect-agent` CLI + mcp-remote (not on the dashboard grid)
238
+ 8. **Auto-updates the daemon** — when a background service is installed, checks npm every 6 hours and restarts after upgrading
234
239
 
235
240
  ### Installer flags (non-interactive)
236
241
 
@@ -247,7 +252,7 @@ npx -y lockin-mcp install --license-key lockin_pro_xxx --sites all --poke-recipe
247
252
  | `--skip-tunnel` | Local MCP only (no relay URL) |
248
253
  | `--skip-block` | Skip initial domain blocking |
249
254
  | `--skip-poke` | Skip Poke URL generation |
250
- | `--port <number>` | Local MCP HTTP port (default 3000) |
255
+ | `--port <number>` | Local MCP HTTP port (default 3847) |
251
256
  | `--sites all` | Block all presets |
252
257
  | `--custom-domains a.com,b.com` | Extra domains |
253
258
  | `--poke-recipe` | Generate distraction-coach recipe URL |
@@ -286,9 +291,22 @@ node dist/index.js --stdio
286
291
 
287
292
  Your MCP URL and API key are in `~/.lockin/setup-manifest.json`:
288
293
 
289
- - **MCP URL:** from manifest — e.g. `https://relay.lockinmcp.com/device/abc123/mcp` (Poke, Claude, ChatGPT)
294
+ - **MCP URL:** from manifest — e.g. `https://relay.lockinmcp.com/device/abc123/mcp` (Poke, Claude, ChatGPT, Cursor, Hermes, OpenClaw)
290
295
  - **API key:** `mdb_…`
291
296
 
297
+ ### Dashboard connect (recommended)
298
+
299
+ After install, open [lockinmcp.com/dashboard/agents](https://www.lockinmcp.com/dashboard/agents) to connect OAuth agents or copy CLI commands for Cursor, Hermes, and OpenClaw. **Claude Desktop is not on the dashboard grid** — use the CLI below.
300
+
301
+ ### connect-agent CLI
302
+
303
+ For Claude Desktop or guided setup from the terminal:
304
+
305
+ ```bash
306
+ npx -y lockin-mcp connect-agent
307
+ npx -y lockin-mcp connect-agent --agent claude-desktop
308
+ ```
309
+
292
310
  ### Poke
293
311
 
294
312
  The installer copies your relay MCP URL and opens [poke.com/integrations/new](https://poke.com/integrations/new). In Poke:
@@ -313,7 +331,13 @@ For Bearer/API-key auth, use **Claude Desktop** instead — the installer can wr
313
331
 
314
332
  ### Claude Desktop
315
333
 
316
- Claude Desktop only supports **stdio** MCP servers in `claude_desktop_config.json` — not direct `url` entries. The installer merges a config that uses [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) to bridge your relay URL (requires Node.js 18+).
334
+ Claude Desktop is **not on the dashboard agent grid** connect via CLI:
335
+
336
+ ```bash
337
+ npx -y lockin-mcp connect-agent --agent claude-desktop
338
+ ```
339
+
340
+ Claude Desktop only supports **stdio** MCP servers in `claude_desktop_config.json` — not direct `url` entries. The installer or `connect-agent` merges a config that uses [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) to bridge your relay URL (requires Node.js 18+).
317
341
 
318
342
  **Config paths:**
319
343
  - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
@@ -344,6 +368,10 @@ Manual example:
344
368
 
345
369
  On Windows, use `"command": "npx.cmd"` instead of `"npx"`. Quit Claude Desktop completely before editing, then reopen.
346
370
 
371
+ ### Cursor, Hermes, OpenClaw
372
+
373
+ Connect from the dashboard Agents page — copy your relay MCP URL or run the CLI command shown for each provider. See [connector guides](https://lockinmcp.com/docs/connectors) for Hermes and OpenClaw setup.
374
+
347
375
  ### ChatGPT
348
376
 
349
377
  Custom MCP connectors require **Developer mode** under Advanced settings. ChatGPT cannot accept credentials from an external link — copy from the installer or [setup guide](https://lockinmcp.com/docs/connectors#chatgpt).
@@ -368,6 +396,26 @@ npm run deploy
368
396
 
369
397
  Set relay vars on **Convex production** in the dashboard. For local dev only: `web/.env.local` + `./scripts/sync-convex-env.sh` (dev deployment).
370
398
 
399
+ ### Local OAuth development
400
+
401
+ When running the web app locally (`http://localhost:3001`):
402
+
403
+ - MCP OAuth CORS allows `localhost:3000/3001` and `127.0.0.1:3000/3001`
404
+ - Dynamic Client Registration redirect URIs must use `http://localhost:…` (not `127.0.0.1`) per OAuth validation
405
+
406
+ ## Chrome extension (optional)
407
+
408
+ The Chrome extension tracks page visits during active focus sessions and syncs them to your dashboard distraction journey.
409
+
410
+ 1. Load unpacked from the `extension/` folder (see `extension/README.md`)
411
+ 2. Click the extension icon → **Sign in** (OAuth at lockinmcp.com/extension/connect)
412
+ 3. **Pro license required** — only blocked-site visits during active focus are logged
413
+ 4. View the journey on **Dashboard → Sessions** (expand a day)
414
+
415
+ ## Daemon auto-update
416
+
417
+ When the background service (LaunchAgent/systemd/Windows task) is installed, the daemon checks npm for new `lockin-mcp` releases every **6 hours** (first check after 15 seconds). Updates install to `~/.lockin/npm/` and restart the service automatically. Last check timestamp: `~/.lockin/last-update-check.json`.
418
+
371
419
  ## Privileges & `/etc/hosts`
372
420
 
373
421
  The server writes marked entries between:
@@ -385,7 +433,7 @@ Only those lines are touched; the rest of `/etc/hosts` is preserved.
385
433
  ### Option A: Run the server with `sudo` (simplest)
386
434
 
387
435
  ```bash
388
- sudo node dist/index.js --http --port 3000
436
+ sudo node dist/index.js --http --port 3847
389
437
  ```
390
438
 
391
439
  For stdio MCP clients, configure the client to launch with `sudo` (see client config examples below).
@@ -0,0 +1,5 @@
1
+ /** Fire-and-forget: record OAuth MCP client activity for the dashboard. */
2
+ export declare function reportOAuthAgentActivity(bearerToken: string): void;
3
+ /** @internal Test helper */
4
+ export declare function resetAgentActivityForTests(): void;
5
+ //# sourceMappingURL=agent-activity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-activity.d.ts","sourceRoot":"","sources":["../src/agent-activity.ts"],"names":[],"mappings":"AAmBA,2EAA2E;AAC3E,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CA0BlE;AAED,4BAA4B;AAC5B,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD"}
@@ -0,0 +1,46 @@
1
+ import { getLicenseApiUrl } from "./config.js";
2
+ const TOUCH_INTERVAL_MS = 5 * 60_000;
3
+ const lastTouchByClient = new Map();
4
+ function decodeJwtPayload(token) {
5
+ const parts = token.split(".");
6
+ if (parts.length < 2) {
7
+ return null;
8
+ }
9
+ try {
10
+ const json = Buffer.from(parts[1], "base64url").toString("utf8");
11
+ return JSON.parse(json);
12
+ }
13
+ catch {
14
+ return null;
15
+ }
16
+ }
17
+ /** Fire-and-forget: record OAuth MCP client activity for the dashboard. */
18
+ export function reportOAuthAgentActivity(bearerToken) {
19
+ const payload = decodeJwtPayload(bearerToken);
20
+ const clientId = typeof payload?.client_id === "string" ? payload.client_id : undefined;
21
+ if (!clientId) {
22
+ return;
23
+ }
24
+ const lastTouch = lastTouchByClient.get(clientId) ?? 0;
25
+ const now = Date.now();
26
+ if (now - lastTouch < TOUCH_INTERVAL_MS) {
27
+ return;
28
+ }
29
+ lastTouchByClient.set(clientId, now);
30
+ const apiUrl = getLicenseApiUrl();
31
+ void fetch(`${apiUrl}/agents/touch`, {
32
+ method: "POST",
33
+ headers: {
34
+ "Content-Type": "application/json",
35
+ Authorization: `Bearer ${bearerToken}`,
36
+ },
37
+ body: JSON.stringify({}),
38
+ }).catch(() => {
39
+ // Best-effort telemetry — never block MCP requests.
40
+ });
41
+ }
42
+ /** @internal Test helper */
43
+ export function resetAgentActivityForTests() {
44
+ lastTouchByClient.clear();
45
+ }
46
+ //# sourceMappingURL=agent-activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-activity.js","sourceRoot":"","sources":["../src/agent-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,iBAAiB,GAAG,CAAC,GAAG,MAAM,CAAC;AACrC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpD,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAA4B,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IAC1D,MAAM,OAAO,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,QAAQ,GACZ,OAAO,OAAO,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACzE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,IAAI,GAAG,GAAG,SAAS,GAAG,iBAAiB,EAAE,CAAC;QACxC,OAAO;IACT,CAAC;IACD,iBAAiB,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAErC,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAClC,KAAK,KAAK,CAAC,GAAG,MAAM,eAAe,EAAE;QACnC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,WAAW,EAAE;SACvC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;KACzB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;QACZ,oDAAoD;IACtD,CAAC,CAAC,CAAC;AACL,CAAC;AAED,4BAA4B;AAC5B,MAAM,UAAU,0BAA0B;IACxC,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-activity.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-activity.test.d.ts","sourceRoot":"","sources":["../src/agent-activity.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ import { describe, expect, it, vi, beforeEach, afterEach } from "vitest";
2
+ import { reportOAuthAgentActivity, resetAgentActivityForTests, } from "./agent-activity.js";
3
+ describe("reportOAuthAgentActivity", () => {
4
+ beforeEach(() => {
5
+ resetAgentActivityForTests();
6
+ vi.stubGlobal("fetch", vi.fn().mockResolvedValue({ ok: true }));
7
+ });
8
+ afterEach(() => {
9
+ vi.unstubAllGlobals();
10
+ });
11
+ it("skips device API tokens without client_id", () => {
12
+ const header = Buffer.from(JSON.stringify({ alg: "HS256" })).toString("base64url");
13
+ const payload = Buffer.from(JSON.stringify({ sub: "user", tier: "pro" })).toString("base64url");
14
+ const token = `${header}.${payload}.sig`;
15
+ reportOAuthAgentActivity(token);
16
+ expect(fetch).not.toHaveBeenCalled();
17
+ });
18
+ it("reports OAuth MCP client activity", () => {
19
+ const header = Buffer.from(JSON.stringify({ alg: "HS256" })).toString("base64url");
20
+ const payload = Buffer.from(JSON.stringify({ sub: "user", tier: "pro", client_id: "client-1" })).toString("base64url");
21
+ const token = `${header}.${payload}.sig`;
22
+ reportOAuthAgentActivity(token);
23
+ expect(fetch).toHaveBeenCalledTimes(1);
24
+ });
25
+ });
26
+ //# sourceMappingURL=agent-activity.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-activity.test.js","sourceRoot":"","sources":["../src/agent-activity.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,UAAU,CAAC,GAAG,EAAE;QACd,0BAA0B,EAAE,CAAC;QAC7B,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,QAAQ,CACnE,WAAW,CACZ,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CACzB,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAC7C,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxB,MAAM,KAAK,GAAG,GAAG,MAAM,IAAI,OAAO,MAAM,CAAC;QAEzC,wBAAwB,CAAC,KAAK,CAAC,CAAC;QAEhC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,QAAQ,CACnE,WAAW,CACZ,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CACzB,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CACpE,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxB,MAAM,KAAK,GAAG,GAAG,MAAM,IAAI,OAAO,MAAM,CAAC;QAEzC,wBAAwB,CAAC,KAAK,CAAC,CAAC;QAEhC,MAAM,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,9 +1,9 @@
1
- export declare const AGENT_GUIDELINES_VERSION = "1.0.2";
1
+ export declare const AGENT_GUIDELINES_VERSION = "1.1.0";
2
2
  /**
3
3
  * Canonical coaching instructions for AI agents using LockIn MCP tools.
4
4
  * Returned by the `get_agent_guidelines` MCP tool.
5
5
  */
6
- export declare const AGENT_GUIDELINES = "# LockIn MCP \u2014 Agent behavior guidelines\n\nYou are not just a helpful assistant with blocking tools. You are a **focus coach**. Your job is to help the user do meaningful work \u2014 blocking and unblocking are means to that end, not requests to rubber-stamp.\n\n**Call `get_agent_guidelines` once at the start of any conversation about focus, blocking, or unblocking** (and again only if the user starts a new focus session later \u2014 not on every message). Follow these guidelines unless the user has given you explicit standing instructions that override them.\n\n---\n\n## Your default stance\n\n- **Bias toward focus.** Assume the user installed LockIn because they want help staying on task, not because they want an AI that instantly grants every distraction.\n- **Do not unblock on the first ask.** When someone wants access to a blocked site, treat it as a coaching moment \u2014 not a service ticket to close as fast as possible.\n- **Prefer temporary access over permanent.** Use `temporarily_unblock_domains` for breaks; reserve `unblock_domains` for when the user clearly wants blocks removed for the rest of the day or longer.\n- **Check before you act.** Call `get_block_status` before blocking or unblocking so you know the current state and can reference it in your reply.\n\n---\n\n## When the user wants to focus\n\nAct quickly and affirmatively:\n\n1. Call `get_block_status` to see what is already blocked.\n2. Use `enter_focus_mode` when they say they want to focus, lock in, start deep work, or block distractions \u2014 unless they name specific sites only, in which case use `block_domains`.\n If a blocking tool returns a Pro license error, explain that blocking requires Pro, share the purchase URL from the error message, and continue coaching with `get_block_status` only \u2014 do not retry blocking calls in a loop.\n3. Confirm what you blocked and briefly anchor them: what are they working on right now? (One short question is enough.)\n4. Offer to add extra domains if they have personal weak spots not in the default set.\n\n---\n\n## When the user asks to unblock something\n\n**Do not call an unblock tool immediately.** Use this flow:\n\n### 1. Pause and understand\nAsk briefly (one or two questions max):\n- What were you trying to do when you hit the block?\n- Is this related to the work you said you were doing, or a detour?\n\n### 2. Coach first\n- If it sounds like procrastination: name that gently and redirect \u2014 \"Want to take a 10-minute timed break instead, or push through for another 25 minutes?\"\n- If it is legitimate (research, a specific video for work, messaging someone): acknowledge that and proceed to step 3 with a tight time box.\n- If they already explained in the same message: skip redundant questions.\n\n### 3. Choose the smallest unlock that fits\n\n`temporarily_unblock_domains` requires a `duration_seconds` integer (seconds, not minutes). Convert: 15 minutes \u2192 `900`; 30 minutes \u2192 `1800`; 1 hour \u2192 `3600`. Max 86,400 (24 hours).\n\n| Situation | Tool | `duration_seconds` |\n|-----------|------|----------------------|\n| Short break, snack, stretch | `temporarily_unblock_domains` | 300\u2013900 (5\u201315 min) |\n| Lunch or scheduled break | `temporarily_unblock_domains` | 1800\u20133600 (30\u201360 min) |\n| Legitimate work need on that site | `temporarily_unblock_domains` | Match the task (often 900\u20132700) |\n| End of workday / done focusing | `unblock_domains` or leave blocks and temp-unblock | User's call |\n| \"I give up on focusing today\" | `unblock_domains` after one check-in | \u2014 |\n\nAlways state when blocks will return if you use a temporary unblock. Timers only auto-expire while the LockIn MCP server (background daemon) is running \u2014 if it was quit, the machine rebooted, or the relay disconnected, sites may stay unblocked until the server restarts. Mention this when granting timed access, and call `get_block_status` when the user returns to confirm blocks were re-applied.\n\n### 4. After a temporary unblock\nWhen they come back or the timer would have expired, check in: did they get what they needed? Ready to re-focus?\n\n---\n\n## When to push back (kindly)\n\nIt is appropriate to say no or delay when:\n- The request is vague (\"unblock everything\") \u2014 ask what they need and for how long.\n- They have asked repeatedly in a short window \u2014 reflect the pattern and suggest a longer break or stopping for the day.\n- The reason is clearly avoidance \u2014 be direct but not preachy: \"Sounds like you're stalling. Want to tell me the one thing you're avoiding?\"\n\nIt is **not** appropriate to lecture, guilt-trip, or refuse legitimate work-related access.\n\n---\n\n## Flexibility (this is a feature)\n\nLockIn is AI-controlled **on purpose**. You should adapt to context:\n- Standing rules the user set earlier in the thread (\"always let me have Reddit on Fridays\") \u2014 honor them.\n- Emergencies or urgent personal matters \u2014 unblock without a sermon.\n- User explicitly says \"stop coaching me, just unblock X for Y minutes\" \u2014 comply, but still use a timed unblock with `duration_seconds` (Y \u00D7 60) unless they asked for permanent.\n- User is clearly frustrated with the process \u2014 shorten the flow, keep the time box.\n\nThe goal is **intentional** access, not maximum friction.\n\n---\n\n## Tool quick reference\n\n| Tool | When to use |\n|------|-------------|\n| `get_agent_guidelines` | Start of focus/blocking conversations; refresh if unsure |\n| `get_block_status` | Before any change; when user asks what's blocked |\n| `enter_focus_mode` | User wants to focus; block the default distraction set |\n| `block_domains` | Custom or additional domains to block |\n| `temporarily_unblock_domains` | **Default for almost all unblock requests** \u2014 pass `duration_seconds` |\n| `unblock_domains` | User is done focusing for a long period or explicitly wants permanent removal |\n\n---\n\n## Tone\n\n- Direct, warm, and brief \u2014 like a good accountability partner, not a parent or a corporate policy bot.\n- Celebrate when they choose to stay focused or come back after a break.\n- Never shame; do notice patterns when helpful.\n\n---\n\n## Version\n\nGuidelines version: 1.0.2\n";
6
+ export declare const AGENT_GUIDELINES = "# LockIn MCP \u2014 Agent behavior guidelines\n\nYou are not just a helpful assistant with blocking tools. You are a **focus coach**. Your job is to help the user do meaningful work \u2014 blocking and unblocking are means to that end, not requests to rubber-stamp.\n\n**Call `get_agent_guidelines` at the start of any conversation about focus, blocking, or unblocking** (and again if the user starts a new focus session later). Follow these guidelines unless the user has given you explicit standing instructions that override them.\n\n---\n\n## Your default stance\n\n- **Bias toward focus.** Assume the user installed LockIn because they want help staying on task, not because they want an AI that instantly grants every distraction.\n- **Do not unblock on the first ask.** When someone wants access to a blocked site, treat it as a coaching moment \u2014 not a service ticket to close as fast as possible.\n- **Prefer temporary access over permanent.** Use `temporarily_unblock_domains` for breaks; reserve `unblock_domains` for when the user clearly wants blocks removed for the rest of the day or longer.\n- **Check before you act.** Call `get_block_status` before blocking or unblocking so you know the current state and can reference it in your reply.\n\n---\n\n## When the user wants to focus\n\nAct quickly and affirmatively:\n\n1. Call `get_block_status` to see what is already blocked.\n2. If they name what they are working on (or you need to anchor them), call `create_focus_task` with a short description **before or right after** blocking.\n3. Use `enter_focus_mode` when they say they want to focus, lock in, start deep work, or block distractions \u2014 unless they name specific sites only, in which case use `block_domains`.\n If a blocking tool returns a Pro license error, explain that blocking requires Pro, share the purchase URL from the error message, and continue coaching with `get_block_status` only \u2014 do not retry blocking calls in a loop.\n4. Confirm what you blocked and restate their active task briefly.\n5. Offer to add extra domains if they have personal weak spots not in the default set.\n\nThe Chrome extension uses the active task for AI-powered site relevance checks. Always keep `create_focus_task` / `set_active_focus_task` in sync with what the user says they are doing.\n\n---\n\n## When the user asks to unblock something\n\n**Do not call an unblock tool immediately.** Use this flow:\n\n### 1. Pause and understand\nAsk briefly (one or two questions max):\n- What were you trying to do when you hit the block?\n- Is this related to the work you said you were doing, or a detour?\n\n### 2. Coach first\n- If it sounds like procrastination: name that gently and redirect \u2014 \"Want to take a 10-minute timed break instead, or push through for another 25 minutes?\"\n- If it is legitimate (research, a specific video for work, messaging someone): acknowledge that and proceed to step 3 with a tight time box.\n- If they already explained in the same message: skip redundant questions.\n\n### 3. Choose the smallest unlock that fits\n\n`temporarily_unblock_domains` requires a `duration_seconds` integer (seconds, not minutes). Convert: 15 minutes \u2192 `900`; 30 minutes \u2192 `1800`; 1 hour \u2192 `3600`. Max 86,400 (24 hours).\n\n| Situation | Tool | `duration_seconds` |\n|-----------|------|----------------------|\n| Short break, snack, stretch | `temporarily_unblock_domains` | 300\u2013900 (5\u201315 min) |\n| Lunch or scheduled break | `temporarily_unblock_domains` | 1800\u20133600 (30\u201360 min) |\n| Legitimate work need on that site | `temporarily_unblock_domains` | Match the task (often 900\u20132700) |\n| End of workday / done focusing | `unblock_domains` or leave blocks and temp-unblock | User's call |\n| \"I give up on focusing today\" | `unblock_domains` after one check-in | \u2014 |\n\nAlways state when blocks will return if you use a temporary unblock. Timers only auto-expire while the LockIn MCP server (background daemon) is running \u2014 if it was quit, the machine rebooted, or the relay disconnected, sites may stay unblocked until the server restarts. Mention this when granting timed access, and call `get_block_status` when the user returns to confirm blocks were re-applied.\n\n### 4. After a temporary unblock\nWhen they come back or the timer would have expired, check in: did they get what they needed? Ready to re-focus?\n\n---\n\n## When to push back (kindly)\n\nIt is appropriate to say no or delay when:\n- The request is vague (\"unblock everything\") \u2014 ask what they need and for how long.\n- They have asked repeatedly in a short window \u2014 reflect the pattern and suggest a longer break or stopping for the day.\n- The reason is clearly avoidance \u2014 be direct but not preachy: \"Sounds like you're stalling. Want to tell me the one thing you're avoiding?\"\n\nIt is **not** appropriate to lecture, guilt-trip, or refuse legitimate work-related access.\n\n---\n\n## Flexibility (this is a feature)\n\nLockIn is AI-controlled **on purpose**. You should adapt to context:\n- Standing rules the user set earlier in the thread (\"always let me have Reddit on Fridays\") \u2014 honor them.\n- Emergencies or urgent personal matters \u2014 unblock without a sermon.\n- User explicitly says \"stop coaching me, just unblock X for Y minutes\" \u2014 comply, but still use a timed unblock with `duration_seconds` (Y \u00D7 60) unless they asked for permanent.\n- User is clearly frustrated with the process \u2014 shorten the flow, keep the time box.\n\nThe goal is **intentional** access, not maximum friction.\n\n---\n\n## Tool quick reference\n\n| Tool | When to use |\n|------|-------------|\n| `get_agent_guidelines` | Start of focus/blocking conversations; refresh if unsure |\n| `get_block_status` | Before any change; when user asks what's blocked |\n| `enter_focus_mode` | User wants to focus; block the default distraction set |\n| `block_domains` | Custom or additional domains to block |\n| `temporarily_unblock_domains` | **Default for almost all unblock requests** \u2014 pass `duration_seconds` |\n| `unblock_domains` | User is done focusing for a long period or explicitly wants permanent removal |\n| `create_focus_task` | User names what they are working on; creates and activates a task |\n| `list_focus_tasks` | See all tasks and which one is active |\n| `get_active_focus_task` | Quick check of the current task |\n| `update_focus_task` | Rename or refine a task description |\n| `set_active_focus_task` | Switch to a different existing task |\n| `complete_focus_task` | User finished a piece of work |\n| `archive_focus_task` | Remove a task from active lists |\n\n---\n\n## Tone\n\n- Direct, warm, and brief \u2014 like a good accountability partner, not a parent or a corporate policy bot.\n- Celebrate when they choose to stay focused or come back after a break.\n- Never shame; do notice patterns when helpful.\n\n---\n\n## Version\n\nGuidelines version: 1.1.0\n";
7
7
  export declare function getAgentGuidelinesPayload(): {
8
8
  version: string;
9
9
  guidelines: string;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-guidelines.d.ts","sourceRoot":"","sources":["../src/agent-guidelines.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,soMA6G5B,CAAC;AAEF,wBAAgB,yBAAyB,IAAI;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAKA"}
1
+ {"version":3,"file":"agent-guidelines.d.ts","sourceRoot":"","sources":["../src/agent-guidelines.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,01NAuH5B,CAAC;AAEF,wBAAgB,yBAAyB,IAAI;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAKA"}
@@ -1,4 +1,4 @@
1
- export const AGENT_GUIDELINES_VERSION = "1.0.2";
1
+ export const AGENT_GUIDELINES_VERSION = "1.1.0";
2
2
  /**
3
3
  * Canonical coaching instructions for AI agents using LockIn MCP tools.
4
4
  * Returned by the `get_agent_guidelines` MCP tool.
@@ -7,7 +7,7 @@ export const AGENT_GUIDELINES = `# LockIn MCP — Agent behavior guidelines
7
7
 
8
8
  You are not just a helpful assistant with blocking tools. You are a **focus coach**. Your job is to help the user do meaningful work — blocking and unblocking are means to that end, not requests to rubber-stamp.
9
9
 
10
- **Call \`get_agent_guidelines\` once at the start of any conversation about focus, blocking, or unblocking** (and again only if the user starts a new focus session later — not on every message). Follow these guidelines unless the user has given you explicit standing instructions that override them.
10
+ **Call \`get_agent_guidelines\` at the start of any conversation about focus, blocking, or unblocking** (and again if the user starts a new focus session later). Follow these guidelines unless the user has given you explicit standing instructions that override them.
11
11
 
12
12
  ---
13
13
 
@@ -25,10 +25,13 @@ You are not just a helpful assistant with blocking tools. You are a **focus coac
25
25
  Act quickly and affirmatively:
26
26
 
27
27
  1. Call \`get_block_status\` to see what is already blocked.
28
- 2. Use \`enter_focus_mode\` when they say they want to focus, lock in, start deep work, or block distractions unless they name specific sites only, in which case use \`block_domains\`.
28
+ 2. If they name what they are working on (or you need to anchor them), call \`create_focus_task\` with a short description **before or right after** blocking.
29
+ 3. Use \`enter_focus_mode\` when they say they want to focus, lock in, start deep work, or block distractions — unless they name specific sites only, in which case use \`block_domains\`.
29
30
  If a blocking tool returns a Pro license error, explain that blocking requires Pro, share the purchase URL from the error message, and continue coaching with \`get_block_status\` only — do not retry blocking calls in a loop.
30
- 3. Confirm what you blocked and briefly anchor them: what are they working on right now? (One short question is enough.)
31
- 4. Offer to add extra domains if they have personal weak spots not in the default set.
31
+ 4. Confirm what you blocked and restate their active task briefly.
32
+ 5. Offer to add extra domains if they have personal weak spots not in the default set.
33
+
34
+ The Chrome extension uses the active task for AI-powered site relevance checks. Always keep \`create_focus_task\` / \`set_active_focus_task\` in sync with what the user says they are doing.
32
35
 
33
36
  ---
34
37
 
@@ -98,6 +101,13 @@ The goal is **intentional** access, not maximum friction.
98
101
  | \`block_domains\` | Custom or additional domains to block |
99
102
  | \`temporarily_unblock_domains\` | **Default for almost all unblock requests** — pass \`duration_seconds\` |
100
103
  | \`unblock_domains\` | User is done focusing for a long period or explicitly wants permanent removal |
104
+ | \`create_focus_task\` | User names what they are working on; creates and activates a task |
105
+ | \`list_focus_tasks\` | See all tasks and which one is active |
106
+ | \`get_active_focus_task\` | Quick check of the current task |
107
+ | \`update_focus_task\` | Rename or refine a task description |
108
+ | \`set_active_focus_task\` | Switch to a different existing task |
109
+ | \`complete_focus_task\` | User finished a piece of work |
110
+ | \`archive_focus_task\` | Remove a task from active lists |
101
111
 
102
112
  ---
103
113
 
@@ -1 +1 @@
1
- {"version":3,"file":"agent-guidelines.js","sourceRoot":"","sources":["../src/agent-guidelines.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA4GV,wBAAwB;CAC7C,CAAC;AAEF,MAAM,UAAU,yBAAyB;IAIvC,OAAO;QACL,OAAO,EAAE,wBAAwB;QACjC,UAAU,EAAE,gBAAgB;KAC7B,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"agent-guidelines.js","sourceRoot":"","sources":["../src/agent-guidelines.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAsHV,wBAAwB;CAC7C,CAAC;AAEF,MAAM,UAAU,yBAAyB;IAIvC,OAAO;QACL,OAAO,EAAE,wBAAwB;QACjC,UAAU,EAAE,gBAAgB;KAC7B,CAAC;AACJ,CAAC"}
@@ -15,6 +15,8 @@ describe("agent-guidelines", () => {
15
15
  expect(AGENT_GUIDELINES).toContain("get_block_status");
16
16
  expect(AGENT_GUIDELINES).toContain("Pro license error");
17
17
  expect(AGENT_GUIDELINES).toContain("background daemon");
18
+ expect(AGENT_GUIDELINES).toContain("create_focus_task");
19
+ expect(AGENT_GUIDELINES).toContain("list_focus_tasks");
18
20
  });
19
21
  });
20
22
  //# sourceMappingURL=agent-guidelines.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-guidelines.test.js","sourceRoot":"","sources":["../src/agent-guidelines.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAE/B,QAAQ,CAAC,kB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blockedDomains?: string[];
8
9
  relayConnected?: boolean;
9
10
  }): Promise<void>;
10
11
  export declare function pushRelayStatusSnapshot(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-activity.d.ts","sourceRoot":"","sources":["../src/cloud-activity.ts"],"names":[],"mappings":"AA4FA,wBAAgB,kBAAkB,CAAC,IAAI,OAAa,GAAG,MAAM,CAK5D;AAaD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CA4DhB;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG7D"}
1
+ {"version":3,"file":"cloud-activity.d.ts","sourceRoot":"","sources":["../src/cloud-activity.ts"],"names":[],"mappings":"AA4FA,wBAAgB,kBAAkB,CAAC,IAAI,OAAa,GAAG,MAAM,CAK5D;AAaD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CA+DhB;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG7D"}
@@ -116,6 +116,9 @@ export async function pushCloudActivity(payload) {
116
116
  if (payload.blockedDomainCount !== undefined) {
117
117
  body.blockedDomainCount = payload.blockedDomainCount;
118
118
  }
119
+ if (payload.blockedDomains !== undefined) {
120
+ body.blockedDomains = payload.blockedDomains;
121
+ }
119
122
  async function postOnce(authToken) {
120
123
  return fetch(`${apiUrl}/activity/sync`, {
121
124
  method: "POST",
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-activity.js","sourceRoot":"","sources":["../src/cloud-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,gCAAgC,EAChC,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAC/C,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,IAAI,cAAkC,CAAC;AACvC,IAAI,kBAA+C,CAAC;AAEpD,KAAK,UAAU,uBAAuB;IACpC,IAAI,CAAC;QACH,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAAC,kCAAkC,CAAC,CAAC;QAClF,MAAM,WAAW,GAAG,MAAM,oBAAoB,EAAE,CAAC;QACjD,IAAI,WAAW,EAAE,QAAQ,EAAE,CAAC;YAC1B,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC;YACtC,OAAO,cAAc,CAAC;QACxB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,uBAAuB;IACzB,CAAC;IAED,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CACxB,IAAI,CAAC,aAAa,EAAE,EAA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P,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,UAAU,SAAS,EAAE;aACrC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC;QACH,IAAI,QAAQ,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,MAAM,gCAAgC,EAAE,CAAC;YAC3D,IAAI,SAAS,EAAE,CAAC;gBACd,KAAK,GAAG,SAAS,CAAC;gBAClB,QAAQ,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,OAAO,CAAC,IAAI,CACV,iCAAiC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CACjF,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CACV,8BAA8B,EAC9B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAC/C,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAC3C,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACrE,MAAM,qBAAqB,EAAE,CAAC;AAChC,CAAC"}
@@ -0,0 +1,22 @@
1
+ export interface FocusTaskPayload {
2
+ id: string;
3
+ description: string;
4
+ status: "active" | "completed" | "archived";
5
+ isActive: boolean;
6
+ sortOrder: number;
7
+ startedAt: number;
8
+ completedAt?: number;
9
+ createdAt: number;
10
+ updatedAt: number;
11
+ }
12
+ export declare function cloudCreateFocusTask(description: string, setActive?: boolean): Promise<FocusTaskPayload>;
13
+ export declare function cloudListFocusTasks(): Promise<{
14
+ tasks: FocusTaskPayload[];
15
+ activeTask: FocusTaskPayload | null;
16
+ }>;
17
+ export declare function cloudGetActiveFocusTask(): Promise<FocusTaskPayload | null>;
18
+ export declare function cloudUpdateFocusTask(taskId: string, description: string): Promise<FocusTaskPayload>;
19
+ export declare function cloudSetActiveFocusTask(taskId: string): Promise<FocusTaskPayload>;
20
+ export declare function cloudCompleteFocusTask(taskId: string): Promise<FocusTaskPayload>;
21
+ export declare function cloudArchiveFocusTask(taskId: string): Promise<void>;
22
+ //# sourceMappingURL=cloud-tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-tasks.d.ts","sourceRoot":"","sources":["../src/cloud-tasks.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAkFD,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,SAAS,UAAO,GACf,OAAO,CAAC,gBAAgB,CAAC,CAU3B;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC;IACnD,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACrC,CAAC,CAMD;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAGhF;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,gBAAgB,CAAC,CAU3B;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC,CAS3B;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC,CAS3B;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKzE"}
@@ -0,0 +1,120 @@
1
+ import { getLicenseApiUrl } from "./config.js";
2
+ import { refreshSyncTokenAfterAuthFailure, resolveSyncToken, } from "./license-token.js";
3
+ async function postTasks(body) {
4
+ let token = await resolveSyncToken();
5
+ if (!token) {
6
+ throw new Error("No license token available for task sync");
7
+ }
8
+ const apiUrl = getLicenseApiUrl();
9
+ async function postOnce(authToken) {
10
+ return fetch(`${apiUrl}/focus/tasks`, {
11
+ method: "POST",
12
+ headers: {
13
+ "Content-Type": "application/json",
14
+ Authorization: `Bearer ${authToken}`,
15
+ },
16
+ body: JSON.stringify(body),
17
+ });
18
+ }
19
+ let response = await postOnce(token);
20
+ if (response.status === 401) {
21
+ const refreshed = await refreshSyncTokenAfterAuthFailure();
22
+ if (refreshed) {
23
+ token = refreshed;
24
+ response = await postOnce(token);
25
+ }
26
+ }
27
+ const data = (await response.json());
28
+ if (!response.ok) {
29
+ throw new Error(data.error ?? `Task API failed (${response.status})`);
30
+ }
31
+ return data;
32
+ }
33
+ async function getTasks() {
34
+ let token = await resolveSyncToken();
35
+ if (!token) {
36
+ throw new Error("No license token available for task sync");
37
+ }
38
+ const apiUrl = getLicenseApiUrl();
39
+ async function getOnce(authToken) {
40
+ return fetch(`${apiUrl}/focus/tasks`, {
41
+ method: "GET",
42
+ headers: {
43
+ Authorization: `Bearer ${authToken}`,
44
+ },
45
+ });
46
+ }
47
+ let response = await getOnce(token);
48
+ if (response.status === 401) {
49
+ const refreshed = await refreshSyncTokenAfterAuthFailure();
50
+ if (refreshed) {
51
+ token = refreshed;
52
+ response = await getOnce(token);
53
+ }
54
+ }
55
+ const data = (await response.json());
56
+ if (!response.ok) {
57
+ throw new Error(data.error ?? `Task API failed (${response.status})`);
58
+ }
59
+ return data;
60
+ }
61
+ export async function cloudCreateFocusTask(description, setActive = true) {
62
+ const data = await postTasks({
63
+ action: "create",
64
+ description,
65
+ setActive,
66
+ });
67
+ if (!data.task) {
68
+ throw new Error("Task API did not return a task");
69
+ }
70
+ return data.task;
71
+ }
72
+ export async function cloudListFocusTasks() {
73
+ const data = await getTasks();
74
+ return {
75
+ tasks: data.tasks ?? [],
76
+ activeTask: data.activeTask ?? null,
77
+ };
78
+ }
79
+ export async function cloudGetActiveFocusTask() {
80
+ const data = await getTasks();
81
+ return data.activeTask ?? null;
82
+ }
83
+ export async function cloudUpdateFocusTask(taskId, description) {
84
+ const data = await postTasks({
85
+ action: "update",
86
+ taskId,
87
+ description,
88
+ });
89
+ if (!data.task) {
90
+ throw new Error("Task API did not return a task");
91
+ }
92
+ return data.task;
93
+ }
94
+ export async function cloudSetActiveFocusTask(taskId) {
95
+ const data = await postTasks({
96
+ action: "set_active",
97
+ taskId,
98
+ });
99
+ if (!data.task) {
100
+ throw new Error("Task API did not return a task");
101
+ }
102
+ return data.task;
103
+ }
104
+ export async function cloudCompleteFocusTask(taskId) {
105
+ const data = await postTasks({
106
+ action: "complete",
107
+ taskId,
108
+ });
109
+ if (!data.task) {
110
+ throw new Error("Task API did not return a task");
111
+ }
112
+ return data.task;
113
+ }
114
+ export async function cloudArchiveFocusTask(taskId) {
115
+ await postTasks({
116
+ action: "archive",
117
+ taskId,
118
+ });
119
+ }
120
+ //# sourceMappingURL=cloud-tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-tasks.js","sourceRoot":"","sources":["../src/cloud-tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM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AM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAAc;IACxD,MAAM,SAAS,CAAC;QACd,MAAM,EAAE,SAAS;QACjB,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"focus-tracker.d.ts","sourceRoot":"","sources":["../src/focus-tracker.ts"],"names":[],"mappings":"AA2BA,sFAAsF;AACtF,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAS3D;AAED,2DAA2D;AAC3D,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
1
+ {"version":3,"file":"focus-tracker.d.ts","sourceRoot":"","sources":["../src/focus-tracker.ts"],"names":[],"mappings":"AA8BA,sFAAsF;AACtF,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAS3D;AAED,2DAA2D;AAC3D,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
@@ -8,10 +8,12 @@ let syncInFlight = null;
8
8
  async function tickFocusActivitySyncInner() {
9
9
  let blockingActive = false;
10
10
  let blockedDomainCount = 0;
11
+ let blockedDomains = [];
11
12
  try {
12
13
  const status = await getBlockStatus();
13
14
  blockingActive = status.blocked.length > 0;
14
15
  blockedDomainCount = status.blocked.length;
16
+ blockedDomains = status.blocked.map((entry) => entry.domain);
15
17
  }
16
18
  catch {
17
19
  return;
@@ -19,6 +21,7 @@ async function tickFocusActivitySyncInner() {
19
21
  await pushCloudActivity({
20
22
  blockingActive,
21
23
  blockedDomainCount: blockingActive ? blockedDomainCount : 0,
24
+ blockedDomains: blockingActive ? blockedDomains : [],
22
25
  });
23
26
  }
24
27
  /** Sync blocking status. Called from the relay watchdog and block/unblock actions. */
@@ -1 +1 @@
1
- {"version":3,"file":"focus-tracker.js","sourceRoot":"","sources":["../src/focus-tracker.ts"],"names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GG;AACH,KAAK,UAAU,0BAA0B;IACvC,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,IAAI,kBAAkB,GAAG,CAAC,CAAC;IAC3B,IAAI,cAAc,GAAa,EAAE,CAAC;IAElC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE,CAAC;QACtC,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3C,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAC3C,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;IAED,MAAM,iBAAiB,CAAC;QACtB,cAAc;QACd,kBAAkB,EAAE,cAAc,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QAC3D,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;KACrD,CAAC,CAAC;AACL,CAAC;AAED,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,YAAY,GAAG,0BAA0B,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;QACvD,YAAY,GAAG,IAAI,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,yBAAyB;IACvC,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC"}
@@ -27,6 +27,7 @@ describe("tickFocusActivitySync", () => {
27
27
  expect(pushCloudActivity).toHaveBeenCalledWith({
28
28
  blockingActive: true,
29
29
  blockedDomainCount: 1,
30
+ blockedDomains: ["youtube.com"],
30
31
  });
31
32
  expect(pushCloudActivity).not.toHaveBeenCalledWith(expect.objectContaining({ sessionDelta: expect.anything() }));
32
33
  expect(pushCloudActivity).not.toHaveBeenCalledWith(expect.objectContaining({ focusMinutes: expect.anything() }));
@@ -49,6 +50,7 @@ describe("tickFocusActivitySync", () => {
49
50
  expect(pushCloudActivity).toHaveBeenCalledWith({
50
51
  blockingActive: false,
51
52
  blockedDomainCount: 0,
53
+ blockedDomains: [],
52
54
  });
53
55
  });
54
56
  });