@jaypie/mcp 0.7.6 → 0.7.8
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/suites/docs/index.js +1 -1
- package/package.json +1 -1
- package/release-notes/constructs/1.2.28.md +12 -0
- package/release-notes/express/1.2.10.md +12 -0
- package/release-notes/express/1.2.8.md +34 -0
- package/release-notes/express/1.2.9.md +22 -0
- package/skills/agents.md +5 -1
- package/skills/secrets.md +108 -110
- package/skills/skills.md +1 -1
|
@@ -9,7 +9,7 @@ import { gt } from 'semver';
|
|
|
9
9
|
/**
|
|
10
10
|
* Docs Suite - Documentation services (skill, version, release_notes)
|
|
11
11
|
*/
|
|
12
|
-
const BUILD_VERSION_STRING = "@jaypie/mcp@0.7.
|
|
12
|
+
const BUILD_VERSION_STRING = "@jaypie/mcp@0.7.8#f1eb1726"
|
|
13
13
|
;
|
|
14
14
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
15
15
|
const __dirname$1 = path.dirname(__filename$1);
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.28
|
|
3
|
+
date: 2025-02-01
|
|
4
|
+
summary: Expand JaypieGitHubDeployRole permissions for CDK context lookups
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Use `ec2:Describe*` wildcard for all EC2 describe operations (VPCs, subnets, VPN gateways, etc.)
|
|
10
|
+
- Use `cloudformation:Describe*` wildcard for CloudFormation lookups
|
|
11
|
+
- Add `cdk-hnb659fds-lookup-role-*` to assumable roles for CDK context provider
|
|
12
|
+
- Include SSM parameter read permissions (`ssm:GetParameter`, `ssm:GetParameters`)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.10
|
|
3
|
+
date: 2026-02-02
|
|
4
|
+
summary: Fix Lambda streaming NO_CONTENT detection using Symbol marker
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **#178**: Fixed Lambda streaming NO_CONTENT responses still hanging after previous fix
|
|
10
|
+
- The `_responseStream` property check failed after Express's prototype manipulation
|
|
11
|
+
- Now uses `JAYPIE_LAMBDA_STREAMING` Symbol marker for reliable detection
|
|
12
|
+
- Matches the pattern used for `JAYPIE_LAMBDA_MOCK` in buffered responses
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.8
|
|
3
|
+
date: 2025-02-01
|
|
4
|
+
summary: Fix CORS OPTIONS by calling flushHeaders() before res.end()
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Bug Fix
|
|
8
|
+
|
|
9
|
+
Fixed CORS OPTIONS preflight requests still hanging with Lambda streaming by calling `flushHeaders()` before `res.end()`.
|
|
10
|
+
|
|
11
|
+
### Problem
|
|
12
|
+
|
|
13
|
+
The fix in v1.2.7 called `res.end()` for OPTIONS requests but didn't explicitly flush headers first. In Lambda streaming mode:
|
|
14
|
+
|
|
15
|
+
1. `LambdaResponseStreaming._final()` closes the stream via `_wrappedStream.end()`
|
|
16
|
+
2. `_wrappedStream` is only created when `flushHeaders()` is called
|
|
17
|
+
3. Without explicit `flushHeaders()`, `_wrappedStream` could be null
|
|
18
|
+
4. The Lambda stream never closes, causing the response to hang
|
|
19
|
+
|
|
20
|
+
### Solution
|
|
21
|
+
|
|
22
|
+
Added explicit `res.flushHeaders()` call before `res.end()` in the CORS OPTIONS handler to ensure the Lambda stream wrapper is initialized before ending the response.
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
res.statusCode = 204;
|
|
26
|
+
res.setHeader("Content-Length", "0");
|
|
27
|
+
res.flushHeaders(); // Initialize _wrappedStream before ending
|
|
28
|
+
res.end();
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Related
|
|
32
|
+
|
|
33
|
+
- GitHub Issue: [#178](https://github.com/finlaysonstudio/jaypie/issues/178)
|
|
34
|
+
- Follow-up to: [#174](https://github.com/finlaysonstudio/jaypie/issues/174)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.9
|
|
3
|
+
date: 2026-02-02
|
|
4
|
+
summary: Fix Lambda streaming hang for NO_CONTENT responses via expressHandler
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# @jaypie/express 1.2.9
|
|
8
|
+
|
|
9
|
+
## Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **Lambda streaming NO_CONTENT hang**: Fixed issue where `httpHandler(HTTP.CODE.NO_CONTENT)` routes would hang when using Lambda streaming. The previous fix (1.2.8) only addressed CORS OPTIONS requests; this extends the solution to all responses going through `expressHandler`.
|
|
12
|
+
|
|
13
|
+
## Technical Details
|
|
14
|
+
|
|
15
|
+
For Lambda streaming responses, `flushHeaders()` must be called before `send()`/`json()` to initialize `_wrappedStream`. Without this, the async `_final()` callback finds `_wrappedStream` null and the Lambda hangs.
|
|
16
|
+
|
|
17
|
+
The fix detects Lambda streaming responses by checking for `"_responseStream" in res`, which is unique to `LambdaResponseStreaming`.
|
|
18
|
+
|
|
19
|
+
## Related
|
|
20
|
+
|
|
21
|
+
- Fixes GitHub issue #178
|
|
22
|
+
- Builds on fix from 1.2.8 (96dce858)
|
package/skills/agents.md
CHANGED
|
@@ -24,12 +24,16 @@ Complete stack styles, techniques, and traditions.
|
|
|
24
24
|
- Check ~tools (`mcp__jaypie__skill("tools")`) for all tools or ~tools-aws, ~tools-datadog, and ~tools-dynamodb individually
|
|
25
25
|
- File bugs, documentation, features, and other issues with `mcp__jaypie__skill("issues")`
|
|
26
26
|
|
|
27
|
+
### Code
|
|
28
|
+
|
|
29
|
+
- `log.trace` happy path, `log.debug` things that should stand out. Avoid info. Use warn when recoverable. Use error when unrecoverable or "really bad"
|
|
30
|
+
|
|
27
31
|
### Skills
|
|
28
32
|
|
|
29
33
|
`mcp__jaypie__skill(alias: String)`
|
|
30
34
|
|
|
31
35
|
Contents: index, releasenotes
|
|
32
|
-
Development: documentation, errors, logs, mocks, monorepo, style, subpackages, tests
|
|
36
|
+
Development: documentation, errors, llm, logs, mocks, monorepo, style, subpackages, tests
|
|
33
37
|
Infrastructure: aws, cdk, cicd, datadog, dns, dynamodb, express, lambda, secrets, streaming, variables, websockets
|
|
34
38
|
Patterns: fabric, handlers, models, services, vocabulary
|
|
35
39
|
Meta: issues, jaypie, skills, tools
|
package/skills/secrets.md
CHANGED
|
@@ -5,190 +5,188 @@ related: aws, cdk, variables
|
|
|
5
5
|
|
|
6
6
|
# Secret Management
|
|
7
7
|
|
|
8
|
-
Jaypie uses AWS Secrets Manager for secure credential storage
|
|
8
|
+
Jaypie uses AWS Secrets Manager for secure credential storage. The `JaypieEnvSecret` construct creates secrets at deploy time from environment variables, and `getEnvSecret` retrieves them at runtime.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## The Pattern
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
1. **Deploy time**: Set environment variables in CI/CD (e.g., `MONGODB_URI=mongodb+srv://...`)
|
|
13
|
+
2. **CDK**: `JaypieEnvSecret` reads the env var and creates/updates an AWS secret
|
|
14
|
+
3. **Runtime**: `getEnvSecret("MONGODB_URI")` fetches from Secrets Manager
|
|
15
|
+
|
|
16
|
+
This keeps secrets out of code and config files while enabling environment-specific values.
|
|
17
|
+
|
|
18
|
+
## CDK: Creating Secrets with JaypieEnvSecret
|
|
19
|
+
|
|
20
|
+
The simplest pattern uses the environment variable name as the construct ID:
|
|
13
21
|
|
|
14
22
|
```typescript
|
|
15
|
-
import {
|
|
23
|
+
import { JaypieEnvSecret, JaypieLambda } from "@jaypie/constructs";
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
const
|
|
25
|
+
// Creates secret from process.env.MONGODB_URI at deploy time
|
|
26
|
+
const mongoSecret = new JaypieEnvSecret(this, "MONGODB_URI");
|
|
27
|
+
const anthropicSecret = new JaypieEnvSecret(this, "ANTHROPIC_API_KEY");
|
|
28
|
+
|
|
29
|
+
// Lambda with secrets array (auto-creates JaypieEnvSecret instances)
|
|
30
|
+
new JaypieLambda(this, "Handler", {
|
|
31
|
+
code: "dist/lambda",
|
|
32
|
+
handler: "index.handler",
|
|
33
|
+
secrets: ["MONGODB_URI", "ANTHROPIC_API_KEY"],
|
|
34
|
+
});
|
|
19
35
|
```
|
|
20
36
|
|
|
21
|
-
|
|
37
|
+
When the construct ID matches an environment variable name, `JaypieEnvSecret` automatically:
|
|
38
|
+
- Uses that env var's value as the secret content
|
|
39
|
+
- Sets `envKey` to the ID for later reference
|
|
22
40
|
|
|
23
|
-
|
|
41
|
+
### CI/CD Setup
|
|
24
42
|
|
|
25
|
-
|
|
26
|
-
2. `{name}_SECRET` - If found, fetches from AWS Secrets Manager
|
|
27
|
-
3. `{name}` - Returns direct value without AWS call
|
|
43
|
+
Set secrets as environment variables in your deployment pipeline:
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
```yaml
|
|
46
|
+
# GitHub Actions example
|
|
47
|
+
jobs:
|
|
48
|
+
deploy:
|
|
49
|
+
env:
|
|
50
|
+
MONGODB_URI: ${{ secrets.MONGODB_URI }}
|
|
51
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
52
|
+
steps:
|
|
53
|
+
- run: npx cdk deploy
|
|
54
|
+
```
|
|
30
55
|
|
|
31
|
-
##
|
|
56
|
+
## Runtime: Retrieving Secrets
|
|
32
57
|
|
|
33
|
-
Use `
|
|
58
|
+
Use `getEnvSecret` to fetch secrets in Lambda:
|
|
34
59
|
|
|
35
60
|
```typescript
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
// Load secrets and set in process.env
|
|
39
|
-
await loadEnvSecrets("ANTHROPIC_API_KEY", "OPENAI_API_KEY", "MONGODB_URI");
|
|
61
|
+
import { getEnvSecret } from "jaypie";
|
|
40
62
|
|
|
41
|
-
|
|
63
|
+
const mongoUri = await getEnvSecret("MONGODB_URI");
|
|
64
|
+
const apiKey = await getEnvSecret("ANTHROPIC_API_KEY");
|
|
42
65
|
```
|
|
43
66
|
|
|
44
|
-
|
|
67
|
+
### Loading Multiple Secrets
|
|
45
68
|
|
|
46
|
-
|
|
69
|
+
Use `loadEnvSecrets` during handler initialization to populate `process.env`:
|
|
47
70
|
|
|
48
71
|
```typescript
|
|
49
|
-
|
|
50
|
-
environment: {
|
|
51
|
-
// SECRET_ prefix triggers AWS Secrets Manager fetch
|
|
52
|
-
SECRET_MONGODB_URI: "my-project/mongodb-uri",
|
|
53
|
-
SECRET_API_KEY: "my-project/third-party-api-key",
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
```
|
|
72
|
+
import { loadEnvSecrets } from "jaypie";
|
|
57
73
|
|
|
58
|
-
|
|
74
|
+
await loadEnvSecrets("ANTHROPIC_API_KEY", "OPENAI_API_KEY", "MONGODB_URI");
|
|
59
75
|
|
|
60
|
-
|
|
61
|
-
// getEnvSecret sees SECRET_MONGODB_URI and fetches from Secrets Manager
|
|
62
|
-
const mongoUri = await getEnvSecret("MONGODB_URI");
|
|
76
|
+
// Now available as process.env.ANTHROPIC_API_KEY, etc.
|
|
63
77
|
```
|
|
64
78
|
|
|
65
|
-
##
|
|
79
|
+
## Provider/Consumer Pattern
|
|
66
80
|
|
|
67
|
-
|
|
81
|
+
For shared secrets across environments (e.g., sandbox providing to personal builds):
|
|
68
82
|
|
|
69
83
|
```typescript
|
|
70
|
-
|
|
84
|
+
// Sandbox stack (provider) - exports the secret name
|
|
85
|
+
new JaypieEnvSecret(this, "SHARED_API_KEY", { provider: true });
|
|
71
86
|
|
|
72
|
-
//
|
|
73
|
-
|
|
87
|
+
// Personal build (consumer) - imports from sandbox
|
|
88
|
+
new JaypieEnvSecret(this, "SHARED_API_KEY"); // consumer auto-detected
|
|
74
89
|
```
|
|
75
90
|
|
|
76
|
-
|
|
91
|
+
The construct auto-detects consumer mode for personal/ephemeral environments (`PROJECT_ENV=personal` or `CDK_ENV_PERSONAL=true`).
|
|
77
92
|
|
|
78
|
-
##
|
|
93
|
+
## Generated Secrets
|
|
79
94
|
|
|
80
|
-
|
|
95
|
+
For secrets without a source value (e.g., database passwords):
|
|
81
96
|
|
|
82
97
|
```typescript
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
98
|
+
new JaypieEnvSecret(this, "DB_PASSWORD", {
|
|
99
|
+
generateSecretString: {
|
|
100
|
+
excludePunctuation: true,
|
|
101
|
+
passwordLength: 32,
|
|
102
|
+
},
|
|
88
103
|
});
|
|
89
|
-
|
|
90
|
-
// Grant read access
|
|
91
|
-
secret.grantRead(lambdaFunction);
|
|
92
104
|
```
|
|
93
105
|
|
|
94
|
-
|
|
106
|
+
## Tagging
|
|
95
107
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
108
|
+
Apply standard tags for organization:
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
new JaypieEnvSecret(this, "STRIPE_KEY", {
|
|
112
|
+
roleTag: CDK.ROLE.PAYMENT,
|
|
113
|
+
vendorTag: CDK.VENDOR.STRIPE,
|
|
114
|
+
});
|
|
100
115
|
```
|
|
101
116
|
|
|
102
|
-
##
|
|
117
|
+
## Local Development
|
|
103
118
|
|
|
104
|
-
|
|
119
|
+
For local development, set environment variables directly in `.env.local`:
|
|
105
120
|
|
|
121
|
+
```bash
|
|
122
|
+
# .env.local (not committed)
|
|
123
|
+
ANTHROPIC_API_KEY=sk-ant-test123
|
|
124
|
+
MONGODB_URI=mongodb://localhost:27017/dev
|
|
106
125
|
```
|
|
107
|
-
{project-key}/{secret-name}
|
|
108
126
|
|
|
109
|
-
|
|
110
|
-
- my-api/mongodb-uri
|
|
111
|
-
- my-api/stripe-key
|
|
112
|
-
- my-api/auth0-secret
|
|
113
|
-
```
|
|
127
|
+
`getEnvSecret` returns these values directly without AWS calls when no `SECRET_` prefix is present.
|
|
114
128
|
|
|
115
|
-
##
|
|
129
|
+
## Alternative Approaches
|
|
116
130
|
|
|
117
|
-
|
|
131
|
+
### Explicit Value
|
|
118
132
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
Pass a value directly instead of reading from environment:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
new JaypieEnvSecret(this, "ApiKey", {
|
|
137
|
+
value: "sk_live_abc123", // Not recommended - prefer env vars
|
|
138
|
+
});
|
|
123
139
|
```
|
|
124
140
|
|
|
125
|
-
|
|
141
|
+
### Manual SECRET_ Linking
|
|
142
|
+
|
|
143
|
+
For non-JaypieEnvSecret secrets, manually set the `SECRET_` prefix:
|
|
126
144
|
|
|
127
145
|
```typescript
|
|
128
|
-
|
|
129
|
-
|
|
146
|
+
new JaypieLambda(this, "Handler", {
|
|
147
|
+
environment: {
|
|
148
|
+
SECRET_MONGODB_URI: "my-project/mongodb-uri", // AWS secret name
|
|
149
|
+
},
|
|
150
|
+
});
|
|
130
151
|
```
|
|
131
152
|
|
|
132
|
-
|
|
153
|
+
At runtime, `getEnvSecret("MONGODB_URI")` sees `SECRET_MONGODB_URI` and fetches from that AWS secret name.
|
|
133
154
|
|
|
134
|
-
|
|
155
|
+
The `_SECRET` suffix also works:
|
|
135
156
|
|
|
136
157
|
```typescript
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
// Second call: returns cached value
|
|
141
|
-
const key2 = await getEnvSecret("API_KEY");
|
|
158
|
+
environment: {
|
|
159
|
+
MONGODB_URI_SECRET: "my-project/mongodb-uri",
|
|
160
|
+
}
|
|
142
161
|
```
|
|
143
162
|
|
|
144
|
-
|
|
163
|
+
### Direct Secret Access
|
|
145
164
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Configure automatic rotation for supported secrets:
|
|
165
|
+
Use `getSecret` when you need to fetch by exact AWS secret name:
|
|
149
166
|
|
|
150
167
|
```typescript
|
|
151
|
-
|
|
152
|
-
secretName: "my-project/db-password",
|
|
153
|
-
generateSecretString: {
|
|
154
|
-
excludePunctuation: true,
|
|
155
|
-
passwordLength: 32,
|
|
156
|
-
},
|
|
157
|
-
});
|
|
168
|
+
import { getSecret } from "jaypie";
|
|
158
169
|
|
|
159
|
-
secret
|
|
160
|
-
automaticallyAfter: Duration.days(30),
|
|
161
|
-
rotationLambda: rotationFunction,
|
|
162
|
-
});
|
|
170
|
+
const secret = await getSecret("my-project/production/api-key");
|
|
163
171
|
```
|
|
164
172
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
For local development, set environment variables directly:
|
|
173
|
+
Note: `getSecret` requires `AWS_SESSION_TOKEN` and always calls Secrets Manager.
|
|
168
174
|
|
|
169
|
-
|
|
170
|
-
# .env.local (not committed)
|
|
171
|
-
ANTHROPIC_API_KEY=sk-ant-test123
|
|
172
|
-
MONGODB_URI=mongodb://localhost:27017/dev
|
|
173
|
-
API_KEY=test_key_123
|
|
174
|
-
```
|
|
175
|
+
## Caching
|
|
175
176
|
|
|
176
|
-
|
|
177
|
+
Secrets are cached by default to reduce API calls. Cache is scoped to Lambda execution context (warm starts reuse cache).
|
|
177
178
|
|
|
178
179
|
## IAM Permissions
|
|
179
180
|
|
|
180
|
-
|
|
181
|
+
`JaypieEnvSecret` implements `ISecret`, so grant access directly:
|
|
181
182
|
|
|
182
183
|
```typescript
|
|
184
|
+
const secret = new JaypieEnvSecret(this, "API_KEY");
|
|
183
185
|
secret.grantRead(lambdaFunction);
|
|
184
|
-
|
|
185
|
-
// Or via policy
|
|
186
|
-
lambdaFunction.addToRolePolicy(new PolicyStatement({
|
|
187
|
-
actions: ["secretsmanager:GetSecretValue"],
|
|
188
|
-
resources: [secret.secretArn],
|
|
189
|
-
}));
|
|
190
186
|
```
|
|
191
187
|
|
|
188
|
+
Or use the `secrets` array on `JaypieLambda`, which handles permissions automatically.
|
|
189
|
+
|
|
192
190
|
## Testing
|
|
193
191
|
|
|
194
192
|
Mock secret functions in tests:
|
package/skills/skills.md
CHANGED
|
@@ -16,7 +16,7 @@ Look up skills by alias: `mcp__jaypie__skill(alias)`
|
|
|
16
16
|
| Category | Skills |
|
|
17
17
|
|----------|--------|
|
|
18
18
|
| contents | index, releasenotes |
|
|
19
|
-
| development | documentation, errors, logs, mocks, monorepo, style, subpackages, tests |
|
|
19
|
+
| development | documentation, errors, llm, logs, mocks, monorepo, style, subpackages, tests |
|
|
20
20
|
| infrastructure | aws, cdk, cicd, datadog, dns, dynamodb, express, lambda, secrets, streaming, variables, websockets |
|
|
21
21
|
| patterns | fabric, handlers, models, services, vocabulary |
|
|
22
22
|
| meta | issues, jaypie, skills, tools |
|