@plaud-ai/mcp 0.3.1 → 0.3.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/dist/index.js CHANGED
@@ -31,7 +31,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
31
31
  import open from "open";
32
32
  var server = new McpServer({
33
33
  name: "plaud",
34
- version: "0.3.1"
34
+ version: "0.3.2"
35
35
  });
36
36
  var CALLBACK_PORT = 8199;
37
37
  var LOGIN_TIMEOUT_MS = 12e4;
@@ -154,7 +154,7 @@ async function main() {
154
154
  const sub = process.argv[2];
155
155
  const sub2 = process.argv[3];
156
156
  if (sub === "install") {
157
- const { runInstall } = await import("./install-42GM4XUO.js");
157
+ const { runInstall } = await import("./install-UUXHA6WE.js");
158
158
  const args = process.argv.slice(3);
159
159
  const yes = args.some((a) => a === "--yes" || a === "-y");
160
160
  const noLogin = args.some((a) => a === "--no-login");
@@ -187,7 +187,7 @@ async function main() {
187
187
  return;
188
188
  }
189
189
  if (sub === "http") {
190
- const { startHttpServer } = await import("./server-KBYYESVJ.js");
190
+ const { startHttpServer } = await import("./server-D3JKIARR.js");
191
191
  const { startMetricsServer } = await import("./server-BOR5EZLF.js");
192
192
  startMetricsServer();
193
193
  startHttpServer();
@@ -213,7 +213,7 @@ Usage:
213
213
  try {
214
214
  await initTelemetry({
215
215
  surface: "mcp",
216
- appVersion: "0.3.1",
216
+ appVersion: "0.3.2",
217
217
  transport: "stdio"
218
218
  });
219
219
  } catch {
@@ -142,6 +142,11 @@ function isJsonObject(value) {
142
142
  function readErrorCode(err) {
143
143
  return isJsonObject(err) && typeof err.code === "string" ? err.code : void 0;
144
144
  }
145
+ function entryAutoUpdates(entry) {
146
+ if (!isJsonObject(entry)) return false;
147
+ const args = Array.isArray(entry.args) ? entry.args : [];
148
+ return args.some((a) => typeof a === "string" && a.includes("@plaud-ai/mcp@latest"));
149
+ }
145
150
  function jsonMcpServersAdapter(spec) {
146
151
  const rootKey = spec.rootKey ?? "mcpServers";
147
152
  const serverKey = spec.serverKey ?? "plaud";
@@ -179,10 +184,21 @@ function jsonMcpServersAdapter(spec) {
179
184
  return { status: "failed", message: `failed: ${configPath} field ${rootKey} must be a JSON object.` };
180
185
  }
181
186
  const servers = existingServers ?? {};
182
- if (servers[serverKey]) {
187
+ const existing = servers[serverKey];
188
+ if (existing) {
189
+ if (entryAutoUpdates(existing)) {
190
+ return {
191
+ status: "already-configured",
192
+ message: "already configured (npx @latest \u2014 auto-updates)",
193
+ restartHint: spec.restartHint
194
+ };
195
+ }
196
+ config[rootKey] = { ...servers, [serverKey]: toEntry(ctx.entry) };
197
+ await mkdir2(dirname2(configPath), { recursive: true });
198
+ await writeFile2(configPath, JSON.stringify(config, null, 2), "utf-8");
183
199
  return {
184
- status: "already-configured",
185
- message: "already configured",
200
+ status: "configured",
201
+ message: "migrated to npx @latest (was pinned/local \u2014 now auto-updates)",
186
202
  restartHint: spec.restartHint
187
203
  };
188
204
  }
@@ -249,6 +265,12 @@ function isJsonObject2(value) {
249
265
  function readErrorCode2(err) {
250
266
  return isJsonObject2(err) && typeof err.code === "string" ? err.code : void 0;
251
267
  }
268
+ function entryAutoUpdates2(existing) {
269
+ if (!isJsonObject2(existing)) return false;
270
+ const command = existing.command;
271
+ const args = isJsonObject2(command) && Array.isArray(command.args) ? command.args : [];
272
+ return args.some((a) => typeof a === "string" && a.includes("@plaud-ai/mcp@latest"));
273
+ }
252
274
  function zedAdapter() {
253
275
  return {
254
276
  id: "zed",
@@ -276,9 +298,10 @@ function zedAdapter() {
276
298
  return { status: "failed", message: `failed: ${configPath} field context_servers must be a JSON object.` };
277
299
  }
278
300
  const servers = existingServers ?? {};
279
- if (servers.plaud) {
280
- return { status: "already-configured", message: "already configured", restartHint: RESTART_HINT3 };
301
+ if (servers.plaud && entryAutoUpdates2(servers.plaud)) {
302
+ return { status: "already-configured", message: "already configured (npx @latest \u2014 auto-updates)", restartHint: RESTART_HINT3 };
281
303
  }
304
+ const migrating = Boolean(servers.plaud);
282
305
  config.context_servers = {
283
306
  ...servers,
284
307
  plaud: { command: { path: entry.command, args: entry.args } }
@@ -287,7 +310,7 @@ function zedAdapter() {
287
310
  await writeFile3(configPath, JSON.stringify(config, null, 2), "utf-8");
288
311
  return {
289
312
  status: "configured",
290
- message: "configured. Restart Zed to load the Plaud MCP.",
313
+ message: migrating ? "migrated to npx @latest (was pinned/local \u2014 now auto-updates). Restart Zed." : "configured. Restart Zed to load the Plaud MCP.",
291
314
  restartHint: RESTART_HINT3
292
315
  };
293
316
  }
@@ -1010,7 +1010,7 @@ function startHttpServer() {
1010
1010
  apiBase,
1011
1011
  staticToken: token
1012
1012
  });
1013
- const mcpServer = new McpServer({ name: "plaud", version: "0.3.1" });
1013
+ const mcpServer = new McpServer({ name: "plaud", version: "0.3.2" });
1014
1014
  registerTools(mcpServer, client);
1015
1015
  const transport = new StreamableHTTPServerTransport({
1016
1016
  sessionIdGenerator: void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaud-ai/mcp",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plaud",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Access your Plaud recordings in Claude",
5
5
  "author": {
6
6
  "name": "Plaud AI"