@yu_robotics/remote-cli-router 1.0.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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +115 -0
  3. package/bin/remote-cli-router.js +2 -0
  4. package/dist/binding/BindingManager.d.ts +62 -0
  5. package/dist/binding/BindingManager.d.ts.map +1 -0
  6. package/dist/binding/BindingManager.js +119 -0
  7. package/dist/binding/BindingManager.js.map +1 -0
  8. package/dist/cli.d.ts +3 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +32 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/commands/config.d.ts +19 -0
  13. package/dist/commands/config.d.ts.map +1 -0
  14. package/dist/commands/config.js +206 -0
  15. package/dist/commands/config.js.map +1 -0
  16. package/dist/commands/start.d.ts +5 -0
  17. package/dist/commands/start.d.ts.map +1 -0
  18. package/dist/commands/start.js +65 -0
  19. package/dist/commands/start.js.map +1 -0
  20. package/dist/commands/status.d.ts +5 -0
  21. package/dist/commands/status.d.ts.map +1 -0
  22. package/dist/commands/status.js +103 -0
  23. package/dist/commands/status.js.map +1 -0
  24. package/dist/commands/stop.d.ts +5 -0
  25. package/dist/commands/stop.d.ts.map +1 -0
  26. package/dist/commands/stop.js +56 -0
  27. package/dist/commands/stop.js.map +1 -0
  28. package/dist/config/ConfigManager.d.ts +46 -0
  29. package/dist/config/ConfigManager.d.ts.map +1 -0
  30. package/dist/config/ConfigManager.js +101 -0
  31. package/dist/config/ConfigManager.js.map +1 -0
  32. package/dist/feishu/FeishuClient.d.ts +46 -0
  33. package/dist/feishu/FeishuClient.d.ts.map +1 -0
  34. package/dist/feishu/FeishuClient.js +130 -0
  35. package/dist/feishu/FeishuClient.js.map +1 -0
  36. package/dist/feishu/FeishuLongConnHandler.d.ts +149 -0
  37. package/dist/feishu/FeishuLongConnHandler.d.ts.map +1 -0
  38. package/dist/feishu/FeishuLongConnHandler.js +632 -0
  39. package/dist/feishu/FeishuLongConnHandler.js.map +1 -0
  40. package/dist/server.d.ts +80 -0
  41. package/dist/server.d.ts.map +1 -0
  42. package/dist/server.js +533 -0
  43. package/dist/server.js.map +1 -0
  44. package/dist/storage/JsonStore.d.ts +90 -0
  45. package/dist/storage/JsonStore.d.ts.map +1 -0
  46. package/dist/storage/JsonStore.js +215 -0
  47. package/dist/storage/JsonStore.js.map +1 -0
  48. package/dist/storage/MemoryStore.d.ts +69 -0
  49. package/dist/storage/MemoryStore.d.ts.map +1 -0
  50. package/dist/storage/MemoryStore.js +117 -0
  51. package/dist/storage/MemoryStore.js.map +1 -0
  52. package/dist/types/config.d.ts +53 -0
  53. package/dist/types/config.d.ts.map +1 -0
  54. package/dist/types/config.js +31 -0
  55. package/dist/types/config.js.map +1 -0
  56. package/dist/types/index.d.ts +93 -0
  57. package/dist/types/index.d.ts.map +1 -0
  58. package/dist/types/index.js +18 -0
  59. package/dist/types/index.js.map +1 -0
  60. package/dist/utils/PidManager.d.ts +28 -0
  61. package/dist/utils/PidManager.d.ts.map +1 -0
  62. package/dist/utils/PidManager.js +90 -0
  63. package/dist/utils/PidManager.js.map +1 -0
  64. package/dist/utils/ToolFormatter.d.ts +41 -0
  65. package/dist/utils/ToolFormatter.d.ts.map +1 -0
  66. package/dist/utils/ToolFormatter.js +273 -0
  67. package/dist/utils/ToolFormatter.js.map +1 -0
  68. package/dist/websocket/ConnectionHub.d.ts +73 -0
  69. package/dist/websocket/ConnectionHub.d.ts.map +1 -0
  70. package/dist/websocket/ConnectionHub.js +177 -0
  71. package/dist/websocket/ConnectionHub.js.map +1 -0
  72. package/package.json +70 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 xiaoyu
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
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,115 @@
1
+ # @yu_robotics/remote-cli-router
2
+
3
+ Router server for [remote-cli](https://www.npmjs.com/package/@yu_robotics/remote-cli) — manages message forwarding between Feishu (Lark) and local CLI clients via WebSocket.
4
+
5
+ ## Overview
6
+
7
+ The router server acts as a bridge between Feishu messaging and developer machines running the remote-cli client. It handles:
8
+
9
+ - **User-device binding** via Feishu bot commands
10
+ - **Message routing** between Feishu and connected CLI clients
11
+ - **WebSocket connections** from local clients
12
+ - **Feishu long connection** for receiving and sending messages
13
+
14
+ ## Prerequisites
15
+
16
+ - A cloud server with at least **1 CPU core** and **1GB RAM**
17
+ - **Node.js** >= 18.0.0
18
+ - A **domain name** with SSL certificate (HTTPS required for Feishu)
19
+ - A **Feishu bot** with messaging permissions
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ npm install -g @yu_robotics/remote-cli-router
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ### 1. Configure
30
+
31
+ ```bash
32
+ remote-cli-router config
33
+ ```
34
+
35
+ You will be prompted for:
36
+ - Feishu App ID (required)
37
+ - Feishu App Secret (required)
38
+ - Feishu Encrypt Key (optional)
39
+ - Feishu Verification Token (optional)
40
+ - Server Port (default: 3000)
41
+
42
+ ### 2. Start the Server
43
+
44
+ ```bash
45
+ remote-cli-router start
46
+ ```
47
+
48
+ ### 3. Deploy with PM2 (Production)
49
+
50
+ ```bash
51
+ pm2 start remote-cli-router --name router -- start
52
+ ```
53
+
54
+ ## Commands
55
+
56
+ | Command | Description |
57
+ |---------|-------------|
58
+ | `remote-cli-router config` | Interactive configuration |
59
+ | `remote-cli-router config show` | View current configuration |
60
+ | `remote-cli-router config reset` | Reset to defaults |
61
+ | `remote-cli-router start` | Start the server |
62
+ | `remote-cli-router stop` | Stop the server |
63
+ | `remote-cli-router status` | Check server status |
64
+
65
+ ## Architecture
66
+
67
+ ```
68
+ Mobile Phone -> Feishu -> Router Server -> WebSocket -> Local CLI -> Claude Code
69
+ |
70
+ Mobile Phone <- Feishu <- Router Server <- WebSocket <- Local CLI <- Results
71
+ ```
72
+
73
+ ## Nginx Reverse Proxy
74
+
75
+ ```nginx
76
+ server {
77
+ listen 443 ssl http2;
78
+ server_name your-domain.com;
79
+
80
+ ssl_certificate /path/to/cert.pem;
81
+ ssl_certificate_key /path/to/key.pem;
82
+
83
+ location / {
84
+ proxy_pass http://localhost:3000;
85
+ proxy_http_version 1.1;
86
+ proxy_set_header Upgrade $http_upgrade;
87
+ proxy_set_header Connection 'upgrade';
88
+ proxy_set_header Host $host;
89
+ }
90
+
91
+ location /ws {
92
+ proxy_pass http://localhost:3000;
93
+ proxy_http_version 1.1;
94
+ proxy_set_header Upgrade $http_upgrade;
95
+ proxy_set_header Connection "Upgrade";
96
+ proxy_set_header Host $host;
97
+ proxy_read_timeout 86400;
98
+ }
99
+ }
100
+ ```
101
+
102
+ ## Health Check
103
+
104
+ ```bash
105
+ curl https://your-domain.com/health
106
+ # {"status":"ok","timestamp":1234567890,"connections":0}
107
+ ```
108
+
109
+ ## Documentation
110
+
111
+ For full documentation, see the [project README](https://github.com/xiaoyu/remote-cli#readme).
112
+
113
+ ## License
114
+
115
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/cli.js');
@@ -0,0 +1,62 @@
1
+ import { BindingCode, UserBinding } from '../types';
2
+ import { JsonStore } from '../storage/JsonStore';
3
+ /**
4
+ * Binding Manager
5
+ * Responsible for managing user and device binding relationships
6
+ */
7
+ export declare class BindingManager {
8
+ private store;
9
+ constructor(store: JsonStore);
10
+ /**
11
+ * Generate binding code
12
+ * @param deviceId Device unique identifier
13
+ * @param deviceName Device name
14
+ * @returns Binding code object
15
+ */
16
+ generateBindingCode(deviceId: string, deviceName: string): Promise<BindingCode>;
17
+ /**
18
+ * Verify binding code
19
+ * @param code Binding code
20
+ * @returns Binding code object, returns null if invalid or expired
21
+ */
22
+ verifyBindingCode(code: string): Promise<BindingCode | null>;
23
+ /**
24
+ * Bind user and device
25
+ * @param openId Feishu user open_id
26
+ * @param deviceId Device unique identifier
27
+ * @param deviceName Device name
28
+ */
29
+ bindUser(openId: string, deviceId: string, deviceName: string): Promise<void>;
30
+ /**
31
+ * Get user binding information
32
+ * @param openId Feishu user open_id
33
+ * @returns Binding information, returns null if not bound
34
+ */
35
+ getUserBinding(openId: string): Promise<UserBinding | null>;
36
+ /**
37
+ * Get device binding information
38
+ * @param deviceId Device unique identifier
39
+ * @returns Binding information, returns null if not bound
40
+ */
41
+ getDeviceBinding(deviceId: string): Promise<UserBinding | null>;
42
+ /**
43
+ * Unbind user
44
+ * @param openId Feishu user open_id
45
+ */
46
+ unbindUser(openId: string): Promise<void>;
47
+ /**
48
+ * Update user last active time
49
+ * @param openId Feishu user open_id
50
+ */
51
+ updateLastActive(openId: string): Promise<void>;
52
+ /**
53
+ * Generate random binding code (format: XXX-XXX-XXX)
54
+ * @returns Binding code string
55
+ */
56
+ private generateRandomCode;
57
+ /**
58
+ * Close and flush data
59
+ */
60
+ close(): Promise<void>;
61
+ }
62
+ //# sourceMappingURL=BindingManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BindingManager.d.ts","sourceRoot":"","sources":["../../src/binding/BindingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAY;gBAEb,KAAK,EAAE,SAAS;IAI5B;;;;;OAKG;IACG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAiBrF;;;;OAIG;IACG,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAIlE;;;;;OAKG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBnF;;;;OAIG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAIjE;;;;OAIG;IACG,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAIrE;;;OAGG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C;;;OAGG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAe1B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BindingManager = void 0;
4
+ /**
5
+ * Binding Manager
6
+ * Responsible for managing user and device binding relationships
7
+ */
8
+ class BindingManager {
9
+ store;
10
+ constructor(store) {
11
+ this.store = store;
12
+ }
13
+ /**
14
+ * Generate binding code
15
+ * @param deviceId Device unique identifier
16
+ * @param deviceName Device name
17
+ * @returns Binding code object
18
+ */
19
+ async generateBindingCode(deviceId, deviceName) {
20
+ // Generate binding code in format XXX-XXX-XXX
21
+ const code = this.generateRandomCode();
22
+ const now = Date.now();
23
+ const bindingCode = {
24
+ code,
25
+ deviceId,
26
+ createdAt: now,
27
+ expiresAt: now + 5 * 60 * 1000 // Expires after 5 minutes
28
+ };
29
+ // Store binding code
30
+ await this.store.setBindingCode(code, bindingCode);
31
+ return bindingCode;
32
+ }
33
+ /**
34
+ * Verify binding code
35
+ * @param code Binding code
36
+ * @returns Binding code object, returns null if invalid or expired
37
+ */
38
+ async verifyBindingCode(code) {
39
+ return this.store.getBindingCode(code);
40
+ }
41
+ /**
42
+ * Bind user and device
43
+ * @param openId Feishu user open_id
44
+ * @param deviceId Device unique identifier
45
+ * @param deviceName Device name
46
+ */
47
+ async bindUser(openId, deviceId, deviceName) {
48
+ const now = Date.now();
49
+ // Check if user already has a binding
50
+ const existingBinding = await this.getUserBinding(openId);
51
+ if (existingBinding) {
52
+ // Will be overwritten by setUserBinding
53
+ }
54
+ // Create new binding relationship
55
+ const binding = {
56
+ openId,
57
+ deviceId,
58
+ deviceName,
59
+ boundAt: now,
60
+ lastActiveAt: now
61
+ };
62
+ // Store user -> device mapping
63
+ await this.store.setUserBinding(openId, binding);
64
+ }
65
+ /**
66
+ * Get user binding information
67
+ * @param openId Feishu user open_id
68
+ * @returns Binding information, returns null if not bound
69
+ */
70
+ async getUserBinding(openId) {
71
+ return this.store.getUserBinding(openId);
72
+ }
73
+ /**
74
+ * Get device binding information
75
+ * @param deviceId Device unique identifier
76
+ * @returns Binding information, returns null if not bound
77
+ */
78
+ async getDeviceBinding(deviceId) {
79
+ return this.store.getDeviceBinding(deviceId);
80
+ }
81
+ /**
82
+ * Unbind user
83
+ * @param openId Feishu user open_id
84
+ */
85
+ async unbindUser(openId) {
86
+ await this.store.deleteUserBinding(openId);
87
+ }
88
+ /**
89
+ * Update user last active time
90
+ * @param openId Feishu user open_id
91
+ */
92
+ async updateLastActive(openId) {
93
+ await this.store.updateLastActive(openId);
94
+ }
95
+ /**
96
+ * Generate random binding code (format: XXX-XXX-XXX)
97
+ * @returns Binding code string
98
+ */
99
+ generateRandomCode() {
100
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
101
+ const segments = [];
102
+ for (let i = 0; i < 3; i++) {
103
+ let segment = '';
104
+ for (let j = 0; j < 3; j++) {
105
+ segment += chars.charAt(Math.floor(Math.random() * chars.length));
106
+ }
107
+ segments.push(segment);
108
+ }
109
+ return segments.join('-');
110
+ }
111
+ /**
112
+ * Close and flush data
113
+ */
114
+ async close() {
115
+ await this.store.flush();
116
+ }
117
+ }
118
+ exports.BindingManager = BindingManager;
119
+ //# sourceMappingURL=BindingManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BindingManager.js","sourceRoot":"","sources":["../../src/binding/BindingManager.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH,MAAa,cAAc;IACjB,KAAK,CAAY;IAEzB,YAAY,KAAgB;QAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CAAC,QAAgB,EAAE,UAAkB;QAC5D,8CAA8C;QAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,WAAW,GAAgB;YAC/B,IAAI;YACJ,QAAQ;YACR,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,0BAA0B;SAC1D,CAAC;QAEF,qBAAqB;QACrB,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,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AAC;IAC5C,CAAC;IAED;;;OAGG;IACK,kBAAkB;QACxB,MAAM,KAAK,GAAG,sCAAsC,CAAC;QACrD,MAAM,QAAQ,GAAG,EAAE,CAAC;QAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3B,IAAI,OAAO,GAAG,EAAE,CAAC;YACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3B,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YACpE,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;CACF;AA9HD,wCA8HC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const commander_1 = require("commander");
5
+ const config_1 = require("./commands/config");
6
+ const start_1 = require("./commands/start");
7
+ const stop_1 = require("./commands/stop");
8
+ const status_1 = require("./commands/status");
9
+ const program = new commander_1.Command();
10
+ program
11
+ .name('remote-cli-router')
12
+ .description('Router server for remote CLI')
13
+ .version('1.0.0');
14
+ // Register config commands
15
+ (0, config_1.registerConfigCommands)(program);
16
+ // Start command
17
+ program
18
+ .command('start')
19
+ .description('Start the router server')
20
+ .action(start_1.startCommand);
21
+ // Stop command
22
+ program
23
+ .command('stop')
24
+ .description('Stop the router server')
25
+ .action(stop_1.stopCommand);
26
+ // Status command
27
+ program
28
+ .command('status')
29
+ .description('Show router server status')
30
+ .action(status_1.statusCommand);
31
+ program.parse();
32
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,8CAA2D;AAC3D,4CAAgD;AAChD,0CAA8C;AAC9C,8CAAkD;AAElD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,mBAAmB,CAAC;KACzB,WAAW,CAAC,8BAA8B,CAAC;KAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,2BAA2B;AAC3B,IAAA,+BAAsB,EAAC,OAAO,CAAC,CAAC;AAEhC,gBAAgB;AAChB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,yBAAyB,CAAC;KACtC,MAAM,CAAC,oBAAY,CAAC,CAAC;AAExB,eAAe;AACf,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,kBAAW,CAAC,CAAC;AAEvB,iBAAiB;AACjB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,2BAA2B,CAAC;KACxC,MAAM,CAAC,sBAAa,CAAC,CAAC;AAEzB,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Interactive configuration command
4
+ * Prompts user for required Feishu credentials and optional settings
5
+ */
6
+ export declare function configureCommand(): Promise<void>;
7
+ /**
8
+ * Show current configuration
9
+ */
10
+ export declare function showConfigCommand(): Promise<void>;
11
+ /**
12
+ * Reset configuration to defaults
13
+ */
14
+ export declare function resetConfigCommand(): Promise<void>;
15
+ /**
16
+ * Register config commands
17
+ */
18
+ export declare function registerConfigCommands(program: Command): void;
19
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAyGtD;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CA2BvD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBxD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsB7D"}
@@ -0,0 +1,206 @@
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.configureCommand = configureCommand;
37
+ exports.showConfigCommand = showConfigCommand;
38
+ exports.resetConfigCommand = resetConfigCommand;
39
+ exports.registerConfigCommands = registerConfigCommands;
40
+ const ConfigManager_1 = require("../config/ConfigManager");
41
+ const readline = __importStar(require("readline/promises"));
42
+ const process_1 = require("process");
43
+ /**
44
+ * Interactive configuration command
45
+ * Prompts user for required Feishu credentials and optional settings
46
+ */
47
+ async function configureCommand() {
48
+ const config = await ConfigManager_1.ConfigManager.initialize();
49
+ const rl = readline.createInterface({ input: process_1.stdin, output: process_1.stdout });
50
+ console.log('\n📝 Router Configuration Setup\n');
51
+ console.log('This will guide you through configuring your router server.');
52
+ console.log('Press Enter to keep existing values (shown in brackets).\n');
53
+ try {
54
+ // Feishu App ID (required)
55
+ const existingAppId = config.get('feishu', 'appId');
56
+ const appIdPrompt = existingAppId
57
+ ? `Feishu App ID [${existingAppId}]: `
58
+ : 'Feishu App ID (required): ';
59
+ const appId = await rl.question(appIdPrompt);
60
+ if (appId.trim()) {
61
+ config.set('feishu', 'appId', appId.trim());
62
+ }
63
+ else if (!existingAppId) {
64
+ console.error('❌ App ID is required!');
65
+ rl.close();
66
+ process.exit(1);
67
+ }
68
+ // Feishu App Secret (required)
69
+ const existingAppSecret = config.get('feishu', 'appSecret');
70
+ const appSecretPrompt = existingAppSecret
71
+ ? `Feishu App Secret [***${existingAppSecret.slice(-4)}]: `
72
+ : 'Feishu App Secret (required): ';
73
+ const appSecret = await rl.question(appSecretPrompt);
74
+ if (appSecret.trim()) {
75
+ config.set('feishu', 'appSecret', appSecret.trim());
76
+ }
77
+ else if (!existingAppSecret) {
78
+ console.error('❌ App Secret is required!');
79
+ rl.close();
80
+ process.exit(1);
81
+ }
82
+ // Feishu Encrypt Key (optional)
83
+ const existingEncryptKey = config.get('feishu', 'encryptKey');
84
+ const encryptKeyPrompt = existingEncryptKey
85
+ ? `Feishu Encrypt Key [${existingEncryptKey}]: `
86
+ : 'Feishu Encrypt Key (optional, press Enter to skip): ';
87
+ const encryptKey = await rl.question(encryptKeyPrompt);
88
+ if (encryptKey.trim()) {
89
+ config.set('feishu', 'encryptKey', encryptKey.trim());
90
+ }
91
+ // Feishu Verification Token (optional)
92
+ const existingVerificationToken = config.get('feishu', 'verificationToken');
93
+ const verificationTokenPrompt = existingVerificationToken
94
+ ? `Feishu Verification Token [${existingVerificationToken}]: `
95
+ : 'Feishu Verification Token (optional, press Enter to skip): ';
96
+ const verificationToken = await rl.question(verificationTokenPrompt);
97
+ if (verificationToken.trim()) {
98
+ config.set('feishu', 'verificationToken', verificationToken.trim());
99
+ }
100
+ console.log('\n⚙️ Optional Settings (press Enter to use defaults)\n');
101
+ // Server Port
102
+ const existingPort = config.get('server', 'port');
103
+ const portInput = await rl.question(`Server Port [${existingPort}]: `);
104
+ if (portInput.trim()) {
105
+ const port = parseInt(portInput.trim(), 10);
106
+ if (isNaN(port) || port < 1 || port > 65535) {
107
+ console.error('❌ Invalid port number!');
108
+ rl.close();
109
+ process.exit(1);
110
+ }
111
+ config.set('server', 'port', port);
112
+ }
113
+ // Server Host
114
+ const existingHost = config.get('server', 'host');
115
+ const hostInput = await rl.question(`Server Host [${existingHost}]: `);
116
+ if (hostInput.trim()) {
117
+ config.set('server', 'host', hostInput.trim());
118
+ }
119
+ // WebSocket Heartbeat Interval
120
+ const existingHeartbeat = config.get('websocket', 'heartbeatInterval');
121
+ const heartbeatInput = await rl.question(`WebSocket Heartbeat Interval (ms) [${existingHeartbeat}]: `);
122
+ if (heartbeatInput.trim()) {
123
+ const interval = parseInt(heartbeatInput.trim(), 10);
124
+ if (isNaN(interval) || interval < 1000) {
125
+ console.error('❌ Heartbeat interval must be at least 1000ms!');
126
+ rl.close();
127
+ process.exit(1);
128
+ }
129
+ config.set('websocket', 'heartbeatInterval', interval);
130
+ }
131
+ await config.save();
132
+ console.log('\n✅ Configuration saved successfully!');
133
+ console.log(`📁 Config file: ${config.getConfigPath()}`);
134
+ console.log('\nYou can now start the router with: remote-cli-router start\n');
135
+ }
136
+ catch (error) {
137
+ console.error('❌ Configuration failed:', error);
138
+ process.exit(1);
139
+ }
140
+ finally {
141
+ rl.close();
142
+ }
143
+ }
144
+ /**
145
+ * Show current configuration
146
+ */
147
+ async function showConfigCommand() {
148
+ const config = await ConfigManager_1.ConfigManager.initialize();
149
+ const allConfig = config.getAll();
150
+ console.log('\n📋 Current Configuration:\n');
151
+ console.log('Server:');
152
+ console.log(` Port: ${allConfig.server.port}`);
153
+ console.log(` Host: ${allConfig.server.host}`);
154
+ console.log(` Environment: ${allConfig.server.nodeEnv}`);
155
+ console.log('\nFeishu:');
156
+ console.log(` App ID: ${allConfig.feishu.appId || '(not set)'}`);
157
+ console.log(` App Secret: ${allConfig.feishu.appSecret ? '***' + allConfig.feishu.appSecret.slice(-4) : '(not set)'}`);
158
+ console.log(` Encrypt Key: ${allConfig.feishu.encryptKey || '(not set)'}`);
159
+ console.log(` Verification Token: ${allConfig.feishu.verificationToken || '(not set)'}`);
160
+ console.log('\nWebSocket:');
161
+ console.log(` Heartbeat Interval: ${allConfig.websocket.heartbeatInterval}ms`);
162
+ console.log(` Reconnect Delay: ${allConfig.websocket.reconnectDelay}ms`);
163
+ console.log('\nSecurity:');
164
+ console.log(` Binding Code Expiry: ${allConfig.security.bindingCodeExpiry}ms`);
165
+ console.log(` Max Binding Attempts: ${allConfig.security.maxBindingAttempts}`);
166
+ console.log(`\n📁 Config file: ${config.getConfigPath()}\n`);
167
+ }
168
+ /**
169
+ * Reset configuration to defaults
170
+ */
171
+ async function resetConfigCommand() {
172
+ const config = await ConfigManager_1.ConfigManager.initialize();
173
+ const rl = readline.createInterface({ input: process_1.stdin, output: process_1.stdout });
174
+ const confirm = await rl.question('\n⚠️ This will reset all configuration to defaults. Continue? (y/N): ');
175
+ rl.close();
176
+ if (confirm.toLowerCase() !== 'y') {
177
+ console.log('Cancelled.');
178
+ return;
179
+ }
180
+ await config.reset();
181
+ console.log('✅ Configuration reset to defaults.');
182
+ console.log('Run "remote-cli-router config" to set up your router.\n');
183
+ }
184
+ /**
185
+ * Register config commands
186
+ */
187
+ function registerConfigCommands(program) {
188
+ const configCommand = program
189
+ .command('config')
190
+ .description('Configure router server settings');
191
+ configCommand
192
+ .command('setup')
193
+ .description('Interactive configuration setup')
194
+ .action(configureCommand);
195
+ configCommand
196
+ .command('show')
197
+ .description('Show current configuration')
198
+ .action(showConfigCommand);
199
+ configCommand
200
+ .command('reset')
201
+ .description('Reset configuration to defaults')
202
+ .action(resetConfigCommand);
203
+ // Default action for 'config' without subcommand is 'setup'
204
+ configCommand.action(configureCommand);
205
+ }
206
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,4CAyGC;AAKD,8CA2BC;AAKD,gDAiBC;AAKD,wDAsBC;AAlMD,2DAAwD;AACxD,4DAA8C;AAC9C,qCAA2D;AAE3D;;;GAGG;AACI,KAAK,UAAU,gBAAgB;IACpC,MAAM,MAAM,GAAG,MAAM,6BAAa,CAAC,UAAU,EAAE,CAAC;IAChD,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAL,eAAK,EAAE,MAAM,EAAN,gBAAM,EAAE,CAAC,CAAC;IAEvD,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC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AAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAC/B,wEAAwE,CACzE,CAAC;IACF,EAAE,CAAC,KAAK,EAAE,CAAC;IAEX,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,SAAgB,sBAAsB,CAAC,OAAgB;IACrD,MAAM,aAAa,GAAG,OAAO;SAC1B,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,kCAAkC,CAAC,CAAC;IAEnD,aAAa;SACV,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,iCAAiC,CAAC;SAC9C,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE5B,aAAa;SACV,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,4BAA4B,CAAC;SACzC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAE7B,aAAa;SACV,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,iCAAiC,CAAC;SAC9C,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAE9B,4DAA4D;IAC5D,aAAa,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Start the router server
3
+ */
4
+ export declare function startCommand(): Promise<void>;
5
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA6DlD"}