@breadstone/archipel-mcp 0.0.22 → 0.0.23
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 +32 -13
- package/data/guides/ai-text-generation.md +16 -24
- package/data/guides/email-templates.md +49 -39
- package/data/packages/platform-authentication/api/Interface.IMfaSubjectUpdate.md +1 -1
- package/data/packages/platform-authentication/api/index.md +1 -1
- package/data/packages/platform-caching/api/Class.RedisLayeredCache.md +3 -3
- package/data/packages/platform-health/index.md +1 -1
- package/data/packages/platform-mailing/api/Class.MailVerificationService.md +1 -1
- package/data/packages/platform-mailing/api/index.md +1 -1
- package/data/packages/platform-mapping/index.md +1 -1
- package/data/packages/platform-resources/index.md +1 -1
- package/data/packages/platform-telemetry/api/Class.OtelSdkHolder.md +1 -1
- package/data/patterns/config-pattern.md +2 -2
- package/package.json +2 -2
- package/src/tools/registerGetConfigPatternTool.js +1 -1
- package/src/tools/registerGetDtoPatternTool.js +1 -1
- package/src/tools/registerGetErrorHandlingPatternTool.js +1 -1
- package/src/tools/registerGetGuardPatternTool.js +1 -1
- package/src/tools/registerGetMappingPatternTool.js +1 -1
- package/src/tools/registerGetModulePatternTool.js +1 -1
- package/src/tools/registerGetQueryPatternTool.js +1 -1
- package/src/tools/registerGetRepositoryPatternTool.js +1 -1
- package/src/tools/registerGetTestingPatternTool.js +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @breadstone/archipel-mcp
|
|
2
2
|
|
|
3
|
-
MCP (Model Context Protocol) server that provides Archipel platform knowledge
|
|
3
|
+
MCP (Model Context Protocol) server that provides Archipel platform knowledge - documentation and query patterns - to AI development tools. The server acts as a structured knowledge provider: AI models combine this knowledge with the user's project context to generate framework-compliant code.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -40,30 +40,49 @@ npx @breadstone/archipel-mcp
|
|
|
40
40
|
Returns the complete Archipel v1 query pattern: `IRepositoryQuery` interface, `query()` factory, `QueryResultType`, transactional queries, rules, and usage examples. When a `modelName` and `fields` array are provided, it generates tailored `findFirst`, `findMany`, and `count` query examples for that model.
|
|
41
41
|
|
|
42
42
|
```
|
|
43
|
-
modelName?: string
|
|
44
|
-
fields?: string[]
|
|
43
|
+
modelName?: string - Prisma model name (e.g. "User")
|
|
44
|
+
fields?: string[] - Field names (e.g. ["id", "email", "name", "createdAt"])
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
## Architecture
|
|
48
48
|
|
|
49
49
|
Plain Node.js MCP server using `@modelcontextprotocol/sdk`. No NestJS, no DI container.
|
|
50
50
|
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
```mermaid
|
|
52
|
+
flowchart TB
|
|
53
|
+
MainTs[main.ts\nCLI entry\nstdio transport + tool registration]
|
|
54
|
+
DocsLoader[DocsLoader.ts\nLoads and indexes .docs/packages]
|
|
55
|
+
GuidesLoader[GuidesLoader.ts\nLoads and indexes .docs/guides]
|
|
56
|
+
PatternsLoader[PatternsLoader.ts\nLoads and indexes .docs/patterns]
|
|
57
|
+
|
|
58
|
+
subgraph Models[models/]
|
|
59
|
+
IPackageDoc[IPackageDoc.ts\nPackage documentation interface]
|
|
60
|
+
IGuideDoc[IGuideDoc.ts\nGuide documentation interface]
|
|
61
|
+
IPatternDoc[IPatternDoc.ts\nPattern documentation interface]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
subgraph Generators[generators/]
|
|
65
|
+
QueryGenerator[queryPatternGenerator.ts]
|
|
66
|
+
RepositoryGenerator[repositoryPatternGenerator.ts]
|
|
67
|
+
MappingGenerator[mappingPatternGenerator.ts]
|
|
68
|
+
ModuleGenerator[modulePatternGenerator.ts]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
MainTs --> DocsLoader
|
|
72
|
+
MainTs --> GuidesLoader
|
|
73
|
+
MainTs --> PatternsLoader
|
|
74
|
+
DocsLoader --> IPackageDoc
|
|
75
|
+
GuidesLoader --> IGuideDoc
|
|
76
|
+
PatternsLoader --> IPatternDoc
|
|
58
77
|
```
|
|
59
78
|
|
|
60
79
|
### Documentation Resolution
|
|
61
80
|
|
|
62
81
|
The server locates docs in this order:
|
|
63
82
|
|
|
64
|
-
1. **Bundled data**
|
|
65
|
-
2. **Workspace root**
|
|
66
|
-
3. **Relative fallback**
|
|
83
|
+
1. **Bundled data** - `<package>/data/packages/` (shipped with the npm package)
|
|
84
|
+
2. **Workspace root** - `<cwd>/.docs/packages/` (monorepo development)
|
|
85
|
+
3. **Relative fallback** - walks up from compiled source to find `.docs/packages/`
|
|
67
86
|
|
|
68
87
|
## Development
|
|
69
88
|
|
|
@@ -368,28 +368,20 @@ If an AI SDK provider package is not installed, the error message clearly states
|
|
|
368
368
|
|
|
369
369
|
## Architecture Overview
|
|
370
370
|
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
┌─────────────┐ ┌──────────────┐
|
|
388
|
-
│ Provider │ │ Feature │
|
|
389
|
-
│ Loaders │ │ Capabilities │
|
|
390
|
-
│ (OpenAI, │ │ (custom │
|
|
391
|
-
│ Anthropic, │ │ handlers) │
|
|
392
|
-
│ Google, │ │ │
|
|
393
|
-
│ Grok) │ │ │
|
|
394
|
-
└─────────────┘ └──────────────┘
|
|
371
|
+
```mermaid
|
|
372
|
+
flowchart TB
|
|
373
|
+
subgraph IntelligenceModule[IntelligenceModule]
|
|
374
|
+
TextGenerator[IntelligenceTextGenerator\nConfigService -> provider]
|
|
375
|
+
CapabilityRegistry[IntelligenceCapability Registry]
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
GenerateText["generateText(prompt, options?)"]
|
|
379
|
+
ResolveCapability["resolve(intent, context)\nregister(capability)"]
|
|
380
|
+
ProviderLoaders[Provider Loaders\nOpenAI, Anthropic, Google, Grok]
|
|
381
|
+
FeatureCapabilities[Feature Capabilities\ncustom handlers]
|
|
382
|
+
|
|
383
|
+
TextGenerator --> GenerateText
|
|
384
|
+
CapabilityRegistry --> ResolveCapability
|
|
385
|
+
TextGenerator --> ProviderLoaders
|
|
386
|
+
CapabilityRegistry --> FeatureCapabilities
|
|
395
387
|
```
|
|
@@ -16,16 +16,14 @@ This guide explains how to create email templates for `platform-mailing` and reg
|
|
|
16
16
|
|
|
17
17
|
`platform-mailing` does **not** ship ready-made template files. It defines a list of known template **names** and loads the actual content through `ResourceManager` at startup.
|
|
18
18
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(variable interpolation) BlobResourceStrategy
|
|
28
|
-
EmbeddedResourceStrategy
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart LR
|
|
21
|
+
MailService["MailService<br/>sendTemplate()"] --> MailTemplateEngine["MailTemplateEngine<br/>compileTemplate()"]
|
|
22
|
+
MailTemplateEngine --> ResourceManager["ResourceManager<br/>tryLoadAsync()"]
|
|
23
|
+
MailTemplateEngine --> ContentTemplateEngine["ContentTemplateEngine<br/>variable interpolation"]
|
|
24
|
+
ResourceManager --> FileResourceStrategy[FileResourceStrategy]
|
|
25
|
+
ResourceManager --> BlobResourceStrategy[BlobResourceStrategy]
|
|
26
|
+
ResourceManager --> EmbeddedResourceStrategy[EmbeddedResourceStrategy]
|
|
29
27
|
```
|
|
30
28
|
|
|
31
29
|
1. `MailService.sendTemplate()` passes the template name and context variables to `MailTemplateEngine`.
|
|
@@ -59,18 +57,18 @@ Templates use a Handlebars-style syntax powered by `ContentTemplateEngine`:
|
|
|
59
57
|
|
|
60
58
|
| Syntax | Description |
|
|
61
59
|
| ---------------------------------------------- | --------------------------------- |
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
60
|
+
| `<code>{{variableName}}</code>` | Simple variable substitution |
|
|
61
|
+
| `<code>{{#if condition}}...{{/if}}</code>` | Conditional block |
|
|
62
|
+
| `<code>{{#if condition}}...{{else}}...{{/if}}</code>` | Conditional with else |
|
|
63
|
+
| `<code>{{#unless condition}}...{{/unless}}</code>` | Negative conditional |
|
|
64
|
+
| `<code>{{#each items}}...{{/each}}</code>` | Loop over array |
|
|
65
|
+
| `<code>{{#with object}}...{{/with}}</code>` | Context switching |
|
|
66
|
+
| `<code>{{@index}}</code>`, `<code>{{@first}}</code>`, `<code>{{@last}}</code>` | Loop metadata inside `#each` |
|
|
67
|
+
| `<code>{{nested.property}}</code>` | Dot notation for nested values |
|
|
70
68
|
|
|
71
69
|
### Example: `AuthVerify.html`
|
|
72
70
|
|
|
73
|
-
```
|
|
71
|
+
```text
|
|
74
72
|
<!DOCTYPE html>
|
|
75
73
|
<html>
|
|
76
74
|
<head>
|
|
@@ -78,14 +76,14 @@ Templates use a Handlebars-style syntax powered by `ContentTemplateEngine`:
|
|
|
78
76
|
<title>Verify your email</title>
|
|
79
77
|
</head>
|
|
80
78
|
<body>
|
|
81
|
-
<h1>Hello,
|
|
79
|
+
<h1>Hello, {{userName}}!</h1>
|
|
82
80
|
<p>Please verify your email address by clicking the link below:</p>
|
|
83
81
|
<p>
|
|
84
|
-
<a href="
|
|
82
|
+
<a href="{{verificationUrl}}">Verify Email</a>
|
|
85
83
|
</p>
|
|
86
|
-
|
|
87
|
-
<p>This link expires in
|
|
88
|
-
|
|
84
|
+
{{#if expiresInHours}}
|
|
85
|
+
<p>This link expires in {{expiresInHours}} hours.</p>
|
|
86
|
+
{{/if}}
|
|
89
87
|
<p>If you did not create an account, you can safely ignore this email.</p>
|
|
90
88
|
</body>
|
|
91
89
|
</html>
|
|
@@ -94,13 +92,13 @@ Templates use a Handlebars-style syntax powered by `ContentTemplateEngine`:
|
|
|
94
92
|
### Example: `AuthVerify.txt`
|
|
95
93
|
|
|
96
94
|
```text
|
|
97
|
-
Hello,
|
|
95
|
+
Hello, {{userName}}!
|
|
98
96
|
|
|
99
97
|
Please verify your email address by visiting the following link:
|
|
100
98
|
|
|
101
|
-
|
|
99
|
+
{{verificationUrl}}
|
|
102
100
|
|
|
103
|
-
|
|
101
|
+
{{#if expiresInHours}}This link expires in {{expiresInHours}} hours.{{/if}}
|
|
104
102
|
|
|
105
103
|
If you did not create an account, you can safely ignore this email.
|
|
106
104
|
```
|
|
@@ -117,18 +115,30 @@ When the format is `html`, `MailTemplateEngine` automatically **escapes all cont
|
|
|
117
115
|
|
|
118
116
|
Place your template files in your application's assets directory and register the path with `ResourceModule`:
|
|
119
117
|
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
118
|
+
```mermaid
|
|
119
|
+
flowchart TB
|
|
120
|
+
Root[my-app/]
|
|
121
|
+
Src[src/]
|
|
122
|
+
Assets[assets/]
|
|
123
|
+
AppModule[app.module.ts]
|
|
124
|
+
AuthRegisterHtml[AuthRegister.html]
|
|
125
|
+
AuthRegisterTxt[AuthRegister.txt]
|
|
126
|
+
AuthVerifyHtml[AuthVerify.html]
|
|
127
|
+
AuthVerifyTxt[AuthVerify.txt]
|
|
128
|
+
AuthForgotPasswordHtml[AuthForgotPassword.html]
|
|
129
|
+
AppointmentInvitationHtml[AppointmentInvitation.html]
|
|
130
|
+
AppointmentUpdateHtml[AppointmentUpdate.html]
|
|
131
|
+
|
|
132
|
+
Root --> Src
|
|
133
|
+
Src --> Assets
|
|
134
|
+
Src --> AppModule
|
|
135
|
+
Assets --> AuthRegisterHtml
|
|
136
|
+
Assets --> AuthRegisterTxt
|
|
137
|
+
Assets --> AuthVerifyHtml
|
|
138
|
+
Assets --> AuthVerifyTxt
|
|
139
|
+
Assets --> AuthForgotPasswordHtml
|
|
140
|
+
Assets --> AppointmentInvitationHtml
|
|
141
|
+
Assets --> AppointmentUpdateHtml
|
|
132
142
|
```
|
|
133
143
|
|
|
134
144
|
```typescript
|
|
@@ -8,7 +8,7 @@ editUrl: false
|
|
|
8
8
|
Defined in: [libs/platform-authentication/src/contracts/IMfaSubjectUpdate.ts:7](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/contracts/IMfaSubjectUpdate.ts#L7)
|
|
9
9
|
|
|
10
10
|
Data payload for updating MFA state on the underlying entity.
|
|
11
|
-
All properties are optional
|
|
11
|
+
All properties are optional - only the provided ones are applied.
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
@@ -49,7 +49,7 @@ editUrl: false
|
|
|
49
49
|
| [IMfaConfirmation](Interface.IMfaConfirmation) | Represents the activation result for multi-factor authentication. |
|
|
50
50
|
| [IMfaSetup](Interface.IMfaSetup) | Represents the data required to onboard a multi-factor authenticator. |
|
|
51
51
|
| [IMfaSubject](Interface.IMfaSubject) | Represents an MFA-enabled subject. Contains the data the MFA subsystem needs to read and write MFA state on the underlying user-like entity. |
|
|
52
|
-
| [IMfaSubjectUpdate](Interface.IMfaSubjectUpdate) | Data payload for updating MFA state on the underlying entity. All properties are optional
|
|
52
|
+
| [IMfaSubjectUpdate](Interface.IMfaSubjectUpdate) | Data payload for updating MFA state on the underlying entity. All properties are optional - only the provided ones are applied. |
|
|
53
53
|
| [ISessionRecord](Interface.ISessionRecord) | Represents a persisted session record. |
|
|
54
54
|
| [ISignInResult](Interface.ISignInResult) | Represents the outcome of a sign-in attempt. |
|
|
55
55
|
| [ISocialProfile](Interface.ISocialProfile) | Profile data received from a social / OAuth provider. |
|
|
@@ -60,7 +60,7 @@ get(key): TValue | undefined;
|
|
|
60
60
|
|
|
61
61
|
Defined in: [redis/RedisLayeredCache.ts:124](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L124)
|
|
62
62
|
|
|
63
|
-
Not supported
|
|
63
|
+
Not supported - Redis is inherently asynchronous.
|
|
64
64
|
|
|
65
65
|
#### Parameters
|
|
66
66
|
|
|
@@ -118,7 +118,7 @@ invalidate(key): void;
|
|
|
118
118
|
|
|
119
119
|
Defined in: [redis/RedisLayeredCache.ts:186](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L186)
|
|
120
120
|
|
|
121
|
-
Not supported
|
|
121
|
+
Not supported - Redis is inherently asynchronous.
|
|
122
122
|
|
|
123
123
|
#### Parameters
|
|
124
124
|
|
|
@@ -196,7 +196,7 @@ set(key, value): void;
|
|
|
196
196
|
|
|
197
197
|
Defined in: [redis/RedisLayeredCache.ts:160](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L160)
|
|
198
198
|
|
|
199
|
-
Not supported
|
|
199
|
+
Not supported - Redis is inherently asynchronous.
|
|
200
200
|
|
|
201
201
|
#### Parameters
|
|
202
202
|
|
|
@@ -125,4 +125,4 @@ The `HealthOrchestrator` enforces a maximum of **100** registered indicators. If
|
|
|
125
125
|
|
|
126
126
|
## API Reference
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
The auto-generated API reference is published when API docs are generated for this package.
|
|
@@ -8,7 +8,7 @@ editUrl: false
|
|
|
8
8
|
Defined in: [platform-mailing/src/services/MailVerificationService.ts:20](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-mailing/src/services/MailVerificationService.ts#L20)
|
|
9
9
|
|
|
10
10
|
Verifies SMTP server connectivity. Does **not** validate individual email
|
|
11
|
-
addresses
|
|
11
|
+
addresses - only checks whether the configured SMTP transport is reachable.
|
|
12
12
|
|
|
13
13
|
## Deprecated
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ editUrl: false
|
|
|
16
16
|
| [MailModule](Class.MailModule) | Represents the mail module. |
|
|
17
17
|
| [MailService](Class.MailService) | Represents the `MailService` class. |
|
|
18
18
|
| [MailTemplateEngine](Class.MailTemplateEngine) | The `MailTemplateEngine` class. |
|
|
19
|
-
| [~~MailVerificationService~~](Class.MailVerificationService) | Verifies SMTP server connectivity. Does **not** validate individual email addresses
|
|
19
|
+
| [~~MailVerificationService~~](Class.MailVerificationService) | Verifies SMTP server connectivity. Does **not** validate individual email addresses - only checks whether the configured SMTP transport is reachable. |
|
|
20
20
|
| [PostmarkDeliveryStrategy](Class.PostmarkDeliveryStrategy) | The `PostmarkDeliveryStrategy` class. |
|
|
21
21
|
| [ResendDeliveryStrategy](Class.ResendDeliveryStrategy) | Delivers emails via the Resend API. |
|
|
22
22
|
| [SendGridDeliveryStrategy](Class.SendGridDeliveryStrategy) | Delivers emails via the SendGrid API. |
|
|
@@ -118,4 +118,4 @@ export class UserController {
|
|
|
118
118
|
|
|
119
119
|
## API Reference
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
The auto-generated API reference is published when API docs are generated for this package.
|
|
@@ -132,4 +132,4 @@ export class CustomStrategy implements IResourceStrategy {
|
|
|
132
132
|
|
|
133
133
|
## API Reference
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
The auto-generated API reference is published when API docs are generated for this package.
|
|
@@ -61,7 +61,7 @@ setSdk(sdk): void;
|
|
|
61
61
|
Defined in: [OtelSdkHolder.ts:30](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-telemetry/src/OtelSdkHolder.ts#L30)
|
|
62
62
|
|
|
63
63
|
Stores the SDK reference so it can be shut down later.
|
|
64
|
-
Can only be called once
|
|
64
|
+
Can only be called once - subsequent calls are ignored.
|
|
65
65
|
|
|
66
66
|
#### Parameters
|
|
67
67
|
|
|
@@ -18,7 +18,7 @@ Azure App Configuration, etc.).
|
|
|
18
18
|
|
|
19
19
|
## Core Types
|
|
20
20
|
|
|
21
|
-
### IConfigKey<TType
|
|
21
|
+
### `IConfigKey<TType>`
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
24
|
export interface IConfigKey<TType = unknown> {
|
|
@@ -27,7 +27,7 @@ export interface IConfigKey<TType = unknown> {
|
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
### createConfigKey<TType
|
|
30
|
+
### `createConfigKey<TType>`
|
|
31
31
|
|
|
32
32
|
```typescript
|
|
33
33
|
import { createConfigKey } from '@breadstone/archipel-platform-core';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadstone/archipel-mcp",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "MCP server providing Archipel platform knowledge
|
|
3
|
+
"version": "0.0.23",
|
|
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",
|
|
7
7
|
"bin": "./src/main.js",
|
|
@@ -5,7 +5,7 @@ exports.registerGetConfigPatternTool = registerGetConfigPatternTool;
|
|
|
5
5
|
* Registers the get-config-pattern tool on the MCP server.
|
|
6
6
|
*/
|
|
7
7
|
function registerGetConfigPatternTool(server, patternsLoader) {
|
|
8
|
-
server.tool('get-config-pattern', 'Returns the Archipel configuration pattern
|
|
8
|
+
server.tool('get-config-pattern', 'Returns the Archipel configuration pattern - typed config keys (createConfigKey), ConfigRegistry, ConfigService, env.ts conventions, and ConfigModule integration.', {}, async () => {
|
|
9
9
|
const pattern = patternsLoader.patterns.get('config-pattern');
|
|
10
10
|
const text = pattern?.content ?? 'Config pattern documentation not available.';
|
|
11
11
|
return {
|
|
@@ -5,7 +5,7 @@ exports.registerGetDtoPatternTool = registerGetDtoPatternTool;
|
|
|
5
5
|
* Registers the get-dto-pattern tool on the MCP server.
|
|
6
6
|
*/
|
|
7
7
|
function registerGetDtoPatternTool(server, patternsLoader) {
|
|
8
|
-
server.tool('get-dto-pattern', 'Returns the Archipel DTO & validation pattern
|
|
8
|
+
server.tool('get-dto-pattern', 'Returns the Archipel DTO & validation pattern - Request/Response DTOs, class-validator decorators, cross-field validation, query parameter DTOs, OpenAPI integration, and naming conventions.', {}, async () => {
|
|
9
9
|
const pattern = patternsLoader.patterns.get('dto-pattern');
|
|
10
10
|
const text = pattern?.content ?? 'DTO pattern documentation not available.';
|
|
11
11
|
return {
|
|
@@ -5,7 +5,7 @@ exports.registerGetErrorHandlingPatternTool = registerGetErrorHandlingPatternToo
|
|
|
5
5
|
* Registers the get-error-handling-pattern tool on the MCP server.
|
|
6
6
|
*/
|
|
7
7
|
function registerGetErrorHandlingPatternTool(server, patternsLoader) {
|
|
8
|
-
server.tool('get-error-handling-pattern', 'Returns the Archipel error handling pattern
|
|
8
|
+
server.tool('get-error-handling-pattern', 'Returns the Archipel error handling pattern - domain errors, RepositoryError, exception filters, and structured error response envelopes.', {}, async () => {
|
|
9
9
|
const pattern = patternsLoader.patterns.get('error-handling-pattern');
|
|
10
10
|
const text = pattern?.content ?? 'Error handling pattern documentation not available.';
|
|
11
11
|
return {
|
|
@@ -5,7 +5,7 @@ exports.registerGetGuardPatternTool = registerGetGuardPatternTool;
|
|
|
5
5
|
* Registers the get-guard-pattern tool on the MCP server.
|
|
6
6
|
*/
|
|
7
7
|
function registerGetGuardPatternTool(server, patternsLoader) {
|
|
8
|
-
server.tool('get-guard-pattern', 'Returns the Archipel guard & interceptor pattern
|
|
8
|
+
server.tool('get-guard-pattern', 'Returns the Archipel guard & interceptor pattern - metadata decorators, FeatureGuard, RolesGuard, FeatureUsageInterceptor, and the full decorator-guard-interceptor trio.', {}, async () => {
|
|
9
9
|
const pattern = patternsLoader.patterns.get('guard-pattern');
|
|
10
10
|
const text = pattern?.content ?? 'Guard pattern documentation not available.';
|
|
11
11
|
return {
|
|
@@ -7,7 +7,7 @@ const mappingPatternGenerator_1 = require("../generators/mappingPatternGenerator
|
|
|
7
7
|
* Registers the get-mapping-pattern tool on the MCP server.
|
|
8
8
|
*/
|
|
9
9
|
function registerGetMappingPatternTool(server, patternsLoader) {
|
|
10
|
-
server.tool('get-mapping-pattern', 'Returns the Archipel mapping pattern
|
|
10
|
+
server.tool('get-mapping-pattern', 'Returns the Archipel mapping pattern - branded type-safe mapping keys, MappingProfileBase, MappingService, and MappingModule registration. Optionally tailored to a specific entity and response class.', {
|
|
11
11
|
entityName: zod_1.z
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
@@ -7,7 +7,7 @@ const modulePatternGenerator_1 = require("../generators/modulePatternGenerator")
|
|
|
7
7
|
* Registers the get-module-pattern tool on the MCP server.
|
|
8
8
|
*/
|
|
9
9
|
function registerGetModulePatternTool(server, patternsLoader) {
|
|
10
|
-
server.tool('get-module-pattern', 'Returns the Archipel NestJS dynamic module pattern
|
|
10
|
+
server.tool('get-module-pattern', 'Returns the Archipel NestJS dynamic module pattern - register(), port/adapter injection, ConfigModule integration. Optionally tailored with module name and port definitions.', {
|
|
11
11
|
moduleName: zod_1.z
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
@@ -7,7 +7,7 @@ const queryPatternGenerator_1 = require("../generators/queryPatternGenerator");
|
|
|
7
7
|
* Registers the get-query-pattern tool on the MCP server.
|
|
8
8
|
*/
|
|
9
9
|
function registerGetQueryPatternTool(server, patternsLoader) {
|
|
10
|
-
server.tool('get-query-pattern', 'Returns the Archipel query pattern documentation
|
|
10
|
+
server.tool('get-query-pattern', 'Returns the Archipel query pattern documentation - interfaces, factories, rules, and examples. Optionally tailored to a specific Prisma model.', {
|
|
11
11
|
modelName: zod_1.z
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
@@ -7,7 +7,7 @@ const repositoryPatternGenerator_1 = require("../generators/repositoryPatternGen
|
|
|
7
7
|
* Registers the get-repository-pattern tool on the MCP server.
|
|
8
8
|
*/
|
|
9
9
|
function registerGetRepositoryPatternTool(server, patternsLoader) {
|
|
10
|
-
server.tool('get-repository-pattern', 'Returns the Archipel repository class pattern
|
|
10
|
+
server.tool('get-repository-pattern', 'Returns the Archipel repository class pattern - how to create a RepositoryBase subclass with correct generics, module registration, and service injection. Optionally tailored to a specific Prisma model.', {
|
|
11
11
|
modelName: zod_1.z
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
@@ -5,7 +5,7 @@ exports.registerGetTestingPatternTool = registerGetTestingPatternTool;
|
|
|
5
5
|
* Registers the get-testing-pattern tool on the MCP server.
|
|
6
6
|
*/
|
|
7
7
|
function registerGetTestingPatternTool(server, patternsLoader) {
|
|
8
|
-
server.tool('get-testing-pattern', 'Returns the Archipel testing pattern
|
|
8
|
+
server.tool('get-testing-pattern', 'Returns the Archipel testing pattern - Vitest conventions, mocking patterns for repositories/services/delegates, AAA structure, and test naming conventions.', {}, async () => {
|
|
9
9
|
const pattern = patternsLoader.patterns.get('testing-pattern');
|
|
10
10
|
const text = pattern?.content ?? 'Testing pattern documentation not available.';
|
|
11
11
|
return {
|