thingd-cli 0.1.0 → 0.3.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/mcp.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { type CliContext } from "./index.js";
2
+ export declare function runMcp(context: CliContext): Promise<void>;
3
+ //# sourceMappingURL=mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,YAAY,CAAC;AAErD,wBAAsB,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAY/D"}
package/dist/mcp.js ADDED
@@ -0,0 +1,14 @@
1
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
2
+ import { createThingdMcpServer } from "thingd-mcp";
3
+ import { withDb } from "./index.js";
4
+ export async function runMcp(context) {
5
+ await withDb(context, async (db) => {
6
+ // We pass empty options to createThingdMcpServer so it uses default audit behavior
7
+ const server = createThingdMcpServer(db);
8
+ const transport = new StdioServerTransport();
9
+ await server.connect(transport);
10
+ // Keep the process alive and the database connection open
11
+ // so the MCP server can continue to receive messages over stdio.
12
+ return new Promise(() => { });
13
+ });
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thingd-cli",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Admin and operator CLI for thingd.",
5
5
  "type": "module",
6
6
  "author": "Sayan Mohsin",
@@ -30,7 +30,10 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@modelcontextprotocol/sdk": "^1.29.0",
33
- "thingd": "0.1.0"
33
+ "cli-table3": "^0.6.5",
34
+ "picocolors": "^1.1.1",
35
+ "thingd": "0.3.0",
36
+ "thingd-mcp": "0.1.0"
34
37
  },
35
38
  "engines": {
36
39
  "node": ">=20"