@modootoday/pmcp 0.7.0 → 0.8.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.
@@ -0,0 +1,352 @@
1
+ import { S as SkillEntry, C as CatalogOptions, A as AssetKind } from './catalog-CS0j6-0U.js';
2
+ import { z } from 'zod';
3
+
4
+ /**
5
+ * The intent key and the cache contract.
6
+ *
7
+ * Separate from the sqlite implementation so that ranking, which needs the key
8
+ * and the interface, does not pull a bun-only module into a consumer running
9
+ * under node. Only `cache.ts` requires bun.
10
+ */
11
+ interface IntentCacheStats {
12
+ readonly hits: number;
13
+ readonly misses: number;
14
+ /** Rows found for the key but written by a different model. */
15
+ readonly mismatched: number;
16
+ readonly rows: number;
17
+ /** Which sqlite builtin answered, or absent when there is no cache. */
18
+ readonly provider?: string;
19
+ }
20
+ interface IntentCache {
21
+ /** The cached vector for an intent, or null when nothing usable is stored. */
22
+ get(intent: string): Float32Array | null;
23
+ put(intent: string, vector: Float32Array): void;
24
+ stats(): IntentCacheStats;
25
+ close(): void;
26
+ }
27
+ /**
28
+ * Same question, differently typed. Case, punctuation and spacing only — the
29
+ * key has to survive a caller writing "How do I wire X?" and "how do i wire x".
30
+ */
31
+ declare function normaliseIntent(intent: string): string;
32
+
33
+ /**
34
+ * Ranking an intent against skill descriptions.
35
+ *
36
+ * Semantic when an embedder is supplied, lexical otherwise, and the answer says
37
+ * which. A caller that cannot tell the two apart cannot tell a degraded server
38
+ * from a working one.
39
+ */
40
+
41
+ type Ranking = "semantic" | "lexical";
42
+ interface Match {
43
+ readonly name: string;
44
+ readonly package: string;
45
+ readonly description: string;
46
+ readonly score: number;
47
+ }
48
+ interface FindResult {
49
+ readonly ranking: Ranking;
50
+ readonly matches: readonly Match[];
51
+ }
52
+ /**
53
+ * The encoder, supplied by the caller. There is no default and no bundled
54
+ * model: which model runs decides what the scores mean, so it is the consuming
55
+ * repository's declaration rather than this package's.
56
+ */
57
+ interface Embedder {
58
+ readonly modelId: string;
59
+ readonly dims: number;
60
+ /** Encodes an intent, the query side. */
61
+ embed(text: string): Promise<Float32Array>;
62
+ /** Encodes a description, for models that write the two sides differently. */
63
+ embedPassage?(text: string): Promise<Float32Array>;
64
+ }
65
+ interface FindOptions {
66
+ readonly entries: readonly SkillEntry[];
67
+ readonly intent: string;
68
+ readonly limit?: number;
69
+ readonly embedder?: Embedder;
70
+ readonly cache?: IntentCache;
71
+ /** Precomputed description vectors, keyed by skill name. */
72
+ readonly vectors?: ReadonlyMap<string, Float32Array>;
73
+ }
74
+ declare const DEFAULT_FIND_LIMIT = 5;
75
+ /**
76
+ * Token overlap and bigram Dice, averaged. Deterministic and dependency-free:
77
+ * this is the answer when there is no model, so it must never be the thing
78
+ * that fails.
79
+ */
80
+ declare function lexicalScore(intent: string, description: string): number;
81
+ /** Cosine over two equal-width vectors. Zero when either has no magnitude. */
82
+ declare function cosine(a: Float32Array, b: Float32Array): number;
83
+ /**
84
+ * Ranked matches, and which ranking produced them.
85
+ *
86
+ * Returns rather than loads: a search verb that also acts cannot be used to
87
+ * look, and the whole reason this server exists is that looking should be
88
+ * cheap.
89
+ */
90
+ declare function find(options: FindOptions): Promise<FindResult>;
91
+
92
+ /** The files one skill carries, with sizes and digests. */
93
+ interface SkillFile {
94
+ /** Relative to the skill directory, with forward slashes. */
95
+ readonly path: string;
96
+ readonly bytes: number;
97
+ readonly sha256: string;
98
+ }
99
+ interface SkillFileListing {
100
+ readonly files: readonly SkillFile[];
101
+ readonly truncated: boolean;
102
+ }
103
+ /**
104
+ * Every file under a skill root, or the root itself when the asset is one file.
105
+ * node_modules and .git are never part of a skill.
106
+ */
107
+ declare function listSkillFiles(root: string, limit?: number): SkillFileListing;
108
+
109
+ /**
110
+ * Every file of one skill as fetchable links, so a host can write the skill to a
111
+ * local skills directory without routing its bytes through the model.
112
+ */
113
+
114
+ interface BundleFile extends SkillFile {
115
+ readonly uri: string;
116
+ readonly mimeType: string;
117
+ }
118
+ interface SkillBundle {
119
+ readonly name: string;
120
+ readonly files: readonly BundleFile[];
121
+ readonly truncated: boolean;
122
+ }
123
+ declare function bundleSkill(entry: SkillEntry): SkillBundle;
124
+
125
+ /**
126
+ * One MIME table for every surface that hands out skill files, so a file is text,
127
+ * image, audio or blob the same way through skill_read and through resources/read.
128
+ */
129
+ /** The declared type of a path by extension, or null when the extension is unknown. */
130
+ declare function mimeOf(path: string): string | null;
131
+ /** True when the bytes decode as UTF-8 and encode back to themselves, without NUL. */
132
+ declare function isUtf8Text(bytes: Uint8Array): boolean;
133
+ type FileKind = "text" | "image" | "audio" | "blob";
134
+ interface Classified {
135
+ readonly kind: FileKind;
136
+ readonly mimeType: string;
137
+ }
138
+ /**
139
+ * How a file goes out. A type that names text is still served as a blob when the
140
+ * bytes are not valid UTF-8, so a digest over them stays exact.
141
+ */
142
+ declare function classify(path: string, bytes: Uint8Array): Classified;
143
+
144
+ /**
145
+ * Turns a path a caller asked for into a file inside one skill. A path that
146
+ * leaves the skill, directly or through a link, is refused.
147
+ */
148
+
149
+ type FileRefusal = {
150
+ readonly ok: false;
151
+ readonly error: "path_outside_skill" | "no_such_file";
152
+ readonly detail: string;
153
+ };
154
+
155
+ /**
156
+ * One skill file's bytes, typed. Text stays text; images, audio and other binary
157
+ * go out as base64 so nothing is corrupted on the way. Nothing is ever executed.
158
+ */
159
+
160
+ /** Largest file returned whole. A skill needing more should split it. */
161
+ declare const READ_BUDGET_BYTES: number;
162
+ interface SkillFileContent {
163
+ readonly ok: true;
164
+ readonly name: string;
165
+ readonly path: string;
166
+ readonly bytes: number;
167
+ readonly sha256: string;
168
+ readonly mimeType: string;
169
+ readonly kind: FileKind;
170
+ /** Set when kind is text. */
171
+ readonly text?: string;
172
+ /** Base64, set when kind is not text. */
173
+ readonly blob?: string;
174
+ }
175
+ type ReadResult = SkillFileContent | FileRefusal | {
176
+ readonly ok: false;
177
+ readonly error: "over_budget";
178
+ readonly detail: string;
179
+ };
180
+ declare function readSkillFile(entry: SkillEntry, wanted?: string, budget?: number): ReadResult;
181
+
182
+ /**
183
+ * The shapes the tools answer with, defined once: the TypeScript types are
184
+ * inferred from these schemas and the same schemas are each tool's outputSchema,
185
+ * so structuredContent cannot drift from what a client validates it against.
186
+ */
187
+
188
+ declare const catalogItemSchema: z.ZodObject<{
189
+ name: z.ZodString;
190
+ description: z.ZodString;
191
+ tier: z.ZodOptional<z.ZodString>;
192
+ kind: z.ZodOptional<z.ZodEnum<{
193
+ agent: "agent";
194
+ skill: "skill";
195
+ hook: "hook";
196
+ mcp: "mcp";
197
+ }>>;
198
+ }, z.core.$strip>;
199
+ declare const catalogResponseSchema: z.ZodObject<{
200
+ count: z.ZodNumber;
201
+ page: z.ZodNumber;
202
+ totalPages: z.ZodNumber;
203
+ hasNext: z.ZodBoolean;
204
+ packages: z.ZodArray<z.ZodObject<{
205
+ package: z.ZodString;
206
+ skills: z.ZodArray<z.ZodObject<{
207
+ name: z.ZodString;
208
+ description: z.ZodString;
209
+ tier: z.ZodOptional<z.ZodString>;
210
+ kind: z.ZodOptional<z.ZodEnum<{
211
+ agent: "agent";
212
+ skill: "skill";
213
+ hook: "hook";
214
+ mcp: "mcp";
215
+ }>>;
216
+ }, z.core.$strip>>;
217
+ }, z.core.$strip>>;
218
+ }, z.core.$strip>;
219
+ declare const findResultSchema: z.ZodObject<{
220
+ ranking: z.ZodEnum<{
221
+ semantic: "semantic";
222
+ lexical: "lexical";
223
+ }>;
224
+ matches: z.ZodArray<z.ZodObject<{
225
+ name: z.ZodString;
226
+ package: z.ZodString;
227
+ description: z.ZodString;
228
+ score: z.ZodNumber;
229
+ }, z.core.$strip>>;
230
+ }, z.core.$strip>;
231
+ declare const describeResponseSchema: z.ZodObject<{
232
+ name: z.ZodString;
233
+ kind: z.ZodEnum<{
234
+ agent: "agent";
235
+ skill: "skill";
236
+ hook: "hook";
237
+ mcp: "mcp";
238
+ }>;
239
+ package: z.ZodString;
240
+ description: z.ZodString;
241
+ tier: z.ZodOptional<z.ZodString>;
242
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString>>]>>;
243
+ frontmatter: z.ZodString;
244
+ files: z.ZodArray<z.ZodObject<{
245
+ path: z.ZodString;
246
+ bytes: z.ZodNumber;
247
+ sha256: z.ZodString;
248
+ }, z.core.$strip>>;
249
+ filesTruncated: z.ZodBoolean;
250
+ }, z.core.$strip>;
251
+ declare const bundleResponseSchema: z.ZodObject<{
252
+ name: z.ZodString;
253
+ truncated: z.ZodBoolean;
254
+ files: z.ZodArray<z.ZodObject<{
255
+ path: z.ZodString;
256
+ bytes: z.ZodNumber;
257
+ sha256: z.ZodString;
258
+ uri: z.ZodString;
259
+ mimeType: z.ZodString;
260
+ }, z.core.$strip>>;
261
+ }, z.core.$strip>;
262
+ type CatalogItem = z.infer<typeof catalogItemSchema>;
263
+ type CatalogResponse = z.infer<typeof catalogResponseSchema>;
264
+ type DescribeResponse = z.infer<typeof describeResponseSchema>;
265
+
266
+ /**
267
+ * The catalog operations the tools speak, as plain functions.
268
+ *
269
+ * The point of the server is that a session's startup cost does not grow with
270
+ * the number of skills installed: the host lists a fixed set of tools whatever
271
+ * the catalog holds, and a body is read only when one is asked for.
272
+ */
273
+
274
+ /** How many files skill_describe lists before saying the rest were cut. */
275
+ declare const DESCRIBE_FILE_LIMIT = 200;
276
+ declare const CATALOG_PAGE_SIZE = 8;
277
+ declare const CATALOG_PAGE_MAX = 20;
278
+ /** A kind filter value: one kind, or every kind. */
279
+ type KindFilter = AssetKind | "any";
280
+ /**
281
+ * Equality filters over catalog fields. Unset keys match everything except
282
+ * kind, which defaults to skill so a search for a skill never returns a hook.
283
+ */
284
+ interface SkillFilters {
285
+ readonly kind?: KindFilter;
286
+ readonly tier?: string;
287
+ readonly package?: string;
288
+ readonly level?: string;
289
+ readonly domain?: string;
290
+ readonly medium?: string;
291
+ }
292
+ interface SkillServerOptions extends CatalogOptions {
293
+ readonly embedder?: Embedder;
294
+ readonly cache?: IntentCache;
295
+ readonly vectors?: ReadonlyMap<string, Float32Array>;
296
+ /** Injected for tests. Reads the catalog off disk otherwise. */
297
+ readonly loadCatalog?: (options: CatalogOptions) => SkillEntry[];
298
+ }
299
+
300
+ interface CallResponse {
301
+ readonly name: string;
302
+ readonly body: string;
303
+ /** Files the skill carries besides its body, for skill_read and resources/read. */
304
+ readonly files: readonly BundleFile[];
305
+ readonly filesTruncated: boolean;
306
+ }
307
+ /**
308
+ * The catalog, the search and the read, as plain functions.
309
+ *
310
+ * Separate from the MCP wiring so they can be exercised without a transport,
311
+ * and so a consumer that wants them from a hook or a script is not made to
312
+ * speak a protocol to get them.
313
+ */
314
+ declare function createSkillTools(options: SkillServerOptions): {
315
+ /**
316
+ * Grouped, and without bodies. The cheap overview and the search's miss
317
+ * path. Paged by package so a large catalog never arrives in one answer.
318
+ */
319
+ catalog(request?: {
320
+ page?: number;
321
+ pageSize?: number;
322
+ tier?: string;
323
+ kind?: KindFilter;
324
+ }): CatalogResponse;
325
+ /** Ranked names. Returns; never loads a body. */
326
+ find(intent: string, limit?: number, filters?: SkillFilters): Promise<FindResult>;
327
+ /** Every property of one skill and the files it carries, without bodies. */
328
+ describe(name: string): DescribeResponse | null;
329
+ /**
330
+ * One file inside a skill's directory. Paths that leave the directory,
331
+ * directly or through a link, are refused; nothing is ever executed.
332
+ */
333
+ read(name: string, path?: string): ReadResult | {
334
+ ok: false;
335
+ error: "unknown_skill";
336
+ detail: string;
337
+ };
338
+ /** Every file of one skill as links; the bytes stay out of the answer. */
339
+ bundle(name: string): SkillBundle | null;
340
+ /** One body, at the moment it is needed, and the other files it carries. */
341
+ call(name: string): CallResponse | null;
342
+ /** The catalog entry for a name, among those this caller may see. */
343
+ entry: (name: string) => SkillEntry | null;
344
+ /** Drops the memoised catalog, so the next call re-reads the tree. */
345
+ refresh(): void;
346
+ entries: () => Omit<SkillEntry, "path">[];
347
+ /** The catalog with paths, for the Skills extension. The same array until refresh. */
348
+ skills: () => readonly SkillEntry[];
349
+ };
350
+ type SkillTools = ReturnType<typeof createSkillTools>;
351
+
352
+ export { isUtf8Text as A, type BundleFile as B, CATALOG_PAGE_MAX as C, DEFAULT_FIND_LIMIT as D, type Embedder as E, type FileKind as F, lexicalScore as G, listSkillFiles as H, type IntentCache as I, mimeOf as J, type KindFilter as K, normaliseIntent as L, type Match as M, readSkillFile as N, READ_BUDGET_BYTES as R, type SkillServerOptions as S, type SkillTools as a, CATALOG_PAGE_SIZE as b, type CallResponse as c, type CatalogItem as d, type CatalogResponse as e, type Classified as f, DESCRIBE_FILE_LIMIT as g, type FindOptions as h, type FindResult as i, type IntentCacheStats as j, type Ranking as k, type ReadResult as l, type SkillBundle as m, type SkillFile as n, type SkillFileContent as o, type SkillFileListing as p, type SkillFilters as q, bundleResponseSchema as r, bundleSkill as s, catalogResponseSchema as t, classify as u, cosine as v, createSkillTools as w, describeResponseSchema as x, find as y, findResultSchema as z };
package/dist/stdio.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as CatalogOptions } from './catalog-5v7jrGwP.js';
2
+ import { C as CatalogOptions } from './catalog-CS0j6-0U.js';
3
3
 
4
4
  /**
5
5
  * The stdio entry a host launches.
@@ -11,7 +11,11 @@ import { C as CatalogOptions } from './catalog-5v7jrGwP.js';
11
11
 
12
12
  /** `node_modules` roots to walk, from argv or from the working directory. */
13
13
  declare function resolveRoots(argv: readonly string[], cwd: string): string[];
14
- declare function serve(catalog: CatalogOptions): void;
14
+ interface ServeOptions {
15
+ /** One prompt per skill, for hosts that offer prompts as commands. */
16
+ readonly prompts?: boolean;
17
+ }
18
+ declare function serve(catalog: CatalogOptions, serving?: ServeOptions): void;
15
19
  declare function main(argv?: readonly string[]): void;
16
20
 
17
- export { main, resolveRoots, serve };
21
+ export { type ServeOptions, main, resolveRoots, serve };
package/dist/stdio.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  main,
4
4
  resolveRoots,
5
5
  serve
6
- } from "./chunk-POJOFL4L.js";
7
- import "./chunk-QHFORYIN.js";
6
+ } from "./chunk-LUBYOET7.js";
7
+ import "./chunk-ZDV75HZN.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.7.0",
3
+ "version": "0.8.0",
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.",
@@ -1,210 +0,0 @@
1
- import { S as SkillEntry, C as CatalogOptions, A as AssetKind } from './catalog-5v7jrGwP.js';
2
-
3
- /**
4
- * The intent key and the cache contract.
5
- *
6
- * Separate from the sqlite implementation so that ranking, which needs the key
7
- * and the interface, does not pull a bun-only module into a consumer running
8
- * under node. Only `cache.ts` requires bun.
9
- */
10
- interface IntentCacheStats {
11
- readonly hits: number;
12
- readonly misses: number;
13
- /** Rows found for the key but written by a different model. */
14
- readonly mismatched: number;
15
- readonly rows: number;
16
- /** Which sqlite builtin answered, or absent when there is no cache. */
17
- readonly provider?: string;
18
- }
19
- interface IntentCache {
20
- /** The cached vector for an intent, or null when nothing usable is stored. */
21
- get(intent: string): Float32Array | null;
22
- put(intent: string, vector: Float32Array): void;
23
- stats(): IntentCacheStats;
24
- close(): void;
25
- }
26
- /**
27
- * Same question, differently typed. Case, punctuation and spacing only — the
28
- * key has to survive a caller writing "How do I wire X?" and "how do i wire x".
29
- */
30
- declare function normaliseIntent(intent: string): string;
31
-
32
- /**
33
- * Ranking an intent against skill descriptions.
34
- *
35
- * Semantic when an embedder is supplied, lexical otherwise, and the answer says
36
- * which. A caller that cannot tell the two apart cannot tell a degraded server
37
- * from a working one.
38
- */
39
-
40
- type Ranking = "semantic" | "lexical";
41
- interface Match {
42
- readonly name: string;
43
- readonly package: string;
44
- readonly description: string;
45
- readonly score: number;
46
- }
47
- interface FindResult {
48
- readonly ranking: Ranking;
49
- readonly matches: readonly Match[];
50
- }
51
- /**
52
- * The encoder, supplied by the caller. There is no default and no bundled
53
- * model: which model runs decides what the scores mean, so it is the consuming
54
- * repository's declaration rather than this package's.
55
- */
56
- interface Embedder {
57
- readonly modelId: string;
58
- readonly dims: number;
59
- /** Encodes an intent, the query side. */
60
- embed(text: string): Promise<Float32Array>;
61
- /** Encodes a description, for models that write the two sides differently. */
62
- embedPassage?(text: string): Promise<Float32Array>;
63
- }
64
- interface FindOptions {
65
- readonly entries: readonly SkillEntry[];
66
- readonly intent: string;
67
- readonly limit?: number;
68
- readonly embedder?: Embedder;
69
- readonly cache?: IntentCache;
70
- /** Precomputed description vectors, keyed by skill name. */
71
- readonly vectors?: ReadonlyMap<string, Float32Array>;
72
- }
73
- declare const DEFAULT_FIND_LIMIT = 5;
74
- /**
75
- * Token overlap and bigram Dice, averaged. Deterministic and dependency-free:
76
- * this is the answer when there is no model, so it must never be the thing
77
- * that fails.
78
- */
79
- declare function lexicalScore(intent: string, description: string): number;
80
- /** Cosine over two equal-width vectors. Zero when either has no magnitude. */
81
- declare function cosine(a: Float32Array, b: Float32Array): number;
82
- /**
83
- * Ranked matches, and which ranking produced them.
84
- *
85
- * Returns rather than loads: a search verb that also acts cannot be used to
86
- * look, and the whole reason this server exists is that looking should be
87
- * cheap.
88
- */
89
- declare function find(options: FindOptions): Promise<FindResult>;
90
-
91
- /**
92
- * The five tools, and nothing else.
93
- *
94
- * The point of the server is that a session's startup cost does not grow with
95
- * the number of skills installed: the host lists five tools whatever the
96
- * catalog holds, and a body is read only when one is asked for.
97
- */
98
-
99
- /** Largest file skill_read returns. A skill needing more should split it. */
100
- declare const READ_BUDGET_BYTES: number;
101
- /** How many files skill_describe lists before saying the rest were cut. */
102
- declare const DESCRIBE_FILE_LIMIT = 200;
103
- declare const CATALOG_PAGE_SIZE = 8;
104
- declare const CATALOG_PAGE_MAX = 20;
105
- /** A kind filter value: one kind, or every kind. */
106
- type KindFilter = AssetKind | "any";
107
- /**
108
- * Equality filters over catalog fields. Unset keys match everything except
109
- * kind, which defaults to skill so a search for a skill never returns a hook.
110
- */
111
- interface SkillFilters {
112
- readonly kind?: KindFilter;
113
- readonly tier?: string;
114
- readonly package?: string;
115
- readonly level?: string;
116
- readonly domain?: string;
117
- readonly medium?: string;
118
- }
119
- type ReadResult = {
120
- readonly ok: true;
121
- readonly name: string;
122
- readonly path: string;
123
- readonly bytes: number;
124
- readonly sha256: string;
125
- readonly text: string;
126
- } | {
127
- readonly ok: false;
128
- readonly error: string;
129
- readonly detail: string;
130
- };
131
- interface SkillServerOptions extends CatalogOptions {
132
- readonly embedder?: Embedder;
133
- readonly cache?: IntentCache;
134
- readonly vectors?: ReadonlyMap<string, Float32Array>;
135
- /** Injected for tests. Reads the catalog off disk otherwise. */
136
- readonly loadCatalog?: (options: CatalogOptions) => SkillEntry[];
137
- }
138
- interface CatalogResponse {
139
- readonly count: number;
140
- readonly page: number;
141
- readonly totalPages: number;
142
- readonly hasNext: boolean;
143
- readonly packages: readonly {
144
- readonly package: string;
145
- readonly skills: readonly CatalogItem[];
146
- }[];
147
- }
148
- /** One catalog line. `kind` appears only for an asset that is not a skill. */
149
- interface CatalogItem {
150
- readonly name: string;
151
- readonly description: string;
152
- readonly tier?: string;
153
- readonly kind?: AssetKind;
154
- }
155
- interface CallResponse {
156
- readonly name: string;
157
- readonly body: string;
158
- }
159
- /**
160
- * The catalog, the search and the read, as plain functions.
161
- *
162
- * Separate from the MCP wiring so they can be exercised without a transport,
163
- * and so a consumer that wants them from a hook or a script is not made to
164
- * speak a protocol to get them.
165
- */
166
- declare function createSkillTools(options: SkillServerOptions): {
167
- /**
168
- * Grouped, and without bodies. The cheap overview and the search's miss
169
- * path. Paged by package so a large catalog never arrives in one answer.
170
- */
171
- catalog(request?: {
172
- page?: number;
173
- pageSize?: number;
174
- tier?: string;
175
- kind?: KindFilter;
176
- }): CatalogResponse;
177
- /** Ranked names. Returns; never loads a body. */
178
- find(intent: string, limit?: number, filters?: SkillFilters): Promise<FindResult>;
179
- /** Every property of one skill and the files it carries, without bodies. */
180
- describe(name: string): {
181
- name: string;
182
- kind: "agent" | "skill" | "hook" | "mcp";
183
- package: string;
184
- description: string;
185
- tier: string | undefined;
186
- metadata: Readonly<Record<string, string | readonly string[]>>;
187
- frontmatter: string;
188
- files: {
189
- path: string;
190
- bytes: number;
191
- sha256: string;
192
- }[];
193
- filesTruncated: boolean;
194
- } | null;
195
- /**
196
- * One file inside a skill's directory. Paths that leave the directory,
197
- * directly or through a link, are refused; nothing is ever executed.
198
- */
199
- read(name: string, path?: string): ReadResult;
200
- /** One body, at the moment it is needed. */
201
- call(name: string): CallResponse | null;
202
- /** Drops the memoised catalog, so the next call re-reads the tree. */
203
- refresh(): void;
204
- entries: () => Omit<SkillEntry, "path">[];
205
- /** The catalog with paths, for the Skills extension. The same array until refresh. */
206
- skills: () => readonly SkillEntry[];
207
- };
208
- type SkillTools = ReturnType<typeof createSkillTools>;
209
-
210
- export { CATALOG_PAGE_MAX as C, DEFAULT_FIND_LIMIT as D, type Embedder as E, type FindOptions as F, type IntentCache as I, type KindFilter as K, type Match as M, READ_BUDGET_BYTES as R, type SkillServerOptions as S, type SkillTools as a, CATALOG_PAGE_SIZE as b, type CallResponse as c, type CatalogItem as d, type CatalogResponse as e, DESCRIBE_FILE_LIMIT as f, type FindResult as g, type IntentCacheStats as h, type Ranking as i, type ReadResult as j, type SkillFilters as k, cosine as l, createSkillTools as m, find as n, lexicalScore as o, normaliseIntent as p };