@modootoday/pmcp 0.9.2 → 0.11.0
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/README.md +308 -2
- package/dist/attachment-tU5FZrgZ.d.ts +17 -0
- package/dist/cli.js +8378 -1674
- package/dist/config-CJ43_oBS.d.ts +49 -0
- package/dist/embed-BBhv3y5x.d.ts +53 -0
- package/dist/encoder-DGRy9skC.d.ts +36 -0
- package/dist/hook-spec-PRSnYGLV.d.ts +10 -0
- package/dist/http.d.ts +7 -38
- package/dist/http.js +2115 -14
- package/dist/index.d.ts +44 -46
- package/dist/index.js +4550 -74
- package/dist/mailbox/index.d.ts +44 -0
- package/dist/mailbox/index.js +1896 -0
- package/dist/project/hook-adapter.d.ts +11 -0
- package/dist/project/hook-adapter.js +191 -0
- package/dist/{server-C9eO6LMI.d.ts → server-CwWcRjqz.d.ts} +122 -2
- package/dist/service-qpCsOXkQ.d.ts +116 -0
- package/dist/stdio.d.ts +10 -4
- package/dist/stdio.js +3052 -6
- package/package.json +5 -1
- package/dist/catalog-BU5VLLyd.d.ts +0 -121
- package/dist/chunk-A5NOHVHN.js +0 -1805
- package/dist/chunk-CMZ7OTQD.js +0 -134
- package/dist/chunk-D3OZVMHN.js +0 -1142
- package/dist/chunk-EIHMCKY5.js +0 -41
- package/dist/chunk-KYW3VP3L.js +0 -160
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { I as IntentCache, S as SkillServerOptions, a as SkillTools } from './server-
|
|
2
|
-
export { B as BundleFile,
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { I as IntentCache, R as Ranking, S as SkillServerOptions, E as Embedder, C as CatalogOptions, a as SkillEntry, M as MetadataValue, b as SkillTools } from './server-CwWcRjqz.js';
|
|
2
|
+
export { A as ASSET_KINDS, c as AssetKind, B as BundleFile, d as CATALOG_PAGE_MAX, e as CATALOG_PAGE_SIZE, f as COMPATIBILITY_MAX, g as CallResponse, h as CatalogItem, i as CatalogResponse, j as Classified, D as DEFAULT_FIND_LIMIT, k as DESCRIBE_FILE_LIMIT, l as DESCRIPTION_MAX, F as FileKind, m as FindOptions, n as FindResult, o as IntentCacheStats, K as KindFilter, p as MAX_SKILL_DEPTH, q as Match, r as MetadataLeaf, N as NAME_MAX, s as READ_BUDGET_BYTES, t as RUNTIMES, u as ReadResult, v as Runtime, w as SKIPPED_DIRS, x as SkillBundle, y as SkillFile, z as SkillFileContent, G as SkillFileListing, H as SkillFilters, J as bundleResponseSchema, L as bundleSkill, O as catalogResponseSchema, P as classify, Q as cosine, T as createSkillTools, U as describeResponseSchema, V as detectRuntime, W as displayPath, X as find, Y as findResultSchema, Z as isUtf8Text, _ as kindOf, $ as lexicalScore, a0 as listSkillFiles, a1 as mimeOf, a2 as normaliseIntent, a3 as parseSkillFrontmatter, a4 as readBody, a5 as readCatalog, a6 as readFrontmatter, a7 as readSkillFile, a8 as runtimeOfClient, a9 as specProblems, aa as verifiedRuntimesOf, ab as withoutBody } from './server-CwWcRjqz.js';
|
|
3
|
+
import { L as LoadEmbedderOptions } from './embed-BBhv3y5x.js';
|
|
4
|
+
export { E as EntryVectorStore, e as encodeEntries, l as loadEmbedder, o as openEntryVectors } from './embed-BBhv3y5x.js';
|
|
5
|
+
export { D as DEFAULT_MODEL_ID, a as EmbeddingModel, b as EncoderDtype, E as EncoderOptions, c as EncoderSpec, R as ResolvedEncoder, e as embeddingModels, d as encoderSpec, r as resolveEncoder } from './encoder-DGRy9skC.js';
|
|
6
|
+
import { P as ProjectConfig } from './config-CJ43_oBS.js';
|
|
7
|
+
export { C as CONFIG_FILE, a as CatalogSection, b as ConfigError, E as EmbeddingSection, f as findConfig, r as readConfig } from './config-CJ43_oBS.js';
|
|
8
|
+
import { S as ShellHookSpec } from './hook-spec-PRSnYGLV.js';
|
|
5
9
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
10
|
+
import { M as MailboxService } from './service-qpCsOXkQ.js';
|
|
6
11
|
import 'zod';
|
|
7
12
|
|
|
8
13
|
/**
|
|
@@ -37,6 +42,19 @@ declare const DEFAULT_INTENT_CACHE_LIMIT = 4096;
|
|
|
37
42
|
*/
|
|
38
43
|
declare function openIntentCache(options: IntentCacheOptions): Promise<IntentCache | null>;
|
|
39
44
|
|
|
45
|
+
interface SearchOptions extends LoadEmbedderOptions {
|
|
46
|
+
readonly indexPath: string;
|
|
47
|
+
readonly modelId?: string;
|
|
48
|
+
readonly embedder?: Embedder;
|
|
49
|
+
readonly loadCatalog?: (options: CatalogOptions) => SkillEntry[];
|
|
50
|
+
}
|
|
51
|
+
interface PreparedSearch {
|
|
52
|
+
readonly ranking: Ranking;
|
|
53
|
+
readonly reason?: "index_missing" | "index_unavailable" | "index_stale" | "encoder_unavailable" | "vector_mismatch";
|
|
54
|
+
readonly options: Pick<SkillServerOptions, "embedder" | "vectors" | "loadCatalog">;
|
|
55
|
+
}
|
|
56
|
+
declare function prepareSearch(catalog: CatalogOptions, options: SearchOptions): Promise<PreparedSearch>;
|
|
57
|
+
|
|
40
58
|
/**
|
|
41
59
|
* Assets laid out as an agent plugin marketplace: a directory holding
|
|
42
60
|
* `.claude-plugin/marketplace.json`, whose plugins keep skills, commands,
|
|
@@ -58,44 +76,6 @@ declare function readMarketplace(dir: string, onReject?: (rejection: Rejection)
|
|
|
58
76
|
/** The directory or single file an entry's describe and read may open. */
|
|
59
77
|
declare const assetRoot: (entry: Pick<SkillEntry, "root" | "path">) => string;
|
|
60
78
|
|
|
61
|
-
/**
|
|
62
|
-
* `pmcp.toml`, the project's one record of where its catalog lives.
|
|
63
|
-
*
|
|
64
|
-
* Paths in it are relative to the file, so the same file works from any
|
|
65
|
-
* directory a host starts pmcp in. Only `[catalog]` is read here; the other
|
|
66
|
-
* sections belong to the projector and are kept as given.
|
|
67
|
-
*/
|
|
68
|
-
declare const CONFIG_FILE = "pmcp.toml";
|
|
69
|
-
/** What `[catalog]` may say. Each mirrors the repeatable CLI flag of the same meaning. */
|
|
70
|
-
interface CatalogSection {
|
|
71
|
-
readonly roots?: readonly string[];
|
|
72
|
-
readonly scopes?: readonly string[];
|
|
73
|
-
readonly workspaces?: readonly string[];
|
|
74
|
-
readonly packages?: readonly string[];
|
|
75
|
-
readonly marketplaces?: readonly string[];
|
|
76
|
-
}
|
|
77
|
-
interface ProjectConfig {
|
|
78
|
-
/** Absolute path of the file read. */
|
|
79
|
-
readonly path: string;
|
|
80
|
-
/** Its directory; every relative path in the file resolves against it. */
|
|
81
|
-
readonly dir: string;
|
|
82
|
-
/** `[catalog]` with paths already absolute. */
|
|
83
|
-
readonly catalog: CatalogSection;
|
|
84
|
-
/** The whole document, for sections this module does not interpret. */
|
|
85
|
-
readonly raw: Readonly<Record<string, unknown>>;
|
|
86
|
-
}
|
|
87
|
-
declare class ConfigError extends Error {
|
|
88
|
-
constructor(path: string, message: string);
|
|
89
|
-
}
|
|
90
|
-
/** The nearest pmcp.toml at or above start, or null when there is none. */
|
|
91
|
-
declare function findConfig(start: string): string | null;
|
|
92
|
-
/**
|
|
93
|
-
* Reads and checks one file. An unknown key under `[catalog]` is an error
|
|
94
|
-
* rather than ignored, for the same reason an unknown flag is: a misspelt
|
|
95
|
-
* `workspace = [...]` must not look like it worked.
|
|
96
|
-
*/
|
|
97
|
-
declare function readConfig(path: string): ProjectConfig;
|
|
98
|
-
|
|
99
79
|
/** What the projector writes. A path is unique across a plan and is the lock key. */
|
|
100
80
|
type Output = {
|
|
101
81
|
readonly kind: "link";
|
|
@@ -113,6 +93,7 @@ type Output = {
|
|
|
113
93
|
readonly file: string;
|
|
114
94
|
readonly key: readonly string[];
|
|
115
95
|
readonly value: unknown;
|
|
96
|
+
readonly managed?: readonly unknown[];
|
|
116
97
|
}
|
|
117
98
|
/** A marked block inside a text file other content shares. path = file#pmcp */
|
|
118
99
|
| {
|
|
@@ -139,13 +120,27 @@ interface PackageRulesSpec {
|
|
|
139
120
|
readonly strip: readonly string[];
|
|
140
121
|
}
|
|
141
122
|
interface McpServerSpec {
|
|
142
|
-
readonly
|
|
123
|
+
readonly mailbox?: boolean;
|
|
124
|
+
readonly command?: string;
|
|
125
|
+
readonly url?: string;
|
|
143
126
|
readonly args: readonly string[];
|
|
144
127
|
readonly env: Readonly<Record<string, string>>;
|
|
128
|
+
readonly envVars?: readonly string[];
|
|
129
|
+
readonly envFrom?: Readonly<Record<string, {
|
|
130
|
+
readonly file: string;
|
|
131
|
+
readonly pointer: string;
|
|
132
|
+
}>>;
|
|
133
|
+
readonly cwd?: string;
|
|
134
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
135
|
+
readonly headerEnv?: Readonly<Record<string, string>>;
|
|
136
|
+
readonly bearerTokenEnvVar?: string;
|
|
137
|
+
readonly native?: Partial<Record<Tool, Readonly<Record<string, number>>>>;
|
|
138
|
+
readonly targets?: readonly Tool[];
|
|
145
139
|
/** Tools the server should expose where a host can narrow them. */
|
|
146
140
|
readonly tools?: readonly string[];
|
|
147
141
|
}
|
|
148
142
|
interface ProjectSpec {
|
|
143
|
+
readonly hooks?: readonly ShellHookSpec[];
|
|
149
144
|
readonly root: string;
|
|
150
145
|
readonly tools: ReadonlySet<Tool>;
|
|
151
146
|
readonly skills: Readonly<Record<string, {
|
|
@@ -172,6 +167,7 @@ declare function plan(spec: ProjectSpec, owned?: ReadonlyMap<string, string>): O
|
|
|
172
167
|
|
|
173
168
|
declare const LOCK_FILE = "pmcp.lock";
|
|
174
169
|
interface ProjectResult {
|
|
170
|
+
readonly backup?: string;
|
|
175
171
|
/** 0 done or clean, 2 check found problems, 3 refused to overwrite. */
|
|
176
172
|
readonly code: 0 | 2 | 3;
|
|
177
173
|
readonly problems: readonly string[];
|
|
@@ -195,7 +191,7 @@ interface RunResult {
|
|
|
195
191
|
readonly status: number | null;
|
|
196
192
|
readonly stdout: string;
|
|
197
193
|
}
|
|
198
|
-
type Runner = (command: string, args: readonly string[], cwd: string) => RunResult;
|
|
194
|
+
type Runner = (command: string, args: readonly string[], cwd: string, env?: Readonly<Record<string, string | undefined>>) => RunResult;
|
|
199
195
|
type Status = "ok" | "fail" | "skip";
|
|
200
196
|
interface Finding$1 {
|
|
201
197
|
readonly tool: Tool | "project";
|
|
@@ -204,6 +200,7 @@ interface Finding$1 {
|
|
|
204
200
|
readonly detail?: string;
|
|
205
201
|
}
|
|
206
202
|
interface DoctorOptions {
|
|
203
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
207
204
|
readonly run: Runner;
|
|
208
205
|
readonly home: string;
|
|
209
206
|
readonly only?: ReadonlySet<Tool>;
|
|
@@ -285,7 +282,7 @@ declare function resolveSkillFileUri(uri: string, entries: readonly SkillEntry[]
|
|
|
285
282
|
|
|
286
283
|
/** Reported to the host on connect. */
|
|
287
284
|
declare const SERVER_NAME = "pmcp";
|
|
288
|
-
declare const SERVER_VERSION = "0.
|
|
285
|
+
declare const SERVER_VERSION = "0.11.0";
|
|
289
286
|
/**
|
|
290
287
|
* Registers the skill_* tools on a server.
|
|
291
288
|
*
|
|
@@ -294,6 +291,7 @@ declare const SERVER_VERSION = "0.9.2";
|
|
|
294
291
|
*/
|
|
295
292
|
declare function registerSkillTools(server: McpServer, tools: SkillTools): McpServer;
|
|
296
293
|
interface SkillMcpOptions extends SkillServerOptions {
|
|
294
|
+
readonly mailbox?: MailboxService;
|
|
297
295
|
/** One prompt per skill, for hosts that offer prompts as commands. Off by default. */
|
|
298
296
|
readonly prompts?: boolean;
|
|
299
297
|
readonly skillsExtension?: SkillsExtensionOptions;
|
|
@@ -337,4 +335,4 @@ declare function registerSkillResources(server: McpServer, skills: () => readonl
|
|
|
337
335
|
declare const promptName: (entry: Pick<SkillEntry, "name">) => string;
|
|
338
336
|
declare function registerSkillPrompts(server: McpServer, tools: SkillTools): void;
|
|
339
337
|
|
|
340
|
-
export {
|
|
338
|
+
export { CatalogOptions, DEFAULT_INTENT_CACHE_LIMIT, Embedder, type Finding$1 as Finding, IntentCache, type IntentCacheOptions, LOCK_FILE, LoadEmbedderOptions, type McpServerSpec, MetadataValue, type Output, type PackageRulesSpec, type PreparedSearch, ProjectConfig, ProjectError, type ProjectResult, type ProjectSpec, Ranking, type Rejection, type Runner, SERVER_NAME, SERVER_VERSION, SKILLS_EXTENSION, type SearchOptions, SkillEntry, type SkillExtensionEntry, type SkillMcpOptions, type SkillResource, SkillServerOptions, SkillTools, TOOLS, type Tool, type Finding as ValidationFinding, assetRoot, createSkillServer, deadGlobs, deriveName, doctor, extensionEntry, openIntentCache, plan, prepareSearch, project, promptName, readFrontmatterText, readMarketplace, readMetadata, readSpec, registerSkillPrompts, registerSkillResources, registerSkillTools, registerSkillsExtension, resolveSkillFileUri, skillFileUri, skillFileUri as skillUri, validateCatalog, validateSkillDir };
|