@daileyos/mcp-server 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/analyze.d.ts.map +1 -1
- package/dist/tools/analyze.js +17 -3
- package/dist/tools/analyze.js.map +1 -1
- package/dist/tools/billing.d.ts.map +1 -1
- package/dist/tools/billing.js +6 -5
- package/dist/tools/billing.js.map +1 -1
- package/dist/tools/credentials-reveal.d.ts.map +1 -1
- package/dist/tools/credentials-reveal.js +7 -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 +12 -2
- package/dist/tools/deploy-status.js.map +1 -1
- package/dist/tools/env.d.ts.map +1 -1
- package/dist/tools/env.js +14 -3
- package/dist/tools/env.js.map +1 -1
- package/dist/tools/processes.d.ts.map +1 -1
- package/dist/tools/processes.js +12 -2
- package/dist/tools/processes.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +31 -5
- package/dist/tools/projects.js.map +1 -1
- package/package.json +1 -1
- package/src/tools/analyze.ts +13 -3
- package/src/tools/billing.ts +6 -5
- package/src/tools/credentials-reveal.ts +7 -1
- package/src/tools/deploy-status.ts +12 -2
- package/src/tools/env.ts +18 -3
- package/src/tools/processes.ts +12 -2
- package/src/tools/projects.ts +39 -6
- package/tests/new-tools-smoke.mjs +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA6BpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA6BpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QA8ErD"}
|
package/dist/tools/analyze.js
CHANGED
|
@@ -41,9 +41,14 @@ export function registerAnalyzeTools(server) {
|
|
|
41
41
|
lines.push('');
|
|
42
42
|
lines.push('Tip: this project will be deployed via dailey_deploy_multi.');
|
|
43
43
|
}
|
|
44
|
-
if (d.estimates) {
|
|
44
|
+
if (d.estimates && (d.estimates.pull_time_seconds != null || d.estimates.deploy_time_seconds != null)) {
|
|
45
|
+
const parts = [];
|
|
46
|
+
if (d.estimates.pull_time_seconds != null)
|
|
47
|
+
parts.push(`pull ~${d.estimates.pull_time_seconds}s`);
|
|
48
|
+
if (d.estimates.deploy_time_seconds != null)
|
|
49
|
+
parts.push(`deploy ~${d.estimates.deploy_time_seconds}s`);
|
|
45
50
|
lines.push('');
|
|
46
|
-
lines.push(`Estimates:
|
|
51
|
+
lines.push(`Estimates: ${parts.join(', ')}`);
|
|
47
52
|
}
|
|
48
53
|
if (d.recommendations?.length) {
|
|
49
54
|
lines.push('');
|
|
@@ -59,7 +64,16 @@ export function registerAnalyzeTools(server) {
|
|
|
59
64
|
}
|
|
60
65
|
else {
|
|
61
66
|
lines.push('');
|
|
62
|
-
|
|
67
|
+
const isMulti = (d.services_manifest?.entries?.length || 0) > 0;
|
|
68
|
+
if (isMulti) {
|
|
69
|
+
lines.push('✓ Ready to deploy — use dailey_deploy_bundle (one call, atomic) for this repo.');
|
|
70
|
+
}
|
|
71
|
+
else if (d._isDockerImage) {
|
|
72
|
+
lines.push('✓ Ready to deploy — use dailey_run_image for this Docker image.');
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
lines.push('✓ Ready to deploy — use dailey_deploy_bundle (one call: create + env + deploy).');
|
|
76
|
+
}
|
|
63
77
|
}
|
|
64
78
|
return textResult(lines.join('\n'));
|
|
65
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/tools/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,CAAC,cAAc,EAAE,CAAC;gBAC5B,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;YAChF,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;YAChG,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/tools/billing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/tools/billing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QA6BrD"}
|
package/dist/tools/billing.js
CHANGED
|
@@ -7,11 +7,12 @@ export function registerBillingTools(server) {
|
|
|
7
7
|
return textResult(formatError(res));
|
|
8
8
|
return jsonResult(res.data);
|
|
9
9
|
});
|
|
10
|
-
server.tool('dailey_billing_estimate', 'Estimate cost
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, async ({
|
|
14
|
-
const
|
|
10
|
+
server.tool('dailey_billing_estimate', 'Estimate cost impact of scaling a project to N additional replicas. Only the "scale" action is supported today — the action argument is reserved for future cost estimators (e.g., adding storage, adding a DB) and will be removed when we have one canonical estimator.', {
|
|
11
|
+
replicas: z.number().describe('Total additional replicas to add across all projects when estimating the scale delta.'),
|
|
12
|
+
action: z.enum(['scale']).optional().describe('Action to estimate. Only "scale" is implemented; omit for the default.'),
|
|
13
|
+
}, async ({ replicas, action }) => {
|
|
14
|
+
const effectiveAction = action || 'scale';
|
|
15
|
+
const res = await apiRequest('GET', `/billing/estimate?action=${encodeURIComponent(effectiveAction)}&replicas=${replicas}`);
|
|
15
16
|
if (!res.ok)
|
|
16
17
|
return textResult(formatError(res));
|
|
17
18
|
return jsonResult(res.data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/tools/billing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5E,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,6CAA6C,EAC7C,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,GAAG,GAAG,MAAM,UAAU,CAA0B,KAAK,EAAE,UAAU,CAAC,CAAC;QACzE,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/tools/billing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5E,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,6CAA6C,EAC7C,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,GAAG,GAAG,MAAM,UAAU,CAA0B,KAAK,EAAE,UAAU,CAAC,CAAC;QACzE,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,yBAAyB,EACzB,2QAA2Q,EAC3Q;QACE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uFAAuF,CAAC;QACtH,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;KACxH,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE;QAC7B,MAAM,eAAe,GAAG,MAAM,IAAI,OAAO,CAAC;QAC1C,MAAM,GAAG,GAAG,MAAM,UAAU,CAC1B,KAAK,EACL,4BAA4B,kBAAkB,CAAC,eAAe,CAAC,aAAa,QAAQ,EAAE,CACvF,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials-reveal.d.ts","sourceRoot":"","sources":["../../src/tools/credentials-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"credentials-reveal.d.ts","sourceRoot":"","sources":["../../src/tools/credentials-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,QAgC9D"}
|
|
@@ -13,7 +13,13 @@ export function registerCredentialRevealTools(server) {
|
|
|
13
13
|
const res = await apiRequest('POST', `/projects/${project_id}/credentials/reveal`, { key, password: pw });
|
|
14
14
|
if (!res.ok)
|
|
15
15
|
return textResult(formatError(res));
|
|
16
|
-
return textResult(
|
|
16
|
+
return textResult([
|
|
17
|
+
`${res.data.key}: ${res.data.value}`,
|
|
18
|
+
'',
|
|
19
|
+
'⚠ This secret was just emitted into a chat/log session. If the reader',
|
|
20
|
+
' is untrusted (logs, transcripts shared with third parties, AI chat',
|
|
21
|
+
' histories), rotate this value now via dailey_env_vars set.',
|
|
22
|
+
].join('\n'));
|
|
17
23
|
});
|
|
18
24
|
}
|
|
19
25
|
//# sourceMappingURL=credentials-reveal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials-reveal.js","sourceRoot":"","sources":["../../src/tools/credentials-reveal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,IAAI,CACT,0BAA0B,EAC1B,oNAAoN,EACpN;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACjD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;QACxF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sEAAsE,CAAC;KACjH,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE;QACtC,MAAM,EAAE,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;QACnD,IAAI,CAAC,EAA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G,MAAM,UAAU,CAC1B,MAAM,EACN,aAAa,UAAU,qBAAqB,EAC5C,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CACtB,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC;YAChB,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE;YACpC,EAAE;YACF,uEAAuE;YACvE,sEAAsE;YACtE,8DAA8D;SAC/D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChB,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-status.d.ts","sourceRoot":"","sources":["../../src/tools/deploy-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiFpE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"deploy-status.d.ts","sourceRoot":"","sources":["../../src/tools/deploy-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiFpE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,QA6E1D"}
|
|
@@ -65,11 +65,21 @@ export function registerDeployStatusTools(server) {
|
|
|
65
65
|
lines.push(`Branch: ${status.branch || 'main'}`);
|
|
66
66
|
lines.push(`Deployed SHA: ${status.current_sha || 'never'}`);
|
|
67
67
|
lines.push(`Deployed at: ${status.deployed_at || 'never'}`);
|
|
68
|
-
|
|
68
|
+
// Only show Latest SHA when the upstream lookup actually returned
|
|
69
|
+
// something. Emitting "Latest SHA: unknown" on every healthy project
|
|
70
|
+
// is noise that implies something is broken (it's almost always just
|
|
71
|
+
// that the GH token hasn't been connected, or there's no activity).
|
|
72
|
+
if (status.latest_sha) {
|
|
73
|
+
lines.push(`Latest SHA: ${status.latest_sha}`);
|
|
74
|
+
}
|
|
69
75
|
if (status.latest_message) {
|
|
70
76
|
lines.push(`Latest msg: ${status.latest_message}`);
|
|
71
77
|
}
|
|
72
|
-
|
|
78
|
+
// Only show New version when we actually have a Latest SHA to
|
|
79
|
+
// compare against — otherwise the "no" is meaningless.
|
|
80
|
+
if (status.latest_sha) {
|
|
81
|
+
lines.push(`New version: ${status.has_new_version ? `yes (${status.new_commits || '?'} new commits)` : 'no'}`);
|
|
82
|
+
}
|
|
73
83
|
lines.push(`Building: ${status.is_building ? 'yes' : 'no'}`);
|
|
74
84
|
lines.push(`Can deploy: ${status.can_deploy ? 'yes' : 'no'}`);
|
|
75
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-status.js","sourceRoot":"","sources":["../../src/tools/deploy-status.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAiChE,MAAM,cAAc,GAAG,cAAc,CAAC;AAEtC,SAAS,kBAAkB,CAAC,GAAW;IACrC,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACzF,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC;AAED,MAAM,gBAAgB,GAA4D;IACh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AG,CAAC,CAAC;gBACzC,IAAI,QAAQ,EAAE,CAAC;oBACb,KAAK,CAAC,IAAI,CAAC,gBAAgB,QAAQ,EAAE,CAAC,CAAC;gBACzC,CAAC;gBACD,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;oBAC/B,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;oBACzC,IAAI,QAAQ,EAAE,CAAC;wBACb,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;wBACf,KAAK,CAAC,IAAI,CAAC,qBAAqB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;wBACnD,KAAK,CAAC,IAAI,CAAC,qBAAqB,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;oBAClD,CAAC;oBACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACf,KAAK,CAAC,IAAI,CAAC,6CAA6C,MAAM,CAAC,EAAE,0BAA0B,CAAC,CAAC;gBAC/F,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/tools/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AASpE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/tools/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AASpE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,QA0EjD"}
|
package/dist/tools/env.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { apiRequest, formatError, textResult } from '../api.js';
|
|
3
3
|
export function registerEnvTools(server) {
|
|
4
|
-
server.tool('dailey_env_vars', 'List, set, or delete environment variables for a project', {
|
|
4
|
+
server.tool('dailey_env_vars', 'List, set, set_many, or delete environment variables for a project. Use set_many to write multiple vars in a single call (one permission prompt, one Secret sync) — especially useful when an app needs 3+ build-time vars like Supabase/Vite/Next.', {
|
|
5
5
|
project_id: z.string().describe('The project ID'),
|
|
6
|
-
action: z.enum(['list', 'set', 'delete']).describe('Action: list, set, or delete'),
|
|
6
|
+
action: z.enum(['list', 'set', 'set_many', 'delete']).describe('Action: list, set (single), set_many (bulk), or delete'),
|
|
7
7
|
key: z.string().optional().describe('Environment variable key (required for set/delete)'),
|
|
8
8
|
value: z.string().optional().describe('Environment variable value (required for set)'),
|
|
9
|
-
|
|
9
|
+
env_vars: z.record(z.string()).optional().describe('Flat object of env vars for set_many, e.g. { FOO: "bar", BAZ: "qux" }'),
|
|
10
|
+
}, async ({ project_id, action, key, value, env_vars }) => {
|
|
10
11
|
if (action === 'list') {
|
|
11
12
|
const res = await apiRequest('GET', `/projects/${project_id}/env`);
|
|
12
13
|
if (!res.ok)
|
|
@@ -41,6 +42,16 @@ export function registerEnvTools(server) {
|
|
|
41
42
|
return textResult(formatError(postRes));
|
|
42
43
|
return textResult(`Environment variable ${key} set.`);
|
|
43
44
|
}
|
|
45
|
+
if (action === 'set_many') {
|
|
46
|
+
if (!env_vars || Object.keys(env_vars).length === 0) {
|
|
47
|
+
return textResult('Error: env_vars object is required for set_many action.');
|
|
48
|
+
}
|
|
49
|
+
const res = await apiRequest('POST', `/projects/${project_id}/env`, { env_vars });
|
|
50
|
+
if (!res.ok)
|
|
51
|
+
return textResult(formatError(res));
|
|
52
|
+
const d = res.data || {};
|
|
53
|
+
return textResult(`Set ${d.count ?? Object.keys(env_vars).length} environment variables: ${(d.keys || Object.keys(env_vars)).join(', ')}`);
|
|
54
|
+
}
|
|
44
55
|
if (action === 'delete') {
|
|
45
56
|
if (!key) {
|
|
46
57
|
return textResult('Error: key is required for delete action.');
|
package/dist/tools/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/tools/env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAOhE,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/tools/env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAOhE,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,qPAAqP,EACrP;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACjD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,wDAAwD,CAAC;QACxH,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;QACzF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;QACtF,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uEAAuE,CAAC;KAC5H,EACD,KAAK,E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AC7I,CAAC;QAED,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,OAAO,UAAU,CAAC,2CAA2C,CAAC,CAAC;YACjE,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,QAAQ,EAAE,aAAa,UAAU,QAAQ,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjG,IAAI,CAAC,GAAG,CAAC,EAAE;gBAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YACjD,OAAO,UAAU,CAAC,wBAAwB,GAAG,WAAW,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,UAAU,CAAC,kDAAkD,CAAC,CAAC;IACxE,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processes.d.ts","sourceRoot":"","sources":["../../src/tools/processes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuCpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"processes.d.ts","sourceRoot":"","sources":["../../src/tools/processes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuCpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QA8IrD"}
|
package/dist/tools/processes.js
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { apiRequest, formatError, textResult } from '../api.js';
|
|
3
3
|
export function registerProcessTools(server) {
|
|
4
|
-
server.tool('dailey_processes', 'List processes defined in a project
|
|
4
|
+
server.tool('dailey_processes', 'List processes defined in a project. For multi-process projects with a dailey.yaml manifest, returns each declared process (web/worker/release) with resource limits and status. For single-container projects (most Dailey OS projects), returns an empty list — use dailey_project_info and dailey_scale for resource management in that case.', { project_id: z.string().describe('The project ID') }, async ({ project_id }) => {
|
|
5
5
|
const res = await apiRequest('GET', `/projects/${project_id}/processes`);
|
|
6
6
|
if (!res.ok)
|
|
7
7
|
return textResult(formatError(res));
|
|
8
8
|
const procs = res.data.processes || [];
|
|
9
9
|
if (procs.length === 0) {
|
|
10
|
-
return textResult(
|
|
10
|
+
return textResult([
|
|
11
|
+
'No processes manifest (dailey.yaml) found — this is a single-container project.',
|
|
12
|
+
'',
|
|
13
|
+
'For single-container projects:',
|
|
14
|
+
' - dailey_project_info to see current replicas/CPU/memory',
|
|
15
|
+
' - dailey_scale to change replicas',
|
|
16
|
+
' - dailey_app_logs to tail runtime logs',
|
|
17
|
+
' - dailey_app_restart to roll the deployment',
|
|
18
|
+
'',
|
|
19
|
+
'dailey_processes/dailey_process_* are only meaningful when a repo ships a dailey.yaml declaring multiple processes.',
|
|
20
|
+
].join('\n'));
|
|
11
21
|
}
|
|
12
22
|
const lines = [
|
|
13
23
|
`Processes (${procs.length})`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processes.js","sourceRoot":"","sources":["../../src/tools/processes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAqChE,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"processes.js","sourceRoot":"","sources":["../../src/tools/processes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAqChE,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,kVAAkV,EAClV,EAAE,UAA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AG,GAAG,MAAM,UAAU,CAC1B,MAAM,EACN,aAAa,UAAU,cAAc,kBAAkB,CAAC,YAAY,CAAC,YAAY,EACjF,IAAI,CACL,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7E,OAAO,UAAU,CAAC,mBAAmB,YAAY,KAAK,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiBpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QAwOrD"}
|
package/dist/tools/projects.js
CHANGED
|
@@ -9,13 +9,16 @@ export function registerProjectTools(server) {
|
|
|
9
9
|
if (!projects || projects.length === 0) {
|
|
10
10
|
return textResult('No projects found.');
|
|
11
11
|
}
|
|
12
|
+
// Include slug — when multiple projects share a name (common with
|
|
13
|
+
// template-generated repos or duplicated test projects) the slug is
|
|
14
|
+
// the disambiguator callers need to pick the right project_id.
|
|
12
15
|
const lines = [
|
|
13
16
|
`Projects (${projects.length})`,
|
|
14
|
-
`${'ID'.padEnd(38)} ${'Name'.padEnd(24)} ${'Status'.padEnd(
|
|
15
|
-
'─'.repeat(
|
|
17
|
+
`${'ID'.padEnd(38)} ${'Name'.padEnd(22)} ${'Slug'.padEnd(24)} ${'Status'.padEnd(10)} Replicas`,
|
|
18
|
+
'─'.repeat(110),
|
|
16
19
|
];
|
|
17
20
|
for (const p of projects) {
|
|
18
|
-
lines.push(`${(p.id || '').padEnd(38)} ${(p.name || '').padEnd(24)} ${(p.status || 'unknown').padEnd(
|
|
21
|
+
lines.push(`${(p.id || '').padEnd(38)} ${(p.name || '').padEnd(22)} ${(p.slug || '').padEnd(24)} ${(p.status || 'unknown').padEnd(10)} ${p.replicas ?? '-'}`);
|
|
19
22
|
}
|
|
20
23
|
return textResult(lines.join('\n'));
|
|
21
24
|
});
|
|
@@ -90,7 +93,7 @@ export function registerProjectTools(server) {
|
|
|
90
93
|
return textResult(formatError(analyzeRes));
|
|
91
94
|
const manifest = analyzeRes.data.services_manifest;
|
|
92
95
|
if (!manifest?.entries?.length) {
|
|
93
|
-
return textResult('No multi-service manifest found.
|
|
96
|
+
return textResult('No multi-service manifest found. For single-container projects use dailey_deploy_bundle (creates + deploys in one call), or dailey_deploy with an existing project_id to redeploy.');
|
|
94
97
|
}
|
|
95
98
|
services = manifest.entries.filter((e) => e.type === 'managed' || e.type === 'app_service');
|
|
96
99
|
}
|
|
@@ -120,7 +123,7 @@ export function registerProjectTools(server) {
|
|
|
120
123
|
` If it fails, call dailey_build_logs with project_id=${project_id} for full output.`,
|
|
121
124
|
].join('\n'));
|
|
122
125
|
});
|
|
123
|
-
server.tool('dailey_create_project', 'Create a
|
|
126
|
+
server.tool('dailey_create_project', 'Create a project row AND auto-queue the first build. Prefer dailey_deploy_bundle when you also need env vars, service links, or a custom domain — it does create + configure + deploy in a single call. Use this tool only for the bare "just create + build" case.', {
|
|
124
127
|
name: z.string().describe('Project name'),
|
|
125
128
|
repo_url: z.string().describe('Git repository URL'),
|
|
126
129
|
branch: z.string().optional().describe('Branch to deploy (default: main)'),
|
|
@@ -142,10 +145,33 @@ export function registerProjectTools(server) {
|
|
|
142
145
|
`Name: ${p.name}`,
|
|
143
146
|
`Status: ${p.status || 'pending'}`,
|
|
144
147
|
`Repo: ${p.repo_url}`,
|
|
148
|
+
...(p.build_id ? [`Build: ${p.build_id} (auto-queued — watch with dailey_deploy_status)`] : []),
|
|
145
149
|
`Branch: ${p.branch || 'main'}`,
|
|
146
150
|
`Database: ${p.needs_database ? 'yes' : 'no'}`,
|
|
147
151
|
].join('\n'));
|
|
148
152
|
});
|
|
153
|
+
server.tool('dailey_deploy', 'Trigger a build + deploy for an existing single-container project. Use this to redeploy a project that already exists (e.g., after pushing new commits to the repo). For multi-service projects use dailey_deploy_multi. To create AND deploy a new project, use dailey_deploy_bundle.', {
|
|
154
|
+
project_id: z.string().describe('The project ID to deploy'),
|
|
155
|
+
commit_sha: z.string().optional().describe('Specific commit SHA to deploy (default: HEAD of the configured branch)'),
|
|
156
|
+
}, async ({ project_id, commit_sha }) => {
|
|
157
|
+
const res = await apiRequest('POST', '/deploys', {
|
|
158
|
+
project_id,
|
|
159
|
+
commit_sha: commit_sha || 'HEAD',
|
|
160
|
+
});
|
|
161
|
+
if (!res.ok)
|
|
162
|
+
return textResult(formatError(res));
|
|
163
|
+
const d = res.data || {};
|
|
164
|
+
return textResult([
|
|
165
|
+
`Deploy triggered!`,
|
|
166
|
+
``,
|
|
167
|
+
`Project: ${project_id}`,
|
|
168
|
+
`Build ID: ${d.build_id || '(unknown)'}`,
|
|
169
|
+
`Commit: ${commit_sha || 'HEAD'}`,
|
|
170
|
+
``,
|
|
171
|
+
`Next: dailey_deploy_status with project_id=${project_id} to watch progress.`,
|
|
172
|
+
` dailey_build_logs with project_id=${project_id} if it fails.`,
|
|
173
|
+
].join('\n'));
|
|
174
|
+
});
|
|
149
175
|
server.tool('dailey_delete_project', 'Delete a project (irreversible)', { project_id: z.string().describe('The project ID to delete') }, async ({ project_id }) => {
|
|
150
176
|
const res = await apiRequest('DELETE', `/projects/${project_id}`);
|
|
151
177
|
if (!res.ok)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAehE,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,+BAA+B,EAC/B,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,GAAG,GAAG,MAAM,UAAU,CAA0B,KAAK,EAAE,WAAW,CAAC,CAAC;QAC1E,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QAEjD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvC,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC;QAC1C,CAAC;QAED,kEAAkE;QAClE,oEAAoE;QACpE,+DAA+D;QAC/D,MAAM,KAAK,GAAG;YACZ,aAAa,QAAQ,CAAC,MAAM,GAAG;YAC/B,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,WAAW;YAC9F,GAAG,CAAC,MAAM,CAAC,GAAG,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AAM,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"}
|
package/package.json
CHANGED
package/src/tools/analyze.ts
CHANGED
|
@@ -72,9 +72,12 @@ export function registerAnalyzeTools(server: McpServer) {
|
|
|
72
72
|
lines.push('Tip: this project will be deployed via dailey_deploy_multi.');
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
if (d.estimates) {
|
|
75
|
+
if (d.estimates && (d.estimates.pull_time_seconds != null || d.estimates.deploy_time_seconds != null)) {
|
|
76
|
+
const parts: string[] = [];
|
|
77
|
+
if (d.estimates.pull_time_seconds != null) parts.push(`pull ~${d.estimates.pull_time_seconds}s`);
|
|
78
|
+
if (d.estimates.deploy_time_seconds != null) parts.push(`deploy ~${d.estimates.deploy_time_seconds}s`);
|
|
76
79
|
lines.push('');
|
|
77
|
-
lines.push(`Estimates:
|
|
80
|
+
lines.push(`Estimates: ${parts.join(', ')}`);
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
if (d.recommendations?.length) {
|
|
@@ -89,7 +92,14 @@ export function registerAnalyzeTools(server: McpServer) {
|
|
|
89
92
|
for (const issue of d.issues) lines.push(` ✗ ${issue}`);
|
|
90
93
|
} else {
|
|
91
94
|
lines.push('');
|
|
92
|
-
|
|
95
|
+
const isMulti = (d.services_manifest?.entries?.length || 0) > 0;
|
|
96
|
+
if (isMulti) {
|
|
97
|
+
lines.push('✓ Ready to deploy — use dailey_deploy_bundle (one call, atomic) for this repo.');
|
|
98
|
+
} else if (d._isDockerImage) {
|
|
99
|
+
lines.push('✓ Ready to deploy — use dailey_run_image for this Docker image.');
|
|
100
|
+
} else {
|
|
101
|
+
lines.push('✓ Ready to deploy — use dailey_deploy_bundle (one call: create + env + deploy).');
|
|
102
|
+
}
|
|
93
103
|
}
|
|
94
104
|
|
|
95
105
|
return textResult(lines.join('\n'));
|
package/src/tools/billing.ts
CHANGED
|
@@ -16,15 +16,16 @@ export function registerBillingTools(server: McpServer) {
|
|
|
16
16
|
|
|
17
17
|
server.tool(
|
|
18
18
|
'dailey_billing_estimate',
|
|
19
|
-
'Estimate cost
|
|
19
|
+
'Estimate cost impact of scaling a project to N additional replicas. Only the "scale" action is supported today — the action argument is reserved for future cost estimators (e.g., adding storage, adding a DB) and will be removed when we have one canonical estimator.',
|
|
20
20
|
{
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
replicas: z.number().describe('Total additional replicas to add across all projects when estimating the scale delta.'),
|
|
22
|
+
action: z.enum(['scale']).optional().describe('Action to estimate. Only "scale" is implemented; omit for the default.'),
|
|
23
23
|
},
|
|
24
|
-
async ({
|
|
24
|
+
async ({ replicas, action }) => {
|
|
25
|
+
const effectiveAction = action || 'scale';
|
|
25
26
|
const res = await apiRequest<Record<string, unknown>>(
|
|
26
27
|
'GET',
|
|
27
|
-
`/billing/estimate?action=${encodeURIComponent(
|
|
28
|
+
`/billing/estimate?action=${encodeURIComponent(effectiveAction)}&replicas=${replicas}`,
|
|
28
29
|
);
|
|
29
30
|
if (!res.ok) return textResult(formatError(res));
|
|
30
31
|
return jsonResult(res.data);
|
|
@@ -25,7 +25,13 @@ export function registerCredentialRevealTools(server: McpServer) {
|
|
|
25
25
|
{ key, password: pw },
|
|
26
26
|
);
|
|
27
27
|
if (!res.ok) return textResult(formatError(res));
|
|
28
|
-
return textResult(
|
|
28
|
+
return textResult([
|
|
29
|
+
`${res.data.key}: ${res.data.value}`,
|
|
30
|
+
'',
|
|
31
|
+
'⚠ This secret was just emitted into a chat/log session. If the reader',
|
|
32
|
+
' is untrusted (logs, transcripts shared with third parties, AI chat',
|
|
33
|
+
' histories), rotate this value now via dailey_env_vars set.',
|
|
34
|
+
].join('\n'));
|
|
29
35
|
},
|
|
30
36
|
);
|
|
31
37
|
}
|
|
@@ -103,11 +103,21 @@ export function registerDeployStatusTools(server: McpServer) {
|
|
|
103
103
|
lines.push(`Branch: ${status.branch || 'main'}`);
|
|
104
104
|
lines.push(`Deployed SHA: ${status.current_sha || 'never'}`);
|
|
105
105
|
lines.push(`Deployed at: ${status.deployed_at || 'never'}`);
|
|
106
|
-
|
|
106
|
+
// Only show Latest SHA when the upstream lookup actually returned
|
|
107
|
+
// something. Emitting "Latest SHA: unknown" on every healthy project
|
|
108
|
+
// is noise that implies something is broken (it's almost always just
|
|
109
|
+
// that the GH token hasn't been connected, or there's no activity).
|
|
110
|
+
if (status.latest_sha) {
|
|
111
|
+
lines.push(`Latest SHA: ${status.latest_sha}`);
|
|
112
|
+
}
|
|
107
113
|
if (status.latest_message) {
|
|
108
114
|
lines.push(`Latest msg: ${status.latest_message}`);
|
|
109
115
|
}
|
|
110
|
-
|
|
116
|
+
// Only show New version when we actually have a Latest SHA to
|
|
117
|
+
// compare against — otherwise the "no" is meaningless.
|
|
118
|
+
if (status.latest_sha) {
|
|
119
|
+
lines.push(`New version: ${status.has_new_version ? `yes (${status.new_commits || '?'} new commits)` : 'no'}`);
|
|
120
|
+
}
|
|
111
121
|
lines.push(`Building: ${status.is_building ? 'yes' : 'no'}`);
|
|
112
122
|
lines.push(`Can deploy: ${status.can_deploy ? 'yes' : 'no'}`);
|
|
113
123
|
}
|
package/src/tools/env.ts
CHANGED
|
@@ -10,14 +10,15 @@ interface EnvVar {
|
|
|
10
10
|
export function registerEnvTools(server: McpServer) {
|
|
11
11
|
server.tool(
|
|
12
12
|
'dailey_env_vars',
|
|
13
|
-
'List, set, or delete environment variables for a project',
|
|
13
|
+
'List, set, set_many, or delete environment variables for a project. Use set_many to write multiple vars in a single call (one permission prompt, one Secret sync) — especially useful when an app needs 3+ build-time vars like Supabase/Vite/Next.',
|
|
14
14
|
{
|
|
15
15
|
project_id: z.string().describe('The project ID'),
|
|
16
|
-
action: z.enum(['list', 'set', 'delete']).describe('Action: list, set, or delete'),
|
|
16
|
+
action: z.enum(['list', 'set', 'set_many', 'delete']).describe('Action: list, set (single), set_many (bulk), or delete'),
|
|
17
17
|
key: z.string().optional().describe('Environment variable key (required for set/delete)'),
|
|
18
18
|
value: z.string().optional().describe('Environment variable value (required for set)'),
|
|
19
|
+
env_vars: z.record(z.string()).optional().describe('Flat object of env vars for set_many, e.g. { FOO: "bar", BAZ: "qux" }'),
|
|
19
20
|
},
|
|
20
|
-
async ({ project_id, action, key, value }) => {
|
|
21
|
+
async ({ project_id, action, key, value, env_vars }) => {
|
|
21
22
|
if (action === 'list') {
|
|
22
23
|
const res = await apiRequest<{ env_vars: EnvVar[] }>('GET', `/projects/${project_id}/env`);
|
|
23
24
|
if (!res.ok) return textResult(formatError(res));
|
|
@@ -54,6 +55,20 @@ export function registerEnvTools(server: McpServer) {
|
|
|
54
55
|
return textResult(`Environment variable ${key} set.`);
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
if (action === 'set_many') {
|
|
59
|
+
if (!env_vars || Object.keys(env_vars).length === 0) {
|
|
60
|
+
return textResult('Error: env_vars object is required for set_many action.');
|
|
61
|
+
}
|
|
62
|
+
const res = await apiRequest<{ set: boolean; count: number; keys: string[] }>(
|
|
63
|
+
'POST',
|
|
64
|
+
`/projects/${project_id}/env`,
|
|
65
|
+
{ env_vars },
|
|
66
|
+
);
|
|
67
|
+
if (!res.ok) return textResult(formatError(res));
|
|
68
|
+
const d = res.data || {} as any;
|
|
69
|
+
return textResult(`Set ${d.count ?? Object.keys(env_vars).length} environment variables: ${(d.keys || Object.keys(env_vars)).join(', ')}`);
|
|
70
|
+
}
|
|
71
|
+
|
|
57
72
|
if (action === 'delete') {
|
|
58
73
|
if (!key) {
|
|
59
74
|
return textResult('Error: key is required for delete action.');
|
package/src/tools/processes.ts
CHANGED
|
@@ -40,7 +40,7 @@ interface ProcessMetricsResponse {
|
|
|
40
40
|
export function registerProcessTools(server: McpServer) {
|
|
41
41
|
server.tool(
|
|
42
42
|
'dailey_processes',
|
|
43
|
-
'List processes defined in a project
|
|
43
|
+
'List processes defined in a project. For multi-process projects with a dailey.yaml manifest, returns each declared process (web/worker/release) with resource limits and status. For single-container projects (most Dailey OS projects), returns an empty list — use dailey_project_info and dailey_scale for resource management in that case.',
|
|
44
44
|
{ project_id: z.string().describe('The project ID') },
|
|
45
45
|
async ({ project_id }) => {
|
|
46
46
|
const res = await apiRequest<{ processes: Process[] }>('GET', `/projects/${project_id}/processes`);
|
|
@@ -48,7 +48,17 @@ export function registerProcessTools(server: McpServer) {
|
|
|
48
48
|
|
|
49
49
|
const procs = res.data.processes || [];
|
|
50
50
|
if (procs.length === 0) {
|
|
51
|
-
return textResult(
|
|
51
|
+
return textResult([
|
|
52
|
+
'No processes manifest (dailey.yaml) found — this is a single-container project.',
|
|
53
|
+
'',
|
|
54
|
+
'For single-container projects:',
|
|
55
|
+
' - dailey_project_info to see current replicas/CPU/memory',
|
|
56
|
+
' - dailey_scale to change replicas',
|
|
57
|
+
' - dailey_app_logs to tail runtime logs',
|
|
58
|
+
' - dailey_app_restart to roll the deployment',
|
|
59
|
+
'',
|
|
60
|
+
'dailey_processes/dailey_process_* are only meaningful when a repo ships a dailey.yaml declaring multiple processes.',
|
|
61
|
+
].join('\n'));
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
const lines = [
|
package/src/tools/projects.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { apiRequest, formatError, textResult } from '../api.js';
|
|
|
5
5
|
interface Project {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
8
|
+
slug?: string;
|
|
8
9
|
status?: string;
|
|
9
10
|
repo_url?: string;
|
|
10
11
|
branch?: string;
|
|
@@ -28,15 +29,18 @@ export function registerProjectTools(server: McpServer) {
|
|
|
28
29
|
return textResult('No projects found.');
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
// Include slug — when multiple projects share a name (common with
|
|
33
|
+
// template-generated repos or duplicated test projects) the slug is
|
|
34
|
+
// the disambiguator callers need to pick the right project_id.
|
|
31
35
|
const lines = [
|
|
32
36
|
`Projects (${projects.length})`,
|
|
33
|
-
`${'ID'.padEnd(38)} ${'Name'.padEnd(24)} ${'Status'.padEnd(
|
|
34
|
-
'─'.repeat(
|
|
37
|
+
`${'ID'.padEnd(38)} ${'Name'.padEnd(22)} ${'Slug'.padEnd(24)} ${'Status'.padEnd(10)} Replicas`,
|
|
38
|
+
'─'.repeat(110),
|
|
35
39
|
];
|
|
36
40
|
|
|
37
41
|
for (const p of projects) {
|
|
38
42
|
lines.push(
|
|
39
|
-
`${(p.id || '').padEnd(38)} ${(p.name || '').padEnd(24)} ${(p.status || 'unknown').padEnd(
|
|
43
|
+
`${(p.id || '').padEnd(38)} ${(p.name || '').padEnd(22)} ${(p.slug || '').padEnd(24)} ${(p.status || 'unknown').padEnd(10)} ${p.replicas ?? '-'}`,
|
|
40
44
|
);
|
|
41
45
|
}
|
|
42
46
|
|
|
@@ -137,7 +141,7 @@ export function registerProjectTools(server: McpServer) {
|
|
|
137
141
|
|
|
138
142
|
const manifest = analyzeRes.data.services_manifest;
|
|
139
143
|
if (!manifest?.entries?.length) {
|
|
140
|
-
return textResult('No multi-service manifest found.
|
|
144
|
+
return textResult('No multi-service manifest found. For single-container projects use dailey_deploy_bundle (creates + deploys in one call), or dailey_deploy with an existing project_id to redeploy.');
|
|
141
145
|
}
|
|
142
146
|
services = manifest.entries.filter((e: any) => e.type === 'managed' || e.type === 'app_service');
|
|
143
147
|
}
|
|
@@ -173,7 +177,7 @@ export function registerProjectTools(server: McpServer) {
|
|
|
173
177
|
|
|
174
178
|
server.tool(
|
|
175
179
|
'dailey_create_project',
|
|
176
|
-
'Create a
|
|
180
|
+
'Create a project row AND auto-queue the first build. Prefer dailey_deploy_bundle when you also need env vars, service links, or a custom domain — it does create + configure + deploy in a single call. Use this tool only for the bare "just create + build" case.',
|
|
177
181
|
{
|
|
178
182
|
name: z.string().describe('Project name'),
|
|
179
183
|
repo_url: z.string().describe('Git repository URL'),
|
|
@@ -185,7 +189,7 @@ export function registerProjectTools(server: McpServer) {
|
|
|
185
189
|
if (branch) body.branch = branch;
|
|
186
190
|
if (needs_database !== undefined) body.needs_database = needs_database;
|
|
187
191
|
|
|
188
|
-
const res = await apiRequest<Project>('POST', '/projects', body);
|
|
192
|
+
const res = await apiRequest<Project & { build_id?: string }>('POST', '/projects', body);
|
|
189
193
|
if (!res.ok) return textResult(formatError(res));
|
|
190
194
|
|
|
191
195
|
const p = res.data;
|
|
@@ -197,6 +201,7 @@ export function registerProjectTools(server: McpServer) {
|
|
|
197
201
|
`Name: ${p.name}`,
|
|
198
202
|
`Status: ${p.status || 'pending'}`,
|
|
199
203
|
`Repo: ${p.repo_url}`,
|
|
204
|
+
...(p.build_id ? [`Build: ${p.build_id} (auto-queued — watch with dailey_deploy_status)`] : []),
|
|
200
205
|
`Branch: ${p.branch || 'main'}`,
|
|
201
206
|
`Database: ${p.needs_database ? 'yes' : 'no'}`,
|
|
202
207
|
].join('\n'),
|
|
@@ -204,6 +209,34 @@ export function registerProjectTools(server: McpServer) {
|
|
|
204
209
|
},
|
|
205
210
|
);
|
|
206
211
|
|
|
212
|
+
server.tool(
|
|
213
|
+
'dailey_deploy',
|
|
214
|
+
'Trigger a build + deploy for an existing single-container project. Use this to redeploy a project that already exists (e.g., after pushing new commits to the repo). For multi-service projects use dailey_deploy_multi. To create AND deploy a new project, use dailey_deploy_bundle.',
|
|
215
|
+
{
|
|
216
|
+
project_id: z.string().describe('The project ID to deploy'),
|
|
217
|
+
commit_sha: z.string().optional().describe('Specific commit SHA to deploy (default: HEAD of the configured branch)'),
|
|
218
|
+
},
|
|
219
|
+
async ({ project_id, commit_sha }) => {
|
|
220
|
+
const res = await apiRequest<any>('POST', '/deploys', {
|
|
221
|
+
project_id,
|
|
222
|
+
commit_sha: commit_sha || 'HEAD',
|
|
223
|
+
});
|
|
224
|
+
if (!res.ok) return textResult(formatError(res));
|
|
225
|
+
|
|
226
|
+
const d = res.data || {};
|
|
227
|
+
return textResult([
|
|
228
|
+
`Deploy triggered!`,
|
|
229
|
+
``,
|
|
230
|
+
`Project: ${project_id}`,
|
|
231
|
+
`Build ID: ${d.build_id || '(unknown)'}`,
|
|
232
|
+
`Commit: ${commit_sha || 'HEAD'}`,
|
|
233
|
+
``,
|
|
234
|
+
`Next: dailey_deploy_status with project_id=${project_id} to watch progress.`,
|
|
235
|
+
` dailey_build_logs with project_id=${project_id} if it fails.`,
|
|
236
|
+
].join('\n'));
|
|
237
|
+
},
|
|
238
|
+
);
|
|
239
|
+
|
|
207
240
|
server.tool(
|
|
208
241
|
'dailey_delete_project',
|
|
209
242
|
'Delete a project (irreversible)',
|
|
@@ -174,10 +174,16 @@ async function main() {
|
|
|
174
174
|
await test('dailey_db_validate (dry)', async () => {
|
|
175
175
|
// Does project have a DB? check db info first.
|
|
176
176
|
const info = await call('GET', `/projects/${project.id}/database`);
|
|
177
|
-
if (!info.ok) return `no DB provisioned — skipped`;
|
|
177
|
+
if (!info.ok || info.data?.status === 'not-configured') return `no DB provisioned — skipped`;
|
|
178
178
|
const r = await call('POST', `/projects/${project.id}/database/validate`, {
|
|
179
179
|
sql: 'CREATE TABLE IF NOT EXISTS _mcp_smoke_test (id INT);',
|
|
180
180
|
});
|
|
181
|
+
// Pack 4 fix: when a project has no managed DB, the API returns 400
|
|
182
|
+
// with a friendly "no managed database" error. Treat that as a skip,
|
|
183
|
+
// not a test failure.
|
|
184
|
+
if (r.status === 400 && typeof r.data?.error === 'string' && /no managed database/i.test(r.data.error)) {
|
|
185
|
+
return `no DB — skipped`;
|
|
186
|
+
}
|
|
181
187
|
if (!r.ok) throw new Error(`HTTP ${r.status}: ${JSON.stringify(r.data)}`);
|
|
182
188
|
return `valid=${r.data.valid}, warnings=${r.data.has_warnings}`;
|
|
183
189
|
});
|