poke-gate 0.1.8 → 0.2.0
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/.github/workflows/release.yml +53 -3
- package/README.md +48 -14
- package/bin/poke-gate.js +17 -0
- package/clients/Poke macOS Gate/Poke macOS Gate/AboutView.swift +7 -1
- package/clients/Poke macOS Gate/Poke macOS Gate/AccessibilityPermissionView.swift +58 -0
- package/clients/Poke macOS Gate/Poke macOS Gate/GateService.swift +354 -23
- package/clients/Poke macOS Gate/Poke macOS Gate/Info.plist +2 -0
- package/clients/Poke macOS Gate/Poke macOS Gate/LogsView.swift +1 -1
- package/clients/Poke macOS Gate/Poke macOS Gate/MacVisualStyle.swift +89 -0
- package/clients/Poke macOS Gate/Poke macOS Gate/PermissionRowView.swift +55 -0
- package/clients/Poke macOS Gate/Poke macOS Gate/Poke_macOS_GateApp.swift +241 -91
- package/clients/Poke macOS Gate/Poke macOS Gate/SettingsView.swift +131 -65
- package/clients/Poke macOS Gate/Poke macOS Gate/SetupView.swift +157 -0
- package/clients/Poke macOS Gate/Poke macOS Gate.xcodeproj/project.pbxproj +28 -8
- package/docs/cli.md +19 -0
- package/docs/getting-started.md +9 -6
- package/docs/index.md +23 -18
- package/docs/macos-app.md +39 -4
- package/docs/security.md +62 -18
- package/examples/agents/battery.30m.js +1 -1
- package/examples/agents/screentime.24h.js +5 -6
- package/package.json +3 -1
- package/src/agents.js +5 -8
- package/src/app.js +3 -3
- package/src/mcp-server.js +502 -27
- package/src/permission-service.js +128 -0
- package/test/mcp-server-access-policy.test.js +40 -0
- package/test/mcp-server-loop-guard.test.js +57 -0
- package/test/mcp-server-sandbox-command.test.js +18 -0
- package/test/permission-service.test.js +97 -0
package/src/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { startMcpServer, enableLogging } from "./mcp-server.js";
|
|
1
|
+
import { startMcpServer, enableLogging, getPermissionMode } from "./mcp-server.js";
|
|
2
2
|
import { startTunnel } from "./tunnel.js";
|
|
3
3
|
import { startAgentScheduler, stopAgentScheduler } from "./agents.js";
|
|
4
4
|
import { Poke, isLoggedIn, login, getToken } from "poke";
|
|
@@ -30,7 +30,6 @@ async function ensureAuthenticated() {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
let currentTunnel = null;
|
|
33
|
-
let reconnectTimer = null;
|
|
34
33
|
let reconnectWatchdog = null;
|
|
35
34
|
|
|
36
35
|
async function connectWithRetry(mcpUrl, token) {
|
|
@@ -104,6 +103,7 @@ function scheduleReconnect(mcpUrl, token) {
|
|
|
104
103
|
|
|
105
104
|
async function main() {
|
|
106
105
|
log("poke-gate starting...");
|
|
106
|
+
log(`Access mode: ${getPermissionMode()}`);
|
|
107
107
|
|
|
108
108
|
const token = await ensureAuthenticated();
|
|
109
109
|
|
|
@@ -122,7 +122,7 @@ async function notifyPoke(connectionId, token) {
|
|
|
122
122
|
`Hey! I've connected my computer to you via Poke Gate (tunnel: ${connectionId}). ` +
|
|
123
123
|
`You can now run commands, read and write files, list directories, take screenshots, and check system info on my machine. ` +
|
|
124
124
|
`Just use the tools whenever I ask you to do something on my computer.` +
|
|
125
|
-
`Now reply me
|
|
125
|
+
`Now reply me with "now I am connected to your computer" but everytime write those replies in most creativev fun way.`
|
|
126
126
|
);
|
|
127
127
|
log("Notified Poke agent about connection.");
|
|
128
128
|
} catch (err) {
|