devmind-monitor 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DevMind
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # devmind-monitor
2
+
3
+ > Lightweight production monitoring SDK for [DevMind](https://github.com/DevMindRepo/MonoRepo). Captures errors and forwards them to DevMind agents, which then triage the incident, search your team's memory for prior similar incidents, and propose a fix — autonomously.
4
+
5
+ Think of it as **Sentry + an autonomous incident-response engineer that remembers everything your team ever learned**.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install devmind-monitor
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ ```ts
16
+ import { DevMindMonitor } from 'devmind-monitor';
17
+
18
+ const monitor = new DevMindMonitor({
19
+ apiUrl: 'https://api.devmind.app',
20
+ apiToken: process.env.DEVMIND_TOKEN!,
21
+ workspaceId: process.env.DEVMIND_WORKSPACE!,
22
+ service: 'checkout-api',
23
+ });
24
+
25
+ monitor.attachToProcess();
26
+ ```
27
+
28
+ That's it. Any uncaught error or unhandled rejection on this process will:
29
+
30
+ 1. Be captured locally (zero overhead — it's just a `process.on` hook)
31
+ 2. Be forwarded to your DevMind backend
32
+ 3. Trigger a 3-agent pipeline (Triage → Researcher → Responder)
33
+ 4. Show up in your DevMind dashboard at `/incidents` with a suggested fix within ~30 seconds
34
+
35
+ ## Manual reporting
36
+
37
+ For app-level events (caught errors, business-logic alerts, etc):
38
+
39
+ ```ts
40
+ await monitor.reportIncident({
41
+ type: 'error',
42
+ severity: 'critical',
43
+ message: 'Payment service unreachable',
44
+ metadata: { customerId: '...', orderId: '...' },
45
+ });
46
+ ```
47
+
48
+ ## Config
49
+
50
+ | Option | Required | Default | Description |
51
+ |---|---|---|---|
52
+ | `apiUrl` | yes | — | DevMind backend URL |
53
+ | `apiToken` | yes | — | `dm_sk_*` token (generate at `/connect`) |
54
+ | `workspaceId` | yes | — | Target workspace |
55
+ | `service` | no | — | Logical service name (e.g. `"checkout-api"`) |
56
+ | `hostname` | no | `os.hostname()` | Instance identifier |
57
+ | `verbose` | no | `true` | Console.error on transport failures |
58
+ | `redactPatterns` | no | DM tokens, Stripe, JWT, AWS, `password=`, `bearer ...` | Regex patterns redacted before send |
59
+ | `defaultSeverity` | no | `critical` | Severity for auto-captured exceptions |
60
+
61
+ ## What gets sent
62
+
63
+ ```ts
64
+ POST {apiUrl}/incidents
65
+ {
66
+ workspaceId,
67
+ type: 'error' | 'attack' | 'performance' | 'custom',
68
+ severity: 'low' | 'medium' | 'high' | 'critical',
69
+ service: string,
70
+ hostname: string,
71
+ message: string, // redacted
72
+ stack: string, // redacted
73
+ metadata: object,
74
+ }
75
+ ```
76
+
77
+ ## Privacy
78
+
79
+ The SDK redacts common secrets before sending (DevMind tokens, Stripe keys, JWTs, AWS keys, `password=` query params, bearer headers). You can pass your own `redactPatterns` for custom rules.
80
+
81
+ For full data sovereignty, self-host DevMind backend (`docker compose up` from the monorepo) and point `apiUrl` to your own instance — DevMind team will never see your data.
82
+
83
+ ## License
84
+
85
+ MIT
@@ -0,0 +1,82 @@
1
+ /**
2
+ * devmind-monitor — lightweight production monitoring SDK.
3
+ *
4
+ * Drops into any Node.js app. Captures uncaught errors + unhandled rejections,
5
+ * forwards them to DevMind backend. DevMind agents then triage, search memory,
6
+ * and propose fixes — all on the backend side.
7
+ *
8
+ * @example
9
+ * import { DevMindMonitor } from 'devmind-monitor';
10
+ *
11
+ * const monitor = new DevMindMonitor({
12
+ * apiUrl: 'https://api.devmind.app',
13
+ * apiToken: process.env.DEVMIND_TOKEN!,
14
+ * workspaceId: process.env.DEVMIND_WORKSPACE!,
15
+ * service: 'checkout-api',
16
+ * });
17
+ *
18
+ * monitor.attachToProcess();
19
+ *
20
+ * // Manual report:
21
+ * await monitor.reportIncident({
22
+ * type: 'error',
23
+ * severity: 'critical',
24
+ * message: 'Payment service unreachable',
25
+ * });
26
+ */
27
+ export type IncidentType = 'error' | 'attack' | 'performance' | 'custom';
28
+ export type IncidentSeverity = 'low' | 'medium' | 'high' | 'critical';
29
+ export interface DevMindMonitorConfig {
30
+ /** DevMind backend URL, e.g. https://api.devmind.app (or http://localhost:3001 in dev) */
31
+ apiUrl: string;
32
+ /** DevMind API token (dm_sk_*) — generate at /connect */
33
+ apiToken: string;
34
+ /** Target workspace ID */
35
+ workspaceId: string;
36
+ /** Logical service name (e.g. "checkout-api") — appears in dashboard */
37
+ service?: string;
38
+ /** Hostname / pod / instance identifier */
39
+ hostname?: string;
40
+ /** If true, console.error on failed forwards (default: true) */
41
+ verbose?: boolean;
42
+ /**
43
+ * Regex patterns whose matches will be replaced with "<REDACTED>" before sending.
44
+ * Default patterns redact common secrets (API keys, JWTs, password=).
45
+ */
46
+ redactPatterns?: RegExp[];
47
+ /** Default severity for `attachToProcess()` captures (default: critical) */
48
+ defaultSeverity?: IncidentSeverity;
49
+ }
50
+ export interface ReportIncidentInput {
51
+ type?: IncidentType;
52
+ severity?: IncidentSeverity;
53
+ message: string;
54
+ stack?: string;
55
+ service?: string;
56
+ hostname?: string;
57
+ metadata?: Record<string, unknown>;
58
+ }
59
+ export interface ReportIncidentResult {
60
+ incidentId: string;
61
+ status: string;
62
+ }
63
+ export declare class DevMindMonitor {
64
+ private readonly config;
65
+ private attached;
66
+ constructor(config: DevMindMonitorConfig);
67
+ /**
68
+ * Hook into Node.js process for uncaught exceptions + unhandled rejections.
69
+ * Returns a detach function.
70
+ */
71
+ attachToProcess(): () => void;
72
+ /**
73
+ * Manually report an incident.
74
+ */
75
+ reportIncident(input: ReportIncidentInput): Promise<ReportIncidentResult | null>;
76
+ private redact;
77
+ private detectHostname;
78
+ private log;
79
+ }
80
+ /** Convenience factory. */
81
+ export declare function createMonitor(config: DevMindMonitorConfig): DevMindMonitor;
82
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,CAAC;AACzE,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,oBAAoB;IACnC,0FAA0F;IAC1F,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,4EAA4E;IAC5E,eAAe,CAAC,EAAE,gBAAgB,CAAC;CACpC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAWD,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAGrB;IACF,OAAO,CAAC,QAAQ,CAAS;gBAEb,MAAM,EAAE,oBAAoB;IAiBxC;;;OAGG;IACH,eAAe,IAAI,MAAM,IAAI;IAmC7B;;OAEG;IACG,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAoCtF,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,GAAG;CAMZ;AAED,2BAA2B;AAC3B,wBAAgB,aAAa,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAE1E"}
package/dist/index.js ADDED
@@ -0,0 +1,156 @@
1
+ /**
2
+ * devmind-monitor — lightweight production monitoring SDK.
3
+ *
4
+ * Drops into any Node.js app. Captures uncaught errors + unhandled rejections,
5
+ * forwards them to DevMind backend. DevMind agents then triage, search memory,
6
+ * and propose fixes — all on the backend side.
7
+ *
8
+ * @example
9
+ * import { DevMindMonitor } from 'devmind-monitor';
10
+ *
11
+ * const monitor = new DevMindMonitor({
12
+ * apiUrl: 'https://api.devmind.app',
13
+ * apiToken: process.env.DEVMIND_TOKEN!,
14
+ * workspaceId: process.env.DEVMIND_WORKSPACE!,
15
+ * service: 'checkout-api',
16
+ * });
17
+ *
18
+ * monitor.attachToProcess();
19
+ *
20
+ * // Manual report:
21
+ * await monitor.reportIncident({
22
+ * type: 'error',
23
+ * severity: 'critical',
24
+ * message: 'Payment service unreachable',
25
+ * });
26
+ */
27
+ const DEFAULT_REDACT = [
28
+ /\bdm_sk_[A-Za-z0-9_-]+/g, // DevMind API tokens
29
+ /\bsk_(?:live|test)_[A-Za-z0-9_-]+/g, // Stripe keys
30
+ /\bAKIA[0-9A-Z]{16}\b/g, // AWS access keys
31
+ /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, // JWTs
32
+ /\bpassword=([^&\s"']+)/gi, // password=xxx
33
+ /\bauthorization:\s*bearer\s+\S+/gi, // bearer tokens in headers
34
+ ];
35
+ export class DevMindMonitor {
36
+ config;
37
+ attached = false;
38
+ constructor(config) {
39
+ if (!config.apiUrl)
40
+ throw new Error('DevMindMonitor: apiUrl is required');
41
+ if (!config.apiToken)
42
+ throw new Error('DevMindMonitor: apiToken is required');
43
+ if (!config.workspaceId)
44
+ throw new Error('DevMindMonitor: workspaceId is required');
45
+ this.config = {
46
+ apiUrl: config.apiUrl.replace(/\/$/, ''),
47
+ apiToken: config.apiToken,
48
+ workspaceId: config.workspaceId,
49
+ service: config.service,
50
+ hostname: config.hostname ?? this.detectHostname(),
51
+ verbose: config.verbose ?? true,
52
+ redactPatterns: config.redactPatterns ?? DEFAULT_REDACT,
53
+ defaultSeverity: config.defaultSeverity ?? 'critical',
54
+ };
55
+ }
56
+ /**
57
+ * Hook into Node.js process for uncaught exceptions + unhandled rejections.
58
+ * Returns a detach function.
59
+ */
60
+ attachToProcess() {
61
+ if (this.attached)
62
+ return () => undefined;
63
+ this.attached = true;
64
+ const onException = (err) => {
65
+ void this.reportIncident({
66
+ type: 'error',
67
+ severity: this.config.defaultSeverity,
68
+ message: err.message,
69
+ stack: err.stack,
70
+ metadata: { source: 'uncaughtException' },
71
+ });
72
+ };
73
+ const onRejection = (reason) => {
74
+ const err = reason instanceof Error ? reason : new Error(String(reason));
75
+ void this.reportIncident({
76
+ type: 'error',
77
+ severity: this.config.defaultSeverity,
78
+ message: err.message,
79
+ stack: err.stack,
80
+ metadata: { source: 'unhandledRejection' },
81
+ });
82
+ };
83
+ process.on('uncaughtException', onException);
84
+ process.on('unhandledRejection', onRejection);
85
+ return () => {
86
+ process.off('uncaughtException', onException);
87
+ process.off('unhandledRejection', onRejection);
88
+ this.attached = false;
89
+ };
90
+ }
91
+ /**
92
+ * Manually report an incident.
93
+ */
94
+ async reportIncident(input) {
95
+ const body = {
96
+ workspaceId: this.config.workspaceId,
97
+ type: input.type ?? 'error',
98
+ severity: input.severity ?? this.config.defaultSeverity,
99
+ service: input.service ?? this.config.service,
100
+ hostname: input.hostname ?? this.config.hostname,
101
+ message: this.redact(input.message),
102
+ stack: input.stack ? this.redact(input.stack) : undefined,
103
+ metadata: input.metadata,
104
+ };
105
+ try {
106
+ const res = await fetch(`${this.config.apiUrl}/incidents`, {
107
+ method: 'POST',
108
+ headers: {
109
+ 'Content-Type': 'application/json',
110
+ Authorization: `Bearer ${this.config.apiToken}`,
111
+ },
112
+ body: JSON.stringify(body),
113
+ });
114
+ if (!res.ok) {
115
+ const text = await res.text();
116
+ this.log(`DevMindMonitor: POST /incidents failed (${res.status}): ${text}`);
117
+ return null;
118
+ }
119
+ const data = (await res.json());
120
+ return data.data ?? null;
121
+ }
122
+ catch (err) {
123
+ this.log(`DevMindMonitor: network error sending incident: ${err instanceof Error ? err.message : err}`);
124
+ return null;
125
+ }
126
+ }
127
+ redact(input) {
128
+ let out = input;
129
+ for (const pattern of this.config.redactPatterns) {
130
+ out = out.replace(pattern, '<REDACTED>');
131
+ }
132
+ return out;
133
+ }
134
+ detectHostname() {
135
+ try {
136
+ // Avoid hard dependency on 'node:os' for ESM/CJS portability
137
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
138
+ const os = require('node:os');
139
+ return os.hostname();
140
+ }
141
+ catch {
142
+ return process.env.HOSTNAME;
143
+ }
144
+ }
145
+ log(msg) {
146
+ if (this.config.verbose) {
147
+ // eslint-disable-next-line no-console
148
+ console.error(msg);
149
+ }
150
+ }
151
+ }
152
+ /** Convenience factory. */
153
+ export function createMonitor(config) {
154
+ return new DevMindMonitor(config);
155
+ }
156
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AA0CH,MAAM,cAAc,GAAa;IAC/B,yBAAyB,EAAkB,qBAAqB;IAChE,oCAAoC,EAAO,cAAc;IACzD,uBAAuB,EAAoB,kBAAkB;IAC7D,wDAAwD,EAAE,OAAO;IACjE,0BAA0B,EAAiB,eAAe;IAC1D,mCAAmC,EAAQ,2BAA2B;CACvE,CAAC;AAEF,MAAM,OAAO,cAAc;IACR,MAAM,CAGrB;IACM,QAAQ,GAAG,KAAK,CAAC;IAEzB,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC9E,IAAI,CAAC,MAAM,CAAC,WAAW;YAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAEpF,IAAI,CAAC,MAAM,GAAG;YACZ,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;YACxC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,OAAO,EAAE,MAAM,C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AAG,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AAED,2BAA2B;AAC3B,MAAM,UAAU,aAAa,CAAC,MAA4B;IACxD,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "devmind-monitor",
3
+ "version": "0.1.0",
4
+ "description": "Production monitoring SDK for DevMind — captures errors, sends them to DevMind agents for autonomous triage + memory-based incident response.",
5
+ "keywords": [
6
+ "devmind",
7
+ "monitoring",
8
+ "incident-response",
9
+ "observability",
10
+ "ai-agent",
11
+ "walrus",
12
+ "memwal"
13
+ ],
14
+ "license": "MIT",
15
+ "author": "DevMind",
16
+ "homepage": "https://github.com/DevMindRepo/MonoRepo",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/DevMindRepo/MonoRepo.git",
20
+ "directory": "monitor-sdk"
21
+ },
22
+ "bugs": "https://github.com/DevMindRepo/MonoRepo/issues",
23
+ "type": "module",
24
+ "main": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.js"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "README.md",
35
+ "LICENSE"
36
+ ],
37
+ "engines": {
38
+ "node": ">=18"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "scripts": {
44
+ "build": "tsc",
45
+ "typecheck": "tsc --noEmit",
46
+ "prepublishOnly": "pnpm build"
47
+ },
48
+ "devDependencies": {
49
+ "@types/node": "^22.10.0",
50
+ "typescript": "^5.7.0"
51
+ }
52
+ }