@modootoday/pmcp 0.7.0 → 0.7.1
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-QHFORYIN.js → chunk-C46YCY2I.js} +30 -6
- package/dist/{chunk-POJOFL4L.js → chunk-IJPOJ6PG.js} +2 -2
- package/dist/{chunk-ZLELYZHL.js → chunk-KP3TQ3QY.js} +2 -2
- package/dist/{chunk-NI2OLZPA.js → chunk-VBLAH6J2.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/http.d.ts +1 -1
- package/dist/http.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{server-wpYiAJ2n.d.ts → server-B9GDPRoE.d.ts} +7 -0
- package/dist/stdio.js +2 -2
- package/package.json +1 -1
|
@@ -791,9 +791,16 @@ function createSkillTools(options) {
|
|
|
791
791
|
call(name) {
|
|
792
792
|
const entry = catalog().find((candidate) => candidate.name === name);
|
|
793
793
|
if (!entry) return null;
|
|
794
|
+
const root = assetRoot(entry);
|
|
795
|
+
const listing = listFiles(root);
|
|
796
|
+
const own = relative2(root, entry.path).split(sep).join("/");
|
|
794
797
|
return {
|
|
795
798
|
name: entry.name,
|
|
796
|
-
body: readBody(readFileSync3(entry.path, "utf8"))
|
|
799
|
+
body: readBody(readFileSync3(entry.path, "utf8")),
|
|
800
|
+
files: listing.files.filter(
|
|
801
|
+
(file) => file.path !== own && file.path !== basename3(entry.path)
|
|
802
|
+
),
|
|
803
|
+
filesTruncated: listing.truncated
|
|
797
804
|
};
|
|
798
805
|
},
|
|
799
806
|
/** Drops the memoised catalog, so the next call re-reads the tree. */
|
|
@@ -1082,7 +1089,7 @@ function registerSkillTools(server, tools) {
|
|
|
1082
1089
|
"skill_read",
|
|
1083
1090
|
{
|
|
1084
1091
|
...readOnlyTool("Read a skill file"),
|
|
1085
|
-
description: "A reference or script file inside one skill's directory in this catalog, as text, with its sha256. It reads only files the catalog ships and calls no external API; path is relative to the skill, as skill_describe
|
|
1092
|
+
description: "A reference or script file inside one skill's directory in this catalog, as text, with its sha256. It reads only files the catalog ships and calls no external API; path is relative to the skill, as skill_call and skill_describe list it (layout: https://pmcp.build). Scripts are returned as text, never run. Files over 256 KiB and paths outside the skill are refused.",
|
|
1086
1093
|
inputSchema: z2.object({
|
|
1087
1094
|
name: z2.string().min(1),
|
|
1088
1095
|
path: z2.string().min(1).optional().describe(
|
|
@@ -1106,7 +1113,7 @@ function registerSkillTools(server, tools) {
|
|
|
1106
1113
|
"skill_call",
|
|
1107
1114
|
{
|
|
1108
1115
|
...readOnlyTool("Read a skill"),
|
|
1109
|
-
description: "The body of a single skill, by the name skill_find or skill_catalog returned. This is the only call that costs a document.",
|
|
1116
|
+
description: "The body of a single skill, by the name skill_find or skill_catalog returned, followed by a list of the reference and script files the skill carries, if any. This is the only call that costs a document.",
|
|
1110
1117
|
inputSchema: z2.object({
|
|
1111
1118
|
name: z2.string().min(1).describe("The skill name, as <package>/<slug>.")
|
|
1112
1119
|
})
|
|
@@ -1123,13 +1130,30 @@ function registerSkillTools(server, tools) {
|
|
|
1123
1130
|
isError: true
|
|
1124
1131
|
};
|
|
1125
1132
|
}
|
|
1126
|
-
|
|
1133
|
+
if (found.files.length === 0) {
|
|
1134
|
+
return { content: [{ type: "text", text: found.body }] };
|
|
1135
|
+
}
|
|
1136
|
+
const lines = found.files.map(
|
|
1137
|
+
(file) => `- ${file.path} (${file.bytes} bytes, sha256 ${file.sha256.slice(0, 12)})`
|
|
1138
|
+
);
|
|
1139
|
+
if (found.filesTruncated)
|
|
1140
|
+
lines.push("- (list cut; skill_describe has the rest)");
|
|
1141
|
+
const manifest = [
|
|
1142
|
+
`Files in skill ${found.name}, each returned by skill_read with this name and the path:`,
|
|
1143
|
+
...lines
|
|
1144
|
+
].join("\n");
|
|
1145
|
+
return {
|
|
1146
|
+
content: [
|
|
1147
|
+
{ type: "text", text: found.body },
|
|
1148
|
+
{ type: "text", text: manifest }
|
|
1149
|
+
]
|
|
1150
|
+
};
|
|
1127
1151
|
}
|
|
1128
1152
|
);
|
|
1129
1153
|
return server;
|
|
1130
1154
|
}
|
|
1131
1155
|
function createSkillServer(options) {
|
|
1132
|
-
const server = new McpServer({ name: SERVER_NAME, version: "0.7.
|
|
1156
|
+
const server = new McpServer({ name: SERVER_NAME, version: "0.7.1" });
|
|
1133
1157
|
const tools = createSkillTools(options);
|
|
1134
1158
|
registerSkillsExtension(server, tools.skills);
|
|
1135
1159
|
return registerSkillTools(server, tools);
|
|
@@ -1167,4 +1191,4 @@ export {
|
|
|
1167
1191
|
registerSkillTools,
|
|
1168
1192
|
createSkillServer
|
|
1169
1193
|
};
|
|
1170
|
-
//# sourceMappingURL=chunk-
|
|
1194
|
+
//# sourceMappingURL=chunk-C46YCY2I.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSkillServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C46YCY2I.js";
|
|
4
4
|
|
|
5
5
|
// src/stdio.ts
|
|
6
6
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
serve,
|
|
36
36
|
main
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-IJPOJ6PG.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normaliseIntent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C46YCY2I.js";
|
|
4
4
|
|
|
5
5
|
// src/cache.ts
|
|
6
6
|
async function openDatabase(path) {
|
|
@@ -131,4 +131,4 @@ export {
|
|
|
131
131
|
DEFAULT_INTENT_CACHE_LIMIT,
|
|
132
132
|
openIntentCache
|
|
133
133
|
};
|
|
134
|
-
//# sourceMappingURL=chunk-
|
|
134
|
+
//# sourceMappingURL=chunk-KP3TQ3QY.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KP3TQ3QY.js";
|
|
4
4
|
|
|
5
5
|
// src/embed.ts
|
|
6
6
|
var DEFAULT_MODEL_ID = "Xenova/multilingual-e5-small";
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
encodeEntries,
|
|
158
158
|
openEntryVectors
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-VBLAH6J2.js.map
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
loadEmbedder,
|
|
4
4
|
openEntryVectors
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VBLAH6J2.js";
|
|
6
6
|
import {
|
|
7
7
|
ConfigError,
|
|
8
8
|
ProjectError,
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
spawnRunner,
|
|
17
17
|
splitFrontmatter
|
|
18
18
|
} from "./chunk-GNJSZCRH.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-KP3TQ3QY.js";
|
|
20
20
|
import {
|
|
21
21
|
serve
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IJPOJ6PG.js";
|
|
23
23
|
import {
|
|
24
24
|
kindOf,
|
|
25
25
|
readCatalog
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-C46YCY2I.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/command.ts
|
|
29
29
|
var ArgumentError = class extends Error {
|
|
@@ -2308,7 +2308,7 @@ function dispatch(argv, options = {}) {
|
|
|
2308
2308
|
}
|
|
2309
2309
|
return run(command, rest, { ui, env, cwd });
|
|
2310
2310
|
}
|
|
2311
|
-
var VERSION = "0.7.
|
|
2311
|
+
var VERSION = "0.7.1";
|
|
2312
2312
|
async function run(command, argv, context) {
|
|
2313
2313
|
try {
|
|
2314
2314
|
return await command.run({
|
package/dist/http.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as SkillEntry } from './catalog-5v7jrGwP.js';
|
|
2
|
-
import { E as Embedder, S as SkillServerOptions } from './server-
|
|
2
|
+
import { E as Embedder, S as SkillServerOptions } from './server-B9GDPRoE.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The optional encoder and the store for the vectors it produces.
|
package/dist/http.js
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
DEFAULT_MODEL_ID,
|
|
3
3
|
encodeEntries,
|
|
4
4
|
loadEmbedder
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VBLAH6J2.js";
|
|
6
|
+
import "./chunk-KP3TQ3QY.js";
|
|
7
7
|
import {
|
|
8
8
|
createSkillServer,
|
|
9
9
|
readCatalog
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-C46YCY2I.js";
|
|
11
11
|
|
|
12
12
|
// src/http.ts
|
|
13
13
|
import {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IntentCache, S as SkillServerOptions, a as SkillTools } from './server-
|
|
2
|
-
export { C as CATALOG_PAGE_MAX, b as CATALOG_PAGE_SIZE, c as CallResponse, d as CatalogItem, e as CatalogResponse, D as DEFAULT_FIND_LIMIT, f as DESCRIBE_FILE_LIMIT, E as Embedder, F as FindOptions, g as FindResult, h as IntentCacheStats, K as KindFilter, M as Match, R as READ_BUDGET_BYTES, i as Ranking, j as ReadResult, k as SkillFilters, l as cosine, m as createSkillTools, n as find, o as lexicalScore, p as normaliseIntent } from './server-
|
|
1
|
+
import { I as IntentCache, S as SkillServerOptions, a as SkillTools } from './server-B9GDPRoE.js';
|
|
2
|
+
export { C as CATALOG_PAGE_MAX, b as CATALOG_PAGE_SIZE, c as CallResponse, d as CatalogItem, e as CatalogResponse, D as DEFAULT_FIND_LIMIT, f as DESCRIBE_FILE_LIMIT, E as Embedder, F as FindOptions, g as FindResult, h as IntentCacheStats, K as KindFilter, M as Match, R as READ_BUDGET_BYTES, i as Ranking, j as ReadResult, k as SkillFilters, l as cosine, m as createSkillTools, n as find, o as lexicalScore, p as normaliseIntent } from './server-B9GDPRoE.js';
|
|
3
3
|
import { S as SkillEntry } from './catalog-5v7jrGwP.js';
|
|
4
4
|
export { a as ASSET_KINDS, A as AssetKind, C as CatalogOptions, M as MAX_SKILL_DEPTH, b as SKIPPED_DIRS, d as displayPath, k as kindOf, r as readBody, c as readCatalog, e as readFrontmatter, w as withoutBody } from './catalog-5v7jrGwP.js';
|
|
5
5
|
import { McpServer } from '@modelcontextprotocol/server';
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_INTENT_CACHE_LIMIT,
|
|
18
18
|
openIntentCache
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KP3TQ3QY.js";
|
|
20
20
|
import {
|
|
21
21
|
ASSET_KINDS,
|
|
22
22
|
CATALOG_PAGE_MAX,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
registerSkillsExtension,
|
|
49
49
|
skillUri,
|
|
50
50
|
withoutBody
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-C46YCY2I.js";
|
|
52
52
|
export {
|
|
53
53
|
ASSET_KINDS,
|
|
54
54
|
CATALOG_PAGE_MAX,
|
|
@@ -155,6 +155,13 @@ interface CatalogItem {
|
|
|
155
155
|
interface CallResponse {
|
|
156
156
|
readonly name: string;
|
|
157
157
|
readonly body: string;
|
|
158
|
+
/** Files the skill carries besides its body, for skill_read. */
|
|
159
|
+
readonly files: readonly {
|
|
160
|
+
path: string;
|
|
161
|
+
bytes: number;
|
|
162
|
+
sha256: string;
|
|
163
|
+
}[];
|
|
164
|
+
readonly filesTruncated: boolean;
|
|
158
165
|
}
|
|
159
166
|
/**
|
|
160
167
|
* The catalog, the search and the read, as plain functions.
|
package/dist/stdio.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modootoday/pmcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"author": "modootoday",
|
|
6
6
|
"description": "An MCP server that finds the skills your installed packages already ship. Reads SKILL.md out of node_modules by shape rather than by path, so it sees the skills, .agent, .claude, .gemini and .codex conventions alike, and keeps session startup flat as the number of installed skills grows.",
|