lockin-mcp 1.0.10 → 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.
- package/README.md +57 -9
- package/dist/agent-guidelines.d.ts +2 -2
- package/dist/agent-guidelines.d.ts.map +1 -1
- package/dist/agent-guidelines.js +14 -4
- package/dist/agent-guidelines.js.map +1 -1
- package/dist/agent-guidelines.test.js +2 -0
- package/dist/agent-guidelines.test.js.map +1 -1
- package/dist/cloud-tasks.d.ts +22 -0
- package/dist/cloud-tasks.d.ts.map +1 -0
- package/dist/cloud-tasks.js +120 -0
- package/dist/cloud-tasks.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +184 -1
- package/dist/server.js.map +1 -1
- package/dist/server.tasks.test.d.ts +2 -0
- package/dist/server.tasks.test.d.ts.map +1 -0
- package/dist/server.tasks.test.js +21 -0
- package/dist/server.tasks.test.js.map +1 -0
- 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`) |
|
|
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` |
|
|
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
|
|
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`
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const AGENT_GUIDELINES_VERSION = "1.0
|
|
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` 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. 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.\
|
|
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,
|
|
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"}
|
package/dist/agent-guidelines.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const AGENT_GUIDELINES_VERSION = "1.0
|
|
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.
|
|
@@ -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.
|
|
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
|
-
|
|
31
|
-
|
|
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
|
|
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,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
|
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,aAAa,CAAC;AAC/C,OAAO,EACL,gCAAgC,EAChC,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAsB5B,K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ACnB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAAc;IACxD,MAAM,SAAS,CAAC;QACd,MAAM,EAAE,SAAS;QACjB,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsDpE,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,SAAS,CAwazE"}
|
package/dist/server.js
CHANGED
|
@@ -3,6 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
import { getAgentGuidelinesPayload } from "./agent-guidelines.js";
|
|
4
4
|
import { APP_SLUG } from "./brand.js";
|
|
5
5
|
import { blockDomains, getBlockStatus, temporarilyUnblockDomains, unblockDomains, } from "./blocker.js";
|
|
6
|
+
import { cloudArchiveFocusTask, cloudCompleteFocusTask, cloudCreateFocusTask, cloudGetActiveFocusTask, cloudListFocusTasks, cloudSetActiveFocusTask, cloudUpdateFocusTask, } from "./cloud-tasks.js";
|
|
6
7
|
import { requireProLicense } from "./license-guard.js";
|
|
7
8
|
const FOCUS_MODE_DOMAINS = [
|
|
8
9
|
"youtube.com",
|
|
@@ -131,6 +132,12 @@ export function createMcpServer(options = {}) {
|
|
|
131
132
|
.array(z.string().min(1))
|
|
132
133
|
.optional()
|
|
133
134
|
.describe("Additional domains to block alongside the default focus set"),
|
|
135
|
+
task_description: z
|
|
136
|
+
.string()
|
|
137
|
+
.min(1)
|
|
138
|
+
.max(500)
|
|
139
|
+
.optional()
|
|
140
|
+
.describe("What the user is working on — creates an active focus task for AI site filtering"),
|
|
134
141
|
},
|
|
135
142
|
annotations: {
|
|
136
143
|
readOnlyHint: false,
|
|
@@ -138,16 +145,21 @@ export function createMcpServer(options = {}) {
|
|
|
138
145
|
idempotentHint: true,
|
|
139
146
|
openWorldHint: false,
|
|
140
147
|
},
|
|
141
|
-
}, async ({ extra_domains }) => {
|
|
148
|
+
}, async ({ extra_domains, task_description }) => {
|
|
142
149
|
try {
|
|
143
150
|
await requireProLicense(guardOptions);
|
|
144
151
|
const domains = [
|
|
145
152
|
...new Set([...FOCUS_MODE_DOMAINS, ...(extra_domains ?? [])]),
|
|
146
153
|
];
|
|
147
154
|
const result = await blockDomains(domains);
|
|
155
|
+
let task = null;
|
|
156
|
+
if (task_description?.trim()) {
|
|
157
|
+
task = await cloudCreateFocusTask(task_description.trim(), true);
|
|
158
|
+
}
|
|
148
159
|
return toolResult({
|
|
149
160
|
success: true,
|
|
150
161
|
mode: "focus",
|
|
162
|
+
task,
|
|
151
163
|
...result,
|
|
152
164
|
});
|
|
153
165
|
}
|
|
@@ -174,6 +186,177 @@ export function createMcpServer(options = {}) {
|
|
|
174
186
|
return toolError(error instanceof Error ? error.message : "Failed to get block status");
|
|
175
187
|
}
|
|
176
188
|
});
|
|
189
|
+
server.registerTool("create_focus_task", {
|
|
190
|
+
title: "Create Focus Task",
|
|
191
|
+
description: "Create a focus task describing what the user is working on. Sets it as the active task by default. Use when the user starts work or names their current task.",
|
|
192
|
+
inputSchema: {
|
|
193
|
+
description: z
|
|
194
|
+
.string()
|
|
195
|
+
.min(1)
|
|
196
|
+
.max(500)
|
|
197
|
+
.describe("What the user is working on right now"),
|
|
198
|
+
set_active: z
|
|
199
|
+
.boolean()
|
|
200
|
+
.optional()
|
|
201
|
+
.describe("Whether to make this the active task (default true)"),
|
|
202
|
+
},
|
|
203
|
+
annotations: {
|
|
204
|
+
readOnlyHint: false,
|
|
205
|
+
destructiveHint: false,
|
|
206
|
+
idempotentHint: false,
|
|
207
|
+
openWorldHint: false,
|
|
208
|
+
},
|
|
209
|
+
}, async ({ description, set_active }) => {
|
|
210
|
+
try {
|
|
211
|
+
await requireProLicense(guardOptions);
|
|
212
|
+
const task = await cloudCreateFocusTask(description, set_active ?? true);
|
|
213
|
+
return toolResult({ success: true, task });
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
return toolError(error instanceof Error ? error.message : "Failed to create focus task");
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
server.registerTool("list_focus_tasks", {
|
|
220
|
+
title: "List Focus Tasks",
|
|
221
|
+
description: "List the user's focus tasks and the currently active task.",
|
|
222
|
+
inputSchema: {},
|
|
223
|
+
annotations: {
|
|
224
|
+
readOnlyHint: true,
|
|
225
|
+
destructiveHint: false,
|
|
226
|
+
idempotentHint: true,
|
|
227
|
+
openWorldHint: false,
|
|
228
|
+
},
|
|
229
|
+
}, async () => {
|
|
230
|
+
try {
|
|
231
|
+
await requireProLicense(guardOptions);
|
|
232
|
+
const result = await cloudListFocusTasks();
|
|
233
|
+
return toolResult({ success: true, ...result });
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
return toolError(error instanceof Error ? error.message : "Failed to list focus tasks");
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
server.registerTool("get_active_focus_task", {
|
|
240
|
+
title: "Get Active Focus Task",
|
|
241
|
+
description: "Return the user's currently active focus task, if any.",
|
|
242
|
+
inputSchema: {},
|
|
243
|
+
annotations: {
|
|
244
|
+
readOnlyHint: true,
|
|
245
|
+
destructiveHint: false,
|
|
246
|
+
idempotentHint: true,
|
|
247
|
+
openWorldHint: false,
|
|
248
|
+
},
|
|
249
|
+
}, async () => {
|
|
250
|
+
try {
|
|
251
|
+
await requireProLicense(guardOptions);
|
|
252
|
+
const activeTask = await cloudGetActiveFocusTask();
|
|
253
|
+
return toolResult({ success: true, activeTask });
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
return toolError(error instanceof Error
|
|
257
|
+
? error.message
|
|
258
|
+
: "Failed to get active focus task");
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
server.registerTool("update_focus_task", {
|
|
262
|
+
title: "Update Focus Task",
|
|
263
|
+
description: "Update the description of an existing focus task.",
|
|
264
|
+
inputSchema: {
|
|
265
|
+
task_id: z.string().min(1).describe("Focus task ID"),
|
|
266
|
+
description: z
|
|
267
|
+
.string()
|
|
268
|
+
.min(1)
|
|
269
|
+
.max(500)
|
|
270
|
+
.describe("Updated task description"),
|
|
271
|
+
},
|
|
272
|
+
annotations: {
|
|
273
|
+
readOnlyHint: false,
|
|
274
|
+
destructiveHint: false,
|
|
275
|
+
idempotentHint: true,
|
|
276
|
+
openWorldHint: false,
|
|
277
|
+
},
|
|
278
|
+
}, async ({ task_id, description }) => {
|
|
279
|
+
try {
|
|
280
|
+
await requireProLicense(guardOptions);
|
|
281
|
+
const task = await cloudUpdateFocusTask(task_id, description);
|
|
282
|
+
return toolResult({ success: true, task });
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
return toolError(error instanceof Error ? error.message : "Failed to update focus task");
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
server.registerTool("set_active_focus_task", {
|
|
289
|
+
title: "Set Active Focus Task",
|
|
290
|
+
description: "Switch the active focus task to an existing task by ID.",
|
|
291
|
+
inputSchema: {
|
|
292
|
+
task_id: z.string().min(1).describe("Focus task ID to activate"),
|
|
293
|
+
},
|
|
294
|
+
annotations: {
|
|
295
|
+
readOnlyHint: false,
|
|
296
|
+
destructiveHint: false,
|
|
297
|
+
idempotentHint: true,
|
|
298
|
+
openWorldHint: false,
|
|
299
|
+
},
|
|
300
|
+
}, async ({ task_id }) => {
|
|
301
|
+
try {
|
|
302
|
+
await requireProLicense(guardOptions);
|
|
303
|
+
const task = await cloudSetActiveFocusTask(task_id);
|
|
304
|
+
return toolResult({ success: true, task });
|
|
305
|
+
}
|
|
306
|
+
catch (error) {
|
|
307
|
+
return toolError(error instanceof Error
|
|
308
|
+
? error.message
|
|
309
|
+
: "Failed to set active focus task");
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
server.registerTool("complete_focus_task", {
|
|
313
|
+
title: "Complete Focus Task",
|
|
314
|
+
description: "Mark a focus task as completed when the user finishes that work.",
|
|
315
|
+
inputSchema: {
|
|
316
|
+
task_id: z.string().min(1).describe("Focus task ID to complete"),
|
|
317
|
+
},
|
|
318
|
+
annotations: {
|
|
319
|
+
readOnlyHint: false,
|
|
320
|
+
destructiveHint: false,
|
|
321
|
+
idempotentHint: true,
|
|
322
|
+
openWorldHint: false,
|
|
323
|
+
},
|
|
324
|
+
}, async ({ task_id }) => {
|
|
325
|
+
try {
|
|
326
|
+
await requireProLicense(guardOptions);
|
|
327
|
+
const task = await cloudCompleteFocusTask(task_id);
|
|
328
|
+
return toolResult({ success: true, task });
|
|
329
|
+
}
|
|
330
|
+
catch (error) {
|
|
331
|
+
return toolError(error instanceof Error
|
|
332
|
+
? error.message
|
|
333
|
+
: "Failed to complete focus task");
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
server.registerTool("archive_focus_task", {
|
|
337
|
+
title: "Archive Focus Task",
|
|
338
|
+
description: "Archive a focus task so it no longer appears in active lists.",
|
|
339
|
+
inputSchema: {
|
|
340
|
+
task_id: z.string().min(1).describe("Focus task ID to archive"),
|
|
341
|
+
},
|
|
342
|
+
annotations: {
|
|
343
|
+
readOnlyHint: false,
|
|
344
|
+
destructiveHint: false,
|
|
345
|
+
idempotentHint: true,
|
|
346
|
+
openWorldHint: false,
|
|
347
|
+
},
|
|
348
|
+
}, async ({ task_id }) => {
|
|
349
|
+
try {
|
|
350
|
+
await requireProLicense(guardOptions);
|
|
351
|
+
await cloudArchiveFocusTask(task_id);
|
|
352
|
+
return toolResult({ success: true, taskId: task_id, archived: true });
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
return toolError(error instanceof Error
|
|
356
|
+
? error.message
|
|
357
|
+
: "Failed to archive focus task");
|
|
358
|
+
}
|
|
359
|
+
});
|
|
177
360
|
return server;
|
|
178
361
|
}
|
|
179
362
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,YAAY,EACZ,cAAc,EACd,yBAAyB,EACzB,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,kBAAkB,GAAG;IACzB,aAAa;IACb,OAAO;IACP,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,cAAc;IACd,aAAa;IACb,WAAW;CACZ,CAAC;AAEF,SAAS,UAAU,CAAC,IAAa;IAI/B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,iBAAiB,EACf,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;YACvC,CAAC,CAAE,IAAgC;YACnC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;KACvB,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,OAAe;IAChC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,aAAa,GAAG,CAAC;KACpB,K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E,+DAA+D;QAC5E,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC;SAChE;QACD,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,MAAM,iBAAiB,CAAC,YAAY,CAAC,CAAC;YACtC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,UAAU,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QACxE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,SAAS,CACd,KAAK,YAAY,KAAK;gBACpB,CAAC,CAAC,KAAK,CAAC,OAAO;gBACf,CAAC,CAAC,8BAA8B,CACnC,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.tasks.test.d.ts","sourceRoot":"","sources":["../src/server.tasks.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
describe("MCP server task tools", () => {
|
|
5
|
+
it("declares focus task tools in server source", () => {
|
|
6
|
+
const source = readFileSync(join(process.cwd(), "src/server.ts"), "utf8");
|
|
7
|
+
const expected = [
|
|
8
|
+
"create_focus_task",
|
|
9
|
+
"list_focus_tasks",
|
|
10
|
+
"get_active_focus_task",
|
|
11
|
+
"update_focus_task",
|
|
12
|
+
"set_active_focus_task",
|
|
13
|
+
"complete_focus_task",
|
|
14
|
+
"archive_focus_task",
|
|
15
|
+
];
|
|
16
|
+
for (const name of expected) {
|
|
17
|
+
expect(source).toContain(`"${name}"`);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=server.tasks.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.tasks.test.js","sourceRoot":"","sources":["../src/server.tasks.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC;QAC1E,MAAM,QAAQ,GAAG;YACf,mBAAmB;YACnB,kBAAkB;YAClB,uBAAuB;YACvB,mBAAmB;YACnB,uBAAuB;YACvB,qBAAqB;YACrB,oBAAoB;SACrB,CAAC;QAEF,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC5B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|