@jaypie/mcp 0.3.2 → 0.4.0

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 (79) hide show
  1. package/dist/createMcpServer.d.ts +7 -1
  2. package/dist/index.js +26 -3135
  3. package/dist/index.js.map +1 -1
  4. package/dist/suite.d.ts +1 -0
  5. package/dist/suite.js +2442 -0
  6. package/dist/suite.js.map +1 -0
  7. package/package.json +8 -3
  8. package/release-notes/constructs/1.2.17.md +11 -0
  9. package/release-notes/fabric/0.1.2.md +11 -0
  10. package/release-notes/fabric/0.1.3.md +25 -0
  11. package/release-notes/fabric/0.1.4.md +42 -0
  12. package/release-notes/mcp/0.3.3.md +12 -0
  13. package/release-notes/mcp/0.3.4.md +36 -0
  14. package/release-notes/mcp/0.4.0.md +27 -0
  15. package/release-notes/testkit/1.2.15.md +23 -0
  16. package/skills/agents.md +25 -0
  17. package/skills/aws.md +107 -0
  18. package/skills/cdk.md +141 -0
  19. package/skills/cicd.md +152 -0
  20. package/skills/datadog.md +129 -0
  21. package/skills/debugging.md +148 -0
  22. package/skills/dns.md +134 -0
  23. package/skills/dynamodb.md +140 -0
  24. package/skills/errors.md +142 -0
  25. package/skills/fabric.md +191 -0
  26. package/skills/index.md +7 -0
  27. package/skills/jaypie.md +100 -0
  28. package/skills/legacy.md +97 -0
  29. package/skills/logs.md +160 -0
  30. package/skills/mocks.md +174 -0
  31. package/skills/models.md +195 -0
  32. package/skills/releasenotes.md +94 -0
  33. package/skills/secrets.md +155 -0
  34. package/skills/services.md +175 -0
  35. package/skills/style.md +190 -0
  36. package/skills/tests.md +209 -0
  37. package/skills/tools.md +127 -0
  38. package/skills/topics.md +116 -0
  39. package/skills/variables.md +146 -0
  40. package/skills/writing.md +153 -0
  41. package/prompts/Branch_Management.md +0 -34
  42. package/prompts/Development_Process.md +0 -89
  43. package/prompts/Jaypie_Agent_Rules.md +0 -110
  44. package/prompts/Jaypie_Auth0_Express_Mongoose.md +0 -736
  45. package/prompts/Jaypie_Browser_and_Frontend_Web_Packages.md +0 -18
  46. package/prompts/Jaypie_CDK_Constructs_and_Patterns.md +0 -430
  47. package/prompts/Jaypie_CICD_with_GitHub_Actions.md +0 -371
  48. package/prompts/Jaypie_Commander_CLI_Package.md +0 -166
  49. package/prompts/Jaypie_Core_Errors_and_Logging.md +0 -39
  50. package/prompts/Jaypie_DynamoDB_Package.md +0 -774
  51. package/prompts/Jaypie_Eslint_NPM_Package.md +0 -78
  52. package/prompts/Jaypie_Express_Package.md +0 -630
  53. package/prompts/Jaypie_Fabric_Commander.md +0 -411
  54. package/prompts/Jaypie_Fabric_LLM.md +0 -312
  55. package/prompts/Jaypie_Fabric_Lambda.md +0 -308
  56. package/prompts/Jaypie_Fabric_MCP.md +0 -316
  57. package/prompts/Jaypie_Fabric_Package.md +0 -513
  58. package/prompts/Jaypie_Fabricator.md +0 -617
  59. package/prompts/Jaypie_Ideal_Project_Structure.md +0 -78
  60. package/prompts/Jaypie_Init_CICD_with_GitHub_Actions.md +0 -1186
  61. package/prompts/Jaypie_Init_Express_on_Lambda.md +0 -115
  62. package/prompts/Jaypie_Init_Jaypie_CDK_Package.md +0 -35
  63. package/prompts/Jaypie_Init_Lambda_Package.md +0 -505
  64. package/prompts/Jaypie_Init_Monorepo_Project.md +0 -44
  65. package/prompts/Jaypie_Init_Project_Subpackage.md +0 -65
  66. package/prompts/Jaypie_Legacy_Patterns.md +0 -15
  67. package/prompts/Jaypie_Llm_Calls.md +0 -449
  68. package/prompts/Jaypie_Llm_Tools.md +0 -155
  69. package/prompts/Jaypie_MCP_Package.md +0 -281
  70. package/prompts/Jaypie_Mocks_and_Testkit.md +0 -137
  71. package/prompts/Jaypie_Repokit.md +0 -103
  72. package/prompts/Jaypie_Scrub.md +0 -177
  73. package/prompts/Jaypie_Streaming.md +0 -467
  74. package/prompts/Templates_CDK_Subpackage.md +0 -115
  75. package/prompts/Templates_Express_Subpackage.md +0 -187
  76. package/prompts/Templates_Project_Monorepo.md +0 -326
  77. package/prompts/Templates_Project_Subpackage.md +0 -93
  78. package/prompts/Write_Efficient_Prompt_Guides.md +0 -48
  79. package/prompts/Write_and_Maintain_Engaging_Readme.md +0 -67
@@ -0,0 +1,36 @@
1
+ ---
2
+ version: 0.3.4
3
+ date: 2025-01-20
4
+ summary: Add skill tool for cleaner documentation access
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ ### New Features
10
+
11
+ - **skill tool**: New `skill(alias)` function for accessing Jaypie documentation
12
+ - Call `skill("index")` to list all available skills with descriptions
13
+ - Call `skill("aws")`, `skill("tests")`, etc. to get specific documentation
14
+ - Path traversal protection for security
15
+ - Case insensitive alias matching
16
+
17
+ ### New Skills
18
+
19
+ Added 25 skill files covering all aspects of Jaypie development:
20
+ - **Infrastructure**: aws, cdk, cicd, datadog, dns, dynamodb, secrets, variables
21
+ - **Development**: debugging, errors, logs, mocks, style, tests, writing
22
+ - **Patterns**: fabric, models, services, tools
23
+ - **Reference**: agents, index, jaypie, legacy, releasenotes, topics
24
+
25
+ ### Skill Frontmatter
26
+
27
+ Skills use YAML frontmatter with:
28
+ - `description` - Brief description shown in index listing
29
+ - `related` - Comma-separated list of related skill aliases
30
+
31
+ ### Deprecations
32
+
33
+ - `list_prompts` - Use `skill("index")` instead
34
+ - `read_prompt` - Use `skill(alias)` instead
35
+
36
+ Both deprecated tools remain functional for backwards compatibility.
@@ -0,0 +1,27 @@
1
+ ---
2
+ version: 0.4.0
3
+ date: 2025-01-20
4
+ summary: Remove deprecated list_prompts and read_prompt tools
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ ### Breaking Changes
10
+
11
+ - **Removed `list_prompts` tool**: Use `skill("index")` instead
12
+ - **Removed `read_prompt` tool**: Use `skill(alias)` instead
13
+ - **Removed `prompts/` directory from package**: All documentation now lives in `skills/`
14
+
15
+ ### Migration
16
+
17
+ If you were using `list_prompts`, replace with:
18
+ ```
19
+ skill("index")
20
+ ```
21
+
22
+ If you were using `read_prompt("Jaypie_Express_Package.md")`, find the equivalent skill alias and use:
23
+ ```
24
+ skill("express") // or appropriate alias
25
+ ```
26
+
27
+ Use `skill("index")` to see all available skills with descriptions.
@@ -0,0 +1,23 @@
1
+ ---
2
+ version: 1.2.15
3
+ date: 2025-01-20
4
+ summary: Removed vocabulary mocks, updated to fabric types
5
+ ---
6
+
7
+ ## Changes
8
+
9
+ - Removed `vocabulary` mock module (vocabulary package deprecated)
10
+ - Updated `IndexableEntity` type import to `IndexableModel` from `@jaypie/fabric`
11
+ - Removed `mock.vocabulary` exports from mock index
12
+
13
+ ## Migration
14
+
15
+ If you were using vocabulary mocks, they are no longer needed as the functionality has moved to `@jaypie/fabric`:
16
+
17
+ ```typescript
18
+ // Before
19
+ import { IndexableEntity } from "@jaypie/testkit/mock";
20
+
21
+ // After
22
+ import { IndexableModel } from "@jaypie/fabric";
23
+ ```
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Minimal agent instructions
3
+ ---
4
+
5
+ # Agent Instructions
6
+
7
+ Add to CLAUDE.md or AGENTS.md:
8
+
9
+ ```markdown
10
+ ## Jaypie
11
+
12
+ Query `mcp__jaypie__skill(alias: String)` for development guidance:
13
+
14
+ Contents: index, releasenotes, topics
15
+ Development: debugging, errors, logs, mocks, style, tests, writing
16
+ Infrastructure: aws, cdk, cicd, datadog, dns, dynamodb, secrets, variables
17
+ Patterns: fabric, models, services, tools
18
+ Meta: agents, jaypie, legacy
19
+ ```
20
+
21
+ Or, for one line,
22
+
23
+ ```markdown
24
+ `mcp__jaypie__skill(index)` describes Jaypie development skills for this repository.
25
+ ```
package/skills/aws.md ADDED
@@ -0,0 +1,107 @@
1
+ ---
2
+ description: AWS integration, CLI tools, and cloud services
3
+ related: cdk, dynamodb, secrets, logs
4
+ ---
5
+
6
+ # AWS Integration
7
+
8
+ Jaypie integrates with AWS services through SDK utilities and CLI tools available via the MCP.
9
+
10
+ ## MCP AWS Tools
11
+
12
+ The Jaypie MCP provides AWS tools that use your local AWS credentials:
13
+
14
+ ### Lambda Functions
15
+ ```
16
+ aws_lambda_list_functions - List functions with optional prefix filter
17
+ aws_lambda_get_function - Get function configuration and details
18
+ ```
19
+
20
+ ### Step Functions
21
+ ```
22
+ aws_stepfunctions_list_executions - List executions for a state machine
23
+ aws_stepfunctions_stop_execution - Stop a running execution
24
+ ```
25
+
26
+ ### CloudWatch Logs
27
+ ```
28
+ aws_logs_filter_log_events - Search logs with patterns and time ranges
29
+ ```
30
+
31
+ ### S3
32
+ ```
33
+ aws_s3_list_objects - List bucket objects with prefix filtering
34
+ ```
35
+
36
+ ### DynamoDB
37
+ ```
38
+ aws_dynamodb_describe_table - Get table metadata and indexes
39
+ aws_dynamodb_scan - Scan table (use sparingly)
40
+ aws_dynamodb_query - Query by partition key
41
+ aws_dynamodb_get_item - Get single item by key
42
+ ```
43
+
44
+ ### SQS
45
+ ```
46
+ aws_sqs_list_queues - List queues with prefix filter
47
+ aws_sqs_get_queue_attributes - Get queue attributes
48
+ aws_sqs_receive_message - Peek at queue messages
49
+ aws_sqs_purge_queue - Delete all messages (irreversible)
50
+ ```
51
+
52
+ ### CloudFormation
53
+ ```
54
+ aws_cloudformation_describe_stack - Get stack details and outputs
55
+ ```
56
+
57
+ ## Credential Management
58
+
59
+ Tools use the host's AWS credential chain:
60
+ 1. Environment variables (`AWS_ACCESS_KEY_ID`, etc.)
61
+ 2. `~/.aws/credentials` and `~/.aws/config`
62
+ 3. SSO sessions via `aws sso login`
63
+
64
+ ```bash
65
+ # List available profiles
66
+ aws_list_profiles
67
+
68
+ # Use a specific profile
69
+ aws_lambda_list_functions --profile production
70
+ ```
71
+
72
+ ## Jaypie AWS Package
73
+
74
+ The `@jaypie/aws` package provides SDK utilities:
75
+
76
+ ```typescript
77
+ import { getSecret, sendMessage } from "@jaypie/aws";
78
+
79
+ // Get secret from Secrets Manager
80
+ const apiKey = await getSecret("my-api-key");
81
+
82
+ // Send SQS message
83
+ await sendMessage(queueUrl, { action: "process", id: "123" });
84
+ ```
85
+
86
+ ## Environment-Based Configuration
87
+
88
+ Use CDK environment variables in Lambda:
89
+
90
+ | Variable | Description |
91
+ |----------|-------------|
92
+ | `CDK_ENV_BUCKET` | S3 bucket name |
93
+ | `CDK_ENV_QUEUE_URL` | SQS queue URL |
94
+ | `CDK_ENV_SNS_TOPIC_ARN` | SNS topic ARN |
95
+
96
+ ## Profile Selection
97
+
98
+ When working with multiple AWS accounts:
99
+
100
+ ```bash
101
+ # Set default profile
102
+ export AWS_PROFILE=development
103
+
104
+ # Or specify per-command via MCP tools
105
+ aws_lambda_list_functions --profile production --region us-west-2
106
+ ```
107
+
package/skills/cdk.md ADDED
@@ -0,0 +1,141 @@
1
+ ---
2
+ description: CDK constructs and deployment patterns
3
+ related: aws, dynamodb, cicd
4
+ ---
5
+
6
+ # CDK Constructs
7
+
8
+ Jaypie provides CDK constructs through `@jaypie/constructs` for deploying AWS infrastructure with best practices built-in.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install @jaypie/constructs
14
+ ```
15
+
16
+ ## Core Constructs
17
+
18
+ ### JaypieLambda
19
+
20
+ Lambda function with Datadog tracing, logging, and error handling:
21
+
22
+ ```typescript
23
+ import { JaypieLambda } from "@jaypie/constructs";
24
+
25
+ const handler = new JaypieLambda(this, "ApiHandler", {
26
+ entry: "src/handler.ts",
27
+ handler: "handler",
28
+ environment: {
29
+ PROJECT_ENV: "production",
30
+ PROJECT_KEY: "my-api",
31
+ },
32
+ timeout: Duration.seconds(30),
33
+ memorySize: 512,
34
+ });
35
+ ```
36
+
37
+ ### JaypieQueue
38
+
39
+ SQS queue with DLQ and Lambda trigger:
40
+
41
+ ```typescript
42
+ import { JaypieQueue } from "@jaypie/constructs";
43
+
44
+ const queue = new JaypieQueue(this, "ProcessQueue", {
45
+ visibilityTimeout: Duration.seconds(60),
46
+ retentionPeriod: Duration.days(7),
47
+ });
48
+
49
+ // Connect to Lambda
50
+ queue.addEventSource(handler);
51
+ ```
52
+
53
+ ### JaypieBucket
54
+
55
+ S3 bucket with encryption and lifecycle rules:
56
+
57
+ ```typescript
58
+ import { JaypieBucket } from "@jaypie/constructs";
59
+
60
+ const bucket = new JaypieBucket(this, "AssetsBucket", {
61
+ encryption: BucketEncryption.S3_MANAGED,
62
+ lifecycleRules: [
63
+ { expiration: Duration.days(90), prefix: "temp/" }
64
+ ],
65
+ });
66
+ ```
67
+
68
+ ## Stack Structure
69
+
70
+ Organize stacks in the `stacks/` directory:
71
+
72
+ ```
73
+ stacks/
74
+ ├── cdk/
75
+ │ ├── src/
76
+ │ │ ├── app.ts # CDK app entry
77
+ │ │ └── stacks/
78
+ │ │ ├── api.ts # API stack
79
+ │ │ └── data.ts # Data stack
80
+ │ ├── cdk.json
81
+ │ └── package.json
82
+ ```
83
+
84
+ ## Environment Configuration
85
+
86
+ Use environment-specific configuration:
87
+
88
+ ```typescript
89
+ const env = process.env.PROJECT_ENV || "sandbox";
90
+ const nonce = process.env.PROJECT_NONCE || "dev";
91
+
92
+ const stack = new ApiStack(app, `api-${env}-${nonce}`, {
93
+ env: {
94
+ account: process.env.CDK_DEFAULT_ACCOUNT,
95
+ region: process.env.CDK_DEFAULT_REGION,
96
+ },
97
+ });
98
+ ```
99
+
100
+ ## Deployment
101
+
102
+ ```bash
103
+ # Deploy to sandbox
104
+ PROJECT_ENV=sandbox PROJECT_NONCE=dev cdk deploy
105
+
106
+ # Deploy to production
107
+ PROJECT_ENV=production PROJECT_NONCE=prod cdk deploy
108
+ ```
109
+
110
+ ## Environment Variables
111
+
112
+ Pass configuration to Lambda via environment variables:
113
+
114
+ ```typescript
115
+ const handler = new JaypieLambda(this, "Handler", {
116
+ environment: {
117
+ CDK_ENV_BUCKET: bucket.bucketName,
118
+ CDK_ENV_QUEUE_URL: queue.queueUrl,
119
+ SECRET_MONGODB_URI: "mongodb-connection-string",
120
+ },
121
+ });
122
+
123
+ // Grant permissions
124
+ bucket.grantReadWrite(handler);
125
+ queue.grantSendMessages(handler);
126
+ ```
127
+
128
+ ## Datadog Integration
129
+
130
+ Enable Datadog tracing:
131
+
132
+ ```typescript
133
+ const handler = new JaypieLambda(this, "Handler", {
134
+ datadogApiKeyArn: "arn:aws:secretsmanager:...",
135
+ environment: {
136
+ DD_ENV: "production",
137
+ DD_SERVICE: "my-api",
138
+ },
139
+ });
140
+ ```
141
+
package/skills/cicd.md ADDED
@@ -0,0 +1,152 @@
1
+ ---
2
+ description: GitHub Actions CI/CD workflows
3
+ related: tests, cdk
4
+ ---
5
+
6
+ # CI/CD with GitHub Actions
7
+
8
+ Jaypie projects use GitHub Actions for continuous integration and deployment.
9
+
10
+ ## Standard Workflows
11
+
12
+ ### npm-check.yml
13
+
14
+ Runs on feature branches (`feat/*`, `fix/*`, `devin/*`):
15
+
16
+ ```yaml
17
+ name: npm-check
18
+
19
+ on:
20
+ push:
21
+ branches:
22
+ - 'feat/*'
23
+ - 'fix/*'
24
+
25
+ jobs:
26
+ lint:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: actions/setup-node@v4
31
+ with:
32
+ node-version: 24
33
+ - run: npm ci
34
+ - run: npm run lint
35
+
36
+ typecheck:
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: actions/setup-node@v4
41
+ with:
42
+ node-version: 24
43
+ - run: npm ci
44
+ - run: npm run typecheck
45
+
46
+ test:
47
+ runs-on: ubuntu-latest
48
+ strategy:
49
+ matrix:
50
+ node-version: [22, 24, 25]
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: actions/setup-node@v4
54
+ with:
55
+ node-version: ${{ matrix.node-version }}
56
+ - run: npm ci
57
+ - run: npm run build
58
+ - run: npm test
59
+ ```
60
+
61
+ ### npm-deploy.yml
62
+
63
+ Runs on `main` branch and release tags:
64
+
65
+ ```yaml
66
+ name: npm-deploy
67
+
68
+ on:
69
+ push:
70
+ branches: [main]
71
+ tags:
72
+ - 'deploy-*'
73
+ - 'rc-*'
74
+
75
+ jobs:
76
+ publish:
77
+ runs-on: ubuntu-latest
78
+ permissions:
79
+ contents: read
80
+ id-token: write
81
+ steps:
82
+ - uses: actions/checkout@v4
83
+ - uses: actions/setup-node@v4
84
+ with:
85
+ node-version: 24
86
+ registry-url: 'https://registry.npmjs.org'
87
+ - run: npm ci
88
+ - run: npm run build
89
+ - run: npm publish --provenance
90
+ env:
91
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
92
+ ```
93
+
94
+ ## Branch Strategy
95
+
96
+ | Branch Pattern | Purpose | Triggers |
97
+ |---------------|---------|----------|
98
+ | `main` | Production releases | npm-deploy |
99
+ | `feat/*` | Feature development | npm-check |
100
+ | `fix/*` | Bug fixes | npm-check |
101
+ | `rc-*` tags | Release candidates | npm-deploy (--tag rc) |
102
+
103
+ ## Testing Matrix
104
+
105
+ Test across multiple Node.js versions:
106
+
107
+ ```yaml
108
+ strategy:
109
+ matrix:
110
+ node-version: [22, 24, 25]
111
+ ```
112
+
113
+ ## Secrets Configuration
114
+
115
+ Required repository secrets:
116
+
117
+ | Secret | Purpose |
118
+ |--------|---------|
119
+ | `NPM_TOKEN` | npm publish authentication |
120
+ | `DATADOG_API_KEY` | Optional: Test tracing |
121
+
122
+ ## Workflow Tips
123
+
124
+ ### Skip Already-Published Versions
125
+
126
+ ```yaml
127
+ - run: |
128
+ CURRENT=$(npm view ${{ github.repository }} version 2>/dev/null || echo "0.0.0")
129
+ LOCAL=$(node -p "require('./package.json').version")
130
+ if [ "$CURRENT" = "$LOCAL" ]; then
131
+ echo "Version already published, skipping"
132
+ exit 0
133
+ fi
134
+ npm publish --provenance
135
+ ```
136
+
137
+ ### Conditional Job Execution
138
+
139
+ Run jobs only when specific files change:
140
+
141
+ ```yaml
142
+ - uses: dorny/paths-filter@v2
143
+ id: changes
144
+ with:
145
+ filters: |
146
+ src:
147
+ - 'packages/llm/**'
148
+
149
+ - run: npm test -w packages/llm
150
+ if: steps.changes.outputs.src == 'true'
151
+ ```
152
+
@@ -0,0 +1,129 @@
1
+ ---
2
+ description: Datadog integration and observability
3
+ related: logs, debugging, aws
4
+ ---
5
+
6
+ # Datadog Integration
7
+
8
+ Jaypie integrates with Datadog for logging, monitoring, and APM.
9
+
10
+ ## MCP Datadog Tools
11
+
12
+ The Jaypie MCP provides tools for querying Datadog:
13
+
14
+ ### Log Search
15
+ ```
16
+ datadog_logs - Search individual log entries
17
+ datadog_log_analytics - Aggregate logs with groupBy
18
+ ```
19
+
20
+ ### Monitoring
21
+ ```
22
+ datadog_monitors - List and check monitor status
23
+ datadog_synthetics - List synthetic tests and results
24
+ datadog_metrics - Query timeseries metrics
25
+ datadog_rum - Search Real User Monitoring events
26
+ ```
27
+
28
+ ## Environment Variables
29
+
30
+ Configure Datadog tools via environment:
31
+
32
+ | Variable | Description |
33
+ |----------|-------------|
34
+ | `DATADOG_API_KEY` or `DD_API_KEY` | API key |
35
+ | `DATADOG_APP_KEY` or `DD_APP_KEY` | Application key |
36
+ | `DD_ENV` | Default environment filter |
37
+ | `DD_SERVICE` | Default service filter |
38
+ | `DD_SOURCE` | Default log source (default: lambda) |
39
+
40
+ ## Common Queries
41
+
42
+ ### Search Error Logs
43
+
44
+ ```
45
+ datadog_logs --query "status:error" --from "now-1h"
46
+ ```
47
+
48
+ ### Count Errors by Service
49
+
50
+ ```
51
+ datadog_log_analytics --groupBy '["service"]' --query "status:error"
52
+ ```
53
+
54
+ ### Check Alerting Monitors
55
+
56
+ ```
57
+ datadog_monitors --status '["Alert", "Warn"]'
58
+ ```
59
+
60
+ ## Lambda Integration
61
+
62
+ Enable Datadog tracing in CDK:
63
+
64
+ ```typescript
65
+ import { JaypieLambda } from "@jaypie/constructs";
66
+
67
+ const handler = new JaypieLambda(this, "Handler", {
68
+ datadogApiKeyArn: process.env.CDK_ENV_DATADOG_API_KEY_ARN,
69
+ environment: {
70
+ DD_ENV: "production",
71
+ DD_SERVICE: "my-api",
72
+ DD_VERSION: "1.0.0",
73
+ },
74
+ });
75
+ ```
76
+
77
+ ## Logging Integration
78
+
79
+ Jaypie logging automatically formats for Datadog:
80
+
81
+ ```typescript
82
+ import { log } from "jaypie";
83
+
84
+ // Structured logs are indexed by Datadog
85
+ log.info("Request processed", {
86
+ userId: "user-123",
87
+ action: "checkout",
88
+ duration: 150,
89
+ });
90
+ ```
91
+
92
+ ## Query Syntax
93
+
94
+ ### Log Search Syntax
95
+
96
+ ```
97
+ status:error # By status
98
+ @http.status_code:500 # By attribute
99
+ service:my-api # By service
100
+ *timeout* # Wildcard
101
+ ```
102
+
103
+ ### Time Ranges
104
+
105
+ ```
106
+ now-15m # Last 15 minutes
107
+ now-1h # Last hour
108
+ now-1d # Last day
109
+ 2024-01-15T10:00:00Z # Specific time (ISO 8601)
110
+ ```
111
+
112
+ ## Unified Service Tagging
113
+
114
+ Use consistent tags across services:
115
+
116
+ | Tag | Purpose |
117
+ |-----|---------|
118
+ | `env` | Environment (sandbox, production) |
119
+ | `service` | Service name |
120
+ | `version` | Deployment version |
121
+
122
+ ```typescript
123
+ environment: {
124
+ DD_ENV: process.env.PROJECT_ENV,
125
+ DD_SERVICE: process.env.PROJECT_KEY,
126
+ DD_VERSION: process.env.npm_package_version,
127
+ }
128
+ ```
129
+