@webpieces/api-doc-model 0.4.806 → 0.4.807
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 +6 -3
- package/package.json +2 -2
- package/src/extract/ApiDocExtractor.d.ts +6 -4
- package/src/extract/ApiDocExtractor.js +8 -6
- package/src/extract/ApiDocExtractor.js.map +1 -1
- package/src/extract/JsDoc.d.ts +3 -3
- package/src/extract/JsDoc.js +3 -3
- package/src/extract/JsDoc.js.map +1 -1
- package/src/index.d.ts +1 -2
- package/src/index.js +3 -3
- package/src/index.js.map +1 -1
- package/src/model/ApiDocModel.d.ts +14 -16
- package/src/model/ApiDocModel.js +12 -13
- package/src/model/ApiDocModel.js.map +1 -1
- package/src/render/McpSchemaRenderer.d.ts +80 -36
- package/src/render/McpSchemaRenderer.js +121 -36
- package/src/render/McpSchemaRenderer.js.map +1 -1
- package/src/render/McpToolDefinition.d.ts +0 -44
- package/src/render/McpToolDefinition.js +0 -44
- package/src/render/McpToolDefinition.js.map +0 -1
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.McpToolDefinition = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* ONE MCP tool, as `tools/list` publishes it, rendered from the `ApiDocModel`.
|
|
6
|
-
*
|
|
7
|
-
* Every field here has a RUNTIME counterpart on `RegisteredMcpTool` in `@webpieces/mcp-server`, and
|
|
8
|
-
* the equivalence gate (#983) asserts the two are equal field by field. That is the whole reason this
|
|
9
|
-
* class mirrors that one's shape rather than inventing a tidier one: a difference in SHAPE would hide
|
|
10
|
-
* a difference in CONTENT, and the content is the thing being measured.
|
|
11
|
-
*/
|
|
12
|
-
class McpToolDefinition {
|
|
13
|
-
name;
|
|
14
|
-
methodName;
|
|
15
|
-
description;
|
|
16
|
-
hints;
|
|
17
|
-
inputSchema;
|
|
18
|
-
outputSchema;
|
|
19
|
-
constructor(
|
|
20
|
-
/** The stable protocol name from `@WpMcpTool({name})`. */
|
|
21
|
-
name,
|
|
22
|
-
/** The contract method it was rendered from, so a mismatch report can name the source. */
|
|
23
|
-
methodName,
|
|
24
|
-
/**
|
|
25
|
-
* The tool documentation: the method's `@mcp` tag when it has one, its JSDoc body otherwise.
|
|
26
|
-
* NOT `@WpMcpTool({description})` — documentation has ONE source, and the decorator's copy is
|
|
27
|
-
* what #984 deletes.
|
|
28
|
-
*/
|
|
29
|
-
description,
|
|
30
|
-
/**
|
|
31
|
-
* All four hints. Three are COMPUTED from `operation` by `mcpHintsForOperation`, which is the
|
|
32
|
-
* one place that mapping lives; `openWorldHint` comes from `@Endpoint`'s `openWorld` option.
|
|
33
|
-
*/
|
|
34
|
-
hints, inputSchema, outputSchema) {
|
|
35
|
-
this.name = name;
|
|
36
|
-
this.methodName = methodName;
|
|
37
|
-
this.description = description;
|
|
38
|
-
this.hints = hints;
|
|
39
|
-
this.inputSchema = inputSchema;
|
|
40
|
-
this.outputSchema = outputSchema;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.McpToolDefinition = McpToolDefinition;
|
|
44
|
-
//# sourceMappingURL=McpToolDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"McpToolDefinition.js","sourceRoot":"","sources":["../../../../../../packages/docs/api-doc-model/src/render/McpToolDefinition.ts"],"names":[],"mappings":";;;AAEA;;;;;;;GAOG;AACH,MAAa,iBAAiB;IAGb;IAEA;IAMA;IAKA;IACA;IACA;IAjBb;IACI,0DAA0D;IACjD,IAAY;IACrB,0FAA0F;IACjF,UAAkB;IAC3B;;;;OAIG;IACM,WAAmB;IAC5B;;;OAGG;IACM,KAAqB,EACrB,WAA0B,EAC1B,YAA2B;QAf3B,SAAI,GAAJ,IAAI,CAAQ;QAEZ,eAAU,GAAV,UAAU,CAAQ;QAMlB,gBAAW,GAAX,WAAW,CAAQ;QAKnB,UAAK,GAAL,KAAK,CAAgB;QACrB,gBAAW,GAAX,WAAW,CAAe;QAC1B,iBAAY,GAAZ,YAAY,CAAe;IACrC,CAAC;CACP;AApBD,8CAoBC","sourcesContent":["import { ApiJsonSchema, WpMcpToolHints } from '@webpieces/core-util';\n\n/**\n * ONE MCP tool, as `tools/list` publishes it, rendered from the `ApiDocModel`.\n *\n * Every field here has a RUNTIME counterpart on `RegisteredMcpTool` in `@webpieces/mcp-server`, and\n * the equivalence gate (#983) asserts the two are equal field by field. That is the whole reason this\n * class mirrors that one's shape rather than inventing a tidier one: a difference in SHAPE would hide\n * a difference in CONTENT, and the content is the thing being measured.\n */\nexport class McpToolDefinition {\n constructor(\n /** The stable protocol name from `@WpMcpTool({name})`. */\n readonly name: string,\n /** The contract method it was rendered from, so a mismatch report can name the source. */\n readonly methodName: string,\n /**\n * The tool documentation: the method's `@mcp` tag when it has one, its JSDoc body otherwise.\n * NOT `@WpMcpTool({description})` — documentation has ONE source, and the decorator's copy is\n * what #984 deletes.\n */\n readonly description: string,\n /**\n * All four hints. Three are COMPUTED from `operation` by `mcpHintsForOperation`, which is the\n * one place that mapping lives; `openWorldHint` comes from `@Endpoint`'s `openWorld` option.\n */\n readonly hints: WpMcpToolHints,\n readonly inputSchema: ApiJsonSchema,\n readonly outputSchema: ApiJsonSchema,\n ) {}\n}\n"]}
|