@daileyos/mcp-server 1.21.1 → 1.21.4
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/dist/api.d.ts +7 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +37 -3
- package/dist/api.js.map +1 -1
- package/dist/context.d.ts +8 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +6 -0
- package/dist/context.js.map +1 -0
- package/dist/http.d.ts +5 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +193 -0
- package/dist/http.js.map +1 -0
- package/dist/index.js +32 -163
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +9 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +165 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/accounts.d.ts +4 -1
- package/dist/tools/accounts.d.ts.map +1 -1
- package/dist/tools/accounts.js +57 -53
- package/dist/tools/accounts.js.map +1 -1
- package/dist/tools/ai.d.ts.map +1 -1
- package/dist/tools/ai.js +7 -1
- package/dist/tools/ai.js.map +1 -1
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +25 -6
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/backups.d.ts.map +1 -1
- package/dist/tools/backups.js +3 -1
- package/dist/tools/backups.js.map +1 -1
- package/dist/tools/build-logs.d.ts.map +1 -1
- package/dist/tools/build-logs.js +3 -1
- package/dist/tools/build-logs.js.map +1 -1
- package/dist/tools/credentials-reveal.d.ts.map +1 -1
- package/dist/tools/credentials-reveal.js +3 -1
- package/dist/tools/credentials-reveal.js.map +1 -1
- package/dist/tools/dailey-images.js +3 -3
- package/dist/tools/dailey-images.js.map +1 -1
- package/dist/tools/db-migrate.js +5 -5
- package/dist/tools/db-migrate.js.map +1 -1
- package/dist/tools/db.d.ts.map +1 -1
- package/dist/tools/db.js +17 -1
- package/dist/tools/db.js.map +1 -1
- package/dist/tools/deploy-status.d.ts.map +1 -1
- package/dist/tools/deploy-status.js +3 -1
- package/dist/tools/deploy-status.js.map +1 -1
- package/dist/tools/deploy.d.ts.map +1 -1
- package/dist/tools/deploy.js +9 -1
- package/dist/tools/deploy.js.map +1 -1
- package/dist/tools/domains.d.ts.map +1 -1
- package/dist/tools/domains.js +3 -1
- package/dist/tools/domains.js.map +1 -1
- package/dist/tools/email.d.ts.map +1 -1
- package/dist/tools/email.js +7 -1
- package/dist/tools/email.js.map +1 -1
- package/dist/tools/env.d.ts.map +1 -1
- package/dist/tools/env.js +5 -1
- package/dist/tools/env.js.map +1 -1
- package/dist/tools/environments.js +3 -3
- package/dist/tools/environments.js.map +1 -1
- package/dist/tools/exec-run.d.ts.map +1 -1
- package/dist/tools/exec-run.js +7 -1
- package/dist/tools/exec-run.js.map +1 -1
- package/dist/tools/images.d.ts.map +1 -1
- package/dist/tools/images.js +5 -1
- package/dist/tools/images.js.map +1 -1
- package/dist/tools/lifecycle.d.ts.map +1 -1
- package/dist/tools/lifecycle.js +5 -1
- package/dist/tools/lifecycle.js.map +1 -1
- package/dist/tools/links.d.ts.map +1 -1
- package/dist/tools/links.js +3 -1
- package/dist/tools/links.js.map +1 -1
- package/dist/tools/platform.d.ts.map +1 -1
- package/dist/tools/platform.js +3 -1
- package/dist/tools/platform.js.map +1 -1
- package/dist/tools/processes.d.ts.map +1 -1
- package/dist/tools/processes.js +11 -1
- package/dist/tools/processes.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +36 -12
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/resource-config.d.ts.map +1 -1
- package/dist/tools/resource-config.js +3 -1
- package/dist/tools/resource-config.js.map +1 -1
- package/dist/tools/scale.d.ts.map +1 -1
- package/dist/tools/scale.js +3 -1
- package/dist/tools/scale.js.map +1 -1
- package/dist/tools/storage.d.ts.map +1 -1
- package/dist/tools/storage.js +11 -1
- package/dist/tools/storage.js.map +1 -1
- package/dist/tools/support.d.ts.map +1 -1
- package/dist/tools/support.js +3 -1
- package/dist/tools/support.js.map +1 -1
- package/dist/tools/usage.d.ts.map +1 -1
- package/dist/tools/usage.js +3 -1
- package/dist/tools/usage.js.map +1 -1
- package/dist/tools/wordpress-import.d.ts.map +1 -1
- package/dist/tools/wordpress-import.js +3 -1
- package/dist/tools/wordpress-import.js.map +1 -1
- package/dist/tools/wordpress-migrate.d.ts.map +1 -1
- package/dist/tools/wordpress-migrate.js +3 -1
- package/dist/tools/wordpress-migrate.js.map +1 -1
- package/dist/tools/wordpress-snapshot.d.ts.map +1 -1
- package/dist/tools/wordpress-snapshot.js +9 -1
- package/dist/tools/wordpress-snapshot.js.map +1 -1
- package/dist/tools/wordpress-targeting.d.ts.map +1 -1
- package/dist/tools/wordpress-targeting.js +22 -7
- package/dist/tools/wordpress-targeting.js.map +1 -1
- package/package.json +7 -3
- package/.github/workflows/publish.yml +0 -120
- package/claude-config.json +0 -13
- package/dist/tools/buddy.d.ts +0 -3
- package/dist/tools/buddy.d.ts.map +0 -1
- package/dist/tools/buddy.js +0 -765
- package/dist/tools/buddy.js.map +0 -1
- package/dist/tools/payments.d.ts +0 -3
- package/dist/tools/payments.d.ts.map +0 -1
- package/dist/tools/payments.js +0 -96
- package/dist/tools/payments.js.map +0 -1
- package/dist/tools/redis.d.ts +0 -3
- package/dist/tools/redis.d.ts.map +0 -1
- package/dist/tools/redis.js +0 -72
- package/dist/tools/redis.js.map +0 -1
- package/src/api.ts +0 -255
- package/src/index.ts +0 -247
- package/src/tools/accounts.ts +0 -111
- package/src/tools/addons.ts +0 -124
- package/src/tools/admin.ts +0 -42
- package/src/tools/ai.ts +0 -83
- package/src/tools/analyze.ts +0 -108
- package/src/tools/auth.ts +0 -177
- package/src/tools/backups.ts +0 -84
- package/src/tools/billing.ts +0 -34
- package/src/tools/build-logs.ts +0 -65
- package/src/tools/bundle.ts +0 -129
- package/src/tools/cli.ts +0 -76
- package/src/tools/credentials-reveal.ts +0 -64
- package/src/tools/credits.ts +0 -97
- package/src/tools/dailey-images.ts +0 -151
- package/src/tools/db-migrate.ts +0 -211
- package/src/tools/db.ts +0 -391
- package/src/tools/deploy-status.ts +0 -247
- package/src/tools/deploy.ts +0 -101
- package/src/tools/diagnose.ts +0 -567
- package/src/tools/domains.ts +0 -156
- package/src/tools/email.ts +0 -101
- package/src/tools/env.ts +0 -205
- package/src/tools/environments.ts +0 -138
- package/src/tools/exec-run.ts +0 -91
- package/src/tools/images.ts +0 -221
- package/src/tools/lifecycle.ts +0 -75
- package/src/tools/links.ts +0 -69
- package/src/tools/platform.ts +0 -209
- package/src/tools/processes.ts +0 -182
- package/src/tools/project-transfer.ts +0 -129
- package/src/tools/projects.ts +0 -287
- package/src/tools/resource-config.ts +0 -84
- package/src/tools/scale.ts +0 -33
- package/src/tools/storage.ts +0 -281
- package/src/tools/support.ts +0 -42
- package/src/tools/usage.ts +0 -128
- package/src/tools/wordpress-import.ts +0 -174
- package/src/tools/wordpress-live-edit.ts +0 -250
- package/src/tools/wordpress-migrate.ts +0 -104
- package/src/tools/wordpress-snapshot.ts +0 -225
- package/src/tools/wordpress-targeting.ts +0 -173
- package/src/upload.ts +0 -35
- package/src/version.ts +0 -70
- package/test/wordpress-import.test.ts +0 -223
- package/test/wordpress-live-edit.test.ts +0 -159
- package/test/wordpress-targeting.test.ts +0 -127
- package/tests/dailey-images.test.mjs +0 -156
- package/tests/environments.test.mjs +0 -230
- package/tests/mcp-protocol-smoke.mjs +0 -149
- package/tests/new-tools-smoke.mjs +0 -217
- package/tests/pack1-mcp-preflight.test.mjs +0 -184
- package/tests/pack6-smoke.mjs +0 -222
- package/tests/wp-snapshot-labels.test.mjs +0 -21
- package/tests/wp-snapshot.test.mjs +0 -261
- package/tsconfig.json +0 -19
package/src/tools/deploy.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { apiRequest, formatError, textResult } from '../api.js';
|
|
4
|
-
|
|
5
|
-
interface LogsResponse {
|
|
6
|
-
logs: string[];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface Build {
|
|
10
|
-
id: string;
|
|
11
|
-
status?: string;
|
|
12
|
-
commit?: string;
|
|
13
|
-
created_at?: string;
|
|
14
|
-
finished_at?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function registerDeployTools(server: McpServer) {
|
|
18
|
-
server.tool(
|
|
19
|
-
'dailey_app_logs',
|
|
20
|
-
'Get application pod logs',
|
|
21
|
-
{
|
|
22
|
-
project_id: z.string().describe('The project ID'),
|
|
23
|
-
tail: z.number().optional().describe('Number of log lines to fetch (default: 100)'),
|
|
24
|
-
},
|
|
25
|
-
async ({ project_id, tail }) => {
|
|
26
|
-
const query = tail ? `?tail=${tail}` : '?tail=100';
|
|
27
|
-
const res = await apiRequest<LogsResponse>('GET', `/projects/${project_id}/logs${query}`);
|
|
28
|
-
if (!res.ok) return textResult(formatError(res));
|
|
29
|
-
|
|
30
|
-
const logs = res.data.logs;
|
|
31
|
-
if (!logs || logs.length === 0) {
|
|
32
|
-
return textResult('No logs available.');
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return textResult([`Logs (last ${tail || 100} lines):`, '', ...logs].join('\n'));
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
server.tool(
|
|
40
|
-
'dailey_deploy_history',
|
|
41
|
-
'List recent deploys/builds for a project',
|
|
42
|
-
{ project_id: z.string().describe('The project ID') },
|
|
43
|
-
async ({ project_id }) => {
|
|
44
|
-
const res = await apiRequest<{ builds: Build[] }>('GET', `/projects/${project_id}/deploys`);
|
|
45
|
-
if (!res.ok) return textResult(formatError(res));
|
|
46
|
-
|
|
47
|
-
const builds = res.data.builds;
|
|
48
|
-
if (!builds || builds.length === 0) {
|
|
49
|
-
return textResult('No deploys found.');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const lines = [
|
|
53
|
-
`Deploy History`,
|
|
54
|
-
`${'Build ID'.padEnd(38)} ${'Status'.padEnd(12)} ${'Commit'.padEnd(12)} Created`,
|
|
55
|
-
'─'.repeat(90),
|
|
56
|
-
];
|
|
57
|
-
|
|
58
|
-
for (const b of builds) {
|
|
59
|
-
lines.push(
|
|
60
|
-
`${(b.id || '').padEnd(38)} ${(b.status || 'unknown').padEnd(12)} ${(b.commit || '-').substring(0, 10).padEnd(12)} ${b.created_at || '-'}`,
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return textResult(lines.join('\n'));
|
|
65
|
-
},
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
server.tool(
|
|
69
|
-
'dailey_rollback',
|
|
70
|
-
'Rollback a project to a previous build',
|
|
71
|
-
{
|
|
72
|
-
project_id: z.string().describe('The project ID'),
|
|
73
|
-
build_id: z.string().describe('The build ID to rollback to'),
|
|
74
|
-
},
|
|
75
|
-
async ({ project_id, build_id }) => {
|
|
76
|
-
const res = await apiRequest('POST', `/projects/${project_id}/rollback`, { build_id });
|
|
77
|
-
if (!res.ok) return textResult(formatError(res));
|
|
78
|
-
return textResult(`Rollback initiated for project ${project_id} to build ${build_id}.`);
|
|
79
|
-
},
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
server.tool(
|
|
83
|
-
'dailey_deploy_rate',
|
|
84
|
-
'Check the deploy rate limit status for a project — deploys used vs. limit this hour, remaining, and minutes until the window resets. Worth calling before kicking off dailey_deploy in a debug loop or when iterating quickly, so you don\'t hit the hourly cap unexpectedly.',
|
|
85
|
-
{ project_id: z.string().describe('The project ID') },
|
|
86
|
-
async ({ project_id }) => {
|
|
87
|
-
const res = await apiRequest<any>('GET', `/projects/${project_id}/deploy-rate`);
|
|
88
|
-
if (!res.ok) return textResult(formatError(res));
|
|
89
|
-
const d = res.data;
|
|
90
|
-
const pct = d.deploys_limit > 0 ? Math.round((d.deploys_used / d.deploys_limit) * 100) : 0;
|
|
91
|
-
const lines = [
|
|
92
|
-
`Deploy rate status`,
|
|
93
|
-
`Used: ${d.deploys_used} / ${d.deploys_limit} (${pct}%)`,
|
|
94
|
-
`Remaining: ${d.deploys_remaining}`,
|
|
95
|
-
`Resets in: ${d.resets_in_minutes} minute(s)`,
|
|
96
|
-
];
|
|
97
|
-
if (pct >= 90) lines.push('', '⚠ approaching rate limit — consider waiting');
|
|
98
|
-
return textResult(lines.join('\n'));
|
|
99
|
-
},
|
|
100
|
-
);
|
|
101
|
-
}
|
package/src/tools/diagnose.ts
DELETED
|
@@ -1,567 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { apiRequest, textResult } from '../api.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* dailey_diagnose — single MCP tool that runs every health check and returns
|
|
7
|
-
* a structured summary. Customer-feedback Scott Waters platform-wishlist
|
|
8
|
-
* 2026-04-25, section 8: "the kind of thing an AI agent reaches for when a
|
|
9
|
-
* customer says 'something's broken.'"
|
|
10
|
-
*
|
|
11
|
-
* Strategy: piggyback on existing endpoints (deploy-status, /resources,
|
|
12
|
-
* /storage, /database, /env/runtime, /logs). No new backend endpoints.
|
|
13
|
-
* Calls run in parallel; each lane is wrapped so one failing lane doesn't
|
|
14
|
-
* abort the rest. Final verdict aggregates lane-level statuses into one
|
|
15
|
-
* of: healthy / degraded / broken.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
type LaneStatus = 'ok' | 'warn' | 'fail' | 'skip';
|
|
19
|
-
|
|
20
|
-
interface Lane {
|
|
21
|
-
name: string;
|
|
22
|
-
status: LaneStatus;
|
|
23
|
-
summary: string;
|
|
24
|
-
detail?: Record<string, unknown>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface ProjectListEntry {
|
|
28
|
-
id: string;
|
|
29
|
-
name?: string;
|
|
30
|
-
slug?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const ERROR_LINE_PATTERN = /(error|fatal|panic|exception|uncaught|unhandled)/i;
|
|
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
|
-
async function resolveProjectId(
|
|
174
|
-
projectOrSlug: string,
|
|
175
|
-
): Promise<{ id: string | null; matched_by: 'id' | 'slug' | 'name' | 'none'; hint?: string }> {
|
|
176
|
-
// Try as ID first — a UUID-shaped string is almost always a real ID.
|
|
177
|
-
const looksLikeId = /^[0-9a-f-]{8,}$/i.test(projectOrSlug);
|
|
178
|
-
if (looksLikeId) {
|
|
179
|
-
const direct = await apiRequest<any>('GET', `/projects/${projectOrSlug}`);
|
|
180
|
-
if (direct.ok) return { id: projectOrSlug, matched_by: 'id' };
|
|
181
|
-
// fall through to slug lookup if 404
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const list = await apiRequest<{ projects: ProjectListEntry[] }>('GET', '/projects');
|
|
185
|
-
if (!list.ok) {
|
|
186
|
-
return { id: null, matched_by: 'none', hint: 'Could not list projects to resolve slug.' };
|
|
187
|
-
}
|
|
188
|
-
const projects = list.data.projects || [];
|
|
189
|
-
const bySlug = projects.find((p) => p.slug === projectOrSlug);
|
|
190
|
-
if (bySlug?.id) return { id: bySlug.id, matched_by: 'slug' };
|
|
191
|
-
const byName = projects.find((p) => p.name === projectOrSlug);
|
|
192
|
-
if (byName?.id) return { id: byName.id, matched_by: 'name' };
|
|
193
|
-
return { id: null, matched_by: 'none', hint: `No project found matching "${projectOrSlug}".` };
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
async function checkDeploy(projectId: string): Promise<Lane> {
|
|
197
|
-
const status = await apiRequest<any>('GET', `/projects/${projectId}/deploy-status`);
|
|
198
|
-
if (!status.ok) {
|
|
199
|
-
return { name: 'deploy', status: 'fail', summary: `deploy-status returned ${status.status}` };
|
|
200
|
-
}
|
|
201
|
-
const builds = await apiRequest<{ builds: any[] }>('GET', `/projects/${projectId}/deploys`);
|
|
202
|
-
const latest = builds.ok ? builds.data.builds?.[0] : null;
|
|
203
|
-
const deployedAt = status.data.deployed_at;
|
|
204
|
-
const isBuilding = !!status.data.is_building;
|
|
205
|
-
|
|
206
|
-
let laneStatus: LaneStatus = 'ok';
|
|
207
|
-
let summary = `Deployed ${deployedAt || 'never'}`;
|
|
208
|
-
|
|
209
|
-
if (latest?.status === 'failed') {
|
|
210
|
-
laneStatus = 'fail';
|
|
211
|
-
summary = `Latest build ${latest.id} failed (${latest.finished_at || 'unknown time'}).`;
|
|
212
|
-
} else if (isBuilding) {
|
|
213
|
-
laneStatus = 'warn';
|
|
214
|
-
summary = `Build in progress (${latest?.id || 'unknown'}).`;
|
|
215
|
-
} else if (!deployedAt) {
|
|
216
|
-
laneStatus = 'warn';
|
|
217
|
-
summary = 'Project has never been deployed.';
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
return {
|
|
221
|
-
name: 'deploy',
|
|
222
|
-
status: laneStatus,
|
|
223
|
-
summary,
|
|
224
|
-
detail: {
|
|
225
|
-
mode: status.data.mode,
|
|
226
|
-
deployed_at: deployedAt,
|
|
227
|
-
is_building: isBuilding,
|
|
228
|
-
can_deploy: status.data.can_deploy,
|
|
229
|
-
latest_build: latest
|
|
230
|
-
? { id: latest.id, status: latest.status, finished_at: latest.finished_at }
|
|
231
|
-
: null,
|
|
232
|
-
},
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
async function checkPods(projectId: string): Promise<Lane> {
|
|
237
|
-
// /resources is the single-call source for pod ready/total + restart counts.
|
|
238
|
-
const res = await apiRequest<any>('GET', `/projects/${projectId}/resources`);
|
|
239
|
-
if (!res.ok) {
|
|
240
|
-
return {
|
|
241
|
-
name: 'pods',
|
|
242
|
-
status: 'fail',
|
|
243
|
-
summary: `Could not fetch pod resources (${res.status}).`,
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
const pods = res.data.pods || [];
|
|
247
|
-
const ready = pods.filter((p: any) => p.ready === true).length;
|
|
248
|
-
const total = pods.length;
|
|
249
|
-
const restarts = pods.reduce((sum: number, p: any) => sum + (p.restarts || 0), 0);
|
|
250
|
-
|
|
251
|
-
// Recent crash reasons — pull anything the API exposes per pod.
|
|
252
|
-
const crashReasons: string[] = [];
|
|
253
|
-
for (const p of pods) {
|
|
254
|
-
if (p.last_termination_reason) crashReasons.push(`${p.name || '?'}: ${p.last_termination_reason}`);
|
|
255
|
-
if (p.status && p.status !== 'Running' && p.status !== 'Pending') {
|
|
256
|
-
crashReasons.push(`${p.name || '?'}: ${p.status}`);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
let laneStatus: LaneStatus = 'ok';
|
|
261
|
-
let summary = `${ready}/${total} pods ready, ${restarts} total restarts`;
|
|
262
|
-
|
|
263
|
-
if (total === 0) {
|
|
264
|
-
laneStatus = 'warn';
|
|
265
|
-
summary = 'No pods running. Project may be paused or never deployed.';
|
|
266
|
-
} else if (ready === 0) {
|
|
267
|
-
laneStatus = 'fail';
|
|
268
|
-
summary = `0/${total} pods ready — service is down.`;
|
|
269
|
-
} else if (ready < total) {
|
|
270
|
-
laneStatus = 'warn';
|
|
271
|
-
summary = `${ready}/${total} pods ready (some not ready).`;
|
|
272
|
-
} else if (restarts > 5) {
|
|
273
|
-
laneStatus = 'warn';
|
|
274
|
-
summary = `${ready}/${total} pods ready but ${restarts} restarts — investigate.`;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
return {
|
|
278
|
-
name: 'pods',
|
|
279
|
-
status: laneStatus,
|
|
280
|
-
summary,
|
|
281
|
-
detail: {
|
|
282
|
-
pods_ready: ready,
|
|
283
|
-
pods_total: total,
|
|
284
|
-
total_restarts: restarts,
|
|
285
|
-
crash_reasons: crashReasons.slice(0, 5),
|
|
286
|
-
},
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
async function checkStorage(projectId: string): Promise<Lane> {
|
|
291
|
-
// Piggyback on /storage. A successful response means the binding row
|
|
292
|
-
// exists and the platform-side storage info is reachable. The full
|
|
293
|
-
// "HeadBucket with auto-injected creds" probe needs a backend extension
|
|
294
|
-
// (tracked separately); for now, "binding info reachable" is the proxy.
|
|
295
|
-
const res = await apiRequest<any>('GET', `/projects/${projectId}/storage`);
|
|
296
|
-
if (!res.ok) {
|
|
297
|
-
if (res.status === 404) {
|
|
298
|
-
return { name: 'storage', status: 'skip', summary: 'No storage binding for this project.' };
|
|
299
|
-
}
|
|
300
|
-
return {
|
|
301
|
-
name: 'storage',
|
|
302
|
-
status: 'fail',
|
|
303
|
-
summary: `Could not fetch storage info (${res.status}).`,
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
const binding = res.data.binding || {};
|
|
307
|
-
const usage = binding.usage || {};
|
|
308
|
-
return {
|
|
309
|
-
name: 'storage',
|
|
310
|
-
status: 'ok',
|
|
311
|
-
summary: `Bucket ${binding.bucket || '?'} reachable (${usage.total_objects || 0} objects, ${usage.total_size_mb || 0} MB).`,
|
|
312
|
-
detail: {
|
|
313
|
-
bucket: binding.bucket,
|
|
314
|
-
provider: binding.provider,
|
|
315
|
-
objects: usage.total_objects,
|
|
316
|
-
size_mb: usage.total_size_mb,
|
|
317
|
-
// The auto-injected `<slug>-storage-credentials` secret is created and
|
|
318
|
-
// refreshed by storage-credential-refresher (24h cycle). A binding row
|
|
319
|
-
// present + storage info endpoint OK is strong evidence the secret is
|
|
320
|
-
// valid; a HeadBucket probe with the per-pod creds would be stronger
|
|
321
|
-
// and is a planned backend addition.
|
|
322
|
-
note: 'Per-pod cred HeadBucket probe pending backend extension.',
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
async function checkDatabase(projectId: string): Promise<Lane> {
|
|
328
|
-
const info = await apiRequest<any>('GET', `/projects/${projectId}/database`);
|
|
329
|
-
if (!info.ok) {
|
|
330
|
-
return {
|
|
331
|
-
name: 'database',
|
|
332
|
-
status: 'fail',
|
|
333
|
-
summary: `Could not fetch database info (${info.status}).`,
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
// A project without a managed DB returns either status='not-configured' or
|
|
337
|
-
// an error mode. Either way → skip lane, not fail.
|
|
338
|
-
if (!info.data.host || info.data.status === 'not-configured') {
|
|
339
|
-
return { name: 'database', status: 'skip', summary: 'No managed database for this project.' };
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
const startedAt = Date.now();
|
|
343
|
-
const probe = await apiRequest<any>('POST', `/projects/${projectId}/database/exec`, {
|
|
344
|
-
sql: 'SELECT 1',
|
|
345
|
-
confirm: false,
|
|
346
|
-
});
|
|
347
|
-
const latencyMs = Date.now() - startedAt;
|
|
348
|
-
|
|
349
|
-
if (!probe.ok) {
|
|
350
|
-
return {
|
|
351
|
-
name: 'database',
|
|
352
|
-
status: 'fail',
|
|
353
|
-
summary: `SELECT 1 failed (${probe.status}). DB is unreachable or auth is broken.`,
|
|
354
|
-
detail: { latency_ms: latencyMs, error: probe.data },
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
return {
|
|
358
|
-
name: 'database',
|
|
359
|
-
status: 'ok',
|
|
360
|
-
summary: `SELECT 1 OK in ${latencyMs}ms (${info.data.type || 'db'}).`,
|
|
361
|
-
detail: {
|
|
362
|
-
type: info.data.type,
|
|
363
|
-
database: info.data.database,
|
|
364
|
-
latency_ms: latencyMs,
|
|
365
|
-
},
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
async function checkEnv(projectId: string): Promise<Lane> {
|
|
370
|
-
const res = await apiRequest<any>('GET', `/projects/${projectId}/env/runtime`);
|
|
371
|
-
if (!res.ok) {
|
|
372
|
-
return {
|
|
373
|
-
name: 'env',
|
|
374
|
-
status: 'fail',
|
|
375
|
-
summary: `Could not fetch runtime env (${res.status}).`,
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
if (res.data.no_deployment) {
|
|
379
|
-
return { name: 'env', status: 'skip', summary: 'No deployment yet — env vars are injected at pod start.' };
|
|
380
|
-
}
|
|
381
|
-
const counts = res.data.counts || {};
|
|
382
|
-
const customer = counts.customer || 0;
|
|
383
|
-
// Anything that isn't customer-set is platform-injected.
|
|
384
|
-
const platform = Object.entries(counts)
|
|
385
|
-
.filter(([k]) => k !== 'customer')
|
|
386
|
-
.reduce((sum, [, n]) => sum + (n as number), 0);
|
|
387
|
-
return {
|
|
388
|
-
name: 'env',
|
|
389
|
-
status: 'ok',
|
|
390
|
-
summary: `${customer} customer-set + ${platform} platform-injected env vars.`,
|
|
391
|
-
detail: { customer, platform, by_source: counts },
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
async function checkRecentErrors(projectId: string): Promise<Lane> {
|
|
396
|
-
const res = await apiRequest<{ logs?: string[] }>('GET', `/projects/${projectId}/logs?tail=50`);
|
|
397
|
-
if (!res.ok) {
|
|
398
|
-
return { name: 'errors', status: 'skip', summary: 'No logs available (project may be paused).' };
|
|
399
|
-
}
|
|
400
|
-
const lines = res.data.logs || [];
|
|
401
|
-
const matches = lines.filter((line) => ERROR_LINE_PATTERN.test(line));
|
|
402
|
-
if (matches.length === 0) {
|
|
403
|
-
return { name: 'errors', status: 'ok', summary: 'No error/fatal/panic in last 50 log lines.' };
|
|
404
|
-
}
|
|
405
|
-
// Heuristic: many error matches in 50 lines is a real fire. A handful of
|
|
406
|
-
// routine "level=error" lines is normal noise — flag warn, not fail.
|
|
407
|
-
const laneStatus: LaneStatus = matches.length >= 10 ? 'fail' : 'warn';
|
|
408
|
-
return {
|
|
409
|
-
name: 'errors',
|
|
410
|
-
status: laneStatus,
|
|
411
|
-
summary: `${matches.length} error/fatal/panic line(s) in last 50.`,
|
|
412
|
-
detail: { matches: matches.slice(0, 5) },
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
|
|
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
|
-
function aggregateVerdict(lanes: Lane[]): { verdict: 'healthy' | 'degraded' | 'broken'; summary: string } {
|
|
457
|
-
const hasFail = lanes.some((l) => l.status === 'fail');
|
|
458
|
-
const hasWarn = lanes.some((l) => l.status === 'warn');
|
|
459
|
-
|
|
460
|
-
if (hasFail) {
|
|
461
|
-
const failingLanes = lanes.filter((l) => l.status === 'fail').map((l) => l.name);
|
|
462
|
-
const allFailures = lanes
|
|
463
|
-
.filter((l) => l.status === 'fail')
|
|
464
|
-
.map((l) => `${l.name}: ${l.summary}`)
|
|
465
|
-
.join(' ');
|
|
466
|
-
return {
|
|
467
|
-
verdict: 'broken',
|
|
468
|
-
summary: `Project is broken. Failing checks: ${failingLanes.join(', ')}. ${allFailures}`,
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
if (hasWarn) {
|
|
472
|
-
const warnLanes = lanes.filter((l) => l.status === 'warn');
|
|
473
|
-
const detail = warnLanes.map((l) => `${l.name}: ${l.summary}`).join(' ');
|
|
474
|
-
return {
|
|
475
|
-
verdict: 'degraded',
|
|
476
|
-
summary: `Project is degraded but not down. ${detail}`,
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
const okCount = lanes.filter((l) => l.status === 'ok').length;
|
|
480
|
-
const skipped = lanes.filter((l) => l.status === 'skip').map((l) => l.name);
|
|
481
|
-
let summary = `Project looks healthy. ${okCount} checks passed.`;
|
|
482
|
-
if (skipped.length) summary += ` Skipped: ${skipped.join(', ')}.`;
|
|
483
|
-
return { verdict: 'healthy', summary };
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
export function registerDiagnoseTools(server: McpServer) {
|
|
487
|
-
server.tool(
|
|
488
|
-
'dailey_diagnose',
|
|
489
|
-
'FIRST tool to reach for when a customer says "something is broken." Runs every health check (deploy, pods, storage, database, env vars, recent log errors) for a project in parallel and returns a structured summary with an overall verdict (healthy/degraded/broken). Output includes a top-level `summary` string an AI agent can render directly to the user. Accepts either a project ID or a slug.',
|
|
490
|
-
{
|
|
491
|
-
project: z.string().describe('Project ID or slug — the tool resolves either.'),
|
|
492
|
-
},
|
|
493
|
-
async ({ project }) => {
|
|
494
|
-
const resolved = await resolveProjectId(project);
|
|
495
|
-
if (!resolved.id) {
|
|
496
|
-
return textResult(
|
|
497
|
-
JSON.stringify(
|
|
498
|
-
{
|
|
499
|
-
verdict: 'broken',
|
|
500
|
-
summary: resolved.hint || `Could not resolve "${project}" to a project.`,
|
|
501
|
-
project_input: project,
|
|
502
|
-
matched_by: resolved.matched_by,
|
|
503
|
-
},
|
|
504
|
-
null,
|
|
505
|
-
2,
|
|
506
|
-
),
|
|
507
|
-
);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
const projectId = resolved.id;
|
|
511
|
-
// Run every lane in parallel — one slow lane shouldn't block the rest.
|
|
512
|
-
const lanes = await Promise.all([
|
|
513
|
-
checkDeploy(projectId).catch((err) => ({
|
|
514
|
-
name: 'deploy',
|
|
515
|
-
status: 'fail' as LaneStatus,
|
|
516
|
-
summary: `lane crashed: ${err.message}`,
|
|
517
|
-
})),
|
|
518
|
-
checkPods(projectId).catch((err) => ({
|
|
519
|
-
name: 'pods',
|
|
520
|
-
status: 'fail' as LaneStatus,
|
|
521
|
-
summary: `lane crashed: ${err.message}`,
|
|
522
|
-
})),
|
|
523
|
-
checkStorage(projectId).catch((err) => ({
|
|
524
|
-
name: 'storage',
|
|
525
|
-
status: 'fail' as LaneStatus,
|
|
526
|
-
summary: `lane crashed: ${err.message}`,
|
|
527
|
-
})),
|
|
528
|
-
checkDatabase(projectId).catch((err) => ({
|
|
529
|
-
name: 'database',
|
|
530
|
-
status: 'fail' as LaneStatus,
|
|
531
|
-
summary: `lane crashed: ${err.message}`,
|
|
532
|
-
})),
|
|
533
|
-
checkEnv(projectId).catch((err) => ({
|
|
534
|
-
name: 'env',
|
|
535
|
-
status: 'fail' as LaneStatus,
|
|
536
|
-
summary: `lane crashed: ${err.message}`,
|
|
537
|
-
})),
|
|
538
|
-
checkRecentErrors(projectId).catch((err) => ({
|
|
539
|
-
name: 'errors',
|
|
540
|
-
status: 'fail' as LaneStatus,
|
|
541
|
-
summary: `lane crashed: ${err.message}`,
|
|
542
|
-
})),
|
|
543
|
-
checkKnownPatterns(projectId).catch((err) => ({
|
|
544
|
-
name: 'known_issues',
|
|
545
|
-
status: 'fail' as LaneStatus,
|
|
546
|
-
summary: `lane crashed: ${err.message}`,
|
|
547
|
-
})),
|
|
548
|
-
]);
|
|
549
|
-
|
|
550
|
-
const { verdict, summary } = aggregateVerdict(lanes);
|
|
551
|
-
|
|
552
|
-
const payload = {
|
|
553
|
-
project_id: projectId,
|
|
554
|
-
project_input: project,
|
|
555
|
-
matched_by: resolved.matched_by,
|
|
556
|
-
verdict,
|
|
557
|
-
summary,
|
|
558
|
-
checks: lanes.reduce<Record<string, Lane>>((acc, lane) => {
|
|
559
|
-
acc[lane.name] = lane;
|
|
560
|
-
return acc;
|
|
561
|
-
}, {}),
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
return textResult(JSON.stringify(payload, null, 2));
|
|
565
|
-
},
|
|
566
|
-
);
|
|
567
|
-
}
|