portveil-mcp 0.2.0 → 0.2.1
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 +2 -2
- package/dist/portveil.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,9 +13,9 @@ Moves are verified: a tool only reports success after the device has switched **
|
|
|
13
13
|
|
|
14
14
|
| Tool | What it does | Needs |
|
|
15
15
|
|---|---|---|
|
|
16
|
-
| `list_devices` | Every device: protected or not, where it exits, remote control on/off | read |
|
|
16
|
+
| `list_devices` | Every device: protected or not, where it exits, live speed (↓/↑ Mbps), remote control on/off | read |
|
|
17
17
|
| `list_locations` | The locations you can move to | read |
|
|
18
|
-
| `device_status` | One device's current state | read |
|
|
18
|
+
| `device_status` | One device's current state, including live speed | read |
|
|
19
19
|
| `account_info` | Plan and devices used | read |
|
|
20
20
|
| `recent_activity` | Recent moves, reconnects and changes, and who made them | read |
|
|
21
21
|
| `move_device` | Move a device to a country or city ("Finland", "US", "Helsinki") | control |
|
package/dist/portveil.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// Portveil API client and the logic behind the MCP tools. No MCP types here,
|
|
2
2
|
// so it can be tested against a fake API.
|
|
3
|
-
export const VERSION = "0.2.
|
|
3
|
+
export const VERSION = "0.2.1";
|
|
4
|
+
/** "↓ 42.3 Mbps ↑ 6.1 Mbps", or "idle" when nothing is moving. */
|
|
5
|
+
export function describeSpeed(speed) {
|
|
6
|
+
if (speed.down_mbps < 0.1 && speed.up_mbps < 0.1)
|
|
7
|
+
return "idle";
|
|
8
|
+
return `↓ ${speed.down_mbps.toFixed(1)} Mbps ↑ ${speed.up_mbps.toFixed(1)} Mbps`;
|
|
9
|
+
}
|
|
4
10
|
export class PortveilError extends Error {
|
|
5
11
|
}
|
|
6
12
|
/** A command the device hasn't finished yet: queued (not picked up) or delivered (working on it). */
|
|
@@ -26,6 +32,8 @@ export function describeDevice(d, servers) {
|
|
|
26
32
|
state = `connected to ${place}, not yet confirmed by the exit`;
|
|
27
33
|
const remote = d.platform === "wireguard-app" ? "view only (WireGuard app)" : d.allow_remote ? "remote control on" : "remote control off";
|
|
28
34
|
const extras = [];
|
|
35
|
+
if (d.connected && d.speed)
|
|
36
|
+
extras.push(`speed ${describeSpeed(d.speed)}`);
|
|
29
37
|
if (d.rotation)
|
|
30
38
|
extras.push(`rotates every ${d.rotation.every_minutes} min`);
|
|
31
39
|
if (d.expires_at)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "portveil-mcp",
|
|
3
3
|
"mcpName": "io.github.roybogs/portveil-mcp",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"description": "MCP server for Portveil: let AI assistants see your devices and move them between VPN locations.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|