@modootoday/pmcp 0.8.2 → 0.8.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSkillServer
3
- } from "./chunk-UGRHZHHC.js";
3
+ } from "./chunk-LCB3ZIPN.js";
4
4
 
5
5
  // src/stdio.ts
6
6
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
@@ -38,4 +38,4 @@ export {
38
38
  serve,
39
39
  main
40
40
  };
41
- //# sourceMappingURL=chunk-UW7HTILA.js.map
41
+ //# sourceMappingURL=chunk-2VWT5IW3.js.map
@@ -1590,7 +1590,7 @@ function registerReadTool(server, tools) {
1590
1590
 
1591
1591
  // src/mcp.ts
1592
1592
  var SERVER_NAME = "pmcp";
1593
- var SERVER_VERSION = "0.8.2";
1593
+ var SERVER_VERSION = "0.8.3";
1594
1594
  function registerSkillTools(server, tools) {
1595
1595
  registerCatalogTool(server, tools);
1596
1596
  registerFindTool(server, tools);
@@ -1661,4 +1661,4 @@ export {
1661
1661
  registerSkillTools,
1662
1662
  createSkillServer
1663
1663
  };
1664
- //# sourceMappingURL=chunk-UGRHZHHC.js.map
1664
+ //# sourceMappingURL=chunk-LCB3ZIPN.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normaliseIntent
3
- } from "./chunk-UGRHZHHC.js";
3
+ } from "./chunk-LCB3ZIPN.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-IRQTGYHA.js.map
134
+ //# sourceMappingURL=chunk-MP3KQDP3.js.map
@@ -2,7 +2,7 @@ import {
2
2
  frontmatterObject,
3
3
  readCatalog,
4
4
  specProblems
5
- } from "./chunk-UGRHZHHC.js";
5
+ } from "./chunk-LCB3ZIPN.js";
6
6
 
7
7
  // src/config.ts
8
8
  import { existsSync, readFileSync } from "fs";
@@ -1139,4 +1139,4 @@ export {
1139
1139
  validateSkillDir,
1140
1140
  validateCatalog
1141
1141
  };
1142
- //# sourceMappingURL=chunk-O2P5AIHX.js.map
1142
+ //# sourceMappingURL=chunk-OWRJWWMP.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  openDatabase
3
- } from "./chunk-IRQTGYHA.js";
3
+ } from "./chunk-MP3KQDP3.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-3JNWCUHA.js.map
160
+ //# sourceMappingURL=chunk-WXDC24UC.js.map
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  loadEmbedder,
4
4
  openEntryVectors
5
- } from "./chunk-3JNWCUHA.js";
5
+ } from "./chunk-WXDC24UC.js";
6
6
  import {
7
7
  ConfigError,
8
8
  ProjectError,
@@ -17,15 +17,15 @@ import {
17
17
  splitFrontmatter,
18
18
  validateCatalog,
19
19
  validateSkillDir
20
- } from "./chunk-O2P5AIHX.js";
21
- import "./chunk-IRQTGYHA.js";
20
+ } from "./chunk-OWRJWWMP.js";
21
+ import "./chunk-MP3KQDP3.js";
22
22
  import {
23
23
  serve
24
- } from "./chunk-UW7HTILA.js";
24
+ } from "./chunk-2VWT5IW3.js";
25
25
  import {
26
26
  kindOf,
27
27
  readCatalog
28
- } from "./chunk-UGRHZHHC.js";
28
+ } from "./chunk-LCB3ZIPN.js";
29
29
 
30
30
  // src/cli/command.ts
31
31
  var ArgumentError = class extends Error {
@@ -2347,7 +2347,7 @@ function dispatch(argv, options = {}) {
2347
2347
  }
2348
2348
  return run(command, rest, { ui, env, cwd });
2349
2349
  }
2350
- var VERSION = "0.8.2";
2350
+ var VERSION = "0.8.3";
2351
2351
  async function run(command, argv, context) {
2352
2352
  try {
2353
2353
  return await command.run({
package/dist/http.d.ts CHANGED
@@ -74,6 +74,7 @@ interface SkillCaller {
74
74
  readonly claims?: Readonly<Record<string, unknown>>;
75
75
  }
76
76
  interface SkillHttpOptions extends SkillServerOptions {
77
+ /** Gets the Request the host's fetch received; read headers only, the body is still unread. */
77
78
  readonly authorize: (request: Request) => SkillCaller | undefined | Promise<SkillCaller | undefined>;
78
79
  /** Tiers a caller may list and load. Package skills without a tier count as open. */
79
80
  readonly tiersFor?: (caller: SkillCaller) => readonly string[];
package/dist/http.js CHANGED
@@ -2,12 +2,12 @@ import {
2
2
  DEFAULT_MODEL_ID,
3
3
  encodeEntries,
4
4
  loadEmbedder
5
- } from "./chunk-3JNWCUHA.js";
6
- import "./chunk-IRQTGYHA.js";
5
+ } from "./chunk-WXDC24UC.js";
6
+ import "./chunk-MP3KQDP3.js";
7
7
  import {
8
8
  createSkillServer,
9
9
  readCatalog
10
- } from "./chunk-UGRHZHHC.js";
10
+ } from "./chunk-LCB3ZIPN.js";
11
11
 
12
12
  // src/http.ts
13
13
  import {
@@ -166,12 +166,7 @@ function createSkillHttpHandler(options) {
166
166
  };
167
167
  const limit = options.rateLimit ? createRateLimiter(options.rateLimit) : void 0;
168
168
  const serve = async (request) => {
169
- const capped = await capBody(
170
- request,
171
- options.maxRequestBytes ?? DEFAULT_MAX_REQUEST_BYTES
172
- );
173
- if (capped instanceof Response) return capped;
174
- const caller = await options.authorize(capped);
169
+ const caller = await options.authorize(request);
175
170
  if (!caller) {
176
171
  return new Response(JSON.stringify({ error: "unauthorized" }), {
177
172
  status: 401,
@@ -183,6 +178,11 @@ function createSkillHttpHandler(options) {
183
178
  }
184
179
  const limited = limit?.(caller.id);
185
180
  if (limited) return limited;
181
+ const capped = await capBody(
182
+ request,
183
+ options.maxRequestBytes ?? DEFAULT_MAX_REQUEST_BYTES
184
+ );
185
+ if (capped instanceof Response) return capped;
186
186
  return handlerFor(tiersFor(caller)).fetch(capped, {
187
187
  authInfo: {
188
188
  token: "",
package/dist/index.d.ts CHANGED
@@ -304,7 +304,7 @@ declare function resolveSkillFileUri(uri: string, entries: readonly SkillEntry[]
304
304
 
305
305
  /** Reported to the host on connect. */
306
306
  declare const SERVER_NAME = "pmcp";
307
- declare const SERVER_VERSION = "0.8.2";
307
+ declare const SERVER_VERSION = "0.8.3";
308
308
  /**
309
309
  * Registers the skill_* tools on a server.
310
310
  *
package/dist/index.js CHANGED
@@ -14,11 +14,11 @@ import {
14
14
  readSpec,
15
15
  validateCatalog,
16
16
  validateSkillDir
17
- } from "./chunk-O2P5AIHX.js";
17
+ } from "./chunk-OWRJWWMP.js";
18
18
  import {
19
19
  DEFAULT_INTENT_CACHE_LIMIT,
20
20
  openIntentCache
21
- } from "./chunk-IRQTGYHA.js";
21
+ } from "./chunk-MP3KQDP3.js";
22
22
  import {
23
23
  ASSET_KINDS,
24
24
  CATALOG_PAGE_MAX,
@@ -70,7 +70,7 @@ import {
70
70
  skillFileUri,
71
71
  specProblems,
72
72
  withoutBody
73
- } from "./chunk-UGRHZHHC.js";
73
+ } from "./chunk-LCB3ZIPN.js";
74
74
  export {
75
75
  ASSET_KINDS,
76
76
  CATALOG_PAGE_MAX,
package/dist/stdio.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  main,
4
4
  resolveRoots,
5
5
  serve
6
- } from "./chunk-UW7HTILA.js";
7
- import "./chunk-UGRHZHHC.js";
6
+ } from "./chunk-2VWT5IW3.js";
7
+ import "./chunk-LCB3ZIPN.js";
8
8
  export {
9
9
  main,
10
10
  resolveRoots,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modootoday/pmcp",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
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.",