@hcu-lab.me/mcp-device 1.0.2 → 1.0.4

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 (43) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +84 -51
  3. package/dist/bootstrap.js +0 -0
  4. package/dist/command-manager.js +0 -0
  5. package/dist/config-field-definitions.js +0 -0
  6. package/dist/config-manager.js +0 -0
  7. package/dist/config.js +0 -0
  8. package/dist/custom-stdio.js +0 -0
  9. package/dist/data/official-app-ca.pem +12 -12
  10. package/dist/data/onboarding-prompts.json +70 -70
  11. package/dist/device/gateway-pairing.d.ts +1 -0
  12. package/dist/device/gateway-pairing.js +0 -6
  13. package/dist/error-handlers.js +0 -0
  14. package/dist/handlers/filesystem-handlers.js +2 -2
  15. package/dist/index.js +0 -0
  16. package/dist/mcp-device.js +0 -0
  17. package/dist/search-manager.js +0 -0
  18. package/dist/server.js +656 -656
  19. package/dist/terminal-manager.js +0 -0
  20. package/dist/tools/edit.js +2 -2
  21. package/dist/tools/fuzzySearch.js +9 -9
  22. package/dist/tools/improved-process-tools.js +10 -10
  23. package/dist/tools/prompts.js +1 -1
  24. package/dist/types.js +0 -0
  25. package/dist/ui/config-editor/index.html +13 -13
  26. package/dist/ui/config-editor/src/app.js +30 -30
  27. package/dist/ui/config-editor/src/array-modal.js +32 -32
  28. package/dist/ui/config-editor/styles.css +586 -586
  29. package/dist/ui/file-preview/index.html +16 -16
  30. package/dist/ui/file-preview/src/app.js +8 -8
  31. package/dist/ui/file-preview/src/document-layout.js +31 -31
  32. package/dist/ui/file-preview/src/document-outline.js +8 -8
  33. package/dist/ui/file-preview/src/markdown/conflict-dialog.js +33 -33
  34. package/dist/ui/file-preview/src/markdown/controller.js +9 -9
  35. package/dist/ui/file-preview/src/markdown/editor.js +31 -31
  36. package/dist/ui/file-preview/styles.css +1630 -1630
  37. package/dist/utils/files/binary.js +4 -4
  38. package/dist/utils/files/excel.js +3 -3
  39. package/dist/utils/system-info.js +90 -90
  40. package/dist/utils/usageTracker.js +49 -49
  41. package/dist/version.d.ts +1 -1
  42. package/dist/version.js +1 -1
  43. package/package.json +135 -131
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024-2025 Eduard Ruzga and Desktop Commander Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 Eduard Ruzga and Desktop Commander Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,51 +1,84 @@
1
- # MCP Device
2
-
3
- `@hcu-lab.me/mcp-device` securely connects a user-owned computer to an authenticated Model Context Protocol gateway. The device makes the outbound connection; no inbound device port is required.
4
-
5
- The gateway owns accounts, OAuth, device ownership, MCP tool contracts, routing, and usage aggregation. MCP Device owns local device identity, pairing, reconnect lifecycle, bounded execution, background registration, and local status.
6
-
7
- ## Commands
8
-
9
- ```text
10
- mcp-device start in the foreground
11
- mcp-device start start in the foreground
12
- mcp-device login explicitly link or switch the gateway account
13
- mcp-device logout unlink the gateway account from this device
14
- mcp-device status show runtime, manager, connection, security, proxy, usage, and schema state
15
- mcp-device install pair if needed, then install and start a background runtime
16
- mcp-device stop stop the current runtime without deleting identity/account state
17
- mcp-device uninstall remove background registration while preserving identity/account state
18
- mcp-device --help show command help
19
- ```
20
-
21
- `md` is an alias of `mcp-device` on POSIX shells. On Windows, use `mcp-device`; bare `md` has a shell collision with built-in directory-creation commands/aliases and is not the supported invocation.
22
-
23
- On Windows, `install` uses the current-user background registration. On Linux, every `install` asks whether to use `systemd --user` or an already configured PM2 installation. MCP Device does not install PM2, run `pm2 startup`, or use `sudo` automatically.
24
-
25
- ## First run and trust
26
-
27
- The official gateway is `https://mcp-v2.hcu-lab.me/mcp`. The official package is designed to pin an independently distributed application CA and require protocol v2 before the first network connection. If that CA is absent, MCP Device fails closed rather than learning trust from the gateway it is about to contact or falling back to protocol v1.
28
-
29
- For a custom gateway, configure the gateway URL and provision its application CA through an independent trusted channel before enabling protocol v2. Proxy selection is captured during interactive provisioning and reused by the background runtime; proxy credentials are protected with Windows DPAPI on Windows.
30
-
31
- ## Local state and migration
32
-
33
- Canonical state is stored under `~/.mcp-device/`. Existing `~/.hcu-device/` identity/config/status state is migrated non-destructively under serialized runtime ownership. A conflicting canonical and legacy identity fails closed rather than creating a second device identity.
34
-
35
- The device identity is Ed25519. On Windows, the private key is protected with DPAPI for the current user. The gateway stores the public identity and account ownership.
36
-
37
- ## Development
38
-
39
- ```powershell
40
- git clone https://github.com/Hiroshimeow/agent-mcp-device.git
41
- cd agent-mcp-device
42
- npm ci
43
- npm run build
44
- node dist/mcp-device.js --help
45
- ```
46
-
47
- For a custom development gateway, set `MCP_GATEWAY_URL`. Supply `MCP_GATEWAY_APP_CA_PATH` from an independent trusted source when using protocol v2. Non-loopback plaintext gateway URLs are rejected.
48
-
49
- ## Upstream execution engine
50
-
51
- The local execution engine is derived from [Desktop Commander MCP](https://github.com/wonderwhy-er/DesktopCommanderMCP). Desktop Commander is MIT licensed; its copyright and MIT license are preserved in this repository's `LICENSE`. The MCP Device product identity, gateway protocol, account/device lifecycle, security layer, and packaging are maintained separately in this repository.
1
+ # MCP Device
2
+
3
+ `@hcu-lab.me/mcp-device` connects a user-owned computer to the authenticated MCP Gateway. The device opens the outbound connection; no inbound device port is required.
4
+
5
+ The gateway owns accounts, OAuth, device ownership, MCP tool contracts, routing, and usage aggregation. MCP Device owns local device identity, pairing, reconnect lifecycle, bounded execution, background registration, and local status.
6
+
7
+ ## Quick start
8
+
9
+ Canonical production gateway: https://device.hcu-lab.me
10
+
11
+ - Dashboard: https://device.hcu-lab.me/dashboard
12
+ - Pair device: https://device.hcu-lab.me/pair
13
+ - Live setup/help: https://device.hcu-lab.me/help
14
+
15
+ Install the current release:
16
+
17
+ ```powershell
18
+ npm install -g @hcu-lab.me/mcp-device
19
+ mcp-device login
20
+ mcp-device install
21
+ mcp-device status
22
+ ```
23
+
24
+ `mcp-device login` stays terminal-only: it prints the pairing URL, user code, and QR code, and never opens a browser automatically.
25
+
26
+ ## Limited hosted access
27
+
28
+ The public source package remains MIT licensed, but access to the hosted `device.hcu-lab.me` gateway is intentionally limited. New hosted accounts are admitted through a small, controlled supply of invite codes rather than open registration. Invite availability may be capped, paused, expired, or revoked as the service capacity and security policy change. Installing the package does not by itself grant a hosted-service account or guarantee that an invite code will be available.
29
+
30
+ The hosted Pair/Help pages render their gateway URL and navigation from the deployment that served the page, so staging or custom deployments do not need a production-host rewrite. For the canonical package, `https://device.hcu-lab.me` is the default gateway; `MCP_GATEWAY_URL` is only needed when intentionally using another gateway.
31
+
32
+ ## Commands
33
+
34
+ ```text
35
+ mcp-device start in the foreground
36
+ mcp-device start start in the foreground
37
+ mcp-device login explicitly link or switch the gateway account
38
+ mcp-device logout unlink the gateway account from this device
39
+ mcp-device status show runtime, manager, connection, security, proxy, usage, and schema state
40
+ mcp-device install pair if needed, then install and start a background runtime
41
+ mcp-device stop stop the current runtime without deleting identity/account state
42
+ mcp-device uninstall remove background registration while preserving identity/account state
43
+ mcp-device --help show command help
44
+ ```
45
+
46
+ `md` is an alias of `mcp-device` on POSIX shells. On Windows, use `mcp-device`; bare `md` has a shell collision with built-in directory-creation commands/aliases and is not the supported invocation.
47
+
48
+ On Windows, `install` uses current-user background registration. On Linux, every `install` asks whether to use `systemd --user` or an already configured PM2 installation. MCP Device does not install PM2, run `pm2 startup`, or use `sudo` automatically.
49
+
50
+ ## First run and trust
51
+
52
+ The official gateway base URL is `https://device.hcu-lab.me`. The official package pins the independently distributed application CA and requires protocol v2 before the first network connection. If that CA is absent or invalid, MCP Device fails closed instead of learning trust from the gateway it is about to contact or falling back to protocol v1.
53
+
54
+ For a custom gateway, set `MCP_GATEWAY_URL` and provision its application CA through an independent trusted channel before enabling protocol v2. Proxy selection is captured during interactive provisioning and reused by the background runtime.
55
+
56
+ ## Local state and 1.0.2 migration
57
+
58
+ Canonical state is stored under `~/.mcp-device/`. Existing `~/.hcu-device/` identity/config/status state is migrated non-destructively under serialized runtime ownership. A conflicting canonical and legacy identity fails closed rather than creating a second device identity.
59
+
60
+ The device identity is Ed25519. MCP Device 1.0.2 does not use Windows DPAPI for the device private key or proxy configuration. A legacy protected 1.0.1 identity is archived without decrypting it, a fresh local identity is generated, and the device must be paired once again. A legacy protected proxy configuration must be supplied again during `mcp-device login`. The gateway stores only the public device identity and account ownership.
61
+
62
+ ## Development
63
+
64
+ ```powershell
65
+ git clone https://github.com/Hiroshimeow/agent-mcp-device.git
66
+ cd agent-mcp-device
67
+ npm ci
68
+ npm run build
69
+ node dist/mcp-device.js --help
70
+ ```
71
+
72
+ Normal development pushes do not publish npm. After reviewed development work is committed on a clean `main`, a release is intentionally created with:
73
+
74
+ ```powershell
75
+ npm run release
76
+ ```
77
+
78
+ That command runs the test suite, bumps the patch version, synchronizes project version files, creates the release commit and `vX.Y.Z` tag, then atomically pushes `main` and the tag. The tag-triggered GitHub Actions workflow performs the npm publish through trusted OIDC publishing. Use `npm run release:minor` or `npm run release:major` only when that version change is intentional.
79
+
80
+ For a custom development gateway, set `MCP_GATEWAY_URL`. Supply `MCP_GATEWAY_APP_CA_PATH` from an independent trusted source when using protocol v2. Non-loopback plaintext gateway URLs are rejected.
81
+
82
+ ## Upstream execution engine
83
+
84
+ The local execution engine is derived from [Desktop Commander MCP](https://github.com/wonderwhy-er/DesktopCommanderMCP). Desktop Commander is MIT licensed; its copyright and MIT license are preserved in this repository's `LICENSE`. The MCP Device product identity, gateway protocol, account/device lifecycle, security layer, and packaging are maintained separately in this repository.
package/dist/bootstrap.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/dist/config.js CHANGED
File without changes
File without changes
@@ -1,12 +1,12 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIBrzCCAVagAwIBAgIUJT4N8vTRvyxp9rlhfHuY8OOJvB4wCgYIKoZIzj0EAwIw
3
- JDEiMCAGA1UEAwwZTUNQIERldmljZSBBcHBsaWNhdGlvbiBDQTAeFw0yNjA5MTYx
4
- NDMyNDVaFw0zNjA5MTMxNDMyNDVaMCQxIjAgBgNVBAMMGU1DUCBEZXZpY2UgQXBw
5
- bGljYXRpb24gQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARFvReUGN6fAVYg
6
- FF4UTn6F7KQ78b9yhkBU9qBy1XEMnCJqpn07rxKQszaB/ABb0awH0kIQuOUt+NA/
7
- 7iUVeyA4o2YwZDASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAd
8
- BgNVHQ4EFgQUMtlUKf+st0jgEdxhESpzROwRDW0wHwYDVR0jBBgwFoAUMtlUKf+s
9
- t0jgEdxhESpzROwRDW0wCgYIKoZIzj0EAwIDRwAwRAIgbjQRULWIJp+zuwOEQgVo
10
- 9Y+3UygTogcwDkylzlR21lwCIDwbk3Vp07JVK7qBCLL9JplP8j4UWTTXVe5Oi+xJ
11
- japd
12
- -----END CERTIFICATE-----
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIBrzCCAVagAwIBAgIUJT4N8vTRvyxp9rlhfHuY8OOJvB4wCgYIKoZIzj0EAwIw
3
+ JDEiMCAGA1UEAwwZTUNQIERldmljZSBBcHBsaWNhdGlvbiBDQTAeFw0yNjA5MTYx
4
+ NDMyNDVaFw0zNjA5MTMxNDMyNDVaMCQxIjAgBgNVBAMMGU1DUCBEZXZpY2UgQXBw
5
+ bGljYXRpb24gQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARFvReUGN6fAVYg
6
+ FF4UTn6F7KQ78b9yhkBU9qBy1XEMnCJqpn07rxKQszaB/ABb0awH0kIQuOUt+NA/
7
+ 7iUVeyA4o2YwZDASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAd
8
+ BgNVHQ4EFgQUMtlUKf+st0jgEdxhESpzROwRDW0wHwYDVR0jBBgwFoAUMtlUKf+s
9
+ t0jgEdxhESpzROwRDW0wCgYIKoZIzj0EAwIDRwAwRAIgbjQRULWIJp+zuwOEQgVo
10
+ 9Y+3UygTogcwDkylzlR21lwCIDwbk3Vp07JVK7qBCLL9JplP8j4UWTTXVe5Oi+xJ
11
+ japd
12
+ -----END CERTIFICATE-----
@@ -1,70 +1,70 @@
1
- {
2
- "version": "2.0.0",
3
- "description": "Desktop Commander onboarding prompts - V2 simplified (5 prompts only)",
4
- "prompts": [
5
- {
6
- "id": "onb2_01",
7
- "title": "Organize my Downloads folder",
8
- "description": "Clean up and organize your messy Downloads folder into relevant subfolders automatically.",
9
- "prompt": "Let's organize your Downloads folder! \n\nFirst, let me check what we're working with. I'll look at your Downloads folder to see how many files are there and what types.\n\nShould I start by analyzing your Downloads folder?",
10
- "categories": ["onboarding"],
11
- "secondaryTag": "Quick Start",
12
- "votes": 0,
13
- "gaClicks": 0,
14
- "icon": "FolderOpen",
15
- "author": "DC team",
16
- "verified": true
17
- },
18
- {
19
- "id": "onb2_02",
20
- "title": "Explain codebase or repository to me",
21
- "description": "Analyze and explain any codebase - local project or GitHub repository - including architecture, dependencies, and how it works.",
22
- "prompt": "I'll analyze and explain any codebase for you! 🔍\n\n**What should I analyze?**\n\n*Local project:* `~/work/my-project` (replace with your path)\n*GitHub repo:* `https://github.com/user/repo`\n\nI'll break down the architecture, dependencies, and how everything works together!",
23
- "categories": ["onboarding"], "secondaryTag": "Code Analysis",
24
- "votes": 0,
25
- "gaClicks": 0,
26
- "icon": "Code",
27
- "author": "DC team",
28
- "verified": true
29
- },
30
- {
31
- "id": "onb2_03",
32
- "title": "Create organized knowledge/documents folder",
33
- "description": "Set up a well-structured knowledge base or document organization system with templates and suggested categories.",
34
- "prompt": "Let's create an organized knowledge base! 📚\n\n**Where should I set it up?**\n\n*I suggest: `~/Documents/Knowledge-Base` (replace with your path) or give me a different location.*\n\nI'll create a clean folder structure with templates and organize any existing documents you have!",
35
- "categories": ["onboarding"],
36
- "secondaryTag": "Quick Start",
37
- "votes": 0,
38
- "gaClicks": 0,
39
- "icon": "BookOpen",
40
- "author": "DC team",
41
- "verified": true
42
- },
43
- {
44
- "id": "onb2_04",
45
- "title": "Analyze my data file",
46
- "description": "Upload or point to any data file (CSV, JSON, Excel, etc.) and get comprehensive analysis including patterns, insights, and summary reports.",
47
- "prompt": "I'll help you analyze your data file! \n\nWhat's the path to your data file? (e.g., `/Users/yourname/data.csv`)\n\nOnce you give me the path, I'll start by checking what type of file it is and show you a quick preview, then we can dive deeper step by step.",
48
- "categories": ["onboarding"],
49
- "secondaryTag": "Quick Start",
50
- "votes": 0,
51
- "gaClicks": 0,
52
- "icon": "BarChart3",
53
- "author": "DC team",
54
- "verified": true
55
- },
56
- {
57
- "id": "onb2_05",
58
- "title": "Check system health and resources",
59
- "description": "Analyze your system's health, resource usage, running processes, and generate a comprehensive system status report.",
60
- "prompt": "Let me check your system health and resources!\n\nI'll start by looking at your CPU, memory, and disk usage, then check for any performance issues.\n\nShould I begin the system analysis?",
61
- "categories": ["onboarding"],
62
- "secondaryTag": "Quick Start",
63
- "votes": 0,
64
- "gaClicks": 0,
65
- "icon": "Activity",
66
- "author": "DC team",
67
- "verified": true
68
- }
69
- ]
70
- }
1
+ {
2
+ "version": "2.0.0",
3
+ "description": "Desktop Commander onboarding prompts - V2 simplified (5 prompts only)",
4
+ "prompts": [
5
+ {
6
+ "id": "onb2_01",
7
+ "title": "Organize my Downloads folder",
8
+ "description": "Clean up and organize your messy Downloads folder into relevant subfolders automatically.",
9
+ "prompt": "Let's organize your Downloads folder! \n\nFirst, let me check what we're working with. I'll look at your Downloads folder to see how many files are there and what types.\n\nShould I start by analyzing your Downloads folder?",
10
+ "categories": ["onboarding"],
11
+ "secondaryTag": "Quick Start",
12
+ "votes": 0,
13
+ "gaClicks": 0,
14
+ "icon": "FolderOpen",
15
+ "author": "DC team",
16
+ "verified": true
17
+ },
18
+ {
19
+ "id": "onb2_02",
20
+ "title": "Explain codebase or repository to me",
21
+ "description": "Analyze and explain any codebase - local project or GitHub repository - including architecture, dependencies, and how it works.",
22
+ "prompt": "I'll analyze and explain any codebase for you! 🔍\n\n**What should I analyze?**\n\n*Local project:* `~/work/my-project` (replace with your path)\n*GitHub repo:* `https://github.com/user/repo`\n\nI'll break down the architecture, dependencies, and how everything works together!",
23
+ "categories": ["onboarding"], "secondaryTag": "Code Analysis",
24
+ "votes": 0,
25
+ "gaClicks": 0,
26
+ "icon": "Code",
27
+ "author": "DC team",
28
+ "verified": true
29
+ },
30
+ {
31
+ "id": "onb2_03",
32
+ "title": "Create organized knowledge/documents folder",
33
+ "description": "Set up a well-structured knowledge base or document organization system with templates and suggested categories.",
34
+ "prompt": "Let's create an organized knowledge base! 📚\n\n**Where should I set it up?**\n\n*I suggest: `~/Documents/Knowledge-Base` (replace with your path) or give me a different location.*\n\nI'll create a clean folder structure with templates and organize any existing documents you have!",
35
+ "categories": ["onboarding"],
36
+ "secondaryTag": "Quick Start",
37
+ "votes": 0,
38
+ "gaClicks": 0,
39
+ "icon": "BookOpen",
40
+ "author": "DC team",
41
+ "verified": true
42
+ },
43
+ {
44
+ "id": "onb2_04",
45
+ "title": "Analyze my data file",
46
+ "description": "Upload or point to any data file (CSV, JSON, Excel, etc.) and get comprehensive analysis including patterns, insights, and summary reports.",
47
+ "prompt": "I'll help you analyze your data file! \n\nWhat's the path to your data file? (e.g., `/Users/yourname/data.csv`)\n\nOnce you give me the path, I'll start by checking what type of file it is and show you a quick preview, then we can dive deeper step by step.",
48
+ "categories": ["onboarding"],
49
+ "secondaryTag": "Quick Start",
50
+ "votes": 0,
51
+ "gaClicks": 0,
52
+ "icon": "BarChart3",
53
+ "author": "DC team",
54
+ "verified": true
55
+ },
56
+ {
57
+ "id": "onb2_05",
58
+ "title": "Check system health and resources",
59
+ "description": "Analyze your system's health, resource usage, running processes, and generate a comprehensive system status report.",
60
+ "prompt": "Let me check your system health and resources!\n\nI'll start by looking at your CPU, memory, and disk usage, then check for any performance issues.\n\nShould I begin the system analysis?",
61
+ "categories": ["onboarding"],
62
+ "secondaryTag": "Quick Start",
63
+ "votes": 0,
64
+ "gaClicks": 0,
65
+ "icon": "Activity",
66
+ "author": "DC team",
67
+ "verified": true
68
+ }
69
+ ]
70
+ }
@@ -16,6 +16,7 @@ export interface GatewayPairingOptions {
16
16
  deviceName?: string;
17
17
  fetchFn?: typeof fetch;
18
18
  proxyAgent?: Agent;
19
+ /** @deprecated Pairing is intentionally terminal-only; this hook is ignored. */
19
20
  openBrowser?: (url: string) => Promise<unknown>;
20
21
  renderQr?: (value: string) => void;
21
22
  sleep?: (ms: number) => Promise<void>;
@@ -1,7 +1,6 @@
1
1
  import { createHash, randomBytes } from 'crypto';
2
2
  import { createRequire } from 'module';
3
3
  import os from 'os';
4
- import open from 'open';
5
4
  import fetch from 'cross-fetch';
6
5
  import { gatewayHttpBase } from './gateway-url-policy.js';
7
6
  const CLIENT_ID = 'mcp-device';
@@ -34,7 +33,6 @@ async function jsonResponse(response) {
34
33
  export async function pairGatewayDevice(options) {
35
34
  const baseUrl = gatewayHttpBase(options.gatewayUrl);
36
35
  const fetchFn = options.fetchFn || fetch;
37
- const openBrowser = options.openBrowser || (url => open(url));
38
36
  const renderQr = options.renderQr || defaultQrRenderer;
39
37
  const sleep = options.sleep || (ms => new Promise(resolve => setTimeout(resolve, ms)));
40
38
  const log = options.log || (value => console.log(value));
@@ -62,10 +60,6 @@ export async function pairGatewayDevice(options) {
62
60
  log(`Pair this device: ${verificationUrl}`);
63
61
  log(`Code: ${start.user_code}`);
64
62
  renderQr(verificationUrl);
65
- try {
66
- await openBrowser(verificationUrl);
67
- }
68
- catch { /* URL + QR remain usable */ }
69
63
  const intervalMs = Math.max(1000, Math.min(30000, Number(start.interval || 2) * 1000));
70
64
  const deadline = Date.now() + Math.max(1, Number(start.expires_in || 600)) * 1000;
71
65
  while (Date.now() < deadline) {
File without changes
@@ -289,8 +289,8 @@ export async function handleWriteFile(args) {
289
289
  const lineCount = lines.length;
290
290
  let errorMessage = "";
291
291
  if (lineCount > MAX_LINES) {
292
- errorMessage = `✅ File written successfully! (${lineCount} lines)
293
-
292
+ errorMessage = `✅ File written successfully! (${lineCount} lines)
293
+
294
294
  💡 Performance tip: For optimal speed, consider chunking files into ≤30 line pieces in future operations.`;
295
295
  }
296
296
  // Pass the mode parameter to writeFile
package/dist/index.js CHANGED
File without changes
File without changes
File without changes