@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/exec-run.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
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 registerExecRunTools(server: McpServer) {
|
|
6
|
-
server.tool(
|
|
7
|
-
'dailey_exec',
|
|
8
|
-
'Run a one-off command inside a running pod for a project (similar to `kubectl exec`). Useful for troubleshooting — inspect files, run `node --version`, check directory contents, etc. The command is an argv array (not a shell string). Captures up to 1 MB of stdout/stderr and times out at 60s by default (configurable to 300s max). Needs at least one Ready pod. For one-off jobs that run to completion in their own pod (migrations, seeders, backfills) use dailey_run instead — exec attaches to a live pod, run spawns a new Job. Avoid running commands that print env vars or secrets (env, printenv) — use dailey_env_vars to inspect config instead.',
|
|
9
|
-
{
|
|
10
|
-
project_id: z.string().describe('The project ID'),
|
|
11
|
-
command: z.array(z.string()).describe('Command as argv array, e.g. ["node","--version"] or ["ls","-la","/app"]. Not a shell string.'),
|
|
12
|
-
process: z.string().optional().describe('Process name for multi-process projects (e.g. "worker", "web"). Defaults to the primary pod.'),
|
|
13
|
-
timeout_seconds: z.number().int().optional().describe('Command timeout in seconds (default 60, max 300)'),
|
|
14
|
-
},
|
|
15
|
-
async ({ project_id, command, process: processName, timeout_seconds }) => {
|
|
16
|
-
const body: any = { command };
|
|
17
|
-
if (processName) body.process = processName;
|
|
18
|
-
if (timeout_seconds) body.timeout_seconds = timeout_seconds;
|
|
19
|
-
|
|
20
|
-
const res = await apiRequest<any>('POST', `/projects/${project_id}/exec`, body);
|
|
21
|
-
if (!res.ok) return textResult(formatError(res));
|
|
22
|
-
|
|
23
|
-
const d = res.data;
|
|
24
|
-
const lines = [
|
|
25
|
-
`exec: ${d.exit_code === 0 ? '✓ exit 0' : `✗ exit ${d.exit_code ?? '?'}`}${d.timed_out ? ' (timed out)' : ''}`,
|
|
26
|
-
`pod: ${d.pod || '-'}`,
|
|
27
|
-
`duration: ${d.duration_ms ?? '?'}ms`,
|
|
28
|
-
];
|
|
29
|
-
if (d.stdout) {
|
|
30
|
-
lines.push('', '--- stdout ---');
|
|
31
|
-
lines.push(d.stdout.length > 4000 ? d.stdout.slice(0, 4000) + '\n...[truncated]' : d.stdout);
|
|
32
|
-
}
|
|
33
|
-
if (d.stderr) {
|
|
34
|
-
lines.push('', '--- stderr ---');
|
|
35
|
-
lines.push(d.stderr.length > 2000 ? d.stderr.slice(0, 2000) + '\n...[truncated]' : d.stderr);
|
|
36
|
-
}
|
|
37
|
-
return textResult(lines.join('\n'));
|
|
38
|
-
},
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
server.tool(
|
|
42
|
-
'dailey_run',
|
|
43
|
-
'Start a one-off container job using the project\'s deployed image — new pod, own lifecycle, own output. Inherits env, volumes, resources, and imagePullSecrets from the project Deployment so it sees the same DATABASE_URL and secrets as the app. Use for: one-time migrations, data backfills, seeders, cron catch-ups. Returns a job_name you can pass to dailey_run_logs to stream output. Jobs auto-clean 1h after completion. Project must be deployed first (can be paused). If you just want a quick command against a live pod, use dailey_exec instead.',
|
|
44
|
-
{
|
|
45
|
-
project_id: z.string().describe('The project ID'),
|
|
46
|
-
command: z.array(z.string()).describe('Command as argv array, e.g. ["node","prisma/seed.mjs"] or ["python","-m","manage","migrate"]'),
|
|
47
|
-
},
|
|
48
|
-
async ({ project_id, command }) => {
|
|
49
|
-
const res = await apiRequest<any>('POST', `/projects/${project_id}/run`, { command });
|
|
50
|
-
if (!res.ok) return textResult(formatError(res));
|
|
51
|
-
const d = res.data;
|
|
52
|
-
const lines = [
|
|
53
|
-
`Job started: ${d.job_name}`,
|
|
54
|
-
`Namespace: ${d.namespace || '-'}`,
|
|
55
|
-
`Image: ${d.image || '-'}`,
|
|
56
|
-
`Audit ID: ${d.audit_id || '-'}`,
|
|
57
|
-
'',
|
|
58
|
-
`Stream logs: dailey_run_logs(project_id, job_name="${d.job_name}")`,
|
|
59
|
-
`Job TTL: 1 hour after completion (auto-cleaned)`,
|
|
60
|
-
];
|
|
61
|
-
return textResult(lines.join('\n'));
|
|
62
|
-
},
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
server.tool(
|
|
66
|
-
'dailey_run_logs',
|
|
67
|
-
'Fetch logs for a one-off job started by dailey_run. Pass the job_name returned by the run call. Returns stdout+stderr combined, up to 1 MB.',
|
|
68
|
-
{
|
|
69
|
-
project_id: z.string().describe('The project ID'),
|
|
70
|
-
job_name: z.string().describe('Job name returned by dailey_run (e.g. "myapp-run-abc12345")'),
|
|
71
|
-
},
|
|
72
|
-
async ({ project_id, job_name }) => {
|
|
73
|
-
const res = await apiRequest<any>('GET', `/projects/${project_id}/run/${job_name}/logs`);
|
|
74
|
-
if (!res.ok) return textResult(formatError(res));
|
|
75
|
-
const d = res.data;
|
|
76
|
-
const lines = [
|
|
77
|
-
`Job: ${job_name}`,
|
|
78
|
-
`Status: ${d.status || 'unknown'}`,
|
|
79
|
-
];
|
|
80
|
-
if (d.started_at) lines.push(`Started: ${d.started_at}`);
|
|
81
|
-
if (d.finished_at) lines.push(`Finished: ${d.finished_at}`);
|
|
82
|
-
if (d.exit_code !== undefined && d.exit_code !== null) lines.push(`Exit: ${d.exit_code}`);
|
|
83
|
-
if (d.logs) {
|
|
84
|
-
lines.push('', '--- logs ---');
|
|
85
|
-
const out = typeof d.logs === 'string' ? d.logs : JSON.stringify(d.logs);
|
|
86
|
-
lines.push(out.length > 6000 ? out.slice(0, 6000) + '\n...[truncated]' : out);
|
|
87
|
-
}
|
|
88
|
-
return textResult(lines.join('\n'));
|
|
89
|
-
},
|
|
90
|
-
);
|
|
91
|
-
}
|
package/src/tools/images.ts
DELETED
|
@@ -1,221 +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
|
-
export function registerImageTools(server: McpServer) {
|
|
6
|
-
// Deploy a Docker image
|
|
7
|
-
server.tool(
|
|
8
|
-
'dailey_run_image',
|
|
9
|
-
'Deploy a Docker image to Dailey OS. Creates a project and deploys the image in one step. Examples: wordpress:6-apache, ghost:5-alpine, nginx:alpine, grafana/grafana:latest',
|
|
10
|
-
{
|
|
11
|
-
image: z.string().describe('Docker image to deploy (e.g., wordpress:6-apache, nginx:alpine)'),
|
|
12
|
-
name: z.string().optional().describe('Project name (auto-generated if not provided)'),
|
|
13
|
-
database: z
|
|
14
|
-
.union([z.enum(['mysql', 'postgres']), z.boolean()])
|
|
15
|
-
.optional()
|
|
16
|
-
.describe('Provision a managed database: "mysql" | "postgres" | true (= mysql, for back-compat) | false. Default: no database.'),
|
|
17
|
-
},
|
|
18
|
-
async ({ image, name, database }) => {
|
|
19
|
-
const projectName = name || image.split('/').pop()?.split(':')[0] || 'app';
|
|
20
|
-
|
|
21
|
-
// Normalize the database flag.
|
|
22
|
-
// false / undefined → no DB
|
|
23
|
-
// true → mysql (back-compat with pre-0.9 callers)
|
|
24
|
-
// "mysql" | "postgres" → that engine
|
|
25
|
-
let needsDatabase = false;
|
|
26
|
-
let databaseType: 'mysql' | 'postgres' | undefined;
|
|
27
|
-
if (database === true) {
|
|
28
|
-
needsDatabase = true;
|
|
29
|
-
databaseType = 'mysql';
|
|
30
|
-
} else if (database === 'mysql' || database === 'postgres') {
|
|
31
|
-
needsDatabase = true;
|
|
32
|
-
databaseType = database;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Gentle nudge if the user asked for a DB alongside an image that
|
|
36
|
-
// IS the database — that's usually a mistake.
|
|
37
|
-
let noteIfRedundant = '';
|
|
38
|
-
const imgLower = image.toLowerCase();
|
|
39
|
-
if (needsDatabase && databaseType === 'postgres' && /(^|\/)postgres:/.test(imgLower)) {
|
|
40
|
-
noteIfRedundant = '\nNote: you asked for a managed Postgres alongside a postgres image. ' +
|
|
41
|
-
'The image IS a database — you probably want database: false and to connect to this project directly.\n';
|
|
42
|
-
}
|
|
43
|
-
if (needsDatabase && databaseType === 'mysql' && /(^|\/)mysql:|mariadb:/.test(imgLower)) {
|
|
44
|
-
noteIfRedundant = '\nNote: you asked for a managed MySQL alongside a MySQL/MariaDB image. ' +
|
|
45
|
-
'The image IS a database — you probably want database: false and to connect to this project directly.\n';
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Create project
|
|
49
|
-
const createRes = await apiRequest<any>('POST', '/projects', {
|
|
50
|
-
name: projectName,
|
|
51
|
-
repo_url: image,
|
|
52
|
-
branch: 'main',
|
|
53
|
-
needs_database: needsDatabase,
|
|
54
|
-
database_type: databaseType,
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
if (!createRes.ok) return textResult(formatError(createRes));
|
|
58
|
-
|
|
59
|
-
const project = createRes.data;
|
|
60
|
-
|
|
61
|
-
// Trigger deploy
|
|
62
|
-
const deployRes = await apiRequest<any>('POST', `/projects/${project.id}/deploy`);
|
|
63
|
-
|
|
64
|
-
let result = `Deployed ${image} → https://${project.slug}.dailey.cloud\n\n`;
|
|
65
|
-
result += `Project: ${project.name}\n`;
|
|
66
|
-
result += `Slug: ${project.slug}\n`;
|
|
67
|
-
result += `URL: https://${project.slug}.dailey.cloud\n`;
|
|
68
|
-
|
|
69
|
-
if (project.slug_auto_generated) {
|
|
70
|
-
result += `Note: ${project.slug_note}\n`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (project.database) {
|
|
74
|
-
result += `Database: ${project.database.database} (${project.database.type || 'mysql'})\n`;
|
|
75
|
-
}
|
|
76
|
-
if (noteIfRedundant) result += noteIfRedundant;
|
|
77
|
-
|
|
78
|
-
if (deployRes.ok && deployRes.data?.credentials) {
|
|
79
|
-
result += `\nCredentials:\n`;
|
|
80
|
-
for (const [key, val] of Object.entries(deployRes.data.credentials)) {
|
|
81
|
-
if (key !== 'note' && key !== 'label') {
|
|
82
|
-
result += ` ${key}: ${val}\n`;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
result += `\nBuild ID: ${deployRes.data?.build_id || 'pending'}\n`;
|
|
88
|
-
result += `\nNext: call dailey_deploy_status with project_id=${project.id} to watch progress.\n`;
|
|
89
|
-
result += ` If it fails, call dailey_build_logs with project_id=${project.id} for full output.`;
|
|
90
|
-
|
|
91
|
-
return textResult(result);
|
|
92
|
-
},
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
// Analyze a Docker image
|
|
96
|
-
server.tool(
|
|
97
|
-
'dailey_inspect_image',
|
|
98
|
-
'Analyze a Docker image before deploying. Shows size, port, database needs, and compatibility.',
|
|
99
|
-
{
|
|
100
|
-
image: z.string().describe('Docker image to analyze (e.g., wordpress:6-apache)'),
|
|
101
|
-
},
|
|
102
|
-
async ({ image }) => {
|
|
103
|
-
const res = await apiRequest<any>('POST', '/deploy/analyze', { repo_url: image });
|
|
104
|
-
if (!res.ok) return textResult(formatError(res));
|
|
105
|
-
|
|
106
|
-
const data = res.data;
|
|
107
|
-
|
|
108
|
-
if (!data._isDockerImage) {
|
|
109
|
-
return textResult(`"${image}" was detected as a Git repository, not a Docker image.`);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
let result = `Image Analysis: ${image}\n\n`;
|
|
113
|
-
result += `Registry: ${data.image?.registry || 'Docker Hub'}\n`;
|
|
114
|
-
result += `Size: ${data.image?.size_mb || '?'} MB\n`;
|
|
115
|
-
result += `Port: ${data.image?.port || 3000}\n`;
|
|
116
|
-
result += `Database needed: ${data.database?.needed ? 'Yes' : 'No'}\n`;
|
|
117
|
-
|
|
118
|
-
if (data.image?.catalog_match) {
|
|
119
|
-
result += `Catalog: ✓ ${data.image.catalog_match} (pre-configured)\n`;
|
|
120
|
-
}
|
|
121
|
-
if (data.image?.description) {
|
|
122
|
-
result += `Description: ${data.image.description}\n`;
|
|
123
|
-
}
|
|
124
|
-
if (data.estimates) {
|
|
125
|
-
result += `\nEstimated pull time: ~${data.estimates.pull_time_seconds}s\n`;
|
|
126
|
-
result += `Estimated deploy time: ~${data.estimates.deploy_time_seconds}s\n`;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (data.issues?.length) {
|
|
130
|
-
result += `\nBlocking issues:\n`;
|
|
131
|
-
for (const issue of data.issues) {
|
|
132
|
-
result += ` ✗ ${issue}\n`;
|
|
133
|
-
}
|
|
134
|
-
} else {
|
|
135
|
-
result += `\n✓ Ready to deploy: use dailey_run_image with image="${image}"`;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
return textResult(result);
|
|
139
|
-
},
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
// List marketplace catalog
|
|
143
|
-
server.tool(
|
|
144
|
-
'dailey_marketplace_catalog',
|
|
145
|
-
'List all available pre-configured marketplace apps that can be deployed with one command.',
|
|
146
|
-
{},
|
|
147
|
-
async () => {
|
|
148
|
-
// Note: the customer-api proxies /projects/catalog → deploy-service /deploys/catalog.
|
|
149
|
-
// The old path /deploy/catalog never existed on customer-api and always 404'd.
|
|
150
|
-
const res = await apiRequest<{ apps: any[] }>('GET', '/projects/catalog');
|
|
151
|
-
if (!res.ok) return textResult(formatError(res));
|
|
152
|
-
|
|
153
|
-
let result = 'Marketplace Catalog\n\n';
|
|
154
|
-
for (const app of res.data.apps) {
|
|
155
|
-
result += `${app.name} (${app.image})\n`;
|
|
156
|
-
result += ` ${app.description}\n`;
|
|
157
|
-
result += ` Database: ${app.needs_database ? 'Yes' : 'No'} | Memory: ${app.memory_mb}MB\n\n`;
|
|
158
|
-
}
|
|
159
|
-
result += `Deploy any of these with: dailey_run_image image="<image>"`;
|
|
160
|
-
|
|
161
|
-
return textResult(result);
|
|
162
|
-
},
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
// Get project credentials
|
|
166
|
-
server.tool(
|
|
167
|
-
'dailey_project_credentials',
|
|
168
|
-
'Get auto-generated credentials (passwords) for a project. Useful for logging into deployed apps like code-server, Grafana, WordPress.',
|
|
169
|
-
{
|
|
170
|
-
project_id: z.string().describe('The project ID'),
|
|
171
|
-
},
|
|
172
|
-
async ({ project_id }) => {
|
|
173
|
-
const res = await apiRequest<{ credentials: any[] }>('GET', `/projects/${project_id}/credentials`);
|
|
174
|
-
if (!res.ok) return textResult(formatError(res));
|
|
175
|
-
|
|
176
|
-
if (!res.data.credentials?.length) {
|
|
177
|
-
return textResult('No auto-generated credentials for this project.');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
let result = 'Project Credentials\n\n';
|
|
181
|
-
for (const cred of res.data.credentials) {
|
|
182
|
-
result += `${cred.label}: ${cred.value}\n`;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return textResult(result);
|
|
186
|
-
},
|
|
187
|
-
);
|
|
188
|
-
|
|
189
|
-
// Get project resources
|
|
190
|
-
server.tool(
|
|
191
|
-
'dailey_project_resources',
|
|
192
|
-
'Get resource usage for a project — CPU, memory, storage, pod status.',
|
|
193
|
-
{
|
|
194
|
-
project_id: z.string().describe('The project ID'),
|
|
195
|
-
},
|
|
196
|
-
async ({ project_id }) => {
|
|
197
|
-
const res = await apiRequest<any>('GET', `/projects/${project_id}/resources`);
|
|
198
|
-
if (!res.ok) return textResult(formatError(res));
|
|
199
|
-
|
|
200
|
-
const data = res.data;
|
|
201
|
-
let result = `Resources for ${data.project}\n\n`;
|
|
202
|
-
result += `Replicas: ${data.replicas}\n`;
|
|
203
|
-
result += `CPU limit: ${data.resources?.cpu_limit}\n`;
|
|
204
|
-
result += `Memory limit: ${data.resources?.memory_limit_mb} MB\n`;
|
|
205
|
-
result += `Storage: ${data.resources?.storage?.capacity || 'None (ephemeral)'}\n`;
|
|
206
|
-
|
|
207
|
-
if (data.storage_warning) {
|
|
208
|
-
result += `\n⚠ ${data.storage_warning}\n`;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (data.pods?.length) {
|
|
212
|
-
result += `\nPods:\n`;
|
|
213
|
-
for (const pod of data.pods) {
|
|
214
|
-
result += ` ${pod.name} — ${pod.status} — ${pod.restarts} restarts — node: ${pod.node}\n`;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return textResult(result);
|
|
219
|
-
},
|
|
220
|
-
);
|
|
221
|
-
}
|
package/src/tools/lifecycle.ts
DELETED
|
@@ -1,75 +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 PauseResponse {
|
|
6
|
-
paused?: boolean;
|
|
7
|
-
already_paused?: boolean;
|
|
8
|
-
scaled?: Array<{ process: string; deployment: string }>;
|
|
9
|
-
failures?: Array<{ process: string; deployment: string; error: string }>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface ResumeResponse {
|
|
13
|
-
resumed?: boolean;
|
|
14
|
-
already_running?: boolean;
|
|
15
|
-
scaled?: Array<{ process: string; deployment: string; replicas: number }>;
|
|
16
|
-
failures?: Array<{ process: string; deployment: string; error: string }>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function registerLifecycleTools(server: McpServer) {
|
|
20
|
-
server.tool(
|
|
21
|
-
'dailey_pause',
|
|
22
|
-
'Pause a project — scales all processes to 0 replicas but preserves DB, storage, ingress, and the desired replica count. Use this instead of dailey_scale 0 when you want to temporarily stop a project without losing config.',
|
|
23
|
-
{ project_id: z.string().describe('The project ID') },
|
|
24
|
-
async ({ project_id }) => {
|
|
25
|
-
const res = await apiRequest<PauseResponse>('POST', `/projects/${project_id}/pause`);
|
|
26
|
-
if (!res.ok) return textResult(formatError(res));
|
|
27
|
-
|
|
28
|
-
const data = res.data;
|
|
29
|
-
if (data.already_paused) return textResult('Project was already paused.');
|
|
30
|
-
|
|
31
|
-
const scaled = data.scaled || [];
|
|
32
|
-
const failures = data.failures || [];
|
|
33
|
-
const lines = [
|
|
34
|
-
`Project ${project_id} paused.`,
|
|
35
|
-
`Scaled to zero: ${scaled.length} process(es).`,
|
|
36
|
-
];
|
|
37
|
-
for (const s of scaled) lines.push(` • ${s.process} (${s.deployment})`);
|
|
38
|
-
if (failures.length) {
|
|
39
|
-
lines.push('');
|
|
40
|
-
lines.push(`⚠ ${failures.length} failure(s):`);
|
|
41
|
-
for (const f of failures) lines.push(` ✗ ${f.process}: ${f.error}`);
|
|
42
|
-
}
|
|
43
|
-
lines.push('');
|
|
44
|
-
lines.push('Resume later with: dailey_resume project_id=' + project_id);
|
|
45
|
-
return textResult(lines.join('\n'));
|
|
46
|
-
},
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
server.tool(
|
|
50
|
-
'dailey_resume',
|
|
51
|
-
'Resume a paused project — scales processes back to their previous replica count.',
|
|
52
|
-
{ project_id: z.string().describe('The project ID') },
|
|
53
|
-
async ({ project_id }) => {
|
|
54
|
-
const res = await apiRequest<ResumeResponse>('POST', `/projects/${project_id}/resume`);
|
|
55
|
-
if (!res.ok) return textResult(formatError(res));
|
|
56
|
-
|
|
57
|
-
const data = res.data;
|
|
58
|
-
if (data.already_running) return textResult('Project was already running.');
|
|
59
|
-
|
|
60
|
-
const scaled = data.scaled || [];
|
|
61
|
-
const failures = data.failures || [];
|
|
62
|
-
const lines = [
|
|
63
|
-
`Project ${project_id} resumed.`,
|
|
64
|
-
`Scaled up: ${scaled.length} process(es).`,
|
|
65
|
-
];
|
|
66
|
-
for (const s of scaled) lines.push(` • ${s.process} → ${s.replicas} replica(s)`);
|
|
67
|
-
if (failures.length) {
|
|
68
|
-
lines.push('');
|
|
69
|
-
lines.push(`⚠ ${failures.length} failure(s):`);
|
|
70
|
-
for (const f of failures) lines.push(` ✗ ${f.process}: ${f.error}`);
|
|
71
|
-
}
|
|
72
|
-
return textResult(lines.join('\n'));
|
|
73
|
-
},
|
|
74
|
-
);
|
|
75
|
-
}
|
package/src/tools/links.ts
DELETED
|
@@ -1,69 +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 ServiceLink {
|
|
6
|
-
id: string;
|
|
7
|
-
target_project_id: string;
|
|
8
|
-
target_name?: string;
|
|
9
|
-
target_slug?: string;
|
|
10
|
-
target_status?: string;
|
|
11
|
-
env_key?: string;
|
|
12
|
-
url?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function registerLinkTools(server: McpServer) {
|
|
16
|
-
server.tool(
|
|
17
|
-
'dailey_service_links',
|
|
18
|
-
'Manage service-to-service links. A link injects an env var pointing at another project (e.g., DATABASE_URL=http://mydb). After add/remove, redeploy to pick up env changes.',
|
|
19
|
-
{
|
|
20
|
-
project_id: z.string().describe('The source project ID'),
|
|
21
|
-
action: z.enum(['list', 'add', 'remove']).describe('list | add | remove'),
|
|
22
|
-
target_project_id: z.string().optional().describe('Target project to link to (add)'),
|
|
23
|
-
env_key: z.string().optional().describe('Env var name to inject (add, optional — auto-generated from target name)'),
|
|
24
|
-
link_id: z.string().optional().describe('Link ID to remove (remove)'),
|
|
25
|
-
},
|
|
26
|
-
async ({ project_id, action, target_project_id, env_key, link_id }) => {
|
|
27
|
-
if (action === 'list') {
|
|
28
|
-
const res = await apiRequest<{ links: ServiceLink[] }>('GET', `/projects/${project_id}/links`);
|
|
29
|
-
if (!res.ok) return textResult(formatError(res));
|
|
30
|
-
|
|
31
|
-
const links = res.data.links || [];
|
|
32
|
-
if (links.length === 0) return textResult('No service links.');
|
|
33
|
-
|
|
34
|
-
const lines = [
|
|
35
|
-
`Service Links (${links.length})`,
|
|
36
|
-
'─'.repeat(70),
|
|
37
|
-
];
|
|
38
|
-
for (const l of links) {
|
|
39
|
-
lines.push(`• ${l.env_key}=${l.url} → ${l.target_name} (${l.target_slug}, ${l.target_status})`);
|
|
40
|
-
lines.push(` link_id: ${l.id}`);
|
|
41
|
-
}
|
|
42
|
-
return textResult(lines.join('\n'));
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (action === 'add') {
|
|
46
|
-
if (!target_project_id) return textResult('Error: target_project_id is required for add.');
|
|
47
|
-
const body: Record<string, string> = { target_project_id };
|
|
48
|
-
if (env_key) body.env_key = env_key;
|
|
49
|
-
const res = await apiRequest<any>('POST', `/projects/${project_id}/links`, body);
|
|
50
|
-
if (!res.ok) return textResult(formatError(res));
|
|
51
|
-
const l = res.data.link;
|
|
52
|
-
return textResult([
|
|
53
|
-
`Link created: ${l.env_key}=${l.url} → ${l.target_name}`,
|
|
54
|
-
'',
|
|
55
|
-
`Redeploy this project to pick up the new env var: dailey_deploy_multi project_id=${project_id}`,
|
|
56
|
-
].join('\n'));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (action === 'remove') {
|
|
60
|
-
if (!link_id) return textResult('Error: link_id is required for remove.');
|
|
61
|
-
const res = await apiRequest('DELETE', `/projects/${project_id}/links/${link_id}`);
|
|
62
|
-
if (!res.ok) return textResult(formatError(res));
|
|
63
|
-
return textResult(`Link ${link_id} removed. Redeploy to reflect the env change.`);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return textResult('Invalid action. Use list, add, or remove.');
|
|
67
|
-
},
|
|
68
|
-
);
|
|
69
|
-
}
|
package/src/tools/platform.ts
DELETED
|
@@ -1,209 +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 PlatformCapability {
|
|
6
|
-
id: string;
|
|
7
|
-
label: string;
|
|
8
|
-
status: string;
|
|
9
|
-
summary: string;
|
|
10
|
-
interfaces?: string[];
|
|
11
|
-
details?: Record<string, unknown>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface PlatformOverview {
|
|
15
|
-
project: {
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
slug: string;
|
|
19
|
-
status: string;
|
|
20
|
-
url: string;
|
|
21
|
-
};
|
|
22
|
-
safety: {
|
|
23
|
-
model: string;
|
|
24
|
-
guarantees: string[];
|
|
25
|
-
restrictions: string[];
|
|
26
|
-
};
|
|
27
|
-
capabilities: PlatformCapability[];
|
|
28
|
-
next_step?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function registerPlatformTools(server: McpServer) {
|
|
32
|
-
server.tool(
|
|
33
|
-
'dailey_platform_info',
|
|
34
|
-
'Show the safe platform capabilities available to a project',
|
|
35
|
-
{ project_id: z.string().describe('The project ID') },
|
|
36
|
-
async ({ project_id }) => {
|
|
37
|
-
const res = await apiRequest<PlatformOverview>('GET', `/projects/${project_id}/platform`);
|
|
38
|
-
if (!res.ok) return textResult(formatError(res));
|
|
39
|
-
|
|
40
|
-
const data = res.data;
|
|
41
|
-
const lines = [
|
|
42
|
-
`Platform: ${data.project.name}`,
|
|
43
|
-
`Slug: ${data.project.slug}`,
|
|
44
|
-
`Status: ${data.project.status}`,
|
|
45
|
-
`URL: ${data.project.url}`,
|
|
46
|
-
'',
|
|
47
|
-
`Safety Model`,
|
|
48
|
-
`Mode: ${data.safety.model}`,
|
|
49
|
-
];
|
|
50
|
-
|
|
51
|
-
for (const line of data.safety.guarantees || []) {
|
|
52
|
-
lines.push(`- ${line}`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if ((data.safety.restrictions || []).length > 0) {
|
|
56
|
-
lines.push('');
|
|
57
|
-
lines.push('Restrictions');
|
|
58
|
-
for (const line of data.safety.restrictions || []) {
|
|
59
|
-
lines.push(`- ${line}`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
lines.push('');
|
|
64
|
-
lines.push('Capabilities');
|
|
65
|
-
for (const capability of data.capabilities || []) {
|
|
66
|
-
lines.push(`- ${capability.label} [${capability.status}]`);
|
|
67
|
-
lines.push(` ${capability.summary}`);
|
|
68
|
-
if (capability.interfaces && capability.interfaces.length > 0) {
|
|
69
|
-
lines.push(` Interfaces: ${capability.interfaces.join(', ')}`);
|
|
70
|
-
}
|
|
71
|
-
for (const [key, value] of Object.entries(capability.details || {})) {
|
|
72
|
-
if (value === null || value === undefined || value === '') continue;
|
|
73
|
-
if (Array.isArray(value) && value.length === 0) continue;
|
|
74
|
-
lines.push(` ${key}: ${Array.isArray(value) ? value.join(', ') : String(value)}`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (data.next_step) {
|
|
79
|
-
lines.push('');
|
|
80
|
-
lines.push(`Next Step: ${data.next_step}`);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return textResult(lines.join('\n'));
|
|
84
|
-
},
|
|
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, the built-in AI / GPU compute / image-generation / voice / email primitives, 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
|
-
- Read/set via dailey_env_vars (list, get, set, delete); dailey_env_runtime_list shows every var the pod actually sees
|
|
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
|
-
## Built-in platform primitives — AI, GPU, images, voice, email
|
|
157
|
-
|
|
158
|
-
Dailey OS has METERED, BUILT-IN primitives. Check these BEFORE suggesting a third-party
|
|
159
|
-
provider (OpenAI keys, Ollama, Twilio/SendGrid, etc.) — the platform almost certainly
|
|
160
|
-
already offers it, pre-wired and on one bill:
|
|
161
|
-
|
|
162
|
-
### Dailey AI (hosted LLM inference)
|
|
163
|
-
- OpenAI-compatible chat-completions gateway; tiers dailey-fast / dailey-pro / dailey-mini.
|
|
164
|
-
- Check per-project state + get the integration snippet: dailey_ai_info.
|
|
165
|
-
- Enable: dailey_ai_enable → injects DAILEY_AI_BASE_URL / DAILEY_AI_API_KEY / DAILEY_AI_MODEL
|
|
166
|
-
on the NEXT deploy. The app then calls it like any OpenAI-compatible API.
|
|
167
|
-
- Use this for features like "summarize", "extract tasks from text/images", chatbots.
|
|
168
|
-
|
|
169
|
-
### Dailey Compute (managed GPU jobs)
|
|
170
|
-
- GPU workloads (e.g. audio transcription) without owning GPUs. Enable: dailey_compute_enable
|
|
171
|
-
→ injects DAILEY_COMPUTE_URL / DAILEY_COMPUTE_KEY. Info: dailey_ai_info (covers both).
|
|
172
|
-
|
|
173
|
-
### Dailey Images (hosted image generation)
|
|
174
|
-
- Text-to-image (Flux), metered per image. Tools: dailey_images_info / dailey_images_enable /
|
|
175
|
-
dailey_images_generate.
|
|
176
|
-
|
|
177
|
-
### Dailey Voice (TTS + STT)
|
|
178
|
-
- Metered text-to-speech and speech-to-text, drawn from the prepaid credit balance.
|
|
179
|
-
|
|
180
|
-
### Dailey Email (transactional email)
|
|
181
|
-
- Sends from <slug>@send.dailey.cloud, zero DNS setup, $10/mo incl. 10k emails.
|
|
182
|
-
Tools: dailey_email_status / dailey_email_enable. App POSTs to the injected
|
|
183
|
-
DAILEY_EMAIL_API_URL with DAILEY_EMAIL_API_KEY.
|
|
184
|
-
|
|
185
|
-
### Usage + billing for all of the above
|
|
186
|
-
- dailey_usage_summary — month-to-date usage, allowance remaining, estimated overage,
|
|
187
|
-
prepaid credit balance. dailey_credits / dailey_credits_topup — prepaid balance + top-up.
|
|
188
|
-
|
|
189
|
-
## Common mistakes to avoid
|
|
190
|
-
|
|
191
|
-
- DO NOT tell a customer to bring an OpenAI/Anthropic API key or self-host Ollama before
|
|
192
|
-
checking dailey_ai_info — Dailey AI is built into the platform
|
|
193
|
-
- DO NOT suggest using third-party file hosts (transfer.sh, S3 public links) for database dumps — use dailey db connect instead
|
|
194
|
-
- DO NOT assume the customer needs Tailscale to connect a GUI tool or run psql — the CLI WebSocket proxy handles it
|
|
195
|
-
- DO NOT suggest mysqldump/pg_dump --host with the CGNAT IP (100.x.x.x) directly — that requires Tailscale
|
|
196
|
-
- DO NOT run dailey_db_import for full schema dumps — it's for structured row data only, not DDL
|
|
197
|
-
- DO NOT suggest redeploying to apply env var changes without confirming the user wants a redeploy
|
|
198
|
-
|
|
199
|
-
## Useful diagnostic sequence
|
|
200
|
-
|
|
201
|
-
User reports app is down / crashing:
|
|
202
|
-
1. dailey_deploy_status — check last deploy result
|
|
203
|
-
2. dailey_build_logs — check if latest build succeeded
|
|
204
|
-
3. dailey_diagnose — AI-powered diagnosis of pod/build state
|
|
205
|
-
4. dailey_processes — see running containers and recent restart counts
|
|
206
|
-
`.trim());
|
|
207
|
-
},
|
|
208
|
-
);
|
|
209
|
-
}
|