@modootoday/pmcp 0.17.0 → 0.17.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/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/dist/cli.js +246 -192
- package/dist/http.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +54 -40
- package/dist/stdio.js +1 -1
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
- package/plugins/pmcp/gemini-extension.json +1 -1
- package/plugins/pmcp/plugin.json +1 -1
package/dist/http.js
CHANGED
|
@@ -2294,7 +2294,7 @@ function registerMailboxTools(server, service) {
|
|
|
2294
2294
|
|
|
2295
2295
|
// src/mcp.ts
|
|
2296
2296
|
var SERVER_NAME = "pmcp";
|
|
2297
|
-
var SERVER_VERSION = "0.17.
|
|
2297
|
+
var SERVER_VERSION = "0.17.1";
|
|
2298
2298
|
function registerSkillTools(server, tools) {
|
|
2299
2299
|
registerCatalogTool(server, tools);
|
|
2300
2300
|
registerFindTool(server, tools);
|
package/dist/index.d.ts
CHANGED
|
@@ -275,7 +275,7 @@ declare function resolveSkillFileUri(uri: string, entries: readonly SkillEntry[]
|
|
|
275
275
|
|
|
276
276
|
/** Reported to the host on connect. */
|
|
277
277
|
declare const SERVER_NAME = "pmcp";
|
|
278
|
-
declare const SERVER_VERSION = "0.17.
|
|
278
|
+
declare const SERVER_VERSION = "0.17.1";
|
|
279
279
|
/**
|
|
280
280
|
* Registers the skill_* tools on a server.
|
|
281
281
|
*
|
package/dist/index.js
CHANGED
|
@@ -3405,9 +3405,9 @@ function project(spec, options) {
|
|
|
3405
3405
|
}
|
|
3406
3406
|
|
|
3407
3407
|
// src/project/doctor.ts
|
|
3408
|
-
import { spawnSync as
|
|
3409
|
-
import { existsSync as existsSync13, readFileSync as
|
|
3410
|
-
import { join as
|
|
3408
|
+
import { spawnSync as spawnSync3 } from "child_process";
|
|
3409
|
+
import { existsSync as existsSync13, readFileSync as readFileSync11 } from "fs";
|
|
3410
|
+
import { join as join13 } from "path";
|
|
3411
3411
|
import { parse as parse5 } from "smol-toml";
|
|
3412
3412
|
|
|
3413
3413
|
// src/project/adapters/opencode-doctor.ts
|
|
@@ -3467,6 +3467,20 @@ function opencodeDoctor(spec, options, listed2) {
|
|
|
3467
3467
|
return findings;
|
|
3468
3468
|
}
|
|
3469
3469
|
|
|
3470
|
+
// src/project/diagnostics/native-json.ts
|
|
3471
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
3472
|
+
import {
|
|
3473
|
+
closeSync as closeSync2,
|
|
3474
|
+
mkdtempSync as mkdtempSync2,
|
|
3475
|
+
openSync as openSync2,
|
|
3476
|
+
readFileSync as readFileSync10,
|
|
3477
|
+
rmSync as rmSync3,
|
|
3478
|
+
statSync as statSync3
|
|
3479
|
+
} from "fs";
|
|
3480
|
+
import { tmpdir } from "os";
|
|
3481
|
+
import { join as join12 } from "path";
|
|
3482
|
+
var MAX_OUTPUT = 1 << 26;
|
|
3483
|
+
|
|
3470
3484
|
// src/project/doctor.ts
|
|
3471
3485
|
var missingFrom = (names, present2) => names.filter((name) => !present2(name));
|
|
3472
3486
|
function verdict(tool, check, missing) {
|
|
@@ -3528,10 +3542,10 @@ function claude(spec, o) {
|
|
|
3528
3542
|
}
|
|
3529
3543
|
function codex(spec, o) {
|
|
3530
3544
|
const findings = [];
|
|
3531
|
-
const config =
|
|
3545
|
+
const config = join13(o.home, ".codex/config.toml");
|
|
3532
3546
|
let trusted = false;
|
|
3533
3547
|
if (existsSync13(config)) {
|
|
3534
|
-
const projects = parse5(
|
|
3548
|
+
const projects = parse5(readFileSync11(config, "utf8")).projects ?? {};
|
|
3535
3549
|
const root = spec.root.replace(/\/$/u, "");
|
|
3536
3550
|
trusted = projects[root]?.trust_level === "trusted" || projects[`${root}/`]?.trust_level === "trusted";
|
|
3537
3551
|
}
|
|
@@ -3657,8 +3671,8 @@ function grok(spec, o) {
|
|
|
3657
3671
|
}
|
|
3658
3672
|
function antigravity(spec, options) {
|
|
3659
3673
|
const foreign = agentNames(spec.root).filter((name) => {
|
|
3660
|
-
const text =
|
|
3661
|
-
|
|
3674
|
+
const text = readFileSync11(
|
|
3675
|
+
join13(spec.root, ".agents/agents", name, "agent.md"),
|
|
3662
3676
|
"utf8"
|
|
3663
3677
|
);
|
|
3664
3678
|
return splitFrontmatter(text).meta["tools"] !== void 0;
|
|
@@ -3678,7 +3692,7 @@ function antigravity(spec, options) {
|
|
|
3678
3692
|
if (serversForTool(spec, "antigravity").length > 0) {
|
|
3679
3693
|
const result = options.run(
|
|
3680
3694
|
"agy",
|
|
3681
|
-
["plugin", "validate",
|
|
3695
|
+
["plugin", "validate", join13(spec.root, ANTIGRAVITY_MCP_PLUGIN)],
|
|
3682
3696
|
spec.root
|
|
3683
3697
|
);
|
|
3684
3698
|
findings.push(
|
|
@@ -3711,11 +3725,11 @@ function doctor(spec, options) {
|
|
|
3711
3725
|
}
|
|
3712
3726
|
|
|
3713
3727
|
// src/server.ts
|
|
3714
|
-
import { readFileSync as
|
|
3728
|
+
import { readFileSync as readFileSync15 } from "fs";
|
|
3715
3729
|
|
|
3716
3730
|
// src/files/bundle.ts
|
|
3717
|
-
import { readFileSync as
|
|
3718
|
-
import { dirname as dirname9, join as
|
|
3731
|
+
import { readFileSync as readFileSync13, statSync as statSync5 } from "fs";
|
|
3732
|
+
import { dirname as dirname9, join as join15 } from "path";
|
|
3719
3733
|
|
|
3720
3734
|
// src/mime.ts
|
|
3721
3735
|
var TYPES = {
|
|
@@ -3822,8 +3836,8 @@ function classify(path, bytes) {
|
|
|
3822
3836
|
|
|
3823
3837
|
// src/files/list.ts
|
|
3824
3838
|
import { createHash as createHash7 } from "crypto";
|
|
3825
|
-
import { readFileSync as
|
|
3826
|
-
import { basename as basename4, join as
|
|
3839
|
+
import { readFileSync as readFileSync12, readdirSync as readdirSync6, statSync as statSync4 } from "fs";
|
|
3840
|
+
import { basename as basename4, join as join14, relative as relative6, sep as sep2 } from "path";
|
|
3827
3841
|
|
|
3828
3842
|
// src/files/redact.ts
|
|
3829
3843
|
import { basename as basename3 } from "path";
|
|
@@ -3860,11 +3874,11 @@ function servedBytes(path, raw) {
|
|
|
3860
3874
|
var FILE_LIST_LIMIT = 200;
|
|
3861
3875
|
var sha256 = (bytes) => createHash7("sha256").update(bytes).digest("hex");
|
|
3862
3876
|
function describe(path, full) {
|
|
3863
|
-
const bytes = servedBytes(full,
|
|
3877
|
+
const bytes = servedBytes(full, readFileSync12(full));
|
|
3864
3878
|
return { path, bytes: bytes.length, sha256: sha256(bytes) };
|
|
3865
3879
|
}
|
|
3866
3880
|
function listSkillFiles(root, limit = FILE_LIST_LIMIT) {
|
|
3867
|
-
if (
|
|
3881
|
+
if (statSync4(root).isFile()) {
|
|
3868
3882
|
return { files: [describe(basename4(root), root)], truncated: false };
|
|
3869
3883
|
}
|
|
3870
3884
|
const files = [];
|
|
@@ -3873,7 +3887,7 @@ function listSkillFiles(root, limit = FILE_LIST_LIMIT) {
|
|
|
3873
3887
|
const dir = stack.pop();
|
|
3874
3888
|
for (const entry of readdirSync6(dir, { withFileTypes: true })) {
|
|
3875
3889
|
if (entry.name === "node_modules" || entry.name === ".git") continue;
|
|
3876
|
-
const full =
|
|
3890
|
+
const full = join14(dir, entry.name);
|
|
3877
3891
|
if (entry.isDirectory()) {
|
|
3878
3892
|
stack.push(full);
|
|
3879
3893
|
continue;
|
|
@@ -3907,7 +3921,7 @@ function resolveSkillFileUri(uri, entries) {
|
|
|
3907
3921
|
// src/files/bundle.ts
|
|
3908
3922
|
function bundleSkill(entry) {
|
|
3909
3923
|
const root = assetRoot(entry);
|
|
3910
|
-
const base =
|
|
3924
|
+
const base = statSync5(root).isFile() ? dirname9(root) : root;
|
|
3911
3925
|
const listing2 = listSkillFiles(root);
|
|
3912
3926
|
return {
|
|
3913
3927
|
name: entry.name,
|
|
@@ -3915,16 +3929,16 @@ function bundleSkill(entry) {
|
|
|
3915
3929
|
files: listing2.files.map((file) => ({
|
|
3916
3930
|
...file,
|
|
3917
3931
|
uri: skillFileUri(entry, file.path),
|
|
3918
|
-
mimeType: classify(file.path,
|
|
3932
|
+
mimeType: classify(file.path, readFileSync13(join15(base, file.path))).mimeType
|
|
3919
3933
|
}))
|
|
3920
3934
|
};
|
|
3921
3935
|
}
|
|
3922
3936
|
|
|
3923
3937
|
// src/files/read.ts
|
|
3924
|
-
import { readFileSync as
|
|
3938
|
+
import { readFileSync as readFileSync14, statSync as statSync7 } from "fs";
|
|
3925
3939
|
|
|
3926
3940
|
// src/files/resolve.ts
|
|
3927
|
-
import { realpathSync as realpathSync4, statSync as
|
|
3941
|
+
import { realpathSync as realpathSync4, statSync as statSync6 } from "fs";
|
|
3928
3942
|
import { dirname as dirname10, isAbsolute as isAbsolute6, relative as relative7, resolve as resolve7, sep as sep3 } from "path";
|
|
3929
3943
|
var ownFile = (entry) => relative7(assetRoot(entry), entry.path).split(sep3).join("/");
|
|
3930
3944
|
function resolveSkillFile(entry, wanted = ownFile(entry)) {
|
|
@@ -3932,7 +3946,7 @@ function resolveSkillFile(entry, wanted = ownFile(entry)) {
|
|
|
3932
3946
|
return { ok: false, error: "path_outside_skill", detail: wanted };
|
|
3933
3947
|
}
|
|
3934
3948
|
const scope = realpathSync4(assetRoot(entry));
|
|
3935
|
-
const single =
|
|
3949
|
+
const single = statSync6(scope).isFile();
|
|
3936
3950
|
const root = single ? dirname10(scope) : scope;
|
|
3937
3951
|
let target;
|
|
3938
3952
|
try {
|
|
@@ -3957,7 +3971,7 @@ var READ_BUDGET_BYTES = 256 * 1024;
|
|
|
3957
3971
|
function readSkillFile(entry, wanted, budget = READ_BUDGET_BYTES) {
|
|
3958
3972
|
const resolved = resolveSkillFile(entry, wanted);
|
|
3959
3973
|
if (!resolved.ok) return resolved;
|
|
3960
|
-
const size =
|
|
3974
|
+
const size = statSync7(resolved.target).size;
|
|
3961
3975
|
if (size > budget) {
|
|
3962
3976
|
return {
|
|
3963
3977
|
ok: false,
|
|
@@ -3965,7 +3979,7 @@ function readSkillFile(entry, wanted, budget = READ_BUDGET_BYTES) {
|
|
|
3965
3979
|
detail: `${size} bytes > ${budget}`
|
|
3966
3980
|
};
|
|
3967
3981
|
}
|
|
3968
|
-
const bytes = servedBytes(resolved.target,
|
|
3982
|
+
const bytes = servedBytes(resolved.target, readFileSync14(resolved.target));
|
|
3969
3983
|
const { kind: kind2, mimeType } = classify(resolved.path, bytes);
|
|
3970
3984
|
return {
|
|
3971
3985
|
ok: true,
|
|
@@ -4141,7 +4155,7 @@ function createSkillTools(options) {
|
|
|
4141
4155
|
describe(name) {
|
|
4142
4156
|
const entry = byName(name);
|
|
4143
4157
|
if (!entry) return null;
|
|
4144
|
-
const source =
|
|
4158
|
+
const source = readFileSync15(entry.path, "utf8");
|
|
4145
4159
|
const listing2 = listSkillFiles(assetRoot(entry));
|
|
4146
4160
|
return {
|
|
4147
4161
|
name: entry.name,
|
|
@@ -4178,7 +4192,7 @@ function createSkillTools(options) {
|
|
|
4178
4192
|
return {
|
|
4179
4193
|
name: entry.name,
|
|
4180
4194
|
body: readBody(
|
|
4181
|
-
servedBytes(entry.path,
|
|
4195
|
+
servedBytes(entry.path, readFileSync15(entry.path)).toString("utf8")
|
|
4182
4196
|
),
|
|
4183
4197
|
files: bundle.files.filter((file) => file.path !== own),
|
|
4184
4198
|
filesTruncated: bundle.truncated
|
|
@@ -4247,7 +4261,7 @@ function registerSkillPrompts(server, tools) {
|
|
|
4247
4261
|
}
|
|
4248
4262
|
|
|
4249
4263
|
// src/resources.ts
|
|
4250
|
-
import { statSync as
|
|
4264
|
+
import { statSync as statSync8 } from "fs";
|
|
4251
4265
|
import {
|
|
4252
4266
|
ResourceNotFoundError,
|
|
4253
4267
|
ResourceTemplate
|
|
@@ -4260,7 +4274,7 @@ function listing(entries) {
|
|
|
4260
4274
|
name: entry.name,
|
|
4261
4275
|
description: entry.description,
|
|
4262
4276
|
mimeType: "text/markdown",
|
|
4263
|
-
size:
|
|
4277
|
+
size: statSync8(entry.path).size
|
|
4264
4278
|
}));
|
|
4265
4279
|
}
|
|
4266
4280
|
function complete(value, entries) {
|
|
@@ -4298,17 +4312,17 @@ function registerSkillResources(server, skills) {
|
|
|
4298
4312
|
|
|
4299
4313
|
// src/extension/entry.ts
|
|
4300
4314
|
import { createHash as createHash8 } from "crypto";
|
|
4301
|
-
import { readFileSync as
|
|
4302
|
-
import { basename as basename5, dirname as dirname11, join as
|
|
4315
|
+
import { readFileSync as readFileSync16, readdirSync as readdirSync7, statSync as statSync9 } from "fs";
|
|
4316
|
+
import { basename as basename5, dirname as dirname11, join as join16, relative as relative8, sep as sep4 } from "path";
|
|
4303
4317
|
var MAX_RESOURCES = 512;
|
|
4304
4318
|
var MAX_SKILL_BYTES = 16 * 1024 * 1024;
|
|
4305
4319
|
var digests = /* @__PURE__ */ new Map();
|
|
4306
4320
|
function facts(path) {
|
|
4307
|
-
const stat =
|
|
4321
|
+
const stat = statSync9(path);
|
|
4308
4322
|
const key = `${stat.mtimeMs}:${stat.size}`;
|
|
4309
4323
|
const cached = digests.get(path);
|
|
4310
4324
|
if (cached?.key === key) return cached;
|
|
4311
|
-
const bytes = servedBytes(path,
|
|
4325
|
+
const bytes = servedBytes(path, readFileSync16(path));
|
|
4312
4326
|
const digest = `sha256:${createHash8("sha256").update(bytes).digest("hex")}`;
|
|
4313
4327
|
const fresh = { key, digest, size: bytes.length };
|
|
4314
4328
|
digests.set(path, fresh);
|
|
@@ -4321,7 +4335,7 @@ function filesUnder(root) {
|
|
|
4321
4335
|
const dir = stack.pop();
|
|
4322
4336
|
for (const entry of readdirSync7(dir, { withFileTypes: true })) {
|
|
4323
4337
|
if (entry.name === "node_modules" || entry.name === ".git") continue;
|
|
4324
|
-
const full =
|
|
4338
|
+
const full = join16(dir, entry.name);
|
|
4325
4339
|
if (entry.isDirectory()) stack.push(full);
|
|
4326
4340
|
else if (entry.isFile()) found.push(full);
|
|
4327
4341
|
if (found.length > MAX_RESOURCES) return null;
|
|
@@ -4332,7 +4346,7 @@ function filesUnder(root) {
|
|
|
4332
4346
|
function extensionEntry(entry) {
|
|
4333
4347
|
if (kindOf(entry) !== "skill" || basename5(entry.path) !== "SKILL.md")
|
|
4334
4348
|
return null;
|
|
4335
|
-
const frontmatter = frontmatterObject(
|
|
4349
|
+
const frontmatter = frontmatterObject(readFileSync16(entry.path, "utf8"));
|
|
4336
4350
|
const root = dirname11(entry.path);
|
|
4337
4351
|
if (specProblems(frontmatter, basename5(root)).length > 0) return null;
|
|
4338
4352
|
if (frontmatter?.["name"] !== entry.slug) return null;
|
|
@@ -4827,7 +4841,7 @@ function registerMailboxTools(server, service) {
|
|
|
4827
4841
|
|
|
4828
4842
|
// src/mcp.ts
|
|
4829
4843
|
var SERVER_NAME = "pmcp";
|
|
4830
|
-
var SERVER_VERSION = "0.17.
|
|
4844
|
+
var SERVER_VERSION = "0.17.1";
|
|
4831
4845
|
function registerSkillTools(server, tools) {
|
|
4832
4846
|
registerCatalogTool(server, tools);
|
|
4833
4847
|
registerFindTool(server, tools);
|
|
@@ -4848,16 +4862,16 @@ function createSkillServer(options) {
|
|
|
4848
4862
|
}
|
|
4849
4863
|
|
|
4850
4864
|
// src/validate.ts
|
|
4851
|
-
import { existsSync as existsSync14, readFileSync as
|
|
4852
|
-
import { basename as basename6, join as
|
|
4865
|
+
import { existsSync as existsSync14, readFileSync as readFileSync17, statSync as statSync10 } from "fs";
|
|
4866
|
+
import { basename as basename6, join as join17, resolve as resolve8 } from "path";
|
|
4853
4867
|
function validateSkillDir(dir) {
|
|
4854
4868
|
const root = resolve8(dir);
|
|
4855
|
-
const skillMd = basename6(root) === "SKILL.md" ? root :
|
|
4856
|
-
if (!existsSync14(skillMd) || !
|
|
4869
|
+
const skillMd = basename6(root) === "SKILL.md" ? root : join17(root, "SKILL.md");
|
|
4870
|
+
if (!existsSync14(skillMd) || !statSync10(skillMd).isFile()) {
|
|
4857
4871
|
return [{ path: root, reason: "no SKILL.md", level: "error" }];
|
|
4858
4872
|
}
|
|
4859
|
-
const front = frontmatterObject(
|
|
4860
|
-
const directory = basename6(skillMd === root ?
|
|
4873
|
+
const front = frontmatterObject(readFileSync17(skillMd, "utf8"));
|
|
4874
|
+
const directory = basename6(skillMd === root ? join17(root, "..") : root);
|
|
4861
4875
|
return specProblems(front, directory).map((reason) => ({
|
|
4862
4876
|
path: skillMd,
|
|
4863
4877
|
reason,
|
package/dist/stdio.js
CHANGED
|
@@ -1941,7 +1941,7 @@ function registerMailboxTools(server, service) {
|
|
|
1941
1941
|
|
|
1942
1942
|
// src/mcp.ts
|
|
1943
1943
|
var SERVER_NAME = "pmcp";
|
|
1944
|
-
var SERVER_VERSION = "0.17.
|
|
1944
|
+
var SERVER_VERSION = "0.17.1";
|
|
1945
1945
|
function registerSkillTools(server, tools) {
|
|
1946
1946
|
registerCatalogTool(server, tools);
|
|
1947
1947
|
registerFindTool(server, tools);
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "pmcp",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.1",
|
|
5
5
|
"description": "Find package skills and use native runtime project configuration.",
|
|
6
6
|
"author": { "name": "modootoday" },
|
|
7
7
|
"license": "Elastic-2.0",
|
package/plugins/pmcp/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "pmcp",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.1",
|
|
5
5
|
"description": "Find package skills and use native runtime project configuration.",
|
|
6
6
|
"author": { "name": "modootoday" },
|
|
7
7
|
"license": "Elastic-2.0",
|