@daileyos/mcp-server 1.13.1 → 1.13.2
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/.github/workflows/publish.yml +22 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +31 -1
- package/dist/api.js.map +1 -1
- package/dist/tools/credentials-reveal.js +1 -1
- package/dist/tools/credentials-reveal.js.map +1 -1
- package/dist/tools/deploy-status.d.ts.map +1 -1
- package/dist/tools/deploy-status.js +0 -70
- package/dist/tools/deploy-status.js.map +1 -1
- package/dist/tools/diagnose.d.ts.map +1 -1
- package/dist/tools/diagnose.js +0 -152
- package/dist/tools/diagnose.js.map +1 -1
- package/dist/tools/platform.d.ts.map +1 -1
- package/dist/tools/platform.js +0 -82
- package/dist/tools/platform.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +1 -1
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/storage.d.ts.map +1 -1
- package/dist/tools/storage.js +0 -30
- package/dist/tools/storage.js.map +1 -1
- package/package.json +1 -1
- package/src/api.ts +30 -1
- package/src/tools/credentials-reveal.ts +1 -1
- package/src/tools/deploy-status.ts +0 -71
- package/src/tools/diagnose.ts +0 -183
- package/src/tools/platform.ts +0 -88
- package/src/tools/projects.ts +1 -3
- package/src/tools/storage.ts +0 -42
package/dist/tools/projects.js
CHANGED
|
@@ -7,7 +7,7 @@ export function registerProjectTools(server) {
|
|
|
7
7
|
return textResult(formatError(res));
|
|
8
8
|
const projects = res.data.projects;
|
|
9
9
|
if (!projects || projects.length === 0) {
|
|
10
|
-
return textResult(
|
|
10
|
+
return textResult('No projects found.');
|
|
11
11
|
}
|
|
12
12
|
// Include slug — when multiple projects share a name (common with
|
|
13
13
|
// template-generated repos or duplicated test projects) the slug is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AACA,OA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AAE;gBAClC,EAAE;gBACF,oBAAoB;gBACpB,qDAAqD;gBACrD,iEAAiE;gBACjE,2DAA2D;gBAC3D,6DAA6D;gBAC7D,uCAAuC;gBACvC,+DAA+D;gBAC/D,EAAE;gBACF,eAAe;gBACf,iDAAiD;gBACjD,wDAAwD;gBACxD,EAAE;gBACF,gDAAgD,UAAU,kBAAkB;aAC7E,CAAC;YACF,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,QAAQ,EAAE,aAAa,UAAU,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC,WAAW,UAAU,wBAAwB,CAAC,CAAC;IACnE,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/tools/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA+DpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/tools/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA+DpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QA+KrD"}
|
package/dist/tools/storage.js
CHANGED
|
@@ -22,12 +22,6 @@ export function registerStorageTools(server) {
|
|
|
22
22
|
`Max Upload: ${data.binding.limits.max_single_upload_mb} MB`,
|
|
23
23
|
`URL TTL: ${data.binding.limits.signed_url_ttl_seconds}s`,
|
|
24
24
|
];
|
|
25
|
-
// Surface credential-missing warning before anything else so the LLM
|
|
26
|
-
// sees it immediately and can call dailey_storage_enable to fix it.
|
|
27
|
-
if (data.secret_warning) {
|
|
28
|
-
lines.push('');
|
|
29
|
-
lines.push(`⚠ WARNING: ${data.secret_warning}`);
|
|
30
|
-
}
|
|
31
25
|
// Render the new integration_paths block when the API surfaces it.
|
|
32
26
|
// Older customer-api responses still set next_step; fall back to that
|
|
33
27
|
// verbatim so this tool keeps working during the rolling deploy.
|
|
@@ -130,30 +124,6 @@ export function registerStorageTools(server) {
|
|
|
130
124
|
lines.push(data.upload_url);
|
|
131
125
|
return textResult(lines.join('\n'));
|
|
132
126
|
});
|
|
133
|
-
server.tool('dailey_storage_enable', 'Enable object storage on an existing project that was created without it, OR fix a project where storage was enabled but S3_* env vars are missing from the pod (secret_injected=false from dailey_storage_info). Provisions R2 credentials, creates the k8s secret, and patches the running deployment so pods pick up S3_* vars immediately. A redeploy is not required after calling this.', { project_id: z.string().describe('The project ID') }, async ({ project_id }) => {
|
|
134
|
-
const res = await apiRequest('POST', `/projects/${project_id}/storage/enable`);
|
|
135
|
-
if (!res.ok) {
|
|
136
|
-
// 409 means already enabled — check if the secret is actually present
|
|
137
|
-
if (res.status === 409) {
|
|
138
|
-
return textResult(`Storage is already enabled for this project.\n\nIf S3_* vars are still missing from your pod, the credentials secret may not have been created correctly.\nCheck: dailey_storage_info to see secret_injected status.\nFix: redeploy the project (dailey_deploy) to re-mount the secret.`);
|
|
139
|
-
}
|
|
140
|
-
return textResult(formatError(res));
|
|
141
|
-
}
|
|
142
|
-
return textResult([
|
|
143
|
-
`Storage enabled.`,
|
|
144
|
-
``,
|
|
145
|
-
`Prefix: ${res.data.prefix}`,
|
|
146
|
-
``,
|
|
147
|
-
res.data.message,
|
|
148
|
-
``,
|
|
149
|
-
`S3_* env vars now available in your pod:`,
|
|
150
|
-
` S3_ENDPOINT, S3_REGION, S3_BUCKET_NAME`,
|
|
151
|
-
` S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_SESSION_TOKEN, S3_KEY_PREFIX`,
|
|
152
|
-
``,
|
|
153
|
-
`Pods are restarting to pick up the new secret (~30s). No rebuild needed.`,
|
|
154
|
-
`If vars are still missing after 60s, call dailey_deploy to trigger a fresh rollout.`,
|
|
155
|
-
].join('\n'));
|
|
156
|
-
});
|
|
157
127
|
server.tool('dailey_storage_presign_download', 'For BROWSER-side flows. Server-side apps deployed on Dailey should instead use the S3 SDK with the auto-injected S3_* env vars (see dailey_storage_info). Creates a presigned download URL for an object in a project bucket.', {
|
|
158
128
|
project_id: z.string().describe('The project ID'),
|
|
159
129
|
key: z.string().describe('The object key to download'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/tools/storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AA6DhE,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,6aAA6a,EAC7a,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EACrD,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACvB,MAAM,GAAG,GAAG,MAAM,UAAU,CAAsB,KAAK,EAAE,aAAa,UAAU,UAAU,CAAC,CAAC;QAC5F,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QAEjD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACtB,MAAM,KAAK,GAAG;YACZ,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YAC/B,gBAAgB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YACnC,gBAAgB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACrC,gBAAgB,IAAI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AAC;QACtB,MAAM,KAAK,GAAG;YACZ,oBAAoB;YACpB,YAAY,IAAI,CAAC,MAAM,EAAE;YACzB,YAAY,IAAI,CAAC,GAAG,EAAE;YACtB,YAAY,IAAI,CAAC,UAAU,EAAE;SAC9B,CAAC;QACF,IAAI,IAAI,CAAC,YAAY;YAAE,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QACnE,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,UAAU,QAAQ,CAAC,CAAC;QAC9E,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9B,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -1,8 +1,37 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
|
|
1
5
|
const API_URL = process.env.DAILEY_API_URL || 'https://os.dailey.cloud/api';
|
|
2
6
|
const DAILEY_EMAIL = process.env.DAILEY_EMAIL;
|
|
3
7
|
const DAILEY_PASSWORD = process.env.DAILEY_PASSWORD;
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
// Read the token the Dailey CLI stores after `dailey auth login`. The CLI uses
|
|
10
|
+
// `conf` ({ projectName: 'dailey' }), which writes <config>/dailey-nodejs/config.json
|
|
11
|
+
// (env-paths layout). Reusing it means anyone already logged into the CLI (their
|
|
12
|
+
// `dailey whoami` works) gets a working MCP server with NO credentials in the
|
|
13
|
+
// client config — the installer's generated config only sets DAILEY_API_URL, so
|
|
14
|
+
// without this the server has no auth and exits, surfacing as "Connection closed".
|
|
15
|
+
function readCliStoredToken(): string | undefined {
|
|
16
|
+
try {
|
|
17
|
+
const name = 'dailey-nodejs';
|
|
18
|
+
let dir: string;
|
|
19
|
+
if (process.platform === 'darwin') {
|
|
20
|
+
dir = join(homedir(), 'Library', 'Preferences', name);
|
|
21
|
+
} else if (process.platform === 'win32') {
|
|
22
|
+
dir = join(process.env.APPDATA || join(homedir(), 'AppData', 'Roaming'), name, 'Config');
|
|
23
|
+
} else {
|
|
24
|
+
dir = join(process.env.XDG_CONFIG_HOME || join(homedir(), '.config'), name);
|
|
25
|
+
}
|
|
26
|
+
const cfg = JSON.parse(readFileSync(join(dir, 'config.json'), 'utf8'));
|
|
27
|
+
const tok = typeof cfg?.token === 'string' ? cfg.token.trim() : '';
|
|
28
|
+
return tok || undefined;
|
|
29
|
+
} catch {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let currentToken = process.env.DAILEY_API_TOKEN || readCliStoredToken() || '';
|
|
6
35
|
|
|
7
36
|
// Credential preflight lives in index.ts so it can distinguish TTY vs
|
|
8
37
|
// MCP-stdio invocation and emit a JSON-RPC-shaped error instead of just
|
|
@@ -17,7 +17,7 @@ function maskValue(v: string): string {
|
|
|
17
17
|
export function registerCredentialRevealTools(server: McpServer) {
|
|
18
18
|
server.tool(
|
|
19
19
|
'dailey_reveal_credential',
|
|
20
|
-
'Reveal a project credential
|
|
20
|
+
'Reveal a project credential (e.g. DB_PASSWORD). Re-auth required — every reveal is audited. BY DEFAULT returns a masked preview (last 3 chars + length) so the value never enters chat transcripts. To emit the plaintext into this response, pass emit_plaintext=true AND acknowledge that the response will be visible in the chat log / AI history / anyone the user shares the transcript with. Better workflow: use dailey_db_tunnel or dashboard "reveal" (which uses a browser-only modal) for anything you wouldn\'t paste in Slack.',
|
|
21
21
|
{
|
|
22
22
|
project_id: z.string().describe('The project ID'),
|
|
23
23
|
key: z.string().describe('Credential key (e.g., DB_PASSWORD, WORDPRESS_ADMIN_PASSWORD)'),
|
|
@@ -14,7 +14,6 @@ interface DeployStatus {
|
|
|
14
14
|
new_commits?: number;
|
|
15
15
|
latest_sha?: string | null;
|
|
16
16
|
latest_message?: string | null;
|
|
17
|
-
pod_crash?: { restart_count: number; recent_logs: string } | null;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
interface Build {
|
|
@@ -82,57 +81,6 @@ function getFailureGuidance(log: string): { reason: string; fix: string } | null
|
|
|
82
81
|
return null;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
const RUNTIME_CRASH_PATTERNS: Array<{ pattern: RegExp; summary: string; fix: string }> = [
|
|
86
|
-
{
|
|
87
|
-
pattern: /P3009|migrate found failed migrations/i,
|
|
88
|
-
summary: 'Prisma migration failed on startup (P3009). A previous migration left the database in a dirty state and Prisma is blocking all further migrations.',
|
|
89
|
-
fix: 'Run `npx prisma migrate resolve --rolled-back <migration_name>` to mark the failed migration as rolled back, then redeploy. If the database is fresh with no real data, you can clear `_prisma_migrations` entirely and redeploy to run all migrations from scratch. Use `dailey_db_exec` to inspect the `_prisma_migrations` table.',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
pattern: /Cannot find module|MODULE_NOT_FOUND/,
|
|
93
|
-
summary: 'App crashed at startup — a required module or file is missing at runtime.',
|
|
94
|
-
fix: 'A file is imported but does not exist in the deployed image. Search for the import in your source, check if the file was deleted or renamed, and fix the import before redeploying. Run `npx tsc --noEmit` locally to catch this before deploying.',
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
pattern: /password authentication failed|ECONNREFUSED.*5432|ECONNREFUSED.*3306|connection refused.*database/i,
|
|
98
|
-
summary: 'App crashed — cannot connect to the database.',
|
|
99
|
-
fix: 'Check that the database is provisioned and DATABASE_URL is set. Run `dailey_env_list` to verify the env var is present. If the database was recently created, it may still be initialising — wait 30 seconds and redeploy.',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
pattern: /EADDRINUSE/i,
|
|
103
|
-
summary: 'App crashed — port already in use.',
|
|
104
|
-
fix: 'The app is trying to bind a hardcoded port. Read the port from `process.env.PORT` and bind to `0.0.0.0`, not localhost.',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
pattern: /ENOMEM|heap out of memory|JavaScript heap out of memory/i,
|
|
108
|
-
summary: 'App crashed — out of memory (OOM).',
|
|
109
|
-
fix: 'The app exceeded its RAM limit. Scale up RAM from the dashboard, or add `--max-old-space-size=<MB>` to NODE_OPTIONS env var to cap Node.js heap below the container limit.',
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
pattern: /missing required env|required environment variable|env.*not.*set|getenv.*undefined/i,
|
|
113
|
-
summary: 'App crashed — a required environment variable is not set.',
|
|
114
|
-
fix: 'Run `dailey_env_list` to see what env vars are set. Add the missing variable with `dailey_env_set`, then redeploy.',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
pattern: /PRISMA_CLIENT_NOT_GENERATED|@prisma\/client did not initialize/i,
|
|
118
|
-
summary: 'Prisma Client was not generated before the app started.',
|
|
119
|
-
fix: 'Add `prisma generate` to your build step or postinstall script. In package.json: `"postinstall": "prisma generate"`.',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
pattern: /SyntaxError|unexpected token|Cannot use import/i,
|
|
123
|
-
summary: 'App crashed — JavaScript syntax error or ESM/CJS module incompatibility.',
|
|
124
|
-
fix: 'The compiled output has a syntax error or module format mismatch. Check your tsconfig `module` and `target` settings. Run `npm run build` locally and start the compiled output to reproduce.',
|
|
125
|
-
},
|
|
126
|
-
];
|
|
127
|
-
|
|
128
|
-
function getRuntimeCrashGuidance(logs: string): { summary: string; fix: string } | null {
|
|
129
|
-
if (!logs) return null;
|
|
130
|
-
for (const { pattern, summary, fix } of RUNTIME_CRASH_PATTERNS) {
|
|
131
|
-
if (pattern.test(logs)) return { summary, fix };
|
|
132
|
-
}
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
84
|
export function registerDeployStatusTools(server: McpServer) {
|
|
137
85
|
// Project-level pre-deploy status: can I deploy? is a build running? is there a new commit?
|
|
138
86
|
// Also fetches the latest build row to show progress emojis during active builds.
|
|
@@ -195,25 +143,6 @@ export function registerDeployStatusTools(server: McpServer) {
|
|
|
195
143
|
if (progress) {
|
|
196
144
|
lines.push(` Progress: ${progress}`);
|
|
197
145
|
}
|
|
198
|
-
// Runtime crash — build succeeded but pod is CrashLoopBackOff
|
|
199
|
-
if (status.pod_crash) {
|
|
200
|
-
const crash = status.pod_crash;
|
|
201
|
-
const guidance = getRuntimeCrashGuidance(crash.recent_logs);
|
|
202
|
-
lines.push('');
|
|
203
|
-
lines.push(`⚠️ RUNTIME CRASH (build succeeded, app crashes on startup)`);
|
|
204
|
-
lines.push(` Restarts: ${crash.restart_count}`);
|
|
205
|
-
if (guidance) {
|
|
206
|
-
lines.push(` Error: ${guidance.summary}`);
|
|
207
|
-
lines.push(` Fix: ${guidance.fix}`);
|
|
208
|
-
} else {
|
|
209
|
-
lines.push(` Logs (last 40 lines):`);
|
|
210
|
-
crash.recent_logs.split('\n').slice(-20).filter(Boolean).forEach((l) => {
|
|
211
|
-
lines.push(` ${l}`);
|
|
212
|
-
});
|
|
213
|
-
lines.push(` Tip: call dailey_app_logs with project_id=${project_id} for full logs.`);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
146
|
if (latest.status === 'failed') {
|
|
218
147
|
// Prefer the structured diagnosis fields surfaced by the deploy-service
|
|
219
148
|
// (build_error_summary / build_error_fix) over the local pattern matching.
|
package/src/tools/diagnose.ts
CHANGED
|
@@ -32,144 +32,6 @@ interface ProjectListEntry {
|
|
|
32
32
|
|
|
33
33
|
const ERROR_LINE_PATTERN = /(error|fatal|panic|exception|uncaught|unhandled)/i;
|
|
34
34
|
|
|
35
|
-
interface KnownIssue {
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
plain_english: string;
|
|
39
|
-
fix: string;
|
|
40
|
-
severity: 'fail' | 'warn';
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
interface PatternRule {
|
|
44
|
-
pattern: RegExp;
|
|
45
|
-
issue: KnownIssue;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const KNOWN_PATTERNS: PatternRule[] = [
|
|
49
|
-
{
|
|
50
|
-
pattern: /P3009|migrate found failed migrations|applied migration.*is not recorded/i,
|
|
51
|
-
issue: {
|
|
52
|
-
id: 'prisma_failed_migration',
|
|
53
|
-
name: 'Prisma: failed migration in history',
|
|
54
|
-
plain_english:
|
|
55
|
-
'Your database has a migration that started but never finished — usually because the app crashed mid-deploy or you restored a dump on top of an existing schema. Prisma refuses to start until it is resolved.',
|
|
56
|
-
fix: 'Run: dailey db exec <project> "UPDATE _prisma_migrations SET finished_at = started_at, logs = NULL WHERE finished_at IS NULL AND rolled_back_at IS NULL;" --confirm\nThen redeploy: dailey deploy <project>',
|
|
57
|
-
severity: 'fail',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
pattern: /PrismaClientInitializationError|prisma\.generate|@prisma\/client did not initialize/i,
|
|
62
|
-
issue: {
|
|
63
|
-
id: 'prisma_client_not_generated',
|
|
64
|
-
name: 'Prisma: client not generated',
|
|
65
|
-
plain_english:
|
|
66
|
-
'The Prisma client was not generated during the build step. Your Dockerfile or build command is missing "prisma generate" before "node" starts.',
|
|
67
|
-
fix: 'Add "npx prisma generate" to your build step. In package.json: "build": "prisma generate && tsc" (or whatever your build command is). Then redeploy: dailey deploy <project>',
|
|
68
|
-
severity: 'fail',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
pattern: /exit code 137|OOMKilled|out of memory kill|memory limit exceeded/i,
|
|
73
|
-
issue: {
|
|
74
|
-
id: 'oom_killed',
|
|
75
|
-
name: 'Pod killed: out of memory (OOM)',
|
|
76
|
-
plain_english:
|
|
77
|
-
'Your app used more memory than its limit and the platform killed it. The default limit is 512 MB per replica.',
|
|
78
|
-
fix: 'Check memory usage: dailey usage <project>\nIncrease the limit: dailey resource-config <project> --memory-limit 1024\nOr reduce memory use (Node.js tip: set NODE_OPTIONS="--max-old-space-size=900" in your env vars).',
|
|
79
|
-
severity: 'fail',
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
pattern: /FATAL ERROR:.*JavaScript heap out of memory|heap out of memory/i,
|
|
84
|
-
issue: {
|
|
85
|
-
id: 'node_heap_oom',
|
|
86
|
-
name: 'Node.js heap out of memory',
|
|
87
|
-
plain_english:
|
|
88
|
-
"Your Node.js process ran out of heap space. It didn't hit the container memory limit — the V8 heap limit (default ~512 MB) was hit first.",
|
|
89
|
-
fix: 'Set NODE_OPTIONS env var: dailey env set <project> NODE_OPTIONS "--max-old-space-size=1024"\nThen redeploy: dailey deploy <project>',
|
|
90
|
-
severity: 'fail',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
pattern: /ECONNREFUSED.*(?:3306|5432|27017)|connect ECONNREFUSED.*database|database connection refused/i,
|
|
95
|
-
issue: {
|
|
96
|
-
id: 'db_connection_refused',
|
|
97
|
-
name: 'Database connection refused',
|
|
98
|
-
plain_english:
|
|
99
|
-
'Your app tried to connect to the database but got "connection refused." Either the database is not provisioned, or the connection URL is wrong.',
|
|
100
|
-
fix: 'Check if a database is provisioned: dailey db info <project>\nIf not provisioned: dailey db provision <project> --type mysql (or postgres)\nIf provisioned, verify DATABASE_URL is correct: dailey env list <project>',
|
|
101
|
-
severity: 'fail',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
pattern: /EADDRINUSE|address already in use|port.*already in use/i,
|
|
106
|
-
issue: {
|
|
107
|
-
id: 'port_in_use',
|
|
108
|
-
name: 'Port already in use',
|
|
109
|
-
plain_english:
|
|
110
|
-
"Your app tried to listen on a port that's already occupied. On Dailey OS you must listen on the PORT env var (always 3000) — never hardcode a port number.",
|
|
111
|
-
fix: 'Update your app to bind to process.env.PORT (not a hardcoded number). Example: app.listen(process.env.PORT || 3000)\nThen redeploy: dailey deploy <project>',
|
|
112
|
-
severity: 'fail',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
pattern: /Cannot find module|MODULE_NOT_FOUND|Error: Cannot find|module not found/i,
|
|
117
|
-
issue: {
|
|
118
|
-
id: 'module_not_found',
|
|
119
|
-
name: 'Module not found',
|
|
120
|
-
plain_english:
|
|
121
|
-
'A package your app depends on is missing from the build. This usually means a dependency was not installed during the build, or was accidentally added to devDependencies instead of dependencies.',
|
|
122
|
-
fix: 'Check your package.json: make sure the missing package is in "dependencies" (not "devDependencies").\nThen redeploy: dailey deploy <project>\nIf the build is failing: dailey build-logs <project>',
|
|
123
|
-
severity: 'fail',
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
pattern:
|
|
128
|
-
/TypeError: Cannot read propert(?:y|ies) of undefined|TypeError: Cannot read propert(?:y|ies) of null|ReferenceError: process is not defined/i,
|
|
129
|
-
issue: {
|
|
130
|
-
id: 'missing_env_var',
|
|
131
|
-
name: 'Missing environment variable (likely)',
|
|
132
|
-
plain_english:
|
|
133
|
-
'Your app crashed trying to read a value that was undefined or null. This is often a missing environment variable — your code references process.env.SOMETHING that was never set.',
|
|
134
|
-
fix: 'Check which env vars are set: dailey env list <project>\nSet a missing var: dailey env set <project> MY_VAR "my value"\nThen redeploy: dailey deploy <project>',
|
|
135
|
-
severity: 'warn',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
pattern: /secretOrPrivateKey must have a value|jwt.*secret.*undefined|invalid signature/i,
|
|
140
|
-
issue: {
|
|
141
|
-
id: 'missing_jwt_secret',
|
|
142
|
-
name: 'Missing JWT secret',
|
|
143
|
-
plain_english:
|
|
144
|
-
'Your app uses JWT (JSON Web Tokens) but the secret key env var is not set. Sessions and auth will fail.',
|
|
145
|
-
fix: 'Set your JWT secret: dailey env set <project> JWT_SECRET "$(openssl rand -hex 32)"\nThen redeploy: dailey deploy <project>',
|
|
146
|
-
severity: 'fail',
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
pattern: /SSL SYSCALL error|SSL connection has been closed|EPROTO.*SSL|certificate verify failed/i,
|
|
151
|
-
issue: {
|
|
152
|
-
id: 'ssl_db_error',
|
|
153
|
-
name: 'Database SSL error',
|
|
154
|
-
plain_english:
|
|
155
|
-
'Your app failed to establish a secure connection to the database. This usually means the SSL mode in your connection string does not match what the server requires.',
|
|
156
|
-
fix: 'If using PostgreSQL, add ?sslmode=require to DATABASE_URL.\nIf using MySQL, add ?ssl=true.\nCheck current DATABASE_URL: dailey env list <project>',
|
|
157
|
-
severity: 'fail',
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
pattern: /SIGTERM|graceful shutdown|terminating connection|Gracefully stopping/i,
|
|
162
|
-
issue: {
|
|
163
|
-
id: 'sigterm_restart',
|
|
164
|
-
name: 'Pod restarting (SIGTERM)',
|
|
165
|
-
plain_english:
|
|
166
|
-
'Your app is being stopped and restarted by the platform. This is normal during deploys, but if it is happening repeatedly it means the app is not starting up properly after being stopped.',
|
|
167
|
-
fix: 'Check pod restart count and crash reasons: dailey processes <project>\nCheck if the latest deploy succeeded: dailey deploy-status <project>',
|
|
168
|
-
severity: 'warn',
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
];
|
|
172
|
-
|
|
173
35
|
async function resolveProjectId(
|
|
174
36
|
projectOrSlug: string,
|
|
175
37
|
): Promise<{ id: string | null; matched_by: 'id' | 'slug' | 'name' | 'none'; hint?: string }> {
|
|
@@ -413,46 +275,6 @@ async function checkRecentErrors(projectId: string): Promise<Lane> {
|
|
|
413
275
|
};
|
|
414
276
|
}
|
|
415
277
|
|
|
416
|
-
async function checkKnownPatterns(projectId: string): Promise<Lane> {
|
|
417
|
-
const res = await apiRequest<{ logs?: string[] }>('GET', `/projects/${projectId}/logs?tail=100`);
|
|
418
|
-
if (!res.ok) {
|
|
419
|
-
return { name: 'known_issues', status: 'skip', summary: 'No logs available to scan for known issues.' };
|
|
420
|
-
}
|
|
421
|
-
const lines = res.data.logs || [];
|
|
422
|
-
const logText = lines.join('\n');
|
|
423
|
-
|
|
424
|
-
const matched: KnownIssue[] = [];
|
|
425
|
-
const seen = new Set<string>();
|
|
426
|
-
for (const rule of KNOWN_PATTERNS) {
|
|
427
|
-
if (rule.pattern.test(logText) && !seen.has(rule.issue.id)) {
|
|
428
|
-
seen.add(rule.issue.id);
|
|
429
|
-
matched.push(rule.issue);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
if (matched.length === 0) {
|
|
434
|
-
return { name: 'known_issues', status: 'ok', summary: 'No known crash patterns detected in last 100 log lines.' };
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
const hasFail = matched.some((i) => i.severity === 'fail');
|
|
438
|
-
const laneStatus: LaneStatus = hasFail ? 'fail' : 'warn';
|
|
439
|
-
const names = matched.map((i) => i.name).join('; ');
|
|
440
|
-
|
|
441
|
-
return {
|
|
442
|
-
name: 'known_issues',
|
|
443
|
-
status: laneStatus,
|
|
444
|
-
summary: `${matched.length} known issue(s) detected: ${names}`,
|
|
445
|
-
detail: {
|
|
446
|
-
issues: matched.map((i) => ({
|
|
447
|
-
id: i.id,
|
|
448
|
-
name: i.name,
|
|
449
|
-
plain_english: i.plain_english,
|
|
450
|
-
fix: i.fix,
|
|
451
|
-
})),
|
|
452
|
-
},
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
|
|
456
278
|
function aggregateVerdict(lanes: Lane[]): { verdict: 'healthy' | 'degraded' | 'broken'; summary: string } {
|
|
457
279
|
const hasFail = lanes.some((l) => l.status === 'fail');
|
|
458
280
|
const hasWarn = lanes.some((l) => l.status === 'warn');
|
|
@@ -540,11 +362,6 @@ export function registerDiagnoseTools(server: McpServer) {
|
|
|
540
362
|
status: 'fail' as LaneStatus,
|
|
541
363
|
summary: `lane crashed: ${err.message}`,
|
|
542
364
|
})),
|
|
543
|
-
checkKnownPatterns(projectId).catch((err) => ({
|
|
544
|
-
name: 'known_issues',
|
|
545
|
-
status: 'fail' as LaneStatus,
|
|
546
|
-
summary: `lane crashed: ${err.message}`,
|
|
547
|
-
})),
|
|
548
365
|
]);
|
|
549
366
|
|
|
550
367
|
const { verdict, summary } = aggregateVerdict(lanes);
|
package/src/tools/platform.ts
CHANGED
|
@@ -83,92 +83,4 @@ export function registerPlatformTools(server: McpServer) {
|
|
|
83
83
|
return textResult(lines.join('\n'));
|
|
84
84
|
},
|
|
85
85
|
);
|
|
86
|
-
|
|
87
|
-
server.tool(
|
|
88
|
-
'dailey_os_guide',
|
|
89
|
-
'Return a guide on how Dailey OS works and the right approach for common tasks. Call this when you need context on platform architecture, database access patterns, deployment flow, or when a user asks how to do something in DOS and you are unsure of the right path.',
|
|
90
|
-
{},
|
|
91
|
-
async () => {
|
|
92
|
-
return textResult(`
|
|
93
|
-
Dailey OS — Platform Guide for AI Assistants
|
|
94
|
-
═════════════════════════════════════════════
|
|
95
|
-
|
|
96
|
-
## Architecture overview
|
|
97
|
-
|
|
98
|
-
Dailey OS is a managed app platform (like Heroku/Render) running on a private Kubernetes cluster.
|
|
99
|
-
Each customer has a namespace (customer-<slug>). Projects map to K8s Deployments.
|
|
100
|
-
Databases (MySQL or PostgreSQL) run on dedicated nodes, reachable only via Tailscale CGNAT IPs (100.x.x.x).
|
|
101
|
-
|
|
102
|
-
## Database access — choose the right path
|
|
103
|
-
|
|
104
|
-
### Reading data (no write access needed)
|
|
105
|
-
→ Use dailey_db_recall — runs a SELECT through the API, no Tailscale, no shell.
|
|
106
|
-
|
|
107
|
-
### Schema inspection
|
|
108
|
-
→ Use dailey_db_schema — returns all tables, columns, row counts.
|
|
109
|
-
|
|
110
|
-
### Applying a migration (DDL/DML)
|
|
111
|
-
→ Use dailey_db_exec — runs SQL in a transaction under a scoped user. Works for CREATE TABLE, ALTER, INSERT, UPDATE, etc.
|
|
112
|
-
|
|
113
|
-
### Importing a full database dump (pg_dump .sql or .pgdump, mysqldump .sql)
|
|
114
|
-
→ Tell the user to run: dailey db connect <project>
|
|
115
|
-
This opens a LOCAL port on 127.0.0.1 via WebSocket proxy (NO Tailscale required on their machine).
|
|
116
|
-
Then in a second terminal:
|
|
117
|
-
PostgreSQL SQL file: PGPASSWORD='...' psql -h 127.0.0.1 -p 15432 -U <user> -d <db> < dump.sql
|
|
118
|
-
PostgreSQL custom: pg_restore -h 127.0.0.1 -p 15432 -U <user> -d <db> dump.pgdump
|
|
119
|
-
MySQL: mysql -h 127.0.0.1 -P 13306 -u <user> -p<pass> <db> < dump.sql
|
|
120
|
-
The CLI prints ready-to-paste commands when the tunnel opens.
|
|
121
|
-
Session lasts 1 hour.
|
|
122
|
-
|
|
123
|
-
### Connecting a GUI tool (TablePlus, DBeaver, pgAdmin)
|
|
124
|
-
→ Same path: dailey db connect <project> — no Tailscale needed.
|
|
125
|
-
The CLI prints the local connection string. Point any GUI at 127.0.0.1 on the printed port.
|
|
126
|
-
|
|
127
|
-
### Bulk row insert/upsert (structured data, not a full dump)
|
|
128
|
-
→ Use dailey_db_import — accepts JSON array or CSV inline, two-phase commit (dry_run then confirm).
|
|
129
|
-
|
|
130
|
-
## Deployment flow
|
|
131
|
-
|
|
132
|
-
1. Customer pushes code to GitHub
|
|
133
|
-
2. Dailey detects the push via webhook → triggers a build
|
|
134
|
-
3. Build runs on a build-worker node (Docker/buildpack)
|
|
135
|
-
4. Image is pushed to registry.dailey.cloud/dailey/<slug>:<tag>
|
|
136
|
-
5. deploy-service rolls out new image to the K8s Deployment
|
|
137
|
-
6. Canary probe runs (HTTP health check) — rollback on failure
|
|
138
|
-
|
|
139
|
-
To redeploy manually: use dailey_deploy.
|
|
140
|
-
To check build status: use dailey_deploy_status or dailey_build_logs.
|
|
141
|
-
|
|
142
|
-
## Environment variables
|
|
143
|
-
|
|
144
|
-
- Set via dailey_env_set (single) or dailey_env_set_many (bulk)
|
|
145
|
-
- Changes take effect on next deploy (not live-patched)
|
|
146
|
-
- Never auto-generate or overwrite variables that look customer-set
|
|
147
|
-
- Sensitive vars (API keys, passwords) are encrypted at rest
|
|
148
|
-
|
|
149
|
-
## Storage (object storage)
|
|
150
|
-
|
|
151
|
-
- Each project has an R2 bucket prefix scoped to its project ID
|
|
152
|
-
- Credentials are auto-injected as S3_* env vars (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL, AWS_REGION, S3_BUCKET)
|
|
153
|
-
- Use any S3-compatible SDK — no Dailey-specific client needed
|
|
154
|
-
- For presigned URLs: use dailey_storage_presign_upload / dailey_storage_presign_download
|
|
155
|
-
|
|
156
|
-
## Common mistakes to avoid
|
|
157
|
-
|
|
158
|
-
- DO NOT suggest using third-party file hosts (transfer.sh, S3 public links) for database dumps — use dailey db connect instead
|
|
159
|
-
- DO NOT assume the customer needs Tailscale to connect a GUI tool or run psql — the CLI WebSocket proxy handles it
|
|
160
|
-
- DO NOT suggest mysqldump/pg_dump --host with the CGNAT IP (100.x.x.x) directly — that requires Tailscale
|
|
161
|
-
- DO NOT run dailey_db_import for full schema dumps — it's for structured row data only, not DDL
|
|
162
|
-
- DO NOT suggest redeploying to apply env var changes without confirming the user wants a redeploy
|
|
163
|
-
|
|
164
|
-
## Useful diagnostic sequence
|
|
165
|
-
|
|
166
|
-
User reports app is down / crashing:
|
|
167
|
-
1. dailey_deploy_status — check last deploy result
|
|
168
|
-
2. dailey_build_logs — check if latest build succeeded
|
|
169
|
-
3. dailey_diagnose — AI-powered diagnosis of pod/build state
|
|
170
|
-
4. dailey_processes — see running containers and recent restart counts
|
|
171
|
-
`.trim());
|
|
172
|
-
},
|
|
173
|
-
);
|
|
174
86
|
}
|
package/src/tools/projects.ts
CHANGED
|
@@ -26,9 +26,7 @@ export function registerProjectTools(server: McpServer) {
|
|
|
26
26
|
|
|
27
27
|
const projects = res.data.projects;
|
|
28
28
|
if (!projects || projects.length === 0) {
|
|
29
|
-
return textResult(
|
|
30
|
-
`No projects found.\n\nNew to Dailey OS? Call dailey_buddy to get started — it can deploy the blog template (covers every DOS feature in ~30 min) or help you get your own app running.`,
|
|
31
|
-
);
|
|
29
|
+
return textResult('No projects found.');
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
// Include slug — when multiple projects share a name (common with
|