@jaypie/mcp 0.8.75 → 0.8.77

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.
@@ -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.8.75#7dfeb98d"
12
+ const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.77#1fb6d6fa"
13
13
  ;
14
14
  const __filename$1 = fileURLToPath(import.meta.url);
15
15
  const __dirname$1 = path.dirname(__filename$1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/mcp",
3
- "version": "0.8.75",
3
+ "version": "0.8.77",
4
4
  "description": "Jaypie MCP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,18 @@
1
+ ---
2
+ version: 1.2.66
3
+ date: 2026-06-20
4
+ summary: Forward DD_VERSION to the Lambda environment for Datadog version tagging
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - `jaypieLambdaEnv` now passes `DD_VERSION` through to the Lambda environment
10
+ when present in `process.env`, alongside the other allowlisted vars. This lets
11
+ projects tag telemetry with a version derived independently of
12
+ `PROJECT_VERSION` (e.g. from the latest git tag), which `dd-trace` reads at
13
+ runtime.
14
+ - `addDatadogLayers` now falls back the `DatadogLambda` `version` to
15
+ `process.env.DD_VERSION || process.env.PROJECT_VERSION`, keeping the version
16
+ tag consistent with the env var.
17
+
18
+ Issue: [#384](https://github.com/finlaysonstudio/jaypie/issues/384)
@@ -0,0 +1,19 @@
1
+ ---
2
+ version: 1.2.67
3
+ date: 2026-06-20
4
+ summary: Add serviceTag to JaypieDistribution for CloudFront metric and log attribution
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - `JaypieDistribution` now accepts an optional `serviceTag` prop, parallel to
10
+ `roleTag` and matching `JaypieLambda`. When set:
11
+ - The distribution is tagged with `CDK.TAG.SERVICE`, so Datadog metrics carry
12
+ `service:<value>` instead of `service:N/A`.
13
+ - The created access-log and WAF-log buckets are tagged with the same value,
14
+ so the Datadog forwarder attributes their forwarded logs to the service
15
+ instead of the generic `cloudfront`/source default.
16
+ - Omitting `serviceTag` preserves current behavior. External/imported log
17
+ buckets are not tagged (the construct does not own them).
18
+
19
+ Issue: [#387](https://github.com/finlaysonstudio/jaypie/issues/387)
@@ -0,0 +1,15 @@
1
+ ---
2
+ version: 0.8.76
3
+ date: 2026-06-20
4
+ summary: Correct the mocks skill to document the real @jaypie/testkit/mock pattern
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - Rewrote the `mocks` skill, which documented a non-existent
10
+ `mockJaypie(vi)` / `mockLogger(vi)` / `mockAws(vi)` API. The working pattern
11
+ is `vi.mock("jaypie", async () => await import("@jaypie/testkit/mock"))`,
12
+ returning the flat mock namespace directly. Sub-package and export-verification
13
+ examples updated to match.
14
+
15
+ Issue: [#385](https://github.com/finlaysonstudio/jaypie/issues/385)
@@ -0,0 +1,13 @@
1
+ ---
2
+ version: 0.8.77
3
+ date: 2026-06-20
4
+ summary: Lead LLM structured-output docs with natural schema syntax over Zod
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - Reordered the `llm` and `models` skills to present Jaypie's natural schema
10
+ syntax first for structured output, with JSON Schema and Zod as alternatives.
11
+ - Fixed the `llm` skill's `format` type signature to include `NaturalSchema`.
12
+ - Added a natural-schema validation example to the `models` skill so its
13
+ Validation Patterns section is no longer Zod-only.
@@ -0,0 +1,17 @@
1
+ ---
2
+ version: 1.2.45
3
+ date: 2026-06-20
4
+ summary: Drop the deprecated mongoose mock that broke @jaypie/testkit/mock at load time
5
+ ---
6
+
7
+ ## Removed
8
+
9
+ - **Mongoose mock dropped from the `./mock` umbrella.** `@jaypie/testkit/mock`
10
+ statically imported `@jaypie/mongoose` (a deprecated, undeclared phantom
11
+ dependency), which threw `Cannot find package '@jaypie/mongoose'` at module
12
+ load in any project without mongoose installed. The mock is removed entirely;
13
+ `jaypie` never re-exported mongoose. The `connect`, `connectFromSecretEnv`,
14
+ `disconnect`, and `mongoose` exports are no longer available from
15
+ `@jaypie/testkit/mock`.
16
+
17
+ Issue: [#385](https://github.com/finlaysonstudio/jaypie/issues/385)
package/skills/api.md CHANGED
@@ -60,4 +60,4 @@ Every response body is a JSON object with one top-level key:
60
60
  3. Single records use an object: `{ data: {} }`
61
61
  4. Multiple records use an array: `{ data: [] }`
62
62
  5. Errors always use an array: `{ errors: [] }` (responses only)
63
- 6. No other top-level keys (no `status`, `message`, `meta` at the root)
63
+ 6. No other top-level keys (no `status`, `message`, `meta` at the root) except `metadata`
package/skills/llm.md CHANGED
@@ -455,7 +455,7 @@ describe("LLM Integration", () => {
455
455
  interface LlmOperateOptions {
456
456
  data?: Record<string, any>; // Placeholder substitution data
457
457
  fallback?: LlmFallbackConfig[] | false; // Fallback provider chain
458
- format?: JsonObject | ZodType; // Structured output schema
458
+ format?: NaturalSchema | JsonObject | ZodType; // Structured output schema (natural syntax preferred)
459
459
  history?: LlmHistory; // Previous conversation
460
460
  hooks?: LlmHooks; // Lifecycle callbacks
461
461
  instructions?: string; // Additional instructions
package/skills/mocks.md CHANGED
@@ -22,11 +22,14 @@ In your test setup file:
22
22
  import { vi } from "vitest";
23
23
 
24
24
  vi.mock("jaypie", async () => {
25
- const { mockJaypie } = await import("@jaypie/testkit");
26
- return mockJaypie(vi);
25
+ const testkit = await import("@jaypie/testkit/mock");
26
+ return testkit;
27
27
  });
28
28
  ```
29
29
 
30
+ `@jaypie/testkit/mock` re-exports a vitest mock for every `jaypie` export as a
31
+ flat namespace, so returning it directly mocks the whole package.
32
+
30
33
  Configure in vitest.config.ts:
31
34
 
32
35
  ```typescript
@@ -43,35 +46,25 @@ export default defineConfig({
43
46
 
44
47
  ```typescript
45
48
  vi.mock("jaypie", async () => {
46
- const { mockJaypie } = await import("@jaypie/testkit");
47
- return mockJaypie(vi);
49
+ const testkit = await import("@jaypie/testkit/mock");
50
+ return testkit;
48
51
  });
49
52
 
50
53
  // Mocked: log, getSecret, sendMessage, etc.
51
54
  ```
52
55
 
53
- ### Logger
54
-
55
- ```typescript
56
- vi.mock("@jaypie/logger", async () => {
57
- const { mockLogger } = await import("@jaypie/testkit");
58
- return mockLogger(vi);
59
- });
60
- ```
56
+ ### Sub-Packages
61
57
 
62
- ### AWS
58
+ To mock an individual `@jaypie/*` package, return the relevant mocks from the
59
+ same flat `@jaypie/testkit/mock` namespace:
63
60
 
64
61
  ```typescript
65
- vi.mock("@jaypie/aws", async () => {
66
- const { mockAws } = await import("@jaypie/testkit");
67
- return mockAws(vi);
62
+ vi.mock("@jaypie/express", async () => {
63
+ const testkit = await import("@jaypie/testkit/mock");
64
+ return { expressHandler: testkit.expressHandler };
68
65
  });
69
66
  ```
70
67
 
71
- ### Legacy Mocks
72
-
73
- For legacy packages, see `skill("legacy")`.
74
-
75
68
  ## Using Mocks in Tests
76
69
 
77
70
  ### Verify Logging
@@ -158,20 +151,20 @@ afterEach(() => {
158
151
 
159
152
  ## Export Verification
160
153
 
161
- When adding exports to packages, update testkit:
154
+ When adding exports to a Jaypie package, add a matching mock to testkit so the
155
+ auto-mock stays complete:
162
156
 
163
157
  ```typescript
164
- // packages/testkit/src/mocks/mockJaypie.ts
165
- export function mockJaypie(vi) {
166
- return {
167
- log: mockLog(vi),
168
- getSecret: vi.fn().mockResolvedValue("mock"),
169
- // Add new exports here
170
- newFunction: vi.fn(),
171
- };
172
- }
158
+ // packages/testkit/src/mock/<package>.ts
159
+ import { createMockFunction } from "./utils";
160
+
161
+ export const newFunction = createMockFunction((x) => x);
173
162
  ```
174
163
 
164
+ Then re-export it from `src/mock/index.ts` (named export and default object) and
165
+ bump the testkit patch version. Missing mocks surface as failures in testkit's
166
+ `mock/__tests__/index.spec.ts` "all exports from original" check.
167
+
175
168
  ## See Also
176
169
 
177
170
  - **`skill("errors")`** - Error types used in mock assertions
package/skills/models.md CHANGED
@@ -83,6 +83,27 @@ const createUser = fabricService({
83
83
 
84
84
  ## Validation Patterns
85
85
 
86
+ Prefer Jaypie's natural schema syntax — it validates and types inline without a schema library. Reach for Zod only when you need refinements the natural form can't express.
87
+
88
+ ### Natural Schema
89
+
90
+ The fabric `input` object is itself a natural schema: each field declares a `type` (a constructor like `String`/`Number`, or a `const` tuple of allowed values), `required`, and `description`. Input is validated and typed before `service` runs.
91
+
92
+ ```typescript
93
+ const createUser = fabricService({
94
+ alias: "user_create",
95
+ input: {
96
+ email: { type: String, required: true, description: "User email address" },
97
+ name: { type: String, required: true, description: "User display name" },
98
+ role: { type: ["user", "admin"] as const, required: false },
99
+ },
100
+ service: async ({ email, name, role }) => {
101
+ // email, name, role are validated and typed here
102
+ return createUserInDatabase({ email, name, role: role || "user" });
103
+ },
104
+ });
105
+ ```
106
+
86
107
  ### Zod Schemas
87
108
 
88
109
  ```typescript