@breadstone/archipel-mcp 0.0.17 → 0.0.19

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.
Files changed (31) hide show
  1. package/data/guides/esigning-integration.md +1 -2
  2. package/data/guides/openapi-and-feature-discovery.md +20 -12
  3. package/data/packages/platform-caching/index.md +8 -5
  4. package/data/packages/platform-cryptography/index.md +6 -8
  5. package/data/packages/platform-esigning/api/Class.AdobeSignEsigningProvider.md +242 -0
  6. package/data/packages/platform-esigning/api/Class.DocuSignEsigningProvider.md +236 -0
  7. package/data/packages/platform-esigning/api/Class.DropboxSignEsigningProvider.md +236 -0
  8. package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +4 -1
  9. package/data/packages/platform-esigning/api/Class.EsigningModule.md +28 -2
  10. package/data/packages/platform-esigning/api/Interface.IEsigningModuleAsyncOptions.md +87 -0
  11. package/data/packages/platform-esigning/api/Interface.IEsigningModuleOptions.md +5 -5
  12. package/data/packages/platform-esigning/api/Interface.IEsigningModuleOptionsFactory.md +31 -0
  13. package/data/packages/platform-esigning/api/index.md +6 -13
  14. package/data/packages/platform-esigning/index.md +3 -22
  15. package/data/packages/platform-logging/index.md +18 -46
  16. package/data/packages/platform-openapi/api/Function.Api.md +3 -14
  17. package/data/packages/platform-openapi/api/index.md +1 -1
  18. package/data/packages/platform-openapi/index.md +78 -43
  19. package/package.json +1 -1
  20. package/data/packages/platform-esigning/api/Variable.ESIGNING_API_BASE_URL.md +0 -14
  21. package/data/packages/platform-esigning/api/Variable.ESIGNING_API_KEY.md +0 -14
  22. package/data/packages/platform-esigning/api/Variable.ESIGNING_PROVIDER.md +0 -12
  23. package/data/packages/platform-esigning/api/Variable.ESIGNING_PROVIDER_OPTIONS.md +0 -12
  24. package/data/packages/platform-esigning/api/Variable.ESIGNING_WEBHOOK_SECRET.md +0 -14
  25. package/data/packages/platform-esigning/api/Variable.PLATFORM_ESIGNING_CONFIG_ENTRIES.md +0 -14
  26. package/data/packages/platform-esigning/api/Variable.SIGNNOW_API_KEY.md +0 -14
  27. package/data/packages/platform-esigning/api/Variable.SIGNNOW_BASE_URL.md +0 -14
  28. package/data/packages/platform-esigning/api/Variable.SIGNNOW_CLIENT_ID.md +0 -14
  29. package/data/packages/platform-esigning/api/Variable.SIGNNOW_CLIENT_SECRET.md +0 -14
  30. package/data/packages/platform-esigning/api/Variable.SIGNNOW_CONFIG_ENTRIES.md +0 -14
  31. package/data/packages/platform-esigning/api/Variable.SIGNNOW_WEBHOOK_SECRET.md +0 -14
@@ -9,26 +9,15 @@ editUrl: false
9
9
  function Api(options): ClassDecorator & MethodDecorator & PropertyDecorator;
10
10
  ```
11
11
 
12
- Defined in: [decorators/Api.ts:21](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-openapi/src/decorators/Api.ts#L21)
12
+ Defined in: [decorators/Api.ts:141](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-openapi/src/decorators/Api.ts#L141)
13
13
 
14
- Custom Swagger Decorator
15
- This decorator wraps all necessary Swagger decorators into one.
14
+ Composite Swagger decorator that wraps all NestJS OpenAPI decorators into a single declaration.
16
15
 
17
16
  ## Parameters
18
17
 
19
18
  | Parameter | Type | Description |
20
19
  | ------ | ------ | ------ |
21
- | `options` | \{ `auth?`: `"bearer"` \| `"basic"` \| `"oauth2"` \| `"cookie"`; `body?`: `ApiBodyOptions`; `extensions?`: `Record`\<`string`, `string` \| `number` \| `boolean`\>; `headers?`: `ApiHeaderOptions`[]; `operation?`: `Partial`\<`OperationObject`\>; `params?`: `ApiParamOptions` \| `ApiParamOptions`[]; `query?`: `ApiQueryOptions` \| `ApiQueryOptions`[]; `responses?`: `ApiResponseOptions` \| `ApiResponseOptions`[]; `scopes?`: `string`[]; `tags?`: `string` \| `string`[]; \} | Configuration for the Swagger decorators. |
22
- | `options.auth?` | `"bearer"` \| `"basic"` \| `"oauth2"` \| `"cookie"` | - |
23
- | `options.body?` | `ApiBodyOptions` | Options for the ApiBody decorator. |
24
- | `options.extensions?` | `Record`\<`string`, `string` \| `number` \| `boolean`\> | - |
25
- | `options.headers?` | `ApiHeaderOptions`[] | Options for the ApiHeaders decorator. |
26
- | `options.operation?` | `Partial`\<`OperationObject`\> | Options for the ApiOperation decorator. |
27
- | `options.params?` | `ApiParamOptions` \| `ApiParamOptions`[] | Options for the ApiParam decorator. |
28
- | `options.query?` | `ApiQueryOptions` \| `ApiQueryOptions`[] | Options for the ApiQuery decorator (can be an array or single query). |
29
- | `options.responses?` | `ApiResponseOptions` \| `ApiResponseOptions`[] | - |
30
- | `options.scopes?` | `string`[] | - |
31
- | `options.tags?` | `string` \| `string`[] | Options for the ApiTags decorator (can be an array or single tag). |
20
+ | `options` | `IApiOptions` | Configuration for the Swagger decorators. |
32
21
 
33
22
  ## Returns
34
23
 
@@ -36,7 +36,7 @@ editUrl: false
36
36
 
37
37
  | Function | Description |
38
38
  | ------ | ------ |
39
- | [Api](Function.Api) | Custom Swagger Decorator This decorator wraps all necessary Swagger decorators into one. |
39
+ | [Api](Function.Api) | Composite Swagger decorator that wraps all NestJS OpenAPI decorators into a single declaration. |
40
40
  | [getRegisteredSwaggerFeatures](Function.getRegisteredSwaggerFeatures) | Retrieves all Swagger features that have been registered through the decorator. |
41
41
  | [getSwaggerFeatureMetadata](Function.getSwaggerFeatureMetadata) | Get the Swagger feature metadata from a module class |
42
42
  | [SwaggerFeature](Function.SwaggerFeature) | Decorator to register a module as a Swagger feature. This allows the SwaggerMultiDocumentService to automatically discover and create documentation. |
@@ -15,19 +15,27 @@ Multi-tenant Swagger/OpenAPI documentation system with feature-scoped discovery,
15
15
  ## Quick Start
16
16
 
17
17
  ```typescript
18
- import { Module } from '@nestjs/common';
18
+ import { Module, Controller, Get, Param } from '@nestjs/common';
19
19
  import { SwaggerFeature, Api } from '@breadstone/archipel-platform-openapi';
20
20
 
21
21
  @SwaggerFeature({
22
- name: 'User Management',
23
- description: 'User CRUD and profile operations',
24
- version: '1.0',
22
+ name: 'users',
23
+ title: 'My App API Users',
24
+ description: 'User CRUD and profile operations.',
25
+ tag: 'Users',
26
+ tags: ['Users'],
25
27
  })
28
+ @Module({
29
+ controllers: [UserController],
30
+ })
31
+ export class UserModule {}
32
+
26
33
  @Controller('api/v1/users')
27
34
  export class UserController {
28
35
  @Api({
36
+ tags: 'Users',
29
37
  summary: 'Get user by ID',
30
- responses: { 200: { description: 'User found' } },
38
+ responses: [{ status: 200, description: 'User found', type: UserResponse }],
31
39
  })
32
40
  @Get(':id')
33
41
  public async getUser(@Param('id') id: string): Promise<UserResponse> {
@@ -44,21 +52,22 @@ The key concept is **per-feature Swagger documents** — each feature or module
44
52
 
45
53
  ### @SwaggerFeature Decorator
46
54
 
47
- Associates a controller with a named feature group:
55
+ Associates a module with a named feature group:
48
56
 
49
57
  ```typescript
50
58
  import { SwaggerFeature } from '@breadstone/archipel-platform-openapi';
51
59
 
52
60
  @SwaggerFeature({
53
- name: 'Orders',
54
- description: 'Order management and fulfillment',
55
- version: '2.0',
56
- tags: ['orders', 'fulfillment'],
61
+ name: 'orders',
62
+ title: 'My App API — Orders',
63
+ description: 'Order management and fulfillment.',
64
+ tag: 'Orders',
65
+ tags: ['Orders'],
57
66
  })
58
- @Controller('api/v1/orders')
59
- export class OrderController {
60
- /* ... */
61
- }
67
+ @Module({
68
+ controllers: [OrderController],
69
+ })
70
+ export class OrderModule {}
62
71
  ```
63
72
 
64
73
  ### @Api Decorator
@@ -70,12 +79,12 @@ import { Api } from '@breadstone/archipel-platform-openapi';
70
79
 
71
80
  @Api({
72
81
  summary: 'Create a new order',
73
- description: 'Creates an order and initiates payment processing.',
74
- responses: {
75
- 201: { description: 'Order created successfully' },
76
- 400: { description: 'Invalid order data' },
77
- 402: { description: 'Payment required' },
78
- },
82
+ operation: { description: 'Creates an order and initiates payment processing.' },
83
+ responses: [
84
+ { status: 201, description: 'Order created successfully' },
85
+ { status: 400, description: 'Invalid order data' },
86
+ { status: 402, description: 'Payment required' },
87
+ ],
79
88
  })
80
89
  @Post()
81
90
  public async createOrder(@Body() body: CreateOrderDto): Promise<OrderResponse> { /* ... */ }
@@ -104,20 +113,37 @@ export class DocsController {
104
113
  ### Bootstrap Setup
105
114
 
106
115
  ```typescript
107
- import { SwaggerModule } from '@nestjs/swagger';
108
- import { SwaggerMultiDocumentService, SwaggerTheme } from '@breadstone/archipel-platform-openapi';
116
+ import {
117
+ SwaggerFeatureDiscovery,
118
+ SwaggerFeatureRegistry,
119
+ SwaggerMultiDocumentService,
120
+ } from '@breadstone/archipel-platform-openapi';
121
+ import { ConfigService, ContentTemplateEngine, HostService, ResourceManager } from '@breadstone/archipel-platform-core';
109
122
 
110
123
  async function bootstrap(): Promise<void> {
111
124
  const app = await NestFactory.create(AppModule);
112
- const docsService = app.get(SwaggerMultiDocumentService);
113
- const documents = docsService.generateAll();
114
-
115
- for (const [featureName, spec] of documents) {
116
- const path = `docs/${featureName.toLowerCase().replace(/\s+/g, '-')}`;
117
- SwaggerModule.setup(path, app, spec, {
118
- customCss: SwaggerTheme.getDefaultCss(),
119
- });
120
- }
125
+
126
+ const configService = app.get(ConfigService);
127
+ const hostService = app.get(HostService);
128
+ const resourceManager = app.get(ResourceManager);
129
+ const contentTemplateEngine = app.get(ContentTemplateEngine);
130
+
131
+ // 1. Discover features
132
+ const featureRegistry = new SwaggerFeatureRegistry();
133
+ const discovery = new SwaggerFeatureDiscovery();
134
+ discovery.registerDiscoveredFeatures(featureRegistry);
135
+ discovery.registerDefaultFeatures(featureRegistry);
136
+
137
+ // 2. Setup multi-document Swagger UI
138
+ const swaggerService = new SwaggerMultiDocumentService(
139
+ app,
140
+ configService,
141
+ hostService,
142
+ featureRegistry,
143
+ resourceManager,
144
+ contentTemplateEngine,
145
+ );
146
+ await swaggerService.setupMultipleSwaggerDocuments();
121
147
 
122
148
  await app.listen(3000);
123
149
  }
@@ -129,30 +155,39 @@ async function bootstrap(): Promise<void> {
129
155
 
130
156
  ### SwaggerFeatureDiscovery
131
157
 
132
- Auto-discovers all `@SwaggerFeature` decorated controllers at bootstrap:
158
+ Reads the global store populated by `@SwaggerFeature()` decorators and registers features into a `SwaggerFeatureRegistry`:
133
159
 
134
160
  ```typescript
135
- import { SwaggerFeatureDiscovery } from '@breadstone/archipel-platform-openapi';
161
+ import { SwaggerFeatureDiscovery, SwaggerFeatureRegistry } from '@breadstone/archipel-platform-openapi';
162
+
163
+ const featureRegistry = new SwaggerFeatureRegistry();
164
+ const discovery = new SwaggerFeatureDiscovery();
136
165
 
137
- const discovery = app.get(SwaggerFeatureDiscovery);
138
- const features = discovery.discoverAll();
139
- // → [{ name: 'User Management', controllers: [...] }, ...]
166
+ discovery
167
+ .registerDiscoveredFeatures(featureRegistry)
168
+ .registerDefaultFeatures(featureRegistry);
140
169
  ```
141
170
 
142
171
  ### SwaggerFeatureRegistry
143
172
 
144
- Programmatic registry for feature configurations:
173
+ Holds the finalized, immutable list of features. After all features are registered, call `finalize()`:
145
174
 
146
175
  ```typescript
147
176
  import { SwaggerFeatureRegistry } from '@breadstone/archipel-platform-openapi';
148
177
 
149
- const registry = app.get(SwaggerFeatureRegistry);
150
- registry.register({
151
- name: 'Admin',
152
- description: 'Admin-only endpoints',
153
- version: '1.0',
154
- controllers: [AdminController],
178
+ const registry = new SwaggerFeatureRegistry();
179
+
180
+ registry.registerFeature({
181
+ name: 'admin',
182
+ title: 'My App API — Admin',
183
+ description: 'Admin-only endpoints.',
184
+ tag: 'Admin',
185
+ tags: ['Admin'],
186
+ path: 'docs/admin',
155
187
  });
188
+
189
+ registry.finalize();
190
+ const features = registry.getFeatures(); // sorted, read-only copy
156
191
  ```
157
192
 
158
193
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breadstone/archipel-mcp",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "MCP server providing Archipel platform knowledge — documentation, query patterns, and coding conventions — to AI development tools.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/main.js",
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: ESIGNING\_API\_BASE\_URL'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: ESIGNING\_API\_BASE\_URL
7
-
8
- ```ts
9
- const ESIGNING_API_BASE_URL: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [env.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/env.ts#L18)
13
-
14
- Active e-signing provider base URL.
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: ESIGNING\_API\_KEY'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: ESIGNING\_API\_KEY
7
-
8
- ```ts
9
- const ESIGNING_API_KEY: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/env.ts#L12)
13
-
14
- Active e-signing provider API key.
@@ -1,12 +0,0 @@
1
- ---
2
- title: 'Variable: ESIGNING\_PROVIDER'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: ESIGNING\_PROVIDER
7
-
8
- ```ts
9
- const ESIGNING_PROVIDER: typeof ESIGNING_PROVIDER;
10
- ```
11
-
12
- Defined in: [tokens.ts:3](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/tokens.ts#L3)
@@ -1,12 +0,0 @@
1
- ---
2
- title: 'Variable: ESIGNING\_PROVIDER\_OPTIONS'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: ESIGNING\_PROVIDER\_OPTIONS
7
-
8
- ```ts
9
- const ESIGNING_PROVIDER_OPTIONS: typeof ESIGNING_PROVIDER_OPTIONS;
10
- ```
11
-
12
- Defined in: [tokens.ts:4](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/tokens.ts#L4)
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: ESIGNING\_WEBHOOK\_SECRET'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: ESIGNING\_WEBHOOK\_SECRET
7
-
8
- ```ts
9
- const ESIGNING_WEBHOOK_SECRET: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/env.ts#L15)
13
-
14
- Active e-signing provider webhook signing secret.
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: PLATFORM\_ESIGNING\_CONFIG\_ENTRIES'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: PLATFORM\_ESIGNING\_CONFIG\_ENTRIES
7
-
8
- ```ts
9
- const PLATFORM_ESIGNING_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
10
- ```
11
-
12
- Defined in: [env.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/env.ts#L25)
13
-
14
- All configuration entries required by `platform-esigning`.
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: SIGNNOW\_API\_KEY'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: SIGNNOW\_API\_KEY
7
-
8
- ```ts
9
- const SIGNNOW_API_KEY: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [signnow/env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/signnow/env.ts#L12)
13
-
14
- signNow API key (basic token).
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: SIGNNOW\_BASE\_URL'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: SIGNNOW\_BASE\_URL
7
-
8
- ```ts
9
- const SIGNNOW_BASE_URL: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [signnow/env.ts:21](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/signnow/env.ts#L21)
13
-
14
- signNow base URL.
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: SIGNNOW\_CLIENT\_ID'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: SIGNNOW\_CLIENT\_ID
7
-
8
- ```ts
9
- const SIGNNOW_CLIENT_ID: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [signnow/env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/signnow/env.ts#L15)
13
-
14
- signNow client ID.
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: SIGNNOW\_CLIENT\_SECRET'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: SIGNNOW\_CLIENT\_SECRET
7
-
8
- ```ts
9
- const SIGNNOW_CLIENT_SECRET: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [signnow/env.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/signnow/env.ts#L18)
13
-
14
- signNow client secret.
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: SIGNNOW\_CONFIG\_ENTRIES'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: SIGNNOW\_CONFIG\_ENTRIES
7
-
8
- ```ts
9
- const SIGNNOW_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
10
- ```
11
-
12
- Defined in: [signnow/env.ts:31](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/signnow/env.ts#L31)
13
-
14
- Configuration entries required by the signNow e-signing provider.
@@ -1,14 +0,0 @@
1
- ---
2
- title: 'Variable: SIGNNOW\_WEBHOOK\_SECRET'
3
- generated: true
4
- editUrl: false
5
- ---
6
- # Variable: SIGNNOW\_WEBHOOK\_SECRET
7
-
8
- ```ts
9
- const SIGNNOW_WEBHOOK_SECRET: IConfigKey<string>;
10
- ```
11
-
12
- Defined in: [signnow/env.ts:24](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-esigning/src/signnow/env.ts#L24)
13
-
14
- signNow webhook callback secret.