@plaud-ai/mcp 0.3.2 → 0.3.3
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/{chunk-4QBEOJPX.js → chunk-242FRP4P.js} +6 -1
- package/dist/chunk-D2JZW2TW.js +832 -0
- package/dist/{chunk-QJV4OLZI.js → chunk-LOGKF7DL.js} +1 -1
- package/dist/{chunk-QT25MKZJ.js → chunk-WR565PER.js} +24 -25
- package/dist/{chunk-XA77WLYF.js → chunk-XWDA3G2U.js} +15 -2
- package/dist/index.js +14 -15
- package/dist/{install-UUXHA6WE.js → install-XCMWU6GQ.js} +7 -8
- package/dist/{server-D3JKIARR.js → server-DDSU6DGR.js} +497 -26
- package/dist/{server-BOR5EZLF.js → server-NKCNUA6P.js} +0 -1
- package/dist/{setup-GLWZYNRW.js → setup-N55HQZFZ.js} +8 -9
- package/package.json +2 -1
- package/plugin.json +1 -1
- package/dist/chunk-MCKGQKYU.js +0 -15
- package/dist/chunk-R5G6UXSI.js +0 -20687
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
loadSkills,
|
|
3
|
+
skillsSourceDir
|
|
4
|
+
} from "./chunk-242FRP4P.js";
|
|
4
5
|
|
|
5
6
|
// src/install-utils.ts
|
|
6
|
-
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
7
|
+
import { readFile, writeFile, mkdir, cp, rm } from "fs/promises";
|
|
7
8
|
import { existsSync } from "fs";
|
|
8
9
|
import { join, dirname } from "path";
|
|
9
10
|
import { homedir, platform } from "os";
|
|
@@ -43,30 +44,28 @@ function copyToClipboard(content) {
|
|
|
43
44
|
}
|
|
44
45
|
return false;
|
|
45
46
|
}
|
|
46
|
-
async function
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} catch {
|
|
56
|
-
}
|
|
57
|
-
if (existing.includes(SKILLS_MARKER_START)) {
|
|
58
|
-
const updated = existing.replace(
|
|
59
|
-
new RegExp(`${SKILLS_MARKER_START}[\\s\\S]*?${SKILLS_MARKER_END}`),
|
|
60
|
-
block
|
|
61
|
-
);
|
|
62
|
-
await mkdir(dirname(claudeMdPath), { recursive: true });
|
|
63
|
-
await writeFile(claudeMdPath, updated, "utf-8");
|
|
64
|
-
} else {
|
|
65
|
-
await mkdir(dirname(claudeMdPath), { recursive: true });
|
|
66
|
-
await writeFile(claudeMdPath, existing + (existing.endsWith("\n") ? "" : "\n") + block + "\n", "utf-8");
|
|
47
|
+
async function installSkillsToClaudeCode() {
|
|
48
|
+
const sourceDir = skillsSourceDir();
|
|
49
|
+
const skills = await loadSkills();
|
|
50
|
+
const destRoot = join(homedir(), ".claude", "skills");
|
|
51
|
+
await mkdir(destRoot, { recursive: true });
|
|
52
|
+
const installed = [];
|
|
53
|
+
for (const skill of skills) {
|
|
54
|
+
await cp(join(sourceDir, skill.dir), join(destRoot, skill.dir), { recursive: true, force: true });
|
|
55
|
+
installed.push(skill.name);
|
|
67
56
|
}
|
|
57
|
+
await removeLegacySkillsBlock();
|
|
58
|
+
return installed;
|
|
68
59
|
}
|
|
69
60
|
async function removeSkillsFromClaudeCode() {
|
|
61
|
+
const destRoot = join(homedir(), ".claude", "skills");
|
|
62
|
+
const skills = await loadSkills();
|
|
63
|
+
for (const skill of skills) {
|
|
64
|
+
await rm(join(destRoot, skill.dir), { recursive: true, force: true }).catch(() => void 0);
|
|
65
|
+
}
|
|
66
|
+
await removeLegacySkillsBlock();
|
|
67
|
+
}
|
|
68
|
+
async function removeLegacySkillsBlock() {
|
|
70
69
|
const claudeMdPath = join(homedir(), ".claude", "CLAUDE.md");
|
|
71
70
|
let existing = "";
|
|
72
71
|
try {
|
|
@@ -84,6 +83,6 @@ async function removeSkillsFromClaudeCode() {
|
|
|
84
83
|
export {
|
|
85
84
|
getMcpEntry,
|
|
86
85
|
copyToClipboard,
|
|
87
|
-
|
|
86
|
+
installSkillsToClaudeCode,
|
|
88
87
|
removeSkillsFromClaudeCode
|
|
89
88
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
capture,
|
|
3
3
|
classifyError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D2JZW2TW.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-NPCCDRWQ.js";
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
// src/tools/index.ts
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { randomUUID } from "crypto";
|
|
16
|
+
var toolHooks = null;
|
|
16
17
|
var MAX_FILTER_PAGES = 5;
|
|
17
18
|
var FILTER_PAGE_SIZE = 100;
|
|
18
19
|
function parseDate(s) {
|
|
@@ -37,6 +38,10 @@ function normalizeMcpHost(name) {
|
|
|
37
38
|
function emitToolClick(tool, props = {}) {
|
|
38
39
|
const requestId = randomUUID();
|
|
39
40
|
capture("mcp:tool:click", { tool_name: tool, request_id: requestId, passive: false, ...props });
|
|
41
|
+
toolHooks?.onToolClick({
|
|
42
|
+
tool,
|
|
43
|
+
fileId: typeof props.file_id === "string" ? props.file_id : void 0
|
|
44
|
+
});
|
|
40
45
|
return requestId;
|
|
41
46
|
}
|
|
42
47
|
function recordToolMetric(tool, status, durationMs, requestId, props = {}, err) {
|
|
@@ -52,8 +57,16 @@ function recordToolMetric(tool, status, durationMs, requestId, props = {}, err)
|
|
|
52
57
|
if (status === "success") evProps.duration_ms = durationMs;
|
|
53
58
|
else evProps.error_type = classifyError(err);
|
|
54
59
|
capture(event, evProps);
|
|
60
|
+
toolHooks?.onToolResult({
|
|
61
|
+
tool,
|
|
62
|
+
status,
|
|
63
|
+
durationMs,
|
|
64
|
+
fileId: typeof props.file_id === "string" ? props.file_id : void 0,
|
|
65
|
+
failureKind: status === "error" ? classifyError(err) : void 0
|
|
66
|
+
});
|
|
55
67
|
}
|
|
56
|
-
function registerTools(server, client) {
|
|
68
|
+
function registerTools(server, client, hooks) {
|
|
69
|
+
toolHooks = hooks ?? null;
|
|
57
70
|
server.registerTool(
|
|
58
71
|
"list_files",
|
|
59
72
|
{
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
getClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LOGKF7DL.js";
|
|
5
5
|
import {
|
|
6
6
|
loadSkills
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-242FRP4P.js";
|
|
8
8
|
import {
|
|
9
9
|
normalizeMcpHost,
|
|
10
10
|
registerTools
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XWDA3G2U.js";
|
|
12
12
|
import {
|
|
13
13
|
capture,
|
|
14
14
|
classifyError,
|
|
@@ -20,10 +20,9 @@ import {
|
|
|
20
20
|
setMcpHost,
|
|
21
21
|
setUser,
|
|
22
22
|
shutdown
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-D2JZW2TW.js";
|
|
24
24
|
import "./chunk-NPCCDRWQ.js";
|
|
25
25
|
import "./chunk-RUFCT6DQ.js";
|
|
26
|
-
import "./chunk-MCKGQKYU.js";
|
|
27
26
|
|
|
28
27
|
// src/index.ts
|
|
29
28
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -31,7 +30,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
31
30
|
import open from "open";
|
|
32
31
|
var server = new McpServer({
|
|
33
32
|
name: "plaud",
|
|
34
|
-
version: "0.3.
|
|
33
|
+
version: "0.3.3"
|
|
35
34
|
});
|
|
36
35
|
var CALLBACK_PORT = 8199;
|
|
37
36
|
var LOGIN_TIMEOUT_MS = 12e4;
|
|
@@ -154,7 +153,7 @@ async function main() {
|
|
|
154
153
|
const sub = process.argv[2];
|
|
155
154
|
const sub2 = process.argv[3];
|
|
156
155
|
if (sub === "install") {
|
|
157
|
-
const { runInstall } = await import("./install-
|
|
156
|
+
const { runInstall } = await import("./install-XCMWU6GQ.js");
|
|
158
157
|
const args = process.argv.slice(3);
|
|
159
158
|
const yes = args.some((a) => a === "--yes" || a === "-y");
|
|
160
159
|
const noLogin = args.some((a) => a === "--no-login");
|
|
@@ -162,33 +161,33 @@ async function main() {
|
|
|
162
161
|
return;
|
|
163
162
|
}
|
|
164
163
|
if (sub === "clean-plugin") {
|
|
165
|
-
const { runCleanPlugin } = await import("./setup-
|
|
164
|
+
const { runCleanPlugin } = await import("./setup-N55HQZFZ.js");
|
|
166
165
|
await runCleanPlugin();
|
|
167
166
|
return;
|
|
168
167
|
}
|
|
169
168
|
if (sub === "setup" && sub2 === "codex") {
|
|
170
|
-
const { runSetupCodex } = await import("./setup-
|
|
169
|
+
const { runSetupCodex } = await import("./setup-N55HQZFZ.js");
|
|
171
170
|
await runSetupCodex();
|
|
172
171
|
return;
|
|
173
172
|
}
|
|
174
173
|
if (sub === "unsetup" && sub2 === "codex") {
|
|
175
|
-
const { runUnsetupCodex } = await import("./setup-
|
|
174
|
+
const { runUnsetupCodex } = await import("./setup-N55HQZFZ.js");
|
|
176
175
|
await runUnsetupCodex();
|
|
177
176
|
return;
|
|
178
177
|
}
|
|
179
178
|
if (sub === "setup") {
|
|
180
|
-
const { runSetup } = await import("./setup-
|
|
179
|
+
const { runSetup } = await import("./setup-N55HQZFZ.js");
|
|
181
180
|
await runSetup();
|
|
182
181
|
return;
|
|
183
182
|
}
|
|
184
183
|
if (sub === "unsetup") {
|
|
185
|
-
const { runUnsetup } = await import("./setup-
|
|
184
|
+
const { runUnsetup } = await import("./setup-N55HQZFZ.js");
|
|
186
185
|
await runUnsetup();
|
|
187
186
|
return;
|
|
188
187
|
}
|
|
189
188
|
if (sub === "http") {
|
|
190
|
-
const { startHttpServer } = await import("./server-
|
|
191
|
-
const { startMetricsServer } = await import("./server-
|
|
189
|
+
const { startHttpServer } = await import("./server-DDSU6DGR.js");
|
|
190
|
+
const { startMetricsServer } = await import("./server-NKCNUA6P.js");
|
|
192
191
|
startMetricsServer();
|
|
193
192
|
startHttpServer();
|
|
194
193
|
return;
|
|
@@ -213,7 +212,7 @@ Usage:
|
|
|
213
212
|
try {
|
|
214
213
|
await initTelemetry({
|
|
215
214
|
surface: "mcp",
|
|
216
|
-
appVersion: "0.3.
|
|
215
|
+
appVersion: "0.3.3",
|
|
217
216
|
transport: "stdio"
|
|
218
217
|
});
|
|
219
218
|
} catch {
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LOGKF7DL.js";
|
|
4
4
|
import {
|
|
5
5
|
copyToClipboard,
|
|
6
6
|
getMcpEntry,
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
installSkillsToClaudeCode
|
|
8
|
+
} from "./chunk-WR565PER.js";
|
|
9
9
|
import {
|
|
10
10
|
skillsCombined
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-242FRP4P.js";
|
|
12
12
|
import {
|
|
13
13
|
runOAuthCallback
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D2JZW2TW.js";
|
|
15
15
|
import "./chunk-RUFCT6DQ.js";
|
|
16
|
-
import "./chunk-MCKGQKYU.js";
|
|
17
16
|
|
|
18
17
|
// src/install.ts
|
|
19
18
|
import { createInterface } from "readline/promises";
|
|
@@ -537,8 +536,8 @@ async function runInstall(opts = {}) {
|
|
|
537
536
|
if (succeeded.some((c) => c.id === "claude-code")) {
|
|
538
537
|
process.stdout.write("\u2192 Claude Code skills... ");
|
|
539
538
|
try {
|
|
540
|
-
await
|
|
541
|
-
console.log("
|
|
539
|
+
const installed = await installSkillsToClaudeCode();
|
|
540
|
+
console.log(`installed ${installed.length} skill${installed.length === 1 ? "" : "s"} to ~/.claude/skills/.`);
|
|
542
541
|
} catch (err) {
|
|
543
542
|
console.log(`failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
544
543
|
}
|