@daileyos/mcp-server 1.12.1 → 1.13.1

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.
@@ -0,0 +1,42 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
+ import { apiRequest, textResult, formatError } from '../api.js';
4
+
5
+ export function registerSupportTools(server: McpServer) {
6
+ server.tool(
7
+ 'dailey_support',
8
+ 'Send a bug report to the Dailey OS support team (jonny@dailey.llc). Use this when you have diagnosed an issue that requires platform-level investigation — a build failure you cannot explain, unexpected pod behavior, database connectivity, storage errors, or anything that looks like an infrastructure problem rather than a code problem. The tool automatically collects recent build logs, pod logs, and env var keys (no values) and includes them in the report. Returns a confirmation once the report is sent.',
9
+ {
10
+ project_id: z.string().describe('The project ID'),
11
+ description: z.string().describe('What is going wrong — be specific. Include what the user was trying to do, what actually happened, and any error messages or unexpected behavior you observed.'),
12
+ error_text: z.string().optional().describe('Full error text, stack trace, or log excerpt relevant to the issue'),
13
+ steps_tried: z.string().optional().describe('What troubleshooting steps have already been attempted'),
14
+ severity: z.enum(['low', 'medium', 'high', 'critical']).optional().describe('Impact level: low (minor inconvenience), medium (feature broken), high (app down), critical (data loss or security). Default: medium'),
15
+ },
16
+ async ({ project_id, description, error_text, steps_tried, severity }) => {
17
+ const body: Record<string, unknown> = { description };
18
+ if (error_text) body.error_text = error_text;
19
+ if (steps_tried) body.steps_tried = steps_tried;
20
+ if (severity) body.severity = severity;
21
+
22
+ const res = await apiRequest<{ ok: boolean; message: string }>(
23
+ 'POST',
24
+ `/projects/${project_id}/support`,
25
+ body,
26
+ );
27
+ if (!res.ok) return textResult(formatError(res));
28
+
29
+ return textResult([
30
+ `✓ ${res.data.message}`,
31
+ '',
32
+ 'The report includes:',
33
+ ' • Your description and any error text provided',
34
+ ' • Last 3 build logs (truncated)',
35
+ ' • Recent pod logs',
36
+ ' • Env var keys (no values)',
37
+ '',
38
+ 'You can expect a response at the email on your account.',
39
+ ].join('\n'));
40
+ },
41
+ );
42
+ }