@remotepilot/cli 0.1.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/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +70 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/list.d.ts +5 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +75 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/pair.d.ts +6 -0
- package/dist/commands/pair.d.ts.map +1 -0
- package/dist/commands/pair.js +114 -0
- package/dist/commands/pair.js.map +1 -0
- package/dist/commands/restart.d.ts +5 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +67 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/setup.d.ts +8 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +387 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/start.d.ts +6 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +164 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +5 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +130 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/stop.d.ts +5 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +67 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +8 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/daemon-manager.ps1 +114 -0
- package/dist/daemon.d.ts +14 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +216 -0
- package/dist/daemon.js.map +1 -0
- package/dist/daemon.log +0 -0
- package/dist/daemon.pid +0 -0
- package/dist/utils/update-check.d.ts +3 -0
- package/dist/utils/update-check.d.ts.map +1 -0
- package/dist/utils/update-check.js +112 -0
- package/dist/utils/update-check.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.statusCommand = statusCommand;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const windows_service_1 = require("@remotepilot/windows-service");
|
|
40
|
+
const node_child_process_1 = require("node:child_process");
|
|
41
|
+
const node_util_1 = require("node:util");
|
|
42
|
+
const execAsync = (0, node_util_1.promisify)(node_child_process_1.exec);
|
|
43
|
+
async function statusCommand(_options) {
|
|
44
|
+
const configPath = getConfigPath();
|
|
45
|
+
if (!fs.existsSync(configPath)) {
|
|
46
|
+
console.log("Host not configured. Run 'remotepilot setup' first.");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
50
|
+
console.log("RemotePilot Host Status");
|
|
51
|
+
console.log("======================\n");
|
|
52
|
+
console.log(`Host ID: ${config.hostId}`);
|
|
53
|
+
console.log(`Host Name: ${config.hostName}`);
|
|
54
|
+
console.log(`Platform: ${config.platform}`);
|
|
55
|
+
console.log(`Port: ${config.port}`);
|
|
56
|
+
console.log(`Created: ${new Date(config.createdAt).toLocaleString()}`);
|
|
57
|
+
// Check service/task status
|
|
58
|
+
if (process.platform === "win32") {
|
|
59
|
+
let installMethod = "Not installed";
|
|
60
|
+
// Check Windows service (sc.exe)
|
|
61
|
+
const serviceManager = new windows_service_1.WindowsServiceManager();
|
|
62
|
+
const exists = await serviceManager.exists();
|
|
63
|
+
if (exists) {
|
|
64
|
+
const svcStatus = await serviceManager.status();
|
|
65
|
+
const stateDisplay = svcStatus.state.charAt(0).toUpperCase() + svcStatus.state.slice(1);
|
|
66
|
+
installMethod = `${stateDisplay} (Windows Service via sc.exe)`;
|
|
67
|
+
if (svcStatus.pid) {
|
|
68
|
+
installMethod += ` PID: ${svcStatus.pid}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// Check Registry Run key
|
|
73
|
+
try {
|
|
74
|
+
const { stdout } = await execAsync('reg query "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "RemotePilotHost"', { timeout: 5000 });
|
|
75
|
+
if (stdout.includes("RemotePilotHost")) {
|
|
76
|
+
installMethod = "Configured (Registry Run key - starts at logon)";
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
// Not configured
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
console.log(`\nAuto-start: ${installMethod}`);
|
|
84
|
+
// Check health endpoint
|
|
85
|
+
const isHealthy = await checkHealth(config.port);
|
|
86
|
+
console.log(`Health: ${isHealthy ? "Healthy (daemon is running)" : "Not responding"}`);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
const isHealthy = await checkHealth(config.port);
|
|
90
|
+
console.log(`\nHealth: ${isHealthy ? "Healthy" : "Not responding"}`);
|
|
91
|
+
}
|
|
92
|
+
// Show paired devices
|
|
93
|
+
const pairedDevicesPath = getPairedDevicesPath();
|
|
94
|
+
if (fs.existsSync(pairedDevicesPath)) {
|
|
95
|
+
const devices = JSON.parse(fs.readFileSync(pairedDevicesPath, "utf-8"));
|
|
96
|
+
console.log(`\nPaired Devices: ${devices.length}`);
|
|
97
|
+
devices.forEach((device, index) => {
|
|
98
|
+
console.log(` ${index + 1}. ${device.name} (${device.id})`);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
console.log("\nPaired Devices: 0");
|
|
103
|
+
}
|
|
104
|
+
// Show private key status
|
|
105
|
+
const keyPath = config.privateKeyPath;
|
|
106
|
+
if (fs.existsSync(keyPath)) {
|
|
107
|
+
console.log(`\nPrivate Key: ${keyPath}`);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
console.log(`\nPrivate Key: MISSING (${keyPath})`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async function checkHealth(port) {
|
|
114
|
+
try {
|
|
115
|
+
const response = await fetch(`http://localhost:${port}/health`);
|
|
116
|
+
return response.ok;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function getConfigPath() {
|
|
123
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE || "~";
|
|
124
|
+
return path.join(homeDir, ".remotepilot", "host.json");
|
|
125
|
+
}
|
|
126
|
+
function getPairedDevicesPath() {
|
|
127
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE || "~";
|
|
128
|
+
return path.join(homeDir, ".remotepilot", "devices.json");
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,sCA2EC;AA/FD,4CAA8B;AAC9B,gDAAkC;AAClC,kEAAqE;AACrE,2DAA0C;AAC1C,yCAAsC;AAEtC,MAAM,SAAS,GAAG,IAAA,qBAAS,EAAC,yBAAI,CAAC,CAAC;AAc3B,KAAK,UAAU,aAAa,CAAC,QAAuB;IACzD,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QACnE,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAe,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAE5E,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IAExC,OAAO,CAAC,GAAG,CAAC,iBAAiB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,iBAAiB,MAAM,CAAC,QAAQ,EAAE,CAAC,C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QAC3B,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,EAAE,CAAC,CAAC;IAC5C,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,4BAA4B,OAAO,GAAG,CAAC,CAAC;IACtD,CAAC;AACH,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,IAAY;IACrC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,oBAAoB,IAAI,SAAS,CAAC,CAAC;QAChE,OAAO,QAAQ,CAAC,EAAE,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC;IACnE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,oBAAoB;IAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC;IACnE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":"AAMA,UAAU,WAAW;CAAG;AAExB,wBAAsB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DtE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stopCommand = stopCommand;
|
|
4
|
+
const windows_service_1 = require("@remotepilot/windows-service");
|
|
5
|
+
const node_child_process_1 = require("node:child_process");
|
|
6
|
+
const node_util_1 = require("node:util");
|
|
7
|
+
const execAsync = (0, node_util_1.promisify)(node_child_process_1.exec);
|
|
8
|
+
async function stopCommand(_options) {
|
|
9
|
+
console.log("Stopping RemotePilot Host...\n");
|
|
10
|
+
if (process.platform === "win32") {
|
|
11
|
+
// Try Windows service (sc.exe) first
|
|
12
|
+
const serviceManager = new windows_service_1.WindowsServiceManager();
|
|
13
|
+
const exists = await serviceManager.exists();
|
|
14
|
+
if (exists) {
|
|
15
|
+
const status = await serviceManager.status();
|
|
16
|
+
if (status.state !== "running") {
|
|
17
|
+
console.log(`Service is not running (state: ${status.state}).`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const stopped = await serviceManager.stop();
|
|
21
|
+
if (stopped) {
|
|
22
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
23
|
+
const newStatus = await serviceManager.status();
|
|
24
|
+
if (newStatus.state === "stopped") {
|
|
25
|
+
console.log("Service stopped successfully.");
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
console.log(`Service state: ${newStatus.state}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
console.error("Failed to stop service.");
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Try Registry Run key - check if daemon is running via health endpoint
|
|
38
|
+
try {
|
|
39
|
+
const { stdout } = await execAsync('reg query "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v "RemotePilotHost"', { timeout: 5000 });
|
|
40
|
+
if (stdout.includes("RemotePilotHost")) {
|
|
41
|
+
// Check if daemon is actually running by hitting health endpoint
|
|
42
|
+
try {
|
|
43
|
+
const response = await fetch("http://localhost:8080/health");
|
|
44
|
+
if (response.ok) {
|
|
45
|
+
console.log("Daemon is running (foreground mode).");
|
|
46
|
+
console.log("To stop: use Ctrl+C in the terminal where it was started.");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// Not running
|
|
52
|
+
}
|
|
53
|
+
console.log("Daemon is not currently running.");
|
|
54
|
+
console.log("(Registry entry exists for auto-start on next logon)");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// Registry entry doesn't exist
|
|
60
|
+
}
|
|
61
|
+
console.log("Service is not installed.");
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
console.log("Use: sudo systemctl stop remotepilot");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=stop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../src/commands/stop.ts"],"names":[],"mappings":";;AAQA,kCA0DC;AAlED,kEAAqE;AACrE,2DAA0C;AAC1C,yCAAsC;AAEtC,MAAM,SAAS,GAAG,IAAA,qBAAS,EAAC,yBAAI,CAAC,CAAC;AAI3B,KAAK,UAAU,WAAW,CAAC,QAAqB;IACrD,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAE9C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,qCAAqC;QACrC,MAAM,cAAc,GAAG,IAAI,uCAAqB,EAAE,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,CAAC;QAE7C,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,CAAC;YAC7C,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,kCAAkC,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC;gBAChE,OAAO;YACT,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC;YA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AC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,+BAA+B;QACjC,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAEA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAEnD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCommand = updateCommand;
|
|
4
|
+
const update_check_js_1 = require("../utils/update-check.js");
|
|
5
|
+
async function updateCommand() {
|
|
6
|
+
await (0, update_check_js_1.performUpdate)();
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":";;AAEA,sCAEC;AAJD,8DAAyD;AAElD,KAAK,UAAU,aAAa;IACjC,MAAM,IAAA,+BAAa,GAAE,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env pwsh
|
|
2
|
+
<#
|
|
3
|
+
.SYNOPSIS
|
|
4
|
+
Start/stop the RemotePilot gateway daemon.
|
|
5
|
+
Uses a PID file so only the daemon process is ever touched.
|
|
6
|
+
#>
|
|
7
|
+
|
|
8
|
+
param(
|
|
9
|
+
[Parameter(Mandatory)]
|
|
10
|
+
[ValidateSet("start","stop","restart","status")]
|
|
11
|
+
[string]$Command
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
$ErrorActionPreference = "Stop"
|
|
15
|
+
$scriptDir = Split-Path -Parent $PSScriptRoot
|
|
16
|
+
$pidFile = Join-Path $PSScriptRoot "daemon.pid"
|
|
17
|
+
$logFile = Join-Path $PSScriptRoot "daemon.log"
|
|
18
|
+
$daemonScript = Join-Path $PSScriptRoot "daemon.js"
|
|
19
|
+
$portNum = 8080
|
|
20
|
+
|
|
21
|
+
function Get-DaemonPid {
|
|
22
|
+
if (Test-Path $pidFile) {
|
|
23
|
+
$content = Get-Content $pidFile -ErrorAction SilentlyContinue
|
|
24
|
+
if ($content -and (Get-Process -Id $content -ErrorAction SilentlyContinue)) {
|
|
25
|
+
return [long]$content
|
|
26
|
+
}
|
|
27
|
+
Remove-Item $pidFile -ErrorAction SilentlyContinue
|
|
28
|
+
}
|
|
29
|
+
return $null
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function Test-PortInUse {
|
|
33
|
+
param([int]$Port)
|
|
34
|
+
$pattern = ":{0} " -f $Port
|
|
35
|
+
$listening = netstat -ano | Select-String $pattern | Select-String "LISTENING"
|
|
36
|
+
return $null -ne $listening
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
switch ($Command) {
|
|
40
|
+
"start" {
|
|
41
|
+
$existing = Get-DaemonPid
|
|
42
|
+
if ($existing) {
|
|
43
|
+
Write-Host "Daemon already running (PID $existing)"
|
|
44
|
+
exit 0
|
|
45
|
+
}
|
|
46
|
+
if (Test-PortInUse -Port $portNum) {
|
|
47
|
+
Write-Host "Port $portNum already in use -- stale daemon?"
|
|
48
|
+
exit 1
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
$proc = Start-Process -FilePath "node" -ArgumentList $daemonScript -WindowStyle Hidden -PassThru -RedirectStandardError $logFile
|
|
52
|
+
Start-Sleep -Seconds 2
|
|
53
|
+
|
|
54
|
+
if (Test-PortInUse -Port $portNum) {
|
|
55
|
+
$proc.Id | Out-File -FilePath $pidFile -NoNewline
|
|
56
|
+
Write-Host "Daemon started (PID $($proc.Id))"
|
|
57
|
+
} else {
|
|
58
|
+
Write-Host "Failed to start daemon -- check $logFile"
|
|
59
|
+
exit 1
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
"stop" {
|
|
64
|
+
$daemonPid = Get-DaemonPid
|
|
65
|
+
if (-not $daemonPid) {
|
|
66
|
+
Write-Host "No daemon PID file -- checking port..."
|
|
67
|
+
if (-not (Test-PortInUse -Port $portNum)) {
|
|
68
|
+
Write-Host "Daemon not running"
|
|
69
|
+
exit 0
|
|
70
|
+
}
|
|
71
|
+
Write-Host "Port in use but no PID file -- cannot stop safely"
|
|
72
|
+
exit 1
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
Write-Host "Stopping daemon (PID $daemonPid)..."
|
|
76
|
+
try {
|
|
77
|
+
Stop-Process -Id $daemonPid -Force -ErrorAction Stop
|
|
78
|
+
Remove-Item $pidFile -ErrorAction SilentlyContinue
|
|
79
|
+
Start-Sleep -Milliseconds 500
|
|
80
|
+
|
|
81
|
+
if (Test-PortInUse -Port $portNum) {
|
|
82
|
+
Write-Host "WARNING: port $portNum still in use after stop"
|
|
83
|
+
exit 1
|
|
84
|
+
}
|
|
85
|
+
Write-Host "Daemon stopped"
|
|
86
|
+
} catch {
|
|
87
|
+
Write-Host "Failed to stop: $_"
|
|
88
|
+
Remove-Item $pidFile -ErrorAction SilentlyContinue
|
|
89
|
+
exit 1
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
"restart" {
|
|
94
|
+
& $PSCommandPath -Command stop
|
|
95
|
+
& $PSCommandPath -Command start
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
"status" {
|
|
99
|
+
$daemonPid = Get-DaemonPid
|
|
100
|
+
if ($daemonPid) {
|
|
101
|
+
$proc = Get-Process -Id $daemonPid -ErrorAction SilentlyContinue
|
|
102
|
+
if ($proc) {
|
|
103
|
+
Write-Host "Daemon running (PID $daemonPid, started $($proc.StartTime))"
|
|
104
|
+
exit 0
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (Test-PortInUse -Port $portNum) {
|
|
108
|
+
Write-Host "Port $portNum in use but no PID file -- stale?"
|
|
109
|
+
exit 1
|
|
110
|
+
}
|
|
111
|
+
Write-Host "Daemon not running"
|
|
112
|
+
exit 0
|
|
113
|
+
}
|
|
114
|
+
}
|
package/dist/daemon.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* RemotePilot Daemon - Windows Service Entry Point
|
|
4
|
+
*
|
|
5
|
+
* This script is the entry point for the RemotePilot Windows service.
|
|
6
|
+
* It can run in two modes:
|
|
7
|
+
* 1. Service mode: When launched by the Windows Service Control Manager
|
|
8
|
+
* 2. Foreground mode: When launched directly for development/testing
|
|
9
|
+
*
|
|
10
|
+
* Architecture:
|
|
11
|
+
* Windows SCM → node-windows wrapper → daemon.ts → Gateway → Host Core
|
|
12
|
+
*/
|
|
13
|
+
export declare function startDaemon(): void;
|
|
14
|
+
//# sourceMappingURL=daemon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../src/daemon.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;AAoDH,wBAAgB,WAAW,IAAI,IAAI,CAmHlC"}
|
package/dist/daemon.js
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* RemotePilot Daemon - Windows Service Entry Point
|
|
5
|
+
*
|
|
6
|
+
* This script is the entry point for the RemotePilot Windows service.
|
|
7
|
+
* It can run in two modes:
|
|
8
|
+
* 1. Service mode: When launched by the Windows Service Control Manager
|
|
9
|
+
* 2. Foreground mode: When launched directly for development/testing
|
|
10
|
+
*
|
|
11
|
+
* Architecture:
|
|
12
|
+
* Windows SCM → node-windows wrapper → daemon.ts → Gateway → Host Core
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
+
var ownKeys = function(o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.startDaemon = startDaemon;
|
|
49
|
+
const fs = __importStar(require("node:fs"));
|
|
50
|
+
const path = __importStar(require("node:path"));
|
|
51
|
+
const node_http_1 = require("node:http");
|
|
52
|
+
const core_1 = require("@remotepilot/core");
|
|
53
|
+
const gateway_1 = require("@remotepilot/gateway");
|
|
54
|
+
const core_2 = require("@remotepilot/core");
|
|
55
|
+
let server = null;
|
|
56
|
+
let gateway = null;
|
|
57
|
+
let logger;
|
|
58
|
+
function parseDataDir() {
|
|
59
|
+
for (let i = 0; i < process.argv.length; i++) {
|
|
60
|
+
const arg = process.argv[i];
|
|
61
|
+
if (arg === "--data-dir" && process.argv[i + 1]) {
|
|
62
|
+
return process.argv[i + 1];
|
|
63
|
+
}
|
|
64
|
+
if (arg.startsWith("--data-dir=")) {
|
|
65
|
+
return arg.slice("--data-dir=".length);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
function getConfigPath(dataDir) {
|
|
71
|
+
if (dataDir) {
|
|
72
|
+
return path.join(dataDir, "host.json");
|
|
73
|
+
}
|
|
74
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE || "~";
|
|
75
|
+
return path.join(homeDir, ".remotepilot", "host.json");
|
|
76
|
+
}
|
|
77
|
+
function loadConfig(configPath) {
|
|
78
|
+
const resolvedPath = configPath || getConfigPath();
|
|
79
|
+
if (!fs.existsSync(resolvedPath)) {
|
|
80
|
+
throw new Error(`Host not configured. Run 'remotepilot setup' first. Config path: ${resolvedPath}`);
|
|
81
|
+
}
|
|
82
|
+
return JSON.parse(fs.readFileSync(resolvedPath, "utf-8"));
|
|
83
|
+
}
|
|
84
|
+
function startDaemon() {
|
|
85
|
+
const dataDir = parseDataDir();
|
|
86
|
+
const configPath = getConfigPath(dataDir);
|
|
87
|
+
const config = loadConfig(configPath);
|
|
88
|
+
// Initialize logger with data dir if provided (service mode)
|
|
89
|
+
const logDir = dataDir
|
|
90
|
+
? path.join(dataDir, "logs")
|
|
91
|
+
: undefined;
|
|
92
|
+
const logFile = logDir ? path.join(logDir, "remotepilot.log") : undefined;
|
|
93
|
+
logger = (0, core_1.createLogger)("daemon", {
|
|
94
|
+
level: "info",
|
|
95
|
+
file: logFile,
|
|
96
|
+
console: true
|
|
97
|
+
});
|
|
98
|
+
logger.info("daemon starting", {
|
|
99
|
+
hostId: config.hostId,
|
|
100
|
+
hostName: config.hostName,
|
|
101
|
+
platform: config.platform,
|
|
102
|
+
port: config.port,
|
|
103
|
+
pid: process.pid,
|
|
104
|
+
dataDir: dataDir || "(user profile)"
|
|
105
|
+
});
|
|
106
|
+
// Create HTTP server for health checks
|
|
107
|
+
server = (0, node_http_1.createServer)((req, res) => {
|
|
108
|
+
if (req.url === "/health") {
|
|
109
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
110
|
+
res.end(JSON.stringify({
|
|
111
|
+
status: "healthy",
|
|
112
|
+
hostId: config.hostId,
|
|
113
|
+
uptime: process.uptime()
|
|
114
|
+
}));
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (req.url === "/ready") {
|
|
118
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
119
|
+
res.end(JSON.stringify({
|
|
120
|
+
status: "ready",
|
|
121
|
+
hostId: config.hostId,
|
|
122
|
+
uptime: process.uptime()
|
|
123
|
+
}));
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (req.url === "/status") {
|
|
127
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
128
|
+
res.end(JSON.stringify({
|
|
129
|
+
hostId: config.hostId,
|
|
130
|
+
hostName: config.hostName,
|
|
131
|
+
platform: config.platform,
|
|
132
|
+
uptime: process.uptime(),
|
|
133
|
+
pid: process.pid
|
|
134
|
+
}));
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (req.method === "POST" && req.url === "/shutdown") {
|
|
138
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
139
|
+
res.end(JSON.stringify({ status: "shutting down" }));
|
|
140
|
+
shutdown();
|
|
141
|
+
process.exit(0);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
res.writeHead(404);
|
|
145
|
+
res.end("Not Found");
|
|
146
|
+
});
|
|
147
|
+
// Create HostManager (loads config from ~/.remotepilot/)
|
|
148
|
+
const hostManager = new core_2.HostManager();
|
|
149
|
+
hostManager.load();
|
|
150
|
+
// Create Gateway with terminal support
|
|
151
|
+
gateway = new gateway_1.Gateway({ port: config.port, host: "0.0.0.0" }, hostManager);
|
|
152
|
+
gateway.on("started", (port) => {
|
|
153
|
+
logger.info("gateway started", {
|
|
154
|
+
port,
|
|
155
|
+
http: `http://localhost:${port}/health`,
|
|
156
|
+
websocket: `ws://localhost:${port}`
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
gateway.on("clientConnected", (clientId) => {
|
|
160
|
+
logger.info("client connected", { clientId });
|
|
161
|
+
});
|
|
162
|
+
gateway.on("clientDisconnected", (clientId) => {
|
|
163
|
+
logger.info("client disconnected", { clientId });
|
|
164
|
+
});
|
|
165
|
+
gateway.on("error", (error) => {
|
|
166
|
+
logger.error("gateway error", error);
|
|
167
|
+
});
|
|
168
|
+
// Start gateway (creates WebSocket server internally)
|
|
169
|
+
gateway.start().catch((error) => {
|
|
170
|
+
logger.error("failed to start gateway", error);
|
|
171
|
+
process.exit(1);
|
|
172
|
+
});
|
|
173
|
+
// Start HTTP server
|
|
174
|
+
server.listen(config.port + 1, () => {
|
|
175
|
+
logger.info("http server listening", {
|
|
176
|
+
port: config.port + 1,
|
|
177
|
+
health: `http://localhost:${config.port + 1}/health`
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
server.on("error", (error) => {
|
|
181
|
+
logger.error("server error", error);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
async function shutdown() {
|
|
185
|
+
logger.info("daemon shutting down");
|
|
186
|
+
if (gateway) {
|
|
187
|
+
await gateway.stop();
|
|
188
|
+
gateway = null;
|
|
189
|
+
}
|
|
190
|
+
if (server) {
|
|
191
|
+
server.close();
|
|
192
|
+
server = null;
|
|
193
|
+
}
|
|
194
|
+
logger.info("daemon stopped");
|
|
195
|
+
}
|
|
196
|
+
// --- Auto-start only when run directly (not when imported) ---
|
|
197
|
+
// When run directly: start the daemon (foreground or service mode)
|
|
198
|
+
// When imported: only export startDaemon for CLI to call explicitly
|
|
199
|
+
const isRunDirectly = require.main === module;
|
|
200
|
+
if (isRunDirectly) {
|
|
201
|
+
const isServiceMode = process.argv.includes("--service");
|
|
202
|
+
// Register shutdown handlers for both modes.
|
|
203
|
+
// In service mode, the C wrapper sends POST /shutdown for graceful shutdown,
|
|
204
|
+
// but SIGTERM may also arrive as a fallback from TerminateProcess.
|
|
205
|
+
startDaemon();
|
|
206
|
+
process.on("SIGINT", () => {
|
|
207
|
+
shutdown().then(() => process.exit(0));
|
|
208
|
+
});
|
|
209
|
+
process.on("SIGTERM", () => {
|
|
210
|
+
shutdown().then(() => process.exit(0));
|
|
211
|
+
});
|
|
212
|
+
process.on("exit", () => {
|
|
213
|
+
shutdown();
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=daemon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon.js","sourceRoot":"","sources":["../src/daemon.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDH,kCAmHC;AArKD,4CAA8B;AAC9B,gDAAkC;AAClC,yCAAiD;AACjD,4CAAqE;AACrE,kDAA+C;AAC/C,4CAAgD;AAYhD,IAAI,MAAM,GAAkB,IAAI,CAAC;AACjC,IAAI,OAAO,GAAmB,IAAI,CAAC;AACnC,IAAI,MAAwC,CAAC;AAE7C,SAAS,YAAY;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7C,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,GAAG,KAAK,YAAY,IAAI,OAAO,CA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CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACtB,QAAQ,EAAE,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/daemon.log
ADDED
|
File without changes
|
package/dist/daemon.pid
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../../src/utils/update-check.ts"],"names":[],"mappings":"AAMA,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBpD;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CA6BnD"}
|