@mofaggolhoshen/dev-assist-mcp 1.0.4 → 1.0.6

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 (57) hide show
  1. package/AGENTS.md +72 -0
  2. package/README.md +204 -52
  3. package/content/concepts/circuit-breaker.md +25 -0
  4. package/content/setups/jwt-dotnet9.md +18 -0
  5. package/content/setups/jwt.md +25 -0
  6. package/content/templates/clean-architecture.md +25 -0
  7. package/dist/content/snippetSchema.js +39 -0
  8. package/dist/index.js +8 -0
  9. package/dist/schemas/markdownKnowledge.js +30 -0
  10. package/dist/shared/response.js +12 -0
  11. package/dist/storage/markdownKnowledgeStore.js +267 -0
  12. package/dist/tools/knowledge/explainConcept.js +46 -0
  13. package/dist/tools/knowledge/generateSetup.js +46 -0
  14. package/dist/tools/knowledge/getSnippet.js +52 -39
  15. package/dist/tools/knowledge/getTemplate.js +46 -0
  16. package/dist/tools/knowledge/index.js +4 -0
  17. package/dist/tools/knowledge/searchSnippet.js +56 -0
  18. package/examples/basic-search/README.md +13 -0
  19. package/examples/claude-desktop/README.md +10 -0
  20. package/examples/claude-desktop/claude_desktop_config.json +8 -0
  21. package/examples/cursor/README.md +15 -0
  22. package/examples/explain-mode/expected-response.md +16 -0
  23. package/examples/jwt-setup/expected-response.json +16 -0
  24. package/examples/polly-retry/expected-response.json +14 -0
  25. package/package.json +17 -2
  26. package/scripts/.gitkeep +0 -0
  27. package/snippets/architecture/.gitkeep +0 -0
  28. package/snippets/architecture/clean-architecture-api.md +25 -0
  29. package/snippets/architecture/cqrs-starter.md +25 -0
  30. package/snippets/architecture/ddd-aggregate.md +25 -0
  31. package/snippets/architecture/efcore-repository.md +39 -0
  32. package/snippets/auth/.gitkeep +0 -0
  33. package/snippets/auth/jwe-setup.md +28 -0
  34. package/snippets/auth/jwt-setup-dotnet9.md +27 -0
  35. package/snippets/auth/jwt-setup.md +44 -0
  36. package/snippets/auth/refresh-token-rotation.md +27 -0
  37. package/snippets/auth/role-based-authorization.md +28 -0
  38. package/snippets/caching/.gitkeep +0 -0
  39. package/snippets/caching/cache-aside-pattern.md +25 -0
  40. package/snippets/caching/redis-distributed-cache.md +25 -0
  41. package/snippets/logging/.gitkeep +0 -0
  42. package/snippets/logging/opentelemetry-tracing.md +25 -0
  43. package/snippets/logging/serilog-bootstrap.md +25 -0
  44. package/snippets/logging/structured-logging-guidelines.md +27 -0
  45. package/snippets/messaging/.gitkeep +0 -0
  46. package/snippets/messaging/masstransit-rabbitmq.md +25 -0
  47. package/snippets/messaging/outbox-pattern.md +25 -0
  48. package/snippets/messaging/saga-state-machine.md +25 -0
  49. package/snippets/resilience/.gitkeep +0 -0
  50. package/snippets/resilience/bulkhead-isolation.md +25 -0
  51. package/snippets/resilience/circuit-breaker-polly.md +25 -0
  52. package/snippets/resilience/fallback-policy-polly.md +25 -0
  53. package/snippets/resilience/polly-retry.md +31 -0
  54. package/snippets/resilience/timeout-policy-polly.md +25 -0
  55. package/snippets/efcore-repository.json +0 -7
  56. package/snippets/jwt-setup.json +0 -7
  57. package/snippets/polly-retry.json +0 -7
@@ -0,0 +1,25 @@
1
+ ---
2
+ id: timeout-policy-polly
3
+ title: Polly Timeout Policy
4
+ summary: Bound request duration to protect thread and connection pools.
5
+ framework: aspnet
6
+ version: .net8+
7
+ language: csharp
8
+ category: resilience
9
+ tags:
10
+ - polly
11
+ - timeout
12
+ - resilience
13
+ difficulty: beginner
14
+ bestPractices:
15
+ - Use per-operation timeout values from performance baselines
16
+ - Distinguish client timeout from server deadline
17
+ pitfalls:
18
+ - Timeouts that are too short cause self-induced failures
19
+ ---
20
+
21
+ ## Implementation
22
+
23
+ ```csharp
24
+ // AddTimeoutPolicy(...) with operation-specific thresholds.
25
+ ```
@@ -1,7 +0,0 @@
1
- {
2
- "name": "efcore-repository",
3
- "title": "EF Core Repository Pattern",
4
- "language": "csharp",
5
- "description": "Simple EF Core repository with asynchronous read/write operations.",
6
- "code": "public sealed class ProductRepository(AppDbContext db)\n{\n public Task<Product?> GetByIdAsync(Guid id, CancellationToken ct = default) =>\n db.Products.FirstOrDefaultAsync(p => p.Id == id, ct);\n\n public async Task AddAsync(Product entity, CancellationToken ct = default)\n {\n await db.Products.AddAsync(entity, ct);\n await db.SaveChangesAsync(ct);\n }\n}"
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "jwt-setup",
3
- "title": "JWT Authentication Setup (ASP.NET Core)",
4
- "language": "csharp",
5
- "description": "Configures JWT bearer authentication with token validation parameters.",
6
- "code": "builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)\n .AddJwtBearer(options =>\n {\n options.TokenValidationParameters = new TokenValidationParameters\n {\n ValidateIssuer = true,\n ValidateAudience = true,\n ValidateIssuerSigningKey = true,\n ValidIssuer = config[\"Jwt:Issuer\"],\n ValidAudience = config[\"Jwt:Audience\"],\n IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(config[\"Jwt:Key\"]!))\n };\n });"
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "polly-retry",
3
- "title": "Polly Retry Policy (.NET)",
4
- "language": "csharp",
5
- "description": "Configures an HTTP retry policy with exponential backoff using Polly.",
6
- "code": "builder.Services.AddHttpClient(\"MyClient\")\n .AddTransientHttpErrorPolicy(p =>\n p.WaitAndRetryAsync(3, attempt => TimeSpan.FromSeconds(Math.Pow(2, attempt))));"
7
- }