@a-company/sentinel 0.2.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.
package/package.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "@a-company/sentinel",
3
+ "version": "0.2.0",
4
+ "description": "Semantic error monitoring — errors that speak your language",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "sentinel": "./dist/cli.js",
10
+ "sentinel-mcp": "./dist/mcp.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./server": {
18
+ "types": "./dist/server/index.d.ts",
19
+ "import": "./dist/server/index.js"
20
+ },
21
+ "./express": {
22
+ "types": "./dist/adapters/express.d.ts",
23
+ "import": "./dist/adapters/express.js"
24
+ },
25
+ "./fastify": {
26
+ "types": "./dist/adapters/fastify.d.ts",
27
+ "import": "./dist/adapters/fastify.js"
28
+ },
29
+ "./hono": {
30
+ "types": "./dist/adapters/hono.d.ts",
31
+ "import": "./dist/adapters/hono.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "src/seeds",
37
+ "ui/dist"
38
+ ],
39
+ "scripts": {
40
+ "build": "npm run build:core && npm run build:ui",
41
+ "build:core": "tsup",
42
+ "build:ui": "cd ui && npm run build",
43
+ "dev": "tsup --watch",
44
+ "typecheck": "tsc --noEmit",
45
+ "prepublishOnly": "npm run build"
46
+ },
47
+ "dependencies": {
48
+ "@modelcontextprotocol/sdk": "^1.0.0",
49
+ "chalk": "^5.3.0",
50
+ "commander": "^11.1.0",
51
+ "express": "^4.18.2",
52
+ "open": "^10.0.0",
53
+ "simple-git": "^3.22.0",
54
+ "sql.js": "^1.10.3",
55
+ "uuid": "^9.0.0",
56
+ "zod": "^3.23.0"
57
+ },
58
+ "devDependencies": {
59
+ "@types/express": "^4.17.21",
60
+ "@types/node": "^20.10.0",
61
+ "@types/react": "^18.2.45",
62
+ "@types/react-dom": "^18.2.18",
63
+ "@types/uuid": "^9.0.7",
64
+ "@vitejs/plugin-react": "^4.2.1",
65
+ "react": "^18.2.0",
66
+ "react-dom": "^18.2.0",
67
+ "tsup": "^8.0.1",
68
+ "typescript": "^5.3.3",
69
+ "vite": "^6.4.0",
70
+ "zustand": "^4.4.7"
71
+ },
72
+ "publishConfig": {
73
+ "access": "public"
74
+ },
75
+ "author": "ascend42",
76
+ "license": "MIT",
77
+ "repository": {
78
+ "type": "git",
79
+ "url": "git+https://github.com/ascend42/a-paradigm.git",
80
+ "directory": "packages/sentinel"
81
+ },
82
+ "bugs": {
83
+ "url": "https://github.com/ascend42/a-paradigm/issues"
84
+ },
85
+ "homepage": "https://github.com/ascend42/a-paradigm#readme",
86
+ "keywords": [
87
+ "sentinel",
88
+ "error-monitoring",
89
+ "observability",
90
+ "error-tracking",
91
+ "patterns",
92
+ "semantic",
93
+ "paradigm"
94
+ ],
95
+ "engines": {
96
+ "node": ">=18.0.0"
97
+ }
98
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Paradigm Sentinel - Seed Pattern Loader
3
+ *
4
+ * Loads built-in patterns from JSON files.
5
+ */
6
+
7
+ import * as path from 'path';
8
+ import * as fs from 'fs';
9
+ import { fileURLToPath } from 'url';
10
+ import type { PatternExport } from '../types.js';
11
+
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = path.dirname(__filename);
14
+
15
+ /**
16
+ * Load universal patterns that apply to most projects
17
+ */
18
+ export function loadUniversalPatterns(): PatternExport {
19
+ const filePath = path.join(__dirname, 'universal-patterns.json');
20
+ const content = fs.readFileSync(filePath, 'utf-8');
21
+ return JSON.parse(content);
22
+ }
23
+
24
+ /**
25
+ * Load Paradigm-specific patterns
26
+ */
27
+ export function loadParadigmPatterns(): PatternExport {
28
+ const filePath = path.join(__dirname, 'paradigm-patterns.json');
29
+ const content = fs.readFileSync(filePath, 'utf-8');
30
+ return JSON.parse(content);
31
+ }
32
+
33
+ /**
34
+ * Load all seed patterns combined
35
+ */
36
+ export function loadAllSeedPatterns(): PatternExport {
37
+ const universal = loadUniversalPatterns();
38
+ const paradigm = loadParadigmPatterns();
39
+
40
+ return {
41
+ version: '1.0.0',
42
+ exportedAt: new Date().toISOString(),
43
+ patterns: [...universal.patterns, ...paradigm.patterns],
44
+ };
45
+ }
@@ -0,0 +1,195 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "exportedAt": "2026-02-02T00:00:00.000Z",
4
+ "patterns": [
5
+ {
6
+ "id": "flow-incomplete-001",
7
+ "name": "Flow Did Not Complete",
8
+ "description": "A flow started but critical signals were never emitted",
9
+ "pattern": {
10
+ "symbols": { "flow": ["$*"] },
11
+ "missingSignals": ["!*-complete", "!*-success", "!*-done"]
12
+ },
13
+ "resolution": {
14
+ "description": "Flow started but never completed - check for early returns, unhandled branches, or silent failures",
15
+ "strategy": "fix-code",
16
+ "priority": "high",
17
+ "codeHint": "Ensure all code paths emit completion signals, add error boundaries that emit failure signals"
18
+ },
19
+ "confidence": { "score": 72, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
20
+ "source": "community",
21
+ "private": false,
22
+ "tags": ["flow", "incomplete", "signals", "paradigm"]
23
+ },
24
+ {
25
+ "id": "gate-bypass-001",
26
+ "name": "Gate Bypassed",
27
+ "description": "A gate check was skipped or circumvented",
28
+ "pattern": {
29
+ "symbols": { "gate": ["^*"] },
30
+ "errorContains": ["unauthorized access", "bypassed", "skipped check", "gate not checked"]
31
+ },
32
+ "resolution": {
33
+ "description": "Security gate was bypassed - audit code paths to ensure all routes check gates",
34
+ "strategy": "fix-code",
35
+ "priority": "critical",
36
+ "codeHint": "Add gate middleware to all relevant routes, audit direct function calls that skip gate checks"
37
+ },
38
+ "confidence": { "score": 95, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
39
+ "source": "community",
40
+ "private": false,
41
+ "tags": ["security", "gate", "bypass", "paradigm"]
42
+ },
43
+ {
44
+ "id": "state-race-001",
45
+ "name": "State Race Condition",
46
+ "description": "Component accessed state that was not yet loaded",
47
+ "pattern": {
48
+ "symbols": { "state": ["%*.loading", "%*.pending", "%*"] },
49
+ "errorContains": ["undefined", "not loaded", "pending state", "state not ready"]
50
+ },
51
+ "resolution": {
52
+ "description": "Component accessed data before it was loaded - add loading guards",
53
+ "strategy": "fix-code",
54
+ "priority": "medium",
55
+ "codeHint": "Check loading state before rendering, add loading skeletons, use suspense boundaries"
56
+ },
57
+ "confidence": { "score": 68, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
58
+ "source": "community",
59
+ "private": false,
60
+ "tags": ["state", "race-condition", "loading", "paradigm"]
61
+ },
62
+ {
63
+ "id": "signal-unhandled-001",
64
+ "name": "Unhandled Signal",
65
+ "description": "A signal was emitted but no handler responded",
66
+ "pattern": {
67
+ "symbols": { "signal": ["!*"] },
68
+ "errorContains": ["unhandled signal", "no handler", "signal dropped", "orphan signal"]
69
+ },
70
+ "resolution": {
71
+ "description": "Signal was emitted but not handled - add signal handler or check signal routing",
72
+ "strategy": "fix-code",
73
+ "priority": "medium",
74
+ "codeHint": "Add handler for the signal, or check if signal name is correct"
75
+ },
76
+ "confidence": { "score": 70, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
77
+ "source": "community",
78
+ "private": false,
79
+ "tags": ["signal", "unhandled", "paradigm"]
80
+ },
81
+ {
82
+ "id": "gate-cascade-failure-001",
83
+ "name": "Gate Cascade Failure",
84
+ "description": "Multiple gates failed in sequence, indicating deeper issue",
85
+ "pattern": {
86
+ "symbols": { "gate": ["^*"] },
87
+ "errorContains": ["multiple gates failed", "cascade", "chain failure"]
88
+ },
89
+ "resolution": {
90
+ "description": "Multiple gates failing suggests a root cause issue - check shared dependencies",
91
+ "strategy": "escalate",
92
+ "priority": "critical",
93
+ "codeHint": "Identify common dependency between failing gates, check service health, review recent deployments"
94
+ },
95
+ "confidence": { "score": 65, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
96
+ "source": "community",
97
+ "private": false,
98
+ "tags": ["gate", "cascade", "critical", "paradigm"]
99
+ },
100
+ {
101
+ "id": "integration-config-missing-001",
102
+ "name": "Integration Configuration Missing",
103
+ "description": "Integration failed due to missing configuration",
104
+ "pattern": {
105
+ "symbols": { "integration": ["&*"] },
106
+ "errorContains": ["config", "missing key", "API_KEY", "SECRET", "undefined config", "env var"]
107
+ },
108
+ "resolution": {
109
+ "description": "Integration configuration is missing - check environment variables and config files",
110
+ "strategy": "fix-data",
111
+ "priority": "high",
112
+ "codeHint": "Verify .env file, check deployment secrets, ensure config is loaded before integration init"
113
+ },
114
+ "confidence": { "score": 82, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
115
+ "source": "community",
116
+ "private": false,
117
+ "tags": ["integration", "config", "environment", "paradigm"]
118
+ },
119
+ {
120
+ "id": "component-unmounted-001",
121
+ "name": "Operation on Unmounted Component",
122
+ "description": "Async operation completed after component unmounted",
123
+ "pattern": {
124
+ "symbols": { "component": ["#*"] },
125
+ "errorContains": ["unmounted", "memory leak", "setState on unmounted", "can't perform"]
126
+ },
127
+ "resolution": {
128
+ "description": "Async operation running on unmounted component - add cleanup or cancellation",
129
+ "strategy": "fix-code",
130
+ "priority": "medium",
131
+ "codeHint": "Use AbortController, add cleanup in useEffect, check mounted state before setState"
132
+ },
133
+ "confidence": { "score": 78, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
134
+ "source": "community",
135
+ "private": false,
136
+ "tags": ["component", "unmounted", "async", "react", "paradigm"]
137
+ },
138
+ {
139
+ "id": "feature-flag-missing-001",
140
+ "name": "Feature Flag Not Found",
141
+ "description": "Feature flag check failed because flag doesn't exist",
142
+ "pattern": {
143
+ "symbols": { "feature": ["@*"] },
144
+ "errorContains": ["feature flag", "flag not found", "undefined flag", "feature disabled"]
145
+ },
146
+ "resolution": {
147
+ "description": "Feature flag doesn't exist or isn't configured - add flag definition",
148
+ "strategy": "fix-data",
149
+ "priority": "medium",
150
+ "codeHint": "Add feature flag to configuration, provide default value for missing flags"
151
+ },
152
+ "confidence": { "score": 75, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
153
+ "source": "community",
154
+ "private": false,
155
+ "tags": ["feature", "flag", "config", "paradigm"]
156
+ },
157
+ {
158
+ "id": "state-invalid-transition-001",
159
+ "name": "Invalid State Transition",
160
+ "description": "Attempted to transition to invalid state from current state",
161
+ "pattern": {
162
+ "symbols": { "state": ["%*"] },
163
+ "errorContains": ["invalid transition", "cannot transition", "illegal state", "state machine"]
164
+ },
165
+ "resolution": {
166
+ "description": "State machine received invalid transition - check state machine definition and trigger",
167
+ "strategy": "fix-code",
168
+ "priority": "high",
169
+ "codeHint": "Review state machine transitions, add guards for invalid transitions, log current state before transition"
170
+ },
171
+ "confidence": { "score": 76, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
172
+ "source": "community",
173
+ "private": false,
174
+ "tags": ["state", "machine", "transition", "paradigm"]
175
+ },
176
+ {
177
+ "id": "purpose-not-defined-001",
178
+ "name": "Purpose File Not Defined",
179
+ "description": "Symbol referenced but has no .purpose file",
180
+ "pattern": {
181
+ "errorContains": [".purpose not found", "purpose undefined", "missing purpose", "no purpose file"]
182
+ },
183
+ "resolution": {
184
+ "description": "Symbol is used but not documented - add .purpose file for the symbol",
185
+ "strategy": "fix-data",
186
+ "priority": "low",
187
+ "codeHint": "Create .purpose file in the symbol's directory describing its intent"
188
+ },
189
+ "confidence": { "score": 60, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
190
+ "source": "community",
191
+ "private": false,
192
+ "tags": ["purpose", "documentation", "paradigm"]
193
+ }
194
+ ]
195
+ }
@@ -0,0 +1,292 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "exportedAt": "2026-02-02T00:00:00.000Z",
4
+ "patterns": [
5
+ {
6
+ "id": "timeout-external-001",
7
+ "name": "External Service Timeout",
8
+ "description": "External API or service did not respond within expected time",
9
+ "pattern": {
10
+ "symbols": { "integration": ["&*"] },
11
+ "errorContains": ["timeout", "ETIMEDOUT", "ECONNRESET", "ESOCKETTIMEDOUT", "deadline exceeded"]
12
+ },
13
+ "resolution": {
14
+ "description": "External service timeout - typically transient",
15
+ "strategy": "retry",
16
+ "priority": "medium",
17
+ "codeHint": "Add retry with exponential backoff (3 attempts, 1s/2s/4s delays)",
18
+ "codeSnippet": "const result = await retry(() => externalCall(), { retries: 3, minTimeout: 1000, factor: 2 });"
19
+ },
20
+ "confidence": { "score": 85, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
21
+ "source": "community",
22
+ "private": false,
23
+ "tags": ["network", "timeout", "transient"]
24
+ },
25
+ {
26
+ "id": "auth-token-expired-001",
27
+ "name": "Authentication Token Expired",
28
+ "description": "JWT or session token has expired",
29
+ "pattern": {
30
+ "symbols": { "gate": ["^authenticated", "^auth-required", "^*-auth*"] },
31
+ "errorContains": ["401", "unauthorized", "token expired", "jwt expired", "session expired", "invalid token"]
32
+ },
33
+ "resolution": {
34
+ "description": "Authentication token expired - user needs to re-authenticate or token needs refresh",
35
+ "strategy": "fix-data",
36
+ "priority": "high",
37
+ "codeHint": "Implement proactive token refresh before expiry, or redirect to login",
38
+ "symbolsToModify": ["^authenticated"]
39
+ },
40
+ "confidence": { "score": 90, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
41
+ "source": "community",
42
+ "private": false,
43
+ "tags": ["auth", "token", "security"]
44
+ },
45
+ {
46
+ "id": "payment-declined-001",
47
+ "name": "Payment Declined",
48
+ "description": "Payment processor declined the transaction",
49
+ "pattern": {
50
+ "symbols": {
51
+ "feature": ["@checkout", "@payment", "@billing"],
52
+ "gate": ["^payment-validated", "^payment-*"]
53
+ },
54
+ "missingSignals": ["!payment-authorized", "!payment-success"],
55
+ "errorContains": ["declined", "insufficient", "card_error", "card_declined", "do_not_honor"]
56
+ },
57
+ "resolution": {
58
+ "description": "Payment method was declined by the processor - not a system error",
59
+ "strategy": "fallback",
60
+ "priority": "medium",
61
+ "codeHint": "Show user-friendly error message, offer alternative payment methods",
62
+ "symbolsToModify": ["@checkout"]
63
+ },
64
+ "confidence": { "score": 80, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
65
+ "source": "community",
66
+ "private": false,
67
+ "tags": ["payment", "user-error", "expected"]
68
+ },
69
+ {
70
+ "id": "rate-limit-exceeded-001",
71
+ "name": "Rate Limit Exceeded",
72
+ "description": "API rate limit was exceeded",
73
+ "pattern": {
74
+ "symbols": { "integration": ["&*"] },
75
+ "errorContains": ["429", "rate limit", "too many requests", "throttle", "quota exceeded"]
76
+ },
77
+ "resolution": {
78
+ "description": "API rate limit exceeded - need to implement rate limiting or backoff",
79
+ "strategy": "retry",
80
+ "priority": "high",
81
+ "codeHint": "Implement client-side rate limiting, add exponential backoff, consider request caching"
82
+ },
83
+ "confidence": { "score": 88, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
84
+ "source": "community",
85
+ "private": false,
86
+ "tags": ["rate-limit", "api", "throttling"]
87
+ },
88
+ {
89
+ "id": "db-connection-failed-001",
90
+ "name": "Database Connection Failed",
91
+ "description": "Could not establish database connection",
92
+ "pattern": {
93
+ "symbols": { "component": ["#database", "#db", "#postgres", "#mysql", "#mongo", "#redis"] },
94
+ "errorContains": ["connection refused", "ECONNREFUSED", "connection pool", "too many connections", "connection timeout"]
95
+ },
96
+ "resolution": {
97
+ "description": "Database connection issue - check connection pool, credentials, and DB health",
98
+ "strategy": "fix-code",
99
+ "priority": "critical",
100
+ "codeHint": "Check connection pool settings, implement connection retry, verify database is running and accessible"
101
+ },
102
+ "confidence": { "score": 75, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
103
+ "source": "community",
104
+ "private": false,
105
+ "tags": ["database", "connection", "infrastructure"]
106
+ },
107
+ {
108
+ "id": "null-reference-001",
109
+ "name": "Null/Undefined Reference",
110
+ "description": "Attempted to access property of null or undefined",
111
+ "pattern": {
112
+ "errorContains": ["cannot read property", "undefined is not an object", "null is not an object", "TypeError: Cannot read"],
113
+ "errorType": ["TypeError"]
114
+ },
115
+ "resolution": {
116
+ "description": "Code attempted to access a property on null/undefined - add null checks or fix data flow",
117
+ "strategy": "fix-code",
118
+ "priority": "high",
119
+ "codeHint": "Add optional chaining (?.), nullish coalescing (??), or explicit null checks"
120
+ },
121
+ "confidence": { "score": 70, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
122
+ "source": "community",
123
+ "private": false,
124
+ "tags": ["null", "type-error", "data-validation"]
125
+ },
126
+ {
127
+ "id": "network-offline-001",
128
+ "name": "Network Offline",
129
+ "description": "Device or server has no network connectivity",
130
+ "pattern": {
131
+ "errorContains": ["network error", "ERR_NETWORK", "offline", "no internet", "DNS_PROBE", "ENOTFOUND"]
132
+ },
133
+ "resolution": {
134
+ "description": "Network connectivity issue - may be user's connection or server network",
135
+ "strategy": "retry",
136
+ "priority": "medium",
137
+ "codeHint": "Show offline indicator, queue requests for retry, implement offline-first patterns"
138
+ },
139
+ "confidence": { "score": 82, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
140
+ "source": "community",
141
+ "private": false,
142
+ "tags": ["network", "offline", "connectivity"]
143
+ },
144
+ {
145
+ "id": "validation-failed-001",
146
+ "name": "Input Validation Failed",
147
+ "description": "User input failed validation",
148
+ "pattern": {
149
+ "symbols": { "gate": ["^*-validated", "^valid-*"] },
150
+ "errorContains": ["validation", "invalid", "required field", "must be", "expected"]
151
+ },
152
+ "resolution": {
153
+ "description": "Input validation failed - show user the specific validation errors",
154
+ "strategy": "fix-data",
155
+ "priority": "low",
156
+ "codeHint": "Display field-level validation errors, highlight invalid fields"
157
+ },
158
+ "confidence": { "score": 78, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
159
+ "source": "community",
160
+ "private": false,
161
+ "tags": ["validation", "user-input", "expected"]
162
+ },
163
+ {
164
+ "id": "permission-denied-001",
165
+ "name": "Permission Denied",
166
+ "description": "User lacks permission for the requested action",
167
+ "pattern": {
168
+ "symbols": { "gate": ["^*-authorized", "^has-permission", "^can-*"] },
169
+ "errorContains": ["403", "forbidden", "permission denied", "not authorized", "access denied"]
170
+ },
171
+ "resolution": {
172
+ "description": "User doesn't have required permissions - show appropriate message or hide action",
173
+ "strategy": "fallback",
174
+ "priority": "medium",
175
+ "codeHint": "Check permissions before showing actions, display clear permission error"
176
+ },
177
+ "confidence": { "score": 85, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
178
+ "source": "community",
179
+ "private": false,
180
+ "tags": ["permissions", "authorization", "access-control"]
181
+ },
182
+ {
183
+ "id": "resource-not-found-001",
184
+ "name": "Resource Not Found",
185
+ "description": "Requested resource does not exist",
186
+ "pattern": {
187
+ "errorContains": ["404", "not found", "does not exist", "no such", "ENOENT"]
188
+ },
189
+ "resolution": {
190
+ "description": "Resource doesn't exist - may be deleted, wrong ID, or stale reference",
191
+ "strategy": "fallback",
192
+ "priority": "medium",
193
+ "codeHint": "Show 'not found' page, redirect to list, or remove stale reference"
194
+ },
195
+ "confidence": { "score": 80, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
196
+ "source": "community",
197
+ "private": false,
198
+ "tags": ["not-found", "resource", "stale"]
199
+ },
200
+ {
201
+ "id": "json-parse-error-001",
202
+ "name": "JSON Parse Error",
203
+ "description": "Failed to parse JSON response or data",
204
+ "pattern": {
205
+ "errorContains": ["JSON", "Unexpected token", "JSON.parse", "SyntaxError"],
206
+ "errorType": ["SyntaxError"]
207
+ },
208
+ "resolution": {
209
+ "description": "Invalid JSON received - check API response format or data source",
210
+ "strategy": "fix-code",
211
+ "priority": "high",
212
+ "codeHint": "Wrap JSON.parse in try-catch, validate response content-type, add error boundaries"
213
+ },
214
+ "confidence": { "score": 75, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
215
+ "source": "community",
216
+ "private": false,
217
+ "tags": ["json", "parsing", "api"]
218
+ },
219
+ {
220
+ "id": "cors-error-001",
221
+ "name": "CORS Error",
222
+ "description": "Cross-Origin Resource Sharing policy blocked request",
223
+ "pattern": {
224
+ "errorContains": ["CORS", "cross-origin", "Access-Control-Allow-Origin", "blocked by CORS"]
225
+ },
226
+ "resolution": {
227
+ "description": "CORS policy blocking request - configure server CORS headers or use proxy",
228
+ "strategy": "fix-code",
229
+ "priority": "high",
230
+ "codeHint": "Add proper CORS headers on server, or proxy requests through same-origin endpoint"
231
+ },
232
+ "confidence": { "score": 90, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
233
+ "source": "community",
234
+ "private": false,
235
+ "tags": ["cors", "security", "browser"]
236
+ },
237
+ {
238
+ "id": "memory-exceeded-001",
239
+ "name": "Memory Limit Exceeded",
240
+ "description": "Application ran out of memory",
241
+ "pattern": {
242
+ "errorContains": ["out of memory", "heap", "ENOMEM", "memory limit", "allocation failed"]
243
+ },
244
+ "resolution": {
245
+ "description": "Memory exhausted - check for memory leaks, optimize data structures, increase limits",
246
+ "strategy": "fix-code",
247
+ "priority": "critical",
248
+ "codeHint": "Profile memory usage, implement pagination, stream large datasets, check for memory leaks"
249
+ },
250
+ "confidence": { "score": 72, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
251
+ "source": "community",
252
+ "private": false,
253
+ "tags": ["memory", "performance", "infrastructure"]
254
+ },
255
+ {
256
+ "id": "ssl-cert-error-001",
257
+ "name": "SSL Certificate Error",
258
+ "description": "SSL/TLS certificate validation failed",
259
+ "pattern": {
260
+ "errorContains": ["certificate", "SSL", "TLS", "CERT_", "self-signed", "expired cert"]
261
+ },
262
+ "resolution": {
263
+ "description": "SSL certificate issue - renew certificate or configure trust",
264
+ "strategy": "escalate",
265
+ "priority": "critical",
266
+ "codeHint": "Check certificate expiration, verify certificate chain, renew if needed"
267
+ },
268
+ "confidence": { "score": 88, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
269
+ "source": "community",
270
+ "private": false,
271
+ "tags": ["ssl", "security", "certificate"]
272
+ },
273
+ {
274
+ "id": "file-too-large-001",
275
+ "name": "File Too Large",
276
+ "description": "Uploaded file exceeds size limit",
277
+ "pattern": {
278
+ "errorContains": ["file too large", "payload too large", "size limit", "413", "maxFileSize"]
279
+ },
280
+ "resolution": {
281
+ "description": "File exceeds upload limit - show user-friendly error with size limit info",
282
+ "strategy": "fallback",
283
+ "priority": "low",
284
+ "codeHint": "Validate file size client-side before upload, show clear size limits"
285
+ },
286
+ "confidence": { "score": 85, "timesMatched": 0, "timesResolved": 0, "timesRecurred": 0 },
287
+ "source": "community",
288
+ "private": false,
289
+ "tags": ["upload", "file", "validation"]
290
+ }
291
+ ]
292
+ }