@thingd/cli 0.70.0 → 0.72.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/package.json +2 -2
- package/dist/commands/cloud.d.ts +0 -3
- package/dist/commands/cloud.d.ts.map +0 -1
- package/dist/commands/cloud.js +0 -648
- package/dist/commands/mcp-connect.d.ts +0 -3
- package/dist/commands/mcp-connect.d.ts.map +0 -1
- package/dist/commands/mcp-connect.js +0 -154
- package/dist/dashboard/public/assets/favicon-CgGFvG_0.svg +0 -4
- package/dist/dashboard/public/assets/index-C6PkDB7y.css +0 -1
- package/dist/dashboard/public/assets/index-CsLTLPTP.js +0 -4
- package/dist/dashboard/public/index.html +0 -19
- package/dist/dashboard/server.d.ts +0 -6
- package/dist/dashboard/server.d.ts.map +0 -1
- package/dist/dashboard/server.js +0 -663
- package/dist/data-movement.d.ts +0 -6
- package/dist/data-movement.d.ts.map +0 -1
- package/dist/data-movement.js +0 -475
- package/dist/doctor.d.ts +0 -3
- package/dist/doctor.d.ts.map +0 -1
- package/dist/doctor.js +0 -108
- package/dist/index.d.ts +0 -47
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1221
- package/dist/install.d.ts +0 -3
- package/dist/install.d.ts.map +0 -1
- package/dist/install.js +0 -229
- package/dist/interactive.d.ts +0 -2
- package/dist/interactive.d.ts.map +0 -1
- package/dist/interactive.js +0 -3036
- package/dist/lib/cloud-api.d.ts +0 -143
- package/dist/lib/cloud-api.d.ts.map +0 -1
- package/dist/lib/cloud-api.js +0 -207
- package/dist/lib/cloud-config.d.ts +0 -33
- package/dist/lib/cloud-config.d.ts.map +0 -1
- package/dist/lib/cloud-config.js +0 -42
- package/dist/lib/mcp-config-writer.d.ts +0 -26
- package/dist/lib/mcp-config-writer.d.ts.map +0 -1
- package/dist/lib/mcp-config-writer.js +0 -86
- package/dist/logo.d.ts +0 -3
- package/dist/logo.d.ts.map +0 -1
- package/dist/logo.js +0 -8
- package/dist/mcp/cluster.d.ts +0 -69
- package/dist/mcp/cluster.d.ts.map +0 -1
- package/dist/mcp/cluster.js +0 -304
- package/dist/mcp/config.d.ts +0 -14
- package/dist/mcp/config.d.ts.map +0 -1
- package/dist/mcp/config.js +0 -67
- package/dist/mcp/http.d.ts +0 -25
- package/dist/mcp/http.d.ts.map +0 -1
- package/dist/mcp/http.js +0 -597
- package/dist/mcp/index.d.ts +0 -5
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -3
- package/dist/mcp-http.d.ts +0 -3
- package/dist/mcp-http.d.ts.map +0 -1
- package/dist/mcp-http.js +0 -42
- package/dist/mcp.d.ts +0 -3
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -28
- package/dist/paths.d.ts +0 -4
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -14
package/dist/mcp.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
2
|
-
import { createThingdMcpServer, readMcpHardeningOptionsFromEnv } from "@thingd/sdk";
|
|
3
|
-
import { resolveConnection, withDb } from "./index.js";
|
|
4
|
-
import { readMcpAuditOptionsFromEnv } from "./mcp/config.js";
|
|
5
|
-
export async function runMcp(context) {
|
|
6
|
-
const sub = context.parsed.tokens[1];
|
|
7
|
-
if (sub === "connect") {
|
|
8
|
-
const { runMcpConnect } = await import("./commands/mcp-connect.js");
|
|
9
|
-
await runMcpConnect(context);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const connection = resolveConnection(context);
|
|
13
|
-
await withDb(context, async (db) => {
|
|
14
|
-
const server = createThingdMcpServer(db, {
|
|
15
|
-
audit: readMcpAuditOptionsFromEnv(context.env),
|
|
16
|
-
hardening: readMcpHardeningOptionsFromEnv(context.env),
|
|
17
|
-
});
|
|
18
|
-
const transport = new StdioServerTransport();
|
|
19
|
-
context.stderr.write(`\nthingd stdio MCP server started successfully.\n`);
|
|
20
|
-
context.stderr.write(` ✓ Database: ${connection.path}\n`);
|
|
21
|
-
context.stderr.write(` ✓ Driver: ${connection.driver ?? "memory"}\n`);
|
|
22
|
-
context.stderr.write(` ✓ Transport: Stdio (listening silently on stdin)\n\n`);
|
|
23
|
-
await server.connect(transport);
|
|
24
|
-
// Keep the process alive and the database connection open
|
|
25
|
-
// so the MCP server can continue to receive messages over stdio.
|
|
26
|
-
return new Promise(() => { });
|
|
27
|
-
});
|
|
28
|
-
}
|
package/dist/paths.d.ts
DELETED
package/dist/paths.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAOA,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
|
package/dist/paths.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { mkdirSync } from "node:fs";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
const THINGD_DIR_NAME = ".thingd";
|
|
5
|
-
const THINGD_DB_NAME = "data.db";
|
|
6
|
-
export function defaultThingdDir() {
|
|
7
|
-
return join(homedir(), THINGD_DIR_NAME);
|
|
8
|
-
}
|
|
9
|
-
export function defaultThingdDbPath() {
|
|
10
|
-
return join(defaultThingdDir(), THINGD_DB_NAME);
|
|
11
|
-
}
|
|
12
|
-
export function ensureThingdDir() {
|
|
13
|
-
mkdirSync(defaultThingdDir(), { recursive: true });
|
|
14
|
-
}
|