@thinremote/thinr-cli 1.1.0-alpha.1 → 1.1.0-alpha.2

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/bin/thinr.js CHANGED
@@ -68,7 +68,7 @@ program
68
68
  .description('Start the MCP server (stdio) for AI tool integration')
69
69
  .action(async () => {
70
70
  try {
71
- await startMCPServer();
71
+ await startMCPServer({ version: pkg.version });
72
72
  } catch (error) {
73
73
  console.error(`Error: ${error.message}`);
74
74
  process.exit(1);
package/lib/mcp/server.js CHANGED
@@ -11,8 +11,12 @@ import { withProfile } from './helpers.js';
11
11
  /**
12
12
  * Start a generic MCP server for ThinRemote.
13
13
  * All tools accept device (when relevant) plus optional user/profile parameters.
14
+ *
15
+ * @param {{ version?: string }} [opts] `version` is echoed back in the
16
+ * MCP `initialize` response's `serverInfo.version`. Caller is expected
17
+ * to pass the CLI's `package.json#version` so the two never drift.
14
18
  */
15
- export async function startMCPServer() {
19
+ export async function startMCPServer({ version = 'unknown' } = {}) {
16
20
  const config = readConfig();
17
21
  if (config.server) {
18
22
  setBaseURL(`https://${config.server}`);
@@ -21,7 +25,7 @@ export async function startMCPServer() {
21
25
  const server = new Server(
22
26
  {
23
27
  name: 'thinr',
24
- version: '1.0.0',
28
+ version,
25
29
  },
26
30
  {
27
31
  capabilities: { tools: {} },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinremote/thinr-cli",
3
- "version": "1.1.0-alpha.1",
3
+ "version": "1.1.0-alpha.2",
4
4
  "description": "CLI for ThinRemote — remote management for IoT devices, with an MCP server for AI clients",
5
5
  "main": "bin/thinr.js",
6
6
  "bin": {
@@ -42,16 +42,16 @@
42
42
  "author": "ThinRemote",
43
43
  "license": "MIT",
44
44
  "dependencies": {
45
- "@inquirer/prompts": "^7.5.3",
45
+ "@inquirer/prompts": "^8.4.1",
46
46
  "@modelcontextprotocol/sdk": "^1.29.0",
47
47
  "axios": "^1.10.0",
48
48
  "chalk": "^5.4.1",
49
49
  "commander": "^14.0.0",
50
- "conf": "^14.0.0",
50
+ "conf": "^15.1.0",
51
51
  "figlet": "^1.8.1",
52
52
  "jsonwebtoken": "^9.0.2",
53
- "open": "^10.1.2",
54
- "ora": "^8.2.0",
53
+ "open": "^11.0.0",
54
+ "ora": "^9.3.0",
55
55
  "ws": "^8.18.2"
56
56
  },
57
57
  "type": "module",