@daileyos/mcp-server 1.21.9 → 1.22.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.
Files changed (44) hide show
  1. package/README.md +28 -0
  2. package/dist/api.d.ts +1 -0
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +1 -1
  5. package/dist/api.js.map +1 -1
  6. package/dist/context.d.ts +5 -0
  7. package/dist/context.d.ts.map +1 -1
  8. package/dist/context.js +7 -0
  9. package/dist/context.js.map +1 -1
  10. package/dist/http.d.ts +5 -0
  11. package/dist/http.d.ts.map +1 -1
  12. package/dist/http.js +27 -9
  13. package/dist/http.js.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/server.d.ts +3 -0
  17. package/dist/server.d.ts.map +1 -1
  18. package/dist/server.js +9 -2
  19. package/dist/server.js.map +1 -1
  20. package/dist/token-check.d.ts +16 -0
  21. package/dist/token-check.d.ts.map +1 -0
  22. package/dist/token-check.js +103 -0
  23. package/dist/token-check.js.map +1 -0
  24. package/dist/tools/deploy.d.ts.map +1 -1
  25. package/dist/tools/deploy.js +22 -5
  26. package/dist/tools/deploy.js.map +1 -1
  27. package/dist/tools/platform.d.ts.map +1 -1
  28. package/dist/tools/platform.js +2 -1
  29. package/dist/tools/platform.js.map +1 -1
  30. package/dist/tools/schedules-format.d.ts +59 -0
  31. package/dist/tools/schedules-format.d.ts.map +1 -0
  32. package/dist/tools/schedules-format.js +150 -0
  33. package/dist/tools/schedules-format.js.map +1 -0
  34. package/dist/tools/schedules.d.ts +95 -0
  35. package/dist/tools/schedules.d.ts.map +1 -0
  36. package/dist/tools/schedules.js +440 -0
  37. package/dist/tools/schedules.js.map +1 -0
  38. package/dist/tools/wordpress-import.d.ts.map +1 -1
  39. package/dist/tools/wordpress-import.js +4 -0
  40. package/dist/tools/wordpress-import.js.map +1 -1
  41. package/dist/tools/wordpress-migrate.d.ts.map +1 -1
  42. package/dist/tools/wordpress-migrate.js +4 -0
  43. package/dist/tools/wordpress-migrate.js.map +1 -1
  44. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { schedulesToolsEnabled, SCHEDULES_GUIDE } from './schedules-format.js';
2
3
  import { apiRequest, formatError, textResult, isValidProjectId, invalidProjectIdResult } from '../api.js';
3
4
  export function registerPlatformTools(server) {
4
5
  server.tool('dailey_platform_info', 'Show the safe platform capabilities available to a project', { project_id: z.string().describe('The project ID') }, async ({ project_id }) => {
@@ -141,7 +142,7 @@ already offers it, pre-wired and on one bill:
141
142
  ### Dailey Email (transactional email)
142
143
  - Sends from <slug>@send.dailey.cloud, zero DNS setup, $10/mo incl. 10k emails.
143
144
  Tools: dailey_email_status / dailey_email_enable. App POSTs to the injected
144
- DAILEY_EMAIL_API_URL with DAILEY_EMAIL_API_KEY.
145
+ DAILEY_EMAIL_API_URL with DAILEY_EMAIL_API_KEY.${schedulesToolsEnabled() ? SCHEDULES_GUIDE : ''}
145
146
 
146
147
  ### Usage + billing for all of the above
147
148
  - dailey_usage_summary — month-to-date usage, allowance remaining, estimated overage,
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/tools/platform.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AA4B1G,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,4DAA4D,EAC5D,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EACrD,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACvB,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;YAAE,OAAO,sBAAsB,CAAC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0 +1,59 @@
1
+ export declare const NOT_AVAILABLE = "Dailey Schedules is not available on your account yet.";
2
+ export declare const TURN_ON_FIRST = "Dailey Schedules is off for this project. Turn it on first with dailey_schedules_enable.";
3
+ export type ApiRes = {
4
+ ok: boolean;
5
+ status: number;
6
+ data: unknown;
7
+ };
8
+ export type Schedule = {
9
+ id: string;
10
+ name: string;
11
+ source: 'repo' | 'platform' | 'app';
12
+ kind: string;
13
+ cron: string;
14
+ every_text: string | null;
15
+ timezone: string | null;
16
+ enabled: number | boolean;
17
+ paused_reason: string | null;
18
+ pending_confirmation: number | boolean;
19
+ next_run_at: string | null;
20
+ last_run_at: string | null;
21
+ last_status: string | null;
22
+ consecutive_failures: number;
23
+ method: string;
24
+ query_keys: string[];
25
+ body_bytes: number;
26
+ credential?: string;
27
+ path?: string;
28
+ display_url?: string;
29
+ };
30
+ export type Run = {
31
+ id: string;
32
+ schedule_id: string | null;
33
+ item_id: string | null;
34
+ run_trigger: 'cron' | 'manual' | 'item';
35
+ scheduled_for: string;
36
+ started_at: string | null;
37
+ finished_at: string | null;
38
+ status: string;
39
+ attempt: number;
40
+ reason: string | null;
41
+ reason_message: string | null;
42
+ http_status: number | null;
43
+ duration_ms: number | null;
44
+ error: string | null;
45
+ preview?: string | null;
46
+ logs?: string | null;
47
+ };
48
+ export declare function schedulesToolsEnabled(env?: Record<string, string | undefined>): boolean;
49
+ export declare function schedulesErrorText(res: ApiRes, subject?: 'schedule' | 'host' | 'item' | 'run' | 'credential'): string;
50
+ export declare function describeSchedule(s: Schedule): string;
51
+ export declare function describeRun(r: Run): string;
52
+ export declare function nextRunsText(nextRuns: string[], timezone?: string): string;
53
+ export declare function signingSecretBlock(host: string, secret: string, where: 'mcp' | 'cli'): string;
54
+ export declare function isSafeId(id: string): boolean;
55
+ export declare function checkDedupeKey(key: string): string | null;
56
+ export declare function checkName(name: string): string | null;
57
+ export declare function checkHostInput(host: string, strict?: boolean): string | null;
58
+ export declare const SCHEDULES_GUIDE = "\n\n### Dailey Schedules (work on a timer)\n- Runs work on a schedule (\"every weekday at 9am\", or cron) or once at a set time, by visiting a path in the app\n or an outside https address. Turn on per project with dailey_schedules_enable (dailey_schedules_disable turns it\n off); the app gets DAILEY_SCHEDULES_SECRET, DAILEY_SCHEDULES_API_URL and DAILEY_SCHEDULES_KEY and restarts.\n- Tools: dailey_schedules_enable, _disable, _list, _preview, _create, _update, _delete, _pause, _resume, _run_now,\n _history, _item_add, _item_cancel, _credential_add, _credential_remove, _host_confirm, _host_rotate_secret,\n _rotate_secret, _rotate_key, _test_endpoint.\n- Plans: Free 3 schedules, at most hourly, 7 days history. Studio 25, every minute, 30 days. Managed 50, 90 days.\n- Every visit to the app is signed. The app MUST check it and answer 401 when it fails:\n headers Dailey-Schedules-Timestamp, Dailey-Schedules-Run-Id, Dailey-Schedules-Attempt, Dailey-Schedules-Signature\n (v1=<hex>, comma separated during a rotation), Dailey-Schedules-Last-Success (may be absent).\n Signed text = these lines joined with a newline: timestamp, METHOD, host, path with query, run id, attempt,\n last success (empty if none), sha256 hex of the raw body. host is <slug>.internal for visits to the app.\n Signature = HMAC-SHA256 with DAILEY_SCHEDULES_SECRET, hex. Accept if any v1= entry matches (constant-time compare),\n the timestamp is within 300 seconds, and the run id was not seen before (keep ids at least 600 seconds,\n store one only after the work commits). After a good check, add the response header Dailey-Schedules-Verified: v1\n so the dashboard can show the check is working once Dailey Schedules reports it.\n- Visits arrive with Host set to the project slug. Apps with a host allow-list (Rails config.hosts, Django\n ALLOWED_HOSTS, Vite server.allowedHosts) must allow the slug.\n- A new outside host waits for the owner's confirmation (dailey_schedules_host_confirm), which shows that host's\n signing secret once. Credentials for outside hosts are saved with dailey_schedules_credential_add, never in code.\n- dailey_schedules_test_endpoint sends one request with a wrong signature to check the app refuses it. Ask first.";
59
+ //# sourceMappingURL=schedules-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedules-format.d.ts","sourceRoot":"","sources":["../../src/tools/schedules-format.ts"],"names":[],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AgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIrD;AAID,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,MAAM,GAAG,IAAI,CAI1E;AAED,eAAO,MAAM,eAAe,wsEAuBsF,CAAC"}
@@ -0,0 +1,150 @@
1
+ // src/tools/schedules-format.ts
2
+ // Dailey Schedules: pure formatting and input checks shared by every dailey_schedules_* tool.
3
+ // No network, no imports from api.ts, so it is unit tested directly.
4
+ // Copy rules: product name "Dailey Schedules", plain words, no em dashes.
5
+ export const NOT_AVAILABLE = 'Dailey Schedules is not available on your account yet.';
6
+ export const TURN_ON_FIRST = 'Dailey Schedules is off for this project. Turn it on first with dailey_schedules_enable.';
7
+ const NOT_FOUND = 'We could not find that project or schedule in this account. Check the id with dailey_schedules_list.';
8
+ const NOT_FOUND_HOST = 'We could not find that address for this project. Check it with dailey_schedules_list.';
9
+ const NOT_FOUND_ITEM = 'We could not find that one-time visit.';
10
+ const NOT_FOUND_RUN = 'We could not find that run.';
11
+ const NOT_FOUND_CREDENTIAL = 'We could not find that credential.';
12
+ const HOST_HELP = 'Give just the host name, like api.example.com.';
13
+ export function schedulesToolsEnabled(env = process.env) {
14
+ return env.DAILEY_SCHEDULES_TOOLS === '1';
15
+ }
16
+ function serverMessage(data) {
17
+ if (data && typeof data === 'object' && typeof data.error === 'string')
18
+ return data.error;
19
+ return '';
20
+ }
21
+ export function schedulesErrorText(res, subject = 'schedule') {
22
+ const d = res.data;
23
+ if (res.status === 404 && d && typeof d === 'object' && d.code === 'route_not_found')
24
+ return NOT_AVAILABLE;
25
+ if (res.status === 401)
26
+ return 'You are not signed in to Dailey Cloud here. Run `dailey login`, then `dailey mcp setup`, and reconnect.';
27
+ if (res.status === 403) {
28
+ const code = serverMessage(d);
29
+ if (code === 'no_manager_grant' || code === 'manager_insufficient_role')
30
+ return "You do not have access to manage that account's projects.";
31
+ return 'Dailey Schedules could not do that (no access).';
32
+ }
33
+ if (res.status === 404)
34
+ return subject === 'host' ? NOT_FOUND_HOST : subject === 'item' ? NOT_FOUND_ITEM : subject === 'run' ? NOT_FOUND_RUN : subject === 'credential' ? NOT_FOUND_CREDENTIAL : NOT_FOUND;
35
+ if (res.status === 409)
36
+ return TURN_ON_FIRST;
37
+ if (res.status >= 502 && res.status <= 504)
38
+ return 'Dailey Cloud did not answer. Try again in a minute.';
39
+ const msg = serverMessage(d);
40
+ if (res.status === 400 || res.status === 429)
41
+ return msg || 'Dailey Schedules could not do that.';
42
+ return msg || `Dailey Schedules could not do that (HTTP ${res.status}).`;
43
+ }
44
+ const PAUSED = {
45
+ paused_by_user: 'Paused',
46
+ plan_limit: 'Paused: your plan does not cover this schedule right now',
47
+ failing: 'Paused after 10 failures in a row',
48
+ disabled: 'Off because Dailey Schedules is turned off for this project',
49
+ };
50
+ export function describeSchedule(s) {
51
+ const every = s.every_text ? s.every_text.replace(/^\s*every\s+/i, '') : '';
52
+ const when = every ? `every ${every}` : `cron ${s.cron}`;
53
+ const tz = s.timezone ? ` (${s.timezone})` : '';
54
+ const target = s.display_url ? s.display_url : (s.path || '');
55
+ const flags = [];
56
+ if (s.source === 'repo')
57
+ flags.push('From your code (dailey.yaml)');
58
+ if (s.source === 'app')
59
+ flags.push('Created by your app');
60
+ if (Number(s.pending_confirmation) === 1)
61
+ flags.push('Waiting for you to confirm this address');
62
+ if (Number(s.enabled) !== 1 && s.paused_reason)
63
+ flags.push(PAUSED[s.paused_reason] || 'Paused');
64
+ if (s.credential)
65
+ flags.push(`credential ${s.credential}`);
66
+ const action = s.kind && s.kind !== 'visit' ? s.kind : (s.method || 'GET') + ' ' + target;
67
+ const next = Number(s.enabled) === 1 && s.next_run_at ? ` next ${s.next_run_at}` : '';
68
+ const last = s.last_status ? ` last ${s.last_status}` : '';
69
+ return `${s.name} ${when}${tz} ${action}${next}${last} id ${s.id}${flags.length ? `\n ${flags.join(' · ')}` : ''}`;
70
+ }
71
+ export function describeRun(r) {
72
+ const trig = r.run_trigger === 'manual' ? ' (run now)' : r.run_trigger === 'item' ? ' (one-time)' : '';
73
+ const http = r.http_status ? ` HTTP ${r.http_status}` : '';
74
+ const dur = r.duration_ms != null ? ` ${r.duration_ms} ms` : '';
75
+ const why = r.reason_message ? ` ${r.reason_message}` : '';
76
+ return `${r.scheduled_for} ${r.status}${trig}${http}${dur} attempt ${r.attempt}${why} run ${r.id}`;
77
+ }
78
+ export function nextRunsText(nextRuns, timezone) {
79
+ if (!nextRuns?.length)
80
+ return 'No upcoming runs.';
81
+ return [`Next runs${timezone ? ` (${timezone})` : ''}:`, ...nextRuns.map(d => ` ${d}`)].join('\n');
82
+ }
83
+ export function signingSecretBlock(host, secret, where) {
84
+ if (!secret)
85
+ throw new Error('signingSecretBlock needs a secret (confirm returns null when the address was already confirmed)');
86
+ const lines = [
87
+ `Signing secret for ${host} (shown once):`,
88
+ '',
89
+ ` ${secret}`,
90
+ '',
91
+ 'Save it now. Dailey Schedules will not show it again.',
92
+ `Give it to the service at ${host} so it can check that calls really come from Dailey Schedules.`,
93
+ 'Lost it? Rotate it and save the new one.',
94
+ ];
95
+ if (where === 'mcp')
96
+ lines.push('This secret is now in this conversation. If that is not OK for you, rotate it from the Schedules tab in the dashboard and copy it there.');
97
+ return lines.join('\n');
98
+ }
99
+ export function isSafeId(id) {
100
+ return /^[0-9a-f-]{8,}$/i.test(String(id || '')) && !/^\.+$/.test(String(id));
101
+ }
102
+ const DEDUPE_HELP = 'The dedupe key can use letters, numbers and . _ : - (up to 120), and cannot look like an id.';
103
+ const NAME_HELP = 'Use a name with lowercase letters, numbers and dashes.';
104
+ // Item key sent in a URL path: same rule as the server; dot-only keys would be dot-segments.
105
+ export function checkDedupeKey(key) {
106
+ const k = String(key ?? '');
107
+ if (!/^[A-Za-z0-9._:-]{1,120}$/.test(k) || /^\.+$/.test(k) || /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(k))
108
+ return DEDUPE_HELP;
109
+ return null;
110
+ }
111
+ // Credential name: same rule as the server (NAME_RE), so it is also a safe path segment.
112
+ export function checkName(name) {
113
+ const n = String(name ?? '');
114
+ if (!/^[a-z0-9][a-z0-9-]{0,79}$/.test(n))
115
+ return NAME_HELP;
116
+ return null;
117
+ }
118
+ // Callers must encodeURIComponent the host before putting it in a path.
119
+ // Lenient for confirm and rotate (server normalises case, port and trailing dot); strict for credentials add (server refuses ':').
120
+ export function checkHostInput(host, strict = false) {
121
+ const h = String(host || '').trim();
122
+ if (!h || /^\.+$/.test(h) || (strict ? /[/:@?#\s]/ : /[/@?#\s]/).test(h))
123
+ return HOST_HELP;
124
+ return null;
125
+ }
126
+ export const SCHEDULES_GUIDE = `
127
+
128
+ ### Dailey Schedules (work on a timer)
129
+ - Runs work on a schedule ("every weekday at 9am", or cron) or once at a set time, by visiting a path in the app
130
+ or an outside https address. Turn on per project with dailey_schedules_enable (dailey_schedules_disable turns it
131
+ off); the app gets DAILEY_SCHEDULES_SECRET, DAILEY_SCHEDULES_API_URL and DAILEY_SCHEDULES_KEY and restarts.
132
+ - Tools: dailey_schedules_enable, _disable, _list, _preview, _create, _update, _delete, _pause, _resume, _run_now,
133
+ _history, _item_add, _item_cancel, _credential_add, _credential_remove, _host_confirm, _host_rotate_secret,
134
+ _rotate_secret, _rotate_key, _test_endpoint.
135
+ - Plans: Free 3 schedules, at most hourly, 7 days history. Studio 25, every minute, 30 days. Managed 50, 90 days.
136
+ - Every visit to the app is signed. The app MUST check it and answer 401 when it fails:
137
+ headers Dailey-Schedules-Timestamp, Dailey-Schedules-Run-Id, Dailey-Schedules-Attempt, Dailey-Schedules-Signature
138
+ (v1=<hex>, comma separated during a rotation), Dailey-Schedules-Last-Success (may be absent).
139
+ Signed text = these lines joined with a newline: timestamp, METHOD, host, path with query, run id, attempt,
140
+ last success (empty if none), sha256 hex of the raw body. host is <slug>.internal for visits to the app.
141
+ Signature = HMAC-SHA256 with DAILEY_SCHEDULES_SECRET, hex. Accept if any v1= entry matches (constant-time compare),
142
+ the timestamp is within 300 seconds, and the run id was not seen before (keep ids at least 600 seconds,
143
+ store one only after the work commits). After a good check, add the response header Dailey-Schedules-Verified: v1
144
+ so the dashboard can show the check is working once Dailey Schedules reports it.
145
+ - Visits arrive with Host set to the project slug. Apps with a host allow-list (Rails config.hosts, Django
146
+ ALLOWED_HOSTS, Vite server.allowedHosts) must allow the slug.
147
+ - A new outside host waits for the owner's confirmation (dailey_schedules_host_confirm), which shows that host's
148
+ signing secret once. Credentials for outside hosts are saved with dailey_schedules_credential_add, never in code.
149
+ - dailey_schedules_test_endpoint sends one request with a wrong signature to check the app refuses it. Ask first.`;
150
+ //# sourceMappingURL=schedules-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedules-format.js","sourceRoot":"","sources":["../../src/tools/schedules-format.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,8FAA8F;AAC9F,qEAAqE;AACrE,0EAA0E;AAE1E,MAAM,CAAC,MAAM,aAAa,GAAG,wDAAwD,CAAC;AACtF,MAAM,CAAC,MAAM,aAAa,GAAG,0FAA0F,CAAC;AACxH,MAAM,SAAS,GAAG,sGAAsG,CAAC;AACzH,MAAM,cAAc,GAAG,uFAAuF,CAAC;AAC/G,MAAM,cAAc,GAAG,wCAAwC,CAAC;AAChE,MAAM,aAAa,GAAG,6BAA6B,CAAC;AACpD,MAAM,oBAAoB,GAAG,oCAAoC,CAAC;AAClE,MAAM,SAAS,GAAG,gDAAgD,CAAC;AAiBnE,MAAM,UAAU,qBAAqB,CAAC,MAA0C,OAAO,CAAC,GAAG;IACzF,OAAO,GAAG,CAAC,sBAAsB,KAAK,GAAG,CAAC;AAC5C,CAAC;AAED,SAAS,aAAa,CAAC,IAAa;IAClC,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAQ,IAAY,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAQ,IAAY,CAAC,KAAK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AAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3F,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;kHAuBmF,CAAC"}
@@ -0,0 +1,95 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
+ export declare const visitSchema: z.ZodObject<{
4
+ path: z.ZodOptional<z.ZodString>;
5
+ url: z.ZodOptional<z.ZodString>;
6
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>>;
7
+ body: z.ZodOptional<z.ZodString>;
8
+ credential: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ method?: "POST" | "PUT" | "PATCH" | "GET" | "DELETE" | undefined;
11
+ url?: string | undefined;
12
+ path?: string | undefined;
13
+ credential?: string | undefined;
14
+ body?: string | undefined;
15
+ }, {
16
+ method?: "POST" | "PUT" | "PATCH" | "GET" | "DELETE" | undefined;
17
+ url?: string | undefined;
18
+ path?: string | undefined;
19
+ credential?: string | undefined;
20
+ body?: string | undefined;
21
+ }>;
22
+ export declare const runSchema: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
23
+ command: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
24
+ timeout_minutes: z.ZodOptional<z.ZodNumber>;
25
+ }, "strict", z.ZodTypeAny, {
26
+ command: string | string[];
27
+ timeout_minutes?: number | undefined;
28
+ }, {
29
+ command: string | string[];
30
+ timeout_minutes?: number | undefined;
31
+ }>]>;
32
+ export declare const emailSchema: z.ZodUnion<[z.ZodObject<{
33
+ from_app: z.ZodString;
34
+ from_name: z.ZodOptional<z.ZodString>;
35
+ }, "strict", z.ZodTypeAny, {
36
+ from_app: string;
37
+ from_name?: string | undefined;
38
+ }, {
39
+ from_app: string;
40
+ from_name?: string | undefined;
41
+ }>, z.ZodObject<{
42
+ to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
43
+ subject: z.ZodString;
44
+ text: z.ZodOptional<z.ZodString>;
45
+ html: z.ZodOptional<z.ZodString>;
46
+ from_name: z.ZodOptional<z.ZodString>;
47
+ vars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
48
+ }, "strict", z.ZodTypeAny, {
49
+ to: string | string[];
50
+ subject: string;
51
+ text?: string | undefined;
52
+ from_name?: string | undefined;
53
+ html?: string | undefined;
54
+ vars?: Record<string, string> | undefined;
55
+ }, {
56
+ to: string | string[];
57
+ subject: string;
58
+ text?: string | undefined;
59
+ from_name?: string | undefined;
60
+ html?: string | undefined;
61
+ vars?: Record<string, string> | undefined;
62
+ }>]>;
63
+ export declare const taskSchema: z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
64
+ name: z.ZodLiteral<"backup-check">;
65
+ max_age_hours: z.ZodOptional<z.ZodNumber>;
66
+ }, "strict", z.ZodTypeAny, {
67
+ name: "backup-check";
68
+ max_age_hours?: number | undefined;
69
+ }, {
70
+ name: "backup-check";
71
+ max_age_hours?: number | undefined;
72
+ }>, z.ZodObject<{
73
+ name: z.ZodLiteral<"storage-cleanup">;
74
+ prefix: z.ZodString;
75
+ older_than_days: z.ZodNumber;
76
+ }, "strict", z.ZodTypeAny, {
77
+ name: "storage-cleanup";
78
+ prefix: string;
79
+ older_than_days: number;
80
+ }, {
81
+ name: "storage-cleanup";
82
+ prefix: string;
83
+ older_than_days: number;
84
+ }>, z.ZodObject<{
85
+ name: z.ZodLiteral<"verify-reminder">;
86
+ after_days: z.ZodOptional<z.ZodNumber>;
87
+ }, "strict", z.ZodTypeAny, {
88
+ name: "verify-reminder";
89
+ after_days?: number | undefined;
90
+ }, {
91
+ name: "verify-reminder";
92
+ after_days?: number | undefined;
93
+ }>]>;
94
+ export declare function registerSchedulesTools(server: McpServer): void;
95
+ //# sourceMappingURL=schedules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../src/tools/schedules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AAGH,eAAO,MAAM,SAAS;;;;;;;;;IAET,CAAC;AACd,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKtB,CAAC;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIrB,CAAC;AAkCH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QAkWvD"}