@kubb/plugin-mcp 5.0.0-alpha.3 → 5.0.0-alpha.4
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/dist/generators.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { n as PluginMcp } from "./types-
|
|
3
|
-
import {
|
|
2
|
+
import { n as PluginMcp } from "./types-DXZDZ3vf.js";
|
|
3
|
+
import { AsyncEventEmitter, Config, FileMetaBase, Generator, Group, KubbEvents, Output, Plugin, PluginFactoryOptions, PluginManager, ResolveNameParams } from "@kubb/core";
|
|
4
4
|
import { Fabric } from "@kubb/react-fabric";
|
|
5
5
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
6
6
|
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
7
|
-
import { OperationNode, SchemaNode } from "@kubb/ast/types";
|
|
8
7
|
import { HttpMethod, Oas, Operation, SchemaObject, contentType } from "@kubb/oas";
|
|
9
8
|
|
|
10
9
|
//#region ../plugin-oas/src/types.d.ts
|
|
@@ -93,8 +92,8 @@ type ByContentType = {
|
|
|
93
92
|
type: 'contentType';
|
|
94
93
|
pattern: string | RegExp;
|
|
95
94
|
};
|
|
96
|
-
type Exclude = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
97
|
-
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
95
|
+
type Exclude = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
96
|
+
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
98
97
|
type Override<TOptions> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
99
98
|
options: Partial<TOptions>;
|
|
100
99
|
};
|
|
@@ -133,7 +132,7 @@ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = P
|
|
|
133
132
|
method: HttpMethod;
|
|
134
133
|
operation: Operation;
|
|
135
134
|
}>>;
|
|
136
|
-
build(...generators: Array<Generator<TPluginOptions
|
|
135
|
+
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
137
136
|
}
|
|
138
137
|
//#endregion
|
|
139
138
|
//#region ../plugin-oas/src/SchemaMapper.d.ts
|
|
@@ -423,48 +422,33 @@ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGe
|
|
|
423
422
|
static deepSearch<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): Array<SchemaKeywordMapper[T]>;
|
|
424
423
|
static find<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
|
|
425
424
|
static combineObjects(tree: Schema[] | undefined): Schema[];
|
|
426
|
-
build(...generators: Array<Generator<TPluginOptions
|
|
425
|
+
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
427
426
|
}
|
|
428
427
|
//#endregion
|
|
429
428
|
//#region ../plugin-oas/src/generators/createGenerator.d.ts
|
|
430
|
-
type CoreGenerator<TOptions extends PluginFactoryOptions
|
|
429
|
+
type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
431
430
|
name: string;
|
|
432
431
|
type: 'core';
|
|
433
|
-
version:
|
|
434
|
-
operations: (props: OperationsProps<TOptions
|
|
435
|
-
operation: (props: OperationProps<TOptions
|
|
436
|
-
schema: (props: SchemaProps<TOptions
|
|
432
|
+
version: '1';
|
|
433
|
+
operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
434
|
+
operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
435
|
+
schema: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
437
436
|
};
|
|
438
437
|
//#endregion
|
|
439
438
|
//#region ../plugin-oas/src/generators/types.d.ts
|
|
440
|
-
type
|
|
441
|
-
type OperationsV1Props<TOptions extends PluginFactoryOptions> = {
|
|
439
|
+
type OperationsProps<TOptions extends PluginFactoryOptions> = {
|
|
442
440
|
config: Config;
|
|
443
441
|
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
444
442
|
plugin: Plugin<TOptions>;
|
|
445
443
|
operations: Array<Operation>;
|
|
446
444
|
};
|
|
447
|
-
type
|
|
448
|
-
config: Config;
|
|
449
|
-
adapter: Adapter;
|
|
450
|
-
options: Plugin<TOptions>['options'];
|
|
451
|
-
nodes: Array<OperationNode>;
|
|
452
|
-
};
|
|
453
|
-
type OperationV1Props<TOptions extends PluginFactoryOptions> = {
|
|
445
|
+
type OperationProps<TOptions extends PluginFactoryOptions> = {
|
|
454
446
|
config: Config;
|
|
455
447
|
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
456
448
|
plugin: Plugin<TOptions>;
|
|
457
449
|
operation: Operation;
|
|
458
450
|
};
|
|
459
|
-
type
|
|
460
|
-
config: Config;
|
|
461
|
-
adapter: Adapter;
|
|
462
|
-
options: Plugin<TOptions>['options'];
|
|
463
|
-
node: OperationNode;
|
|
464
|
-
};
|
|
465
|
-
type OperationsProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? OperationsV2Props<TOptions> : OperationsV1Props<TOptions>;
|
|
466
|
-
type OperationProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? OperationV2Props<TOptions> : OperationV1Props<TOptions>;
|
|
467
|
-
type SchemaV1Props<TOptions extends PluginFactoryOptions> = {
|
|
451
|
+
type SchemaProps<TOptions extends PluginFactoryOptions> = {
|
|
468
452
|
config: Config;
|
|
469
453
|
generator: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
|
|
470
454
|
plugin: Plugin<TOptions>;
|
|
@@ -474,30 +458,23 @@ type SchemaV1Props<TOptions extends PluginFactoryOptions> = {
|
|
|
474
458
|
value: SchemaObject;
|
|
475
459
|
};
|
|
476
460
|
};
|
|
477
|
-
type
|
|
478
|
-
config: Config;
|
|
479
|
-
options: Plugin<TOptions>['options'];
|
|
480
|
-
node: SchemaNode;
|
|
481
|
-
adapter: Adapter;
|
|
482
|
-
};
|
|
483
|
-
type SchemaProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? SchemaV2Props<TOptions> : SchemaV1Props<TOptions>;
|
|
484
|
-
type Generator<TOptions extends PluginFactoryOptions, TVersion extends Version = Version> = CoreGenerator<TOptions, TVersion> | ReactGenerator<TOptions, TVersion>;
|
|
461
|
+
type Generator$1<TOptions extends PluginFactoryOptions> = CoreGenerator<TOptions> | ReactGenerator<TOptions> | Generator<TOptions>;
|
|
485
462
|
//#endregion
|
|
486
463
|
//#region ../plugin-oas/src/generators/createReactGenerator.d.ts
|
|
487
|
-
type ReactGenerator<TOptions extends PluginFactoryOptions
|
|
464
|
+
type ReactGenerator<TOptions extends PluginFactoryOptions> = {
|
|
488
465
|
name: string;
|
|
489
466
|
type: 'react';
|
|
490
|
-
version:
|
|
491
|
-
Operations: (props: OperationsProps<TOptions
|
|
492
|
-
Operation: (props: OperationProps<TOptions
|
|
493
|
-
Schema: (props: SchemaProps<TOptions
|
|
467
|
+
version: '1';
|
|
468
|
+
Operations: (props: OperationsProps<TOptions>) => FabricReactNode;
|
|
469
|
+
Operation: (props: OperationProps<TOptions>) => FabricReactNode;
|
|
470
|
+
Schema: (props: SchemaProps<TOptions>) => FabricReactNode;
|
|
494
471
|
};
|
|
495
472
|
//#endregion
|
|
496
473
|
//#region src/generators/mcpGenerator.d.ts
|
|
497
|
-
declare const mcpGenerator: ReactGenerator<PluginMcp
|
|
474
|
+
declare const mcpGenerator: ReactGenerator<PluginMcp>;
|
|
498
475
|
//#endregion
|
|
499
476
|
//#region src/generators/serverGenerator.d.ts
|
|
500
|
-
declare const serverGenerator: ReactGenerator<PluginMcp
|
|
477
|
+
declare const serverGenerator: ReactGenerator<PluginMcp>;
|
|
501
478
|
//#endregion
|
|
502
479
|
export { mcpGenerator, serverGenerator };
|
|
503
480
|
//# sourceMappingURL=generators.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { t as __name } from "./chunk--u3MIqq1.js";
|
|
|
2
2
|
import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
|
|
3
3
|
import { ClientImportPath, PluginClient } from "@kubb/plugin-client";
|
|
4
4
|
import { Exclude, Include, Override, ResolvePathOptions } from "@kubb/plugin-oas";
|
|
5
|
-
import { Generator } from "@kubb/plugin-oas/generators";
|
|
5
|
+
import { Generator as Generator$1 } from "@kubb/plugin-oas/generators";
|
|
6
6
|
import { Oas, contentType } from "@kubb/oas";
|
|
7
7
|
|
|
8
8
|
//#region src/types.d.ts
|
|
@@ -50,7 +50,7 @@ type Options = {
|
|
|
50
50
|
/**
|
|
51
51
|
* Define some generators next to the Mcp generators.
|
|
52
52
|
*/
|
|
53
|
-
generators?: Array<Generator<PluginMcp>>;
|
|
53
|
+
generators?: Array<Generator$1<PluginMcp>>;
|
|
54
54
|
};
|
|
55
55
|
type ResolvedOptions = {
|
|
56
56
|
output: Output<Oas>;
|
|
@@ -61,4 +61,4 @@ type ResolvedOptions = {
|
|
|
61
61
|
type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { PluginMcp as n, Options as t };
|
|
64
|
-
//# sourceMappingURL=types-
|
|
64
|
+
//# sourceMappingURL=types-DXZDZ3vf.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-mcp",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.4",
|
|
4
4
|
"description": "Model Context Protocol (MCP) plugin for Kubb, generating MCP-compatible tools and schemas from OpenAPI specifications for AI assistants.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@kubb/react-fabric": "0.13.3",
|
|
77
|
-
"@kubb/core": "5.0.0-alpha.
|
|
78
|
-
"@kubb/oas": "5.0.0-alpha.
|
|
79
|
-
"@kubb/plugin-client": "5.0.0-alpha.
|
|
80
|
-
"@kubb/plugin-oas": "5.0.0-alpha.
|
|
81
|
-
"@kubb/plugin-
|
|
82
|
-
"@kubb/plugin-
|
|
77
|
+
"@kubb/core": "5.0.0-alpha.4",
|
|
78
|
+
"@kubb/oas": "5.0.0-alpha.4",
|
|
79
|
+
"@kubb/plugin-client": "5.0.0-alpha.4",
|
|
80
|
+
"@kubb/plugin-oas": "5.0.0-alpha.4",
|
|
81
|
+
"@kubb/plugin-ts": "5.0.0-alpha.4",
|
|
82
|
+
"@kubb/plugin-zod": "5.0.0-alpha.4"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@internals/utils": "0.0.0"
|