lockin-mcp 1.0.7 → 1.0.9

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 (74) hide show
  1. package/README.md +36 -23
  2. package/dist/agent-guidelines.d.ts +11 -0
  3. package/dist/agent-guidelines.d.ts.map +1 -0
  4. package/dist/agent-guidelines.js +122 -0
  5. package/dist/agent-guidelines.js.map +1 -0
  6. package/dist/agent-guidelines.test.d.ts +2 -0
  7. package/dist/agent-guidelines.test.d.ts.map +1 -0
  8. package/dist/agent-guidelines.test.js +20 -0
  9. package/dist/agent-guidelines.test.js.map +1 -0
  10. package/dist/blocker.d.ts +4 -1
  11. package/dist/blocker.d.ts.map +1 -1
  12. package/dist/blocker.js +14 -1
  13. package/dist/blocker.js.map +1 -1
  14. package/dist/brand.d.ts +1 -1
  15. package/dist/brand.d.ts.map +1 -1
  16. package/dist/brand.js +1 -1
  17. package/dist/brand.js.map +1 -1
  18. package/dist/cloud-activity.d.ts +11 -0
  19. package/dist/cloud-activity.d.ts.map +1 -0
  20. package/dist/cloud-activity.js +151 -0
  21. package/dist/cloud-activity.js.map +1 -0
  22. package/dist/focus-tracker.d.ts +5 -0
  23. package/dist/focus-tracker.d.ts.map +1 -0
  24. package/dist/focus-tracker.js +38 -0
  25. package/dist/focus-tracker.js.map +1 -0
  26. package/dist/focus-tracker.test.d.ts +2 -0
  27. package/dist/focus-tracker.test.d.ts.map +1 -0
  28. package/dist/focus-tracker.test.js +55 -0
  29. package/dist/focus-tracker.test.js.map +1 -0
  30. package/dist/index.js +94 -18
  31. package/dist/index.js.map +1 -1
  32. package/dist/installer/agents.d.ts.map +1 -1
  33. package/dist/installer/agents.js +7 -4
  34. package/dist/installer/agents.js.map +1 -1
  35. package/dist/installer/auto-update.d.ts +9 -0
  36. package/dist/installer/auto-update.d.ts.map +1 -0
  37. package/dist/installer/auto-update.js +194 -0
  38. package/dist/installer/auto-update.js.map +1 -0
  39. package/dist/installer/background-service.d.ts +1 -0
  40. package/dist/installer/background-service.d.ts.map +1 -1
  41. package/dist/installer/background-service.js +68 -1
  42. package/dist/installer/background-service.js.map +1 -1
  43. package/dist/installer/daemon-windows.d.ts +3 -0
  44. package/dist/installer/daemon-windows.d.ts.map +1 -1
  45. package/dist/installer/daemon-windows.js +12 -1
  46. package/dist/installer/daemon-windows.js.map +1 -1
  47. package/dist/installer/license.d.ts.map +1 -1
  48. package/dist/installer/license.js +1 -1
  49. package/dist/installer/license.js.map +1 -1
  50. package/dist/installer/poke.js +1 -1
  51. package/dist/installer/poke.js.map +1 -1
  52. package/dist/installer/port.d.ts +3 -0
  53. package/dist/installer/port.d.ts.map +1 -1
  54. package/dist/installer/port.js +70 -3
  55. package/dist/installer/port.js.map +1 -1
  56. package/dist/installer/relay-provision.d.ts +1 -0
  57. package/dist/installer/relay-provision.d.ts.map +1 -1
  58. package/dist/installer/relay-provision.js +2 -1
  59. package/dist/installer/relay-provision.js.map +1 -1
  60. package/dist/installer/run.d.ts.map +1 -1
  61. package/dist/installer/run.js +12 -6
  62. package/dist/installer/run.js.map +1 -1
  63. package/dist/license-token.d.ts +5 -0
  64. package/dist/license-token.d.ts.map +1 -0
  65. package/dist/license-token.js +87 -0
  66. package/dist/license-token.js.map +1 -0
  67. package/dist/relay-manager.d.ts +1 -0
  68. package/dist/relay-manager.d.ts.map +1 -1
  69. package/dist/relay-manager.js +7 -0
  70. package/dist/relay-manager.js.map +1 -1
  71. package/dist/server.d.ts.map +1 -1
  72. package/dist/server.js +15 -0
  73. package/dist/server.js.map +1 -1
  74. package/package.json +2 -1
package/README.md CHANGED
@@ -6,6 +6,7 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that b
6
6
 
7
7
  | Tool | Description |
8
8
  |------|-------------|
9
+ | `get_agent_guidelines` | Coaching instructions for AI agents (when to enforce focus, how to handle unblock requests) |
9
10
  | `block_domains` | Block a list of domains (e.g. `youtube.com`, `x.com`, `tiktok.com`) |
10
11
  | `unblock_domains` | Permanently unblock specific domains |
11
12
  | `temporarily_unblock_domains` | Allow access for a limited time, then auto re-block |
@@ -14,7 +15,7 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that b
14
15
 
15
16
  Blocking redirects domains to `127.0.0.1` and `::1`, including `www.` variants.
16
17
 
17
- **Pro license required:** `block_domains`, `unblock_domains`, `temporarily_unblock_domains`, and `enter_focus_mode` require an active Pro license. `get_block_status` is read-only and works without Pro. For local development only, set `MDB_SKIP_LICENSE_CHECK=1`.
18
+ **Pro license required:** `block_domains`, `unblock_domains`, `temporarily_unblock_domains`, and `enter_focus_mode` require an active Pro license. `get_agent_guidelines` and `get_block_status` are read-only and work without Pro. For local development only, set `MDB_SKIP_LICENSE_CHECK=1`.
18
19
 
19
20
  ## Requirements
20
21
 
@@ -148,10 +149,10 @@ cd web && npx convex deploy
148
149
 
149
150
  1. Convex `MDB_APP_URL` is `https://www.lockinmcp.com` (not `localhost`).
150
151
  2. Vercel `MDB_SERVER_SECRET` === Convex `MDB_SERVER_SECRET`.
151
- 2. Stripe webhook enables `checkout.session.created` and `checkout.session.expired`.
152
- 3. Preview email: `./scripts/send-abandoned-checkout-preview.sh you@example.com`
153
- 4. Dev smoke test (60s delay): `npx convex env set CHECKOUT_FOLLOW_UP_DELAY_MS 60000` then `./scripts/test-abandoned-checkout-schedule.sh <userId>`
154
- 5. Inspect jobs: `./scripts/list-checkout-follow-ups.sh scheduled`
152
+ 3. Stripe webhook enables `checkout.session.created` and `checkout.session.expired`.
153
+ 4. Preview email: `./scripts/send-abandoned-checkout-preview.sh you@example.com`
154
+ 5. Dev smoke test (60s delay): `npx convex env set CHECKOUT_FOLLOW_UP_DELAY_MS 60000` then `./scripts/test-abandoned-checkout-schedule.sh <userId>`
155
+ 6. Inspect jobs: `./scripts/list-checkout-follow-ups.sh scheduled`
155
156
 
156
157
  Optional Convex env: `CHECKOUT_FOLLOW_UP_DELAY_MS` (default `86400000` = 24h).
157
158
 
@@ -214,12 +215,12 @@ iwr -useb https://raw.githubusercontent.com/Kiog-Aser/LockIn/main/install.ps1 |
214
215
  ### npm
215
216
 
216
217
  ```bash
217
- npx -y lockin-mcp@1.0.4 install
218
+ npx -y lockin-mcp@1.0.7 install
218
219
  # or from a local clone:
219
220
  npm run install:local
220
221
  ```
221
222
 
222
- The npm package `lockin-mcp` (v1.0.4) replaces the legacy `mac-distraction-blocker-mcp` name. Legacy bin aliases (`mac-distraction-blocker-mcp`, `mdb-install`) still work.
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.
223
224
 
224
225
  ### What the installer does
225
226
 
@@ -229,7 +230,7 @@ The npm package `lockin-mcp` (v1.0.4) replaces the legacy `mac-distraction-block
229
230
  4. **Applies initial blocks** to `/etc/hosts`
230
231
  5. **Starts the MCP HTTP server** locally with an outbound relay connection (background LaunchAgent on macOS)
231
232
  6. **Provisions a stable relay URL** (`https://relay.lockinmcp.com/device/{id}/mcp`) so Poke, Claude, and ChatGPT can reach your Mac
232
- 7. **Connects your AI agent** — Poke and Claude Desktop use your API key; Claude (web) and ChatGPT use OAuth via lockinmcp.com
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
233
234
 
234
235
  ### Installer flags (non-interactive)
235
236
 
@@ -244,6 +245,9 @@ npx -y lockin-mcp install --license-key lockin_pro_xxx --sites all --poke-recipe
244
245
  | `--license-key <key>` | Pro license key |
245
246
  | `--browser-login` | Verify license via browser device flow (default) |
246
247
  | `--skip-tunnel` | Local MCP only (no relay URL) |
248
+ | `--skip-block` | Skip initial domain blocking |
249
+ | `--skip-poke` | Skip Poke URL generation |
250
+ | `--port <number>` | Local MCP HTTP port (default 3000) |
247
251
  | `--sites all` | Block all presets |
248
252
  | `--custom-domains a.com,b.com` | Extra domains |
249
253
  | `--poke-recipe` | Generate distraction-coach recipe URL |
@@ -287,12 +291,14 @@ Your MCP URL and API key are in `~/.lockin/setup-manifest.json`:
287
291
 
288
292
  ### Poke
289
293
 
290
- ```bash
291
- npx poke@latest login
292
- npx poke@latest mcp add 'https://YOUR_RELAY_HOST/device/YOUR_ID/mcp' -n 'LockIn MCP' --api-key 'mdb_...'
293
- ```
294
+ The installer copies your relay MCP URL and opens [poke.com/integrations/new](https://poke.com/integrations/new). In Poke:
294
295
 
295
- Or set URL + API key in [poke.com/integrations](https://poke.com/integrations).
296
+ 1. Paste the MCP URL (ends with `/mcp`)
297
+ 2. Choose **OAuth** authentication (do not paste your API key in the integration form)
298
+ 3. Sign in on lockinmcp.com when prompted
299
+ 4. Install the [LockIn recipe](https://poke.com/r/KQ7myvC_Xpo)
300
+
301
+ Legacy CLI (optional): `npx poke@latest mcp add 'https://YOUR_RELAY_HOST/device/YOUR_ID/mcp' -n 'LockIn MCP'` with OAuth in the Poke UI.
296
302
 
297
303
  ### Claude (claude.ai)
298
304
 
@@ -431,14 +437,7 @@ Call `get_block_status` — `hostsFileWritable: true` means the server can updat
431
437
 
432
438
  ## Hooking up to [poke.com/kitchen](https://poke.com/kitchen)
433
439
 
434
- The installer tunnels your local MCP over HTTPS so Poke can connect remotely — no extra terminal tab.
435
-
436
- ```bash
437
- npx poke@latest login
438
- npx poke@latest mcp add 'https://YOUR_RELAY_HOST/device/YOUR_ID/mcp' -n 'LockIn MCP' --api-key 'mdb_...'
439
- ```
440
-
441
- The installer runs this automatically when you choose Poke. Credentials are in `setup-manifest.json`.
440
+ The installer tunnels your local MCP over HTTPS so Poke can connect remotely — no extra terminal tab. When you choose Poke during install, it copies your relay URL and opens the integrations page for OAuth setup.
442
441
 
443
442
  ### Recipe / Kitchen (recommended)
444
443
 
@@ -446,10 +445,14 @@ The installer runs this automatically when you choose Poke. Credentials are in `
446
445
 
447
446
  https://poke.com/r/KQ7myvC_Xpo
448
447
 
449
- The recipe connects your MCP tools and coaches you through focus sessions. You can also build custom recipes in [poke.com/kitchen](https://poke.com/kitchen) using `block_domains`, `get_block_status`, etc.
448
+ The recipe connects your MCP tools and coaches you through focus sessions. You can also build custom recipes in [poke.com/kitchen](https://poke.com/kitchen) using `get_agent_guidelines`, `block_domains`, `get_block_status`, etc.
450
449
 
451
450
  ## Tool Examples
452
451
 
452
+ ### Get agent guidelines
453
+
454
+ No arguments. Returns focus-coaching instructions for AI agents — call at the start of focus or blocking conversations.
455
+
453
456
  ### Block sites
454
457
 
455
458
  ```json
@@ -510,6 +513,16 @@ cd relay && npm test # relay token hashing tests
510
513
 
511
514
  CI (`.github/workflows/ci.yml`) runs lint, test, build, and `npm audit --audit-level=high` for the MCP server, web app, and relay worker.
512
515
 
516
+ **Reset local install state** (development only):
517
+
518
+ ```bash
519
+ npx lockin-mcp dev-reset # reset hosts, manifest, relay config
520
+ npx lockin-mcp dev-reset --full # also remove LaunchAgent / background service
521
+ npx lockin-mcp dev-reset --wipe-license # clear saved license
522
+ ```
523
+
524
+ See `relay/README.md` for Cloudflare WebSocket hibernation details on the device relay worker.
525
+
513
526
  ## Troubleshooting
514
527
 
515
528
  | Issue | Fix |
@@ -517,7 +530,7 @@ CI (`.github/workflows/ci.yml`) runs lint, test, build, and `npm audit --audit-l
517
530
  | `EACCES` on block/unblock | Run with `sudo` or configure passwordless sudo (see above) |
518
531
  | Site still loads | Hard-refresh browser; DNS cache may take a moment. Try private window. |
519
532
  | Temp unblock didn't re-block | Keep the MCP server process running (expiry watcher runs in-process) |
520
- | Poke can't connect | Check manifest relay URL + `/health` returns `lockin-mcp` with `relay.connected: true`. If offline, re-run `npx lockin-mcp install` once — the daemon self-heals reconnects automatically. |
533
+ | Poke can't connect | Re-run install and confirm OAuth completed in Poke. Check manifest relay URL + `/health` returns `lockin-mcp` with `relay.connected: true`. If offline, re-run `npx lockin-mcp install` once — the daemon self-heals reconnects automatically. |
521
534
  | Wrong platform | macOS, Linux, and Windows are supported; DNS flush behavior differs by OS |
522
535
 
523
536
  ## License
@@ -0,0 +1,11 @@
1
+ export declare const AGENT_GUIDELINES_VERSION = "1.0.2";
2
+ /**
3
+ * Canonical coaching instructions for AI agents using LockIn MCP tools.
4
+ * Returned by the `get_agent_guidelines` MCP tool.
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";
7
+ export declare function getAgentGuidelinesPayload(): {
8
+ version: string;
9
+ guidelines: string;
10
+ };
11
+ //# sourceMappingURL=agent-guidelines.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,122 @@
1
+ export const AGENT_GUIDELINES_VERSION = "1.0.2";
2
+ /**
3
+ * Canonical coaching instructions for AI agents using LockIn MCP tools.
4
+ * Returned by the `get_agent_guidelines` MCP tool.
5
+ */
6
+ export const AGENT_GUIDELINES = `# LockIn MCP — Agent behavior guidelines
7
+
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
+
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.
11
+
12
+ ---
13
+
14
+ ## Your default stance
15
+
16
+ - **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.
17
+ - **Do not unblock on the first ask.** When someone wants access to a blocked site, treat it as a coaching moment — not a service ticket to close as fast as possible.
18
+ - **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.
19
+ - **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.
20
+
21
+ ---
22
+
23
+ ## When the user wants to focus
24
+
25
+ Act quickly and affirmatively:
26
+
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\`.
29
+ 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.
32
+
33
+ ---
34
+
35
+ ## When the user asks to unblock something
36
+
37
+ **Do not call an unblock tool immediately.** Use this flow:
38
+
39
+ ### 1. Pause and understand
40
+ Ask briefly (one or two questions max):
41
+ - What were you trying to do when you hit the block?
42
+ - Is this related to the work you said you were doing, or a detour?
43
+
44
+ ### 2. Coach first
45
+ - If it sounds like procrastination: name that gently and redirect — "Want to take a 10-minute timed break instead, or push through for another 25 minutes?"
46
+ - If it is legitimate (research, a specific video for work, messaging someone): acknowledge that and proceed to step 3 with a tight time box.
47
+ - If they already explained in the same message: skip redundant questions.
48
+
49
+ ### 3. Choose the smallest unlock that fits
50
+
51
+ \`temporarily_unblock_domains\` requires a \`duration_seconds\` integer (seconds, not minutes). Convert: 15 minutes → \`900\`; 30 minutes → \`1800\`; 1 hour → \`3600\`. Max 86,400 (24 hours).
52
+
53
+ | Situation | Tool | \`duration_seconds\` |
54
+ |-----------|------|----------------------|
55
+ | Short break, snack, stretch | \`temporarily_unblock_domains\` | 300–900 (5–15 min) |
56
+ | Lunch or scheduled break | \`temporarily_unblock_domains\` | 1800–3600 (30–60 min) |
57
+ | Legitimate work need on that site | \`temporarily_unblock_domains\` | Match the task (often 900–2700) |
58
+ | End of workday / done focusing | \`unblock_domains\` or leave blocks and temp-unblock | User's call |
59
+ | "I give up on focusing today" | \`unblock_domains\` after one check-in | — |
60
+
61
+ Always state when blocks will return if you use a temporary unblock. Timers only auto-expire while the LockIn MCP server (background daemon) is running — 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.
62
+
63
+ ### 4. After a temporary unblock
64
+ When they come back or the timer would have expired, check in: did they get what they needed? Ready to re-focus?
65
+
66
+ ---
67
+
68
+ ## When to push back (kindly)
69
+
70
+ It is appropriate to say no or delay when:
71
+ - The request is vague ("unblock everything") — ask what they need and for how long.
72
+ - They have asked repeatedly in a short window — reflect the pattern and suggest a longer break or stopping for the day.
73
+ - The reason is clearly avoidance — be direct but not preachy: "Sounds like you're stalling. Want to tell me the one thing you're avoiding?"
74
+
75
+ It is **not** appropriate to lecture, guilt-trip, or refuse legitimate work-related access.
76
+
77
+ ---
78
+
79
+ ## Flexibility (this is a feature)
80
+
81
+ LockIn is AI-controlled **on purpose**. You should adapt to context:
82
+ - Standing rules the user set earlier in the thread ("always let me have Reddit on Fridays") — honor them.
83
+ - Emergencies or urgent personal matters — unblock without a sermon.
84
+ - User explicitly says "stop coaching me, just unblock X for Y minutes" — comply, but still use a timed unblock with \`duration_seconds\` (Y × 60) unless they asked for permanent.
85
+ - User is clearly frustrated with the process — shorten the flow, keep the time box.
86
+
87
+ The goal is **intentional** access, not maximum friction.
88
+
89
+ ---
90
+
91
+ ## Tool quick reference
92
+
93
+ | Tool | When to use |
94
+ |------|-------------|
95
+ | \`get_agent_guidelines\` | Start of focus/blocking conversations; refresh if unsure |
96
+ | \`get_block_status\` | Before any change; when user asks what's blocked |
97
+ | \`enter_focus_mode\` | User wants to focus; block the default distraction set |
98
+ | \`block_domains\` | Custom or additional domains to block |
99
+ | \`temporarily_unblock_domains\` | **Default for almost all unblock requests** — pass \`duration_seconds\` |
100
+ | \`unblock_domains\` | User is done focusing for a long period or explicitly wants permanent removal |
101
+
102
+ ---
103
+
104
+ ## Tone
105
+
106
+ - Direct, warm, and brief — like a good accountability partner, not a parent or a corporate policy bot.
107
+ - Celebrate when they choose to stay focused or come back after a break.
108
+ - Never shame; do notice patterns when helpful.
109
+
110
+ ---
111
+
112
+ ## Version
113
+
114
+ Guidelines version: ${AGENT_GUIDELINES_VERSION}
115
+ `;
116
+ export function getAgentGuidelinesPayload() {
117
+ return {
118
+ version: AGENT_GUIDELINES_VERSION,
119
+ guidelines: AGENT_GUIDELINES,
120
+ };
121
+ }
122
+ //# sourceMappingURL=agent-guidelines.js.map
@@ -0,0 +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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-guidelines.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-guidelines.test.d.ts","sourceRoot":"","sources":["../src/agent-guidelines.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { AGENT_GUIDELINES, AGENT_GUIDELINES_VERSION, getAgentGuidelinesPayload, } from "./agent-guidelines.js";
3
+ describe("agent-guidelines", () => {
4
+ it("returns a stable version and non-empty guidelines", () => {
5
+ const payload = getAgentGuidelinesPayload();
6
+ expect(payload.version).toBe(AGENT_GUIDELINES_VERSION);
7
+ expect(payload.guidelines).toBe(AGENT_GUIDELINES);
8
+ expect(payload.guidelines.length).toBeGreaterThan(500);
9
+ });
10
+ it("covers core coaching behaviors", () => {
11
+ expect(AGENT_GUIDELINES).toContain("focus coach");
12
+ expect(AGENT_GUIDELINES).toContain("temporarily_unblock_domains");
13
+ expect(AGENT_GUIDELINES).toContain("duration_seconds");
14
+ expect(AGENT_GUIDELINES).toContain("Do not unblock on the first ask");
15
+ expect(AGENT_GUIDELINES).toContain("get_block_status");
16
+ expect(AGENT_GUIDELINES).toContain("Pro license error");
17
+ expect(AGENT_GUIDELINES).toContain("background daemon");
18
+ });
19
+ });
20
+ //# sourceMappingURL=agent-guidelines.test.js.map
@@ -0,0 +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,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,OAAO,GAAG,yBAAyB,EAAE,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACvD,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAClD,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACxC,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAClD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;QAClE,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACvD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC;QACtE,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACvD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACxD,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/dist/blocker.d.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  import { type BlockStatusResult, type BlockerState, type DomainStatus } from "./types.js";
2
2
  export declare function startExpiryWatcher(intervalMs?: number): void;
3
3
  export declare function stopExpiryWatcher(): void;
4
- export declare function blockDomains(domains: string[]): Promise<{
4
+ export declare function blockDomains(domains: string[], options?: {
5
+ syncActivity?: boolean;
6
+ }): Promise<{
5
7
  blocked: string[];
8
+ newlyBlocked: string[];
6
9
  message: string;
7
10
  }>;
8
11
  export declare function unblockDomains(domains: string[]): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"blocker.d.ts","sourceRoot":"","sources":["../src/blocker.ts"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;AAKpB,wBAAgB,kBAAkB,CAChC,UAAU,SAAS,GAClB,IAAI,CAUN;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAKxC;AAsCD,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAmDD;AAOD,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC/D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAkCD;AAED,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,MAAM,EAAE,EACjB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC;IACT,oBAAoB,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CA4CD;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAiCjE;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAG7D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CAgBhF;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGzE"}
package/dist/blocker.js CHANGED
@@ -48,7 +48,8 @@ function validateDomains(domains) {
48
48
  }
49
49
  return normalized;
50
50
  }
51
- export async function blockDomains(domains) {
51
+ export async function blockDomains(domains, options) {
52
+ const syncActivity = options?.syncActivity !== false;
52
53
  const validated = validateDomains(domains);
53
54
  const state = await loadState();
54
55
  const blockedSet = new Set(state.blockedDomains);
@@ -68,17 +69,26 @@ export async function blockDomains(domains) {
68
69
  await saveState(nextState);
69
70
  }
70
71
  const method = await applyHostsFromState(nextState);
72
+ if (!stateUnchanged && syncActivity) {
73
+ void syncBlockingStatus(nextState);
74
+ }
71
75
  if (method === "unchanged" && newDomains.length === 0) {
72
76
  return {
73
77
  blocked: validated,
78
+ newlyBlocked: [],
74
79
  message: `${validated.length} site(s) already blocked.`,
75
80
  };
76
81
  }
77
82
  return {
78
83
  blocked: validated,
84
+ newlyBlocked: newDomains,
79
85
  message: `Blocked ${validated.length} site(s) via /etc/hosts (${method}).`,
80
86
  };
81
87
  }
88
+ async function syncBlockingStatus(_state) {
89
+ const { tickFocusActivitySync } = await import("./focus-tracker.js");
90
+ void tickFocusActivitySync();
91
+ }
82
92
  export async function unblockDomains(domains) {
83
93
  const validated = validateDomains(domains);
84
94
  const state = await loadState();
@@ -91,6 +101,9 @@ export async function unblockDomains(domains) {
91
101
  }, "unblock_domains", unblocked);
92
102
  await saveState(nextState);
93
103
  const method = await applyHostsFromState(nextState);
104
+ if (unblocked.length > 0) {
105
+ void syncBlockingStatus(nextState);
106
+ }
94
107
  return {
95
108
  unblocked,
96
109
  message: `Unblocked ${unblocked.length} domain(s) and updated /etc/hosts (${method}).`,
@@ -1 +1 @@
1
- {"version":3,"file":"blocker.js","sourceRoot":"","sources":["../src/blocker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAIL,aAAa,EACb,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,IAAI,WAAuC,CAAC;AAC5C,IAAI,YAAY,GAAkB,I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M,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;IACvD,CAAC;IAED,MAAM,IAAI,GAAG,yBAAyB,CAAC,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC5E,IAAI,IAAI,EAAE,CAAC;QACT,OAAO;YACL,MAAM,EAAE,UAAU;YAClB,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACnD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAc;IACrD,MAAM,KAAK,GAAG,MAAM,SAAS,EAAE,CAAC;IAChC,OAAO,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC"}
package/dist/brand.d.ts CHANGED
@@ -7,7 +7,7 @@ export declare const RELAY_HOST = "relay.lockinmcp.com";
7
7
  export declare const RELAY_PUBLIC_ORIGIN = "https://relay.lockinmcp.com";
8
8
  export declare const LICENSE_PRICE_ORIGINAL = "$19.99";
9
9
  export declare const LICENSE_PRICE = "$9.99";
10
- export declare const LICENSE_DISCOUNT_LABEL = "50% off \u2014 forever";
10
+ export declare const LICENSE_DISCOUNT_LABEL = "Launch promo \u2014 50% off";
11
11
  export declare const POKE_LOCKIN_RECIPE_URL = "https://poke.com/r/KQ7myvC_Xpo";
12
12
  export declare const ICON_URL = "https://www.lockinmcp.com/icon.png";
13
13
  //# sourceMappingURL=brand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,eAAe,CAAC;AACrC,eAAO,MAAM,QAAQ,eAAe,CAAC;AACrC,eAAO,MAAM,WAAW,uCAAuC,CAAC;AAChE,eAAO,MAAM,UAAU,kBAAkB,CAAC;AAC1C,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAC5D,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAChD,eAAO,MAAM,mBAAmB,gCAA0B,CAAC;AAC3D,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,aAAa,UAAU,CAAC;AACrC,eAAO,MAAM,sBAAsB,2BAAsB,CAAC;AAC1D,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AACvE,eAAO,MAAM,QAAQ,uCAAiC,CAAC"}
1
+ {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,eAAe,CAAC;AACrC,eAAO,MAAM,QAAQ,eAAe,CAAC;AACrC,eAAO,MAAM,WAAW,uCAAuC,CAAC;AAChE,eAAO,MAAM,UAAU,kBAAkB,CAAC;AAC1C,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAC5D,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAChD,eAAO,MAAM,mBAAmB,gCAA0B,CAAC;AAC3D,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,aAAa,UAAU,CAAC;AACrC,eAAO,MAAM,sBAAsB,gCAA2B,CAAC;AAC/D,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AACvE,eAAO,MAAM,QAAQ,uCAAiC,CAAC"}
package/dist/brand.js CHANGED
@@ -7,7 +7,7 @@ export const RELAY_HOST = `relay.${APP_DOMAIN}`;
7
7
  export const RELAY_PUBLIC_ORIGIN = `https://${RELAY_HOST}`;
8
8
  export const LICENSE_PRICE_ORIGINAL = "$19.99";
9
9
  export const LICENSE_PRICE = "$9.99";
10
- export const LICENSE_DISCOUNT_LABEL = "50% off — forever";
10
+ export const LICENSE_DISCOUNT_LABEL = "Launch promo — 50% off";
11
11
  export const POKE_LOCKIN_RECIPE_URL = "https://poke.com/r/KQ7myvC_Xpo";
12
12
  export const ICON_URL = `${CANONICAL_ORIGIN}/icon.png`;
13
13
  //# sourceMappingURL=brand.js.map
package/dist/brand.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"brand.js","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AACrC,MAAM,CAAC,MAAM,WAAW,GAAG,oCAAoC,CAAC;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;AAC1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,UAAU,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,UAAU,EAAE,CAAC;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAC1D,MAAM,CAAC,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AACvE,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,gBAAgB,WAAW,CAAC"}
1
+ {"version":3,"file":"brand.js","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AACrC,MAAM,CAAC,MAAM,WAAW,GAAG,oCAAoC,CAAC;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;AAC1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,UAAU,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,UAAU,EAAE,CAAC;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAC/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AACvE,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,gBAAgB,WAAW,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare function deviceLocalDateKey(date?: Date): string;
2
+ export declare function pushCloudActivity(payload: {
3
+ focusMinutes?: number;
4
+ sessionDelta?: number;
5
+ date?: string;
6
+ blockingActive?: boolean;
7
+ blockedDomainCount?: number;
8
+ relayConnected?: boolean;
9
+ }): Promise<void>;
10
+ export declare function pushRelayStatusSnapshot(): Promise<void>;
11
+ //# sourceMappingURL=cloud-activity.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,151 @@
1
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
2
+ import { join } from "node:path";
3
+ import { randomBytes } from "node:crypto";
4
+ import { getLicenseApiUrl } from "./config.js";
5
+ import { refreshSyncTokenAfterAuthFailure, resolveSyncToken, } from "./license-token.js";
6
+ import { fetchLockInHealthSnapshot } from "./installer/port.js";
7
+ import { getInstallDir } from "./installer/platform.js";
8
+ const LOCAL_DEVICE_ID_FILE = "local-device-id";
9
+ const SETUP_MANIFEST_FILE = "setup-manifest.json";
10
+ let cachedDeviceId;
11
+ let deviceIdResolution;
12
+ async function resolveDeviceIdFromDisk() {
13
+ try {
14
+ const { readRelayCredentials } = await import("./installer/relay-credentials.js");
15
+ const credentials = await readRelayCredentials();
16
+ if (credentials?.deviceId) {
17
+ cachedDeviceId = credentials.deviceId;
18
+ return cachedDeviceId;
19
+ }
20
+ }
21
+ catch {
22
+ // no relay credentials
23
+ }
24
+ try {
25
+ const raw = await readFile(join(getInstallDir(), SETUP_MANIFEST_FILE), "utf8");
26
+ const manifest = JSON.parse(raw);
27
+ if (manifest.relayDeviceId?.trim()) {
28
+ cachedDeviceId = manifest.relayDeviceId.trim();
29
+ return cachedDeviceId;
30
+ }
31
+ }
32
+ catch {
33
+ // no manifest
34
+ }
35
+ const localIdPath = join(getInstallDir(), LOCAL_DEVICE_ID_FILE);
36
+ try {
37
+ const persisted = (await readFile(localIdPath, "utf8")).trim();
38
+ if (persisted) {
39
+ cachedDeviceId = persisted;
40
+ return cachedDeviceId;
41
+ }
42
+ }
43
+ catch {
44
+ // generate below
45
+ }
46
+ const generated = `local_${randomBytes(16).toString("hex")}`;
47
+ try {
48
+ await mkdir(getInstallDir(), { recursive: true });
49
+ await writeFile(localIdPath, `${generated}\n`, { mode: 0o600 });
50
+ }
51
+ catch {
52
+ // Install dir may be unwritable — use in-memory id for this process.
53
+ }
54
+ cachedDeviceId = generated;
55
+ return cachedDeviceId;
56
+ }
57
+ function readDeviceIdFromEnv() {
58
+ return process.env.MDB_DEVICE_ID?.trim() || undefined;
59
+ }
60
+ /** Resolve a stable device id for cloud sync (env → relay creds → manifest → local file). */
61
+ async function resolveDeviceId() {
62
+ const fromEnv = readDeviceIdFromEnv();
63
+ if (fromEnv) {
64
+ return fromEnv;
65
+ }
66
+ if (cachedDeviceId) {
67
+ return cachedDeviceId;
68
+ }
69
+ deviceIdResolution ??= resolveDeviceIdFromDisk().finally(() => {
70
+ deviceIdResolution = undefined;
71
+ });
72
+ return deviceIdResolution;
73
+ }
74
+ async function readRelayConnected() {
75
+ const port = Number(process.env.MDB_HTTP_PORT ?? 3847);
76
+ const snapshot = await fetchLockInHealthSnapshot(port);
77
+ return snapshot?.relayConnected === true;
78
+ }
79
+ export function deviceLocalDateKey(date = new Date()) {
80
+ const year = date.getFullYear();
81
+ const month = String(date.getMonth() + 1).padStart(2, "0");
82
+ const day = String(date.getDate()).padStart(2, "0");
83
+ return `${year}-${month}-${day}`;
84
+ }
85
+ function formatSyncFailure(status, body) {
86
+ if (status === 404) {
87
+ return `${status} — activity sync API not deployed yet`;
88
+ }
89
+ const trimmed = body.replace(/\s+/g, " ").trim();
90
+ if (!trimmed || trimmed.startsWith("<!DOCTYPE") || trimmed.startsWith("<html")) {
91
+ return `${status}`;
92
+ }
93
+ return `${status} ${trimmed.slice(0, 120)}`;
94
+ }
95
+ export async function pushCloudActivity(payload) {
96
+ let token = await resolveSyncToken();
97
+ if (!token)
98
+ return;
99
+ const deviceId = await resolveDeviceId();
100
+ const relayConnected = payload.relayConnected ?? (await readRelayConnected());
101
+ const apiUrl = getLicenseApiUrl();
102
+ const body = {
103
+ deviceId,
104
+ relayConnected,
105
+ date: payload.date ?? deviceLocalDateKey(),
106
+ };
107
+ if (payload.focusMinutes !== undefined) {
108
+ body.focusMinutes = payload.focusMinutes;
109
+ }
110
+ if (payload.sessionDelta !== undefined) {
111
+ body.sessionDelta = payload.sessionDelta;
112
+ }
113
+ if (payload.blockingActive !== undefined) {
114
+ body.blockingActive = payload.blockingActive;
115
+ }
116
+ if (payload.blockedDomainCount !== undefined) {
117
+ body.blockedDomainCount = payload.blockedDomainCount;
118
+ }
119
+ async function postOnce(authToken) {
120
+ return fetch(`${apiUrl}/activity/sync`, {
121
+ method: "POST",
122
+ headers: {
123
+ "Content-Type": "application/json",
124
+ Authorization: `Bearer ${authToken}`,
125
+ },
126
+ body: JSON.stringify(body),
127
+ });
128
+ }
129
+ try {
130
+ let response = await postOnce(token);
131
+ if (response.status === 401) {
132
+ const refreshed = await refreshSyncTokenAfterAuthFailure();
133
+ if (refreshed) {
134
+ token = refreshed;
135
+ response = await postOnce(token);
136
+ }
137
+ }
138
+ if (!response.ok) {
139
+ const errorBody = await response.text();
140
+ console.warn(`[cloud-activity] sync failed: ${formatSyncFailure(response.status, errorBody)}`);
141
+ }
142
+ }
143
+ catch (error) {
144
+ console.warn("[cloud-activity] sync error:", error instanceof Error ? error.message : error);
145
+ }
146
+ }
147
+ export async function pushRelayStatusSnapshot() {
148
+ const { tickFocusActivitySync } = await import("./focus-tracker.js");
149
+ await tickFocusActivitySync();
150
+ }
151
+ //# sourceMappingURL=cloud-activity.js.map