@tday-com/mcp 0.2.0 → 0.3.1

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 (42) hide show
  1. package/README.md +25 -6
  2. package/dist/api-client.js +1 -18
  3. package/dist/cli.js +0 -3
  4. package/dist/config.js +0 -4
  5. package/dist/download-safety.js +2 -5
  6. package/dist/installer-agents.js +132 -216
  7. package/dist/installer-callback.js +0 -7
  8. package/dist/installer-slash-command.js +94 -35
  9. package/dist/installer.js +34 -11
  10. package/dist/package-info.js +14 -8
  11. package/dist/prompts.js +36 -0
  12. package/dist/result-format.js +7 -31
  13. package/dist/server.js +12 -6
  14. package/dist/tool-schemas.js +1 -15
  15. package/dist/tools-account.js +0 -4
  16. package/dist/tools-features.js +39 -0
  17. package/dist/tools-launch.js +43 -50
  18. package/dist/tools.js +5 -26
  19. package/package.json +5 -15
  20. package/dist/api-client.d.ts +0 -23
  21. package/dist/cli.d.ts +0 -2
  22. package/dist/config.d.ts +0 -7
  23. package/dist/demo-import.d.ts +0 -6
  24. package/dist/demo-import.js +0 -101
  25. package/dist/download-safety.d.ts +0 -7
  26. package/dist/installer-agents.d.ts +0 -17
  27. package/dist/installer-callback.d.ts +0 -13
  28. package/dist/installer-slash-command.d.ts +0 -12
  29. package/dist/installer.d.ts +0 -2
  30. package/dist/observability.d.ts +0 -1
  31. package/dist/observability.js +0 -77
  32. package/dist/package-info.d.ts +0 -11
  33. package/dist/result-format.d.ts +0 -4
  34. package/dist/server.d.ts +0 -1
  35. package/dist/tool-schemas.d.ts +0 -460
  36. package/dist/tools-account.d.ts +0 -6
  37. package/dist/tools-demo.d.ts +0 -11
  38. package/dist/tools-demo.js +0 -57
  39. package/dist/tools-knowledge.d.ts +0 -4
  40. package/dist/tools-knowledge.js +0 -111
  41. package/dist/tools-launch.d.ts +0 -4
  42. package/dist/tools.d.ts +0 -15
@@ -1,460 +0,0 @@
1
- import { z } from "zod";
2
- import type { TdayConfig } from "./config.js";
3
- export type ResponseFormat = "json" | "markdown";
4
- export type ToolAnnotations = {
5
- title?: string;
6
- readOnlyHint?: boolean;
7
- destructiveHint?: boolean;
8
- idempotentHint?: boolean;
9
- openWorldHint?: boolean;
10
- };
11
- export interface Tool {
12
- name: string;
13
- title: string;
14
- description: string;
15
- inputSchema: z.AnyZodObject;
16
- outputSchema: z.AnyZodObject;
17
- annotations: ToolAnnotations;
18
- handler: (args: Record<string, unknown>, config: TdayConfig) => Promise<unknown>;
19
- }
20
- export declare const SAFE_ID: RegExp;
21
- export declare const safeIdSchema: z.ZodString;
22
- export declare function argsObject<T extends z.ZodRawShape>(shape: T): z.ZodObject<T & {
23
- response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
24
- }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T & {
25
- response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
26
- }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<T & {
27
- response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
28
- }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
29
- export declare const emptyArgsSchema: z.ZodObject<{
30
- response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
31
- }, "strict", z.ZodTypeAny, {
32
- response_format: "json" | "markdown";
33
- }, {
34
- response_format?: "json" | "markdown" | undefined;
35
- }>;
36
- export declare const listArgsSchema: z.ZodObject<{
37
- limit: z.ZodDefault<z.ZodNumber>;
38
- offset: z.ZodDefault<z.ZodNumber>;
39
- } & {
40
- response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
41
- }, "strict", z.ZodTypeAny, {
42
- response_format: "json" | "markdown";
43
- limit: number;
44
- offset: number;
45
- }, {
46
- response_format?: "json" | "markdown" | undefined;
47
- limit?: number | undefined;
48
- offset?: number | undefined;
49
- }>;
50
- export declare function safePath(template: string, params: Record<string, unknown>): string;
51
- export declare function stripPresentationArgs(args: Record<string, unknown>): Record<string, unknown>;
52
- export declare function responseFormatFromArgs(args: Record<string, unknown>): ResponseFormat;
53
- export declare const outputSchemas: {
54
- whoami: z.ZodObject<{
55
- account: z.ZodOptional<z.ZodUnknown>;
56
- staffExempt: z.ZodOptional<z.ZodBoolean>;
57
- organizations: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
58
- defaultOrganizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
- features: z.ZodOptional<z.ZodUnknown>;
60
- links: z.ZodOptional<z.ZodUnknown>;
61
- notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
62
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
63
- account: z.ZodOptional<z.ZodUnknown>;
64
- staffExempt: z.ZodOptional<z.ZodBoolean>;
65
- organizations: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
66
- defaultOrganizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
- features: z.ZodOptional<z.ZodUnknown>;
68
- links: z.ZodOptional<z.ZodUnknown>;
69
- notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
70
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
71
- account: z.ZodOptional<z.ZodUnknown>;
72
- staffExempt: z.ZodOptional<z.ZodBoolean>;
73
- organizations: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
74
- defaultOrganizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
- features: z.ZodOptional<z.ZodUnknown>;
76
- links: z.ZodOptional<z.ZodUnknown>;
77
- notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
78
- }, z.ZodTypeAny, "passthrough">>;
79
- creditPrices: z.ZodObject<{
80
- priceVersion: z.ZodOptional<z.ZodNumber>;
81
- actions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
82
- launchVideos: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
83
- launchVideoRevisions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
84
- monthlyCredits: z.ZodOptional<z.ZodUnknown>;
85
- notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
87
- priceVersion: z.ZodOptional<z.ZodNumber>;
88
- actions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
89
- launchVideos: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
90
- launchVideoRevisions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
91
- monthlyCredits: z.ZodOptional<z.ZodUnknown>;
92
- notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
94
- priceVersion: z.ZodOptional<z.ZodNumber>;
95
- actions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
96
- launchVideos: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
97
- launchVideoRevisions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
98
- monthlyCredits: z.ZodOptional<z.ZodUnknown>;
99
- notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
100
- }, z.ZodTypeAny, "passthrough">>;
101
- usage: z.ZodObject<{
102
- organization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
103
- balance: z.ZodOptional<z.ZodUnknown>;
104
- usage: z.ZodOptional<z.ZodUnknown>;
105
- links: z.ZodOptional<z.ZodUnknown>;
106
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
107
- organization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
108
- balance: z.ZodOptional<z.ZodUnknown>;
109
- usage: z.ZodOptional<z.ZodUnknown>;
110
- links: z.ZodOptional<z.ZodUnknown>;
111
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
112
- organization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
113
- balance: z.ZodOptional<z.ZodUnknown>;
114
- usage: z.ZodOptional<z.ZodUnknown>;
115
- links: z.ZodOptional<z.ZodUnknown>;
116
- }, z.ZodTypeAny, "passthrough">>;
117
- listBrands: z.ZodObject<{
118
- brands: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
119
- pagination: z.ZodOptional<z.ZodObject<{
120
- total_count: z.ZodOptional<z.ZodNumber>;
121
- total: z.ZodOptional<z.ZodNumber>;
122
- count: z.ZodNumber;
123
- offset: z.ZodNumber;
124
- limit: z.ZodNumber;
125
- has_more: z.ZodOptional<z.ZodBoolean>;
126
- hasMore: z.ZodOptional<z.ZodBoolean>;
127
- next_offset: z.ZodOptional<z.ZodNumber>;
128
- nextOffset: z.ZodOptional<z.ZodNumber>;
129
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
130
- total_count: z.ZodOptional<z.ZodNumber>;
131
- total: z.ZodOptional<z.ZodNumber>;
132
- count: z.ZodNumber;
133
- offset: z.ZodNumber;
134
- limit: z.ZodNumber;
135
- has_more: z.ZodOptional<z.ZodBoolean>;
136
- hasMore: z.ZodOptional<z.ZodBoolean>;
137
- next_offset: z.ZodOptional<z.ZodNumber>;
138
- nextOffset: z.ZodOptional<z.ZodNumber>;
139
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
140
- total_count: z.ZodOptional<z.ZodNumber>;
141
- total: z.ZodOptional<z.ZodNumber>;
142
- count: z.ZodNumber;
143
- offset: z.ZodNumber;
144
- limit: z.ZodNumber;
145
- has_more: z.ZodOptional<z.ZodBoolean>;
146
- hasMore: z.ZodOptional<z.ZodBoolean>;
147
- next_offset: z.ZodOptional<z.ZodNumber>;
148
- nextOffset: z.ZodOptional<z.ZodNumber>;
149
- }, z.ZodTypeAny, "passthrough">>>;
150
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
151
- brands: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
152
- pagination: z.ZodOptional<z.ZodObject<{
153
- total_count: z.ZodOptional<z.ZodNumber>;
154
- total: z.ZodOptional<z.ZodNumber>;
155
- count: z.ZodNumber;
156
- offset: z.ZodNumber;
157
- limit: z.ZodNumber;
158
- has_more: z.ZodOptional<z.ZodBoolean>;
159
- hasMore: z.ZodOptional<z.ZodBoolean>;
160
- next_offset: z.ZodOptional<z.ZodNumber>;
161
- nextOffset: z.ZodOptional<z.ZodNumber>;
162
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
163
- total_count: z.ZodOptional<z.ZodNumber>;
164
- total: z.ZodOptional<z.ZodNumber>;
165
- count: z.ZodNumber;
166
- offset: z.ZodNumber;
167
- limit: z.ZodNumber;
168
- has_more: z.ZodOptional<z.ZodBoolean>;
169
- hasMore: z.ZodOptional<z.ZodBoolean>;
170
- next_offset: z.ZodOptional<z.ZodNumber>;
171
- nextOffset: z.ZodOptional<z.ZodNumber>;
172
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
173
- total_count: z.ZodOptional<z.ZodNumber>;
174
- total: z.ZodOptional<z.ZodNumber>;
175
- count: z.ZodNumber;
176
- offset: z.ZodNumber;
177
- limit: z.ZodNumber;
178
- has_more: z.ZodOptional<z.ZodBoolean>;
179
- hasMore: z.ZodOptional<z.ZodBoolean>;
180
- next_offset: z.ZodOptional<z.ZodNumber>;
181
- nextOffset: z.ZodOptional<z.ZodNumber>;
182
- }, z.ZodTypeAny, "passthrough">>>;
183
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
184
- brands: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
185
- pagination: z.ZodOptional<z.ZodObject<{
186
- total_count: z.ZodOptional<z.ZodNumber>;
187
- total: z.ZodOptional<z.ZodNumber>;
188
- count: z.ZodNumber;
189
- offset: z.ZodNumber;
190
- limit: z.ZodNumber;
191
- has_more: z.ZodOptional<z.ZodBoolean>;
192
- hasMore: z.ZodOptional<z.ZodBoolean>;
193
- next_offset: z.ZodOptional<z.ZodNumber>;
194
- nextOffset: z.ZodOptional<z.ZodNumber>;
195
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
196
- total_count: z.ZodOptional<z.ZodNumber>;
197
- total: z.ZodOptional<z.ZodNumber>;
198
- count: z.ZodNumber;
199
- offset: z.ZodNumber;
200
- limit: z.ZodNumber;
201
- has_more: z.ZodOptional<z.ZodBoolean>;
202
- hasMore: z.ZodOptional<z.ZodBoolean>;
203
- next_offset: z.ZodOptional<z.ZodNumber>;
204
- nextOffset: z.ZodOptional<z.ZodNumber>;
205
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
206
- total_count: z.ZodOptional<z.ZodNumber>;
207
- total: z.ZodOptional<z.ZodNumber>;
208
- count: z.ZodNumber;
209
- offset: z.ZodNumber;
210
- limit: z.ZodNumber;
211
- has_more: z.ZodOptional<z.ZodBoolean>;
212
- hasMore: z.ZodOptional<z.ZodBoolean>;
213
- next_offset: z.ZodOptional<z.ZodNumber>;
214
- nextOffset: z.ZodOptional<z.ZodNumber>;
215
- }, z.ZodTypeAny, "passthrough">>>;
216
- }, z.ZodTypeAny, "passthrough">>;
217
- getBrand: z.ZodObject<{
218
- brand: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
219
- role: z.ZodOptional<z.ZodString>;
220
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
221
- brand: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
222
- role: z.ZodOptional<z.ZodString>;
223
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
224
- brand: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
225
- role: z.ZodOptional<z.ZodString>;
226
- }, z.ZodTypeAny, "passthrough">>;
227
- listDesigns: z.ZodObject<{
228
- designs: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
229
- archivedCount: z.ZodOptional<z.ZodNumber>;
230
- pagination: z.ZodOptional<z.ZodObject<{
231
- total_count: z.ZodOptional<z.ZodNumber>;
232
- total: z.ZodOptional<z.ZodNumber>;
233
- count: z.ZodNumber;
234
- offset: z.ZodNumber;
235
- limit: z.ZodNumber;
236
- has_more: z.ZodOptional<z.ZodBoolean>;
237
- hasMore: z.ZodOptional<z.ZodBoolean>;
238
- next_offset: z.ZodOptional<z.ZodNumber>;
239
- nextOffset: z.ZodOptional<z.ZodNumber>;
240
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
241
- total_count: z.ZodOptional<z.ZodNumber>;
242
- total: z.ZodOptional<z.ZodNumber>;
243
- count: z.ZodNumber;
244
- offset: z.ZodNumber;
245
- limit: z.ZodNumber;
246
- has_more: z.ZodOptional<z.ZodBoolean>;
247
- hasMore: z.ZodOptional<z.ZodBoolean>;
248
- next_offset: z.ZodOptional<z.ZodNumber>;
249
- nextOffset: z.ZodOptional<z.ZodNumber>;
250
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
251
- total_count: z.ZodOptional<z.ZodNumber>;
252
- total: z.ZodOptional<z.ZodNumber>;
253
- count: z.ZodNumber;
254
- offset: z.ZodNumber;
255
- limit: z.ZodNumber;
256
- has_more: z.ZodOptional<z.ZodBoolean>;
257
- hasMore: z.ZodOptional<z.ZodBoolean>;
258
- next_offset: z.ZodOptional<z.ZodNumber>;
259
- nextOffset: z.ZodOptional<z.ZodNumber>;
260
- }, z.ZodTypeAny, "passthrough">>>;
261
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
262
- designs: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
263
- archivedCount: z.ZodOptional<z.ZodNumber>;
264
- pagination: z.ZodOptional<z.ZodObject<{
265
- total_count: z.ZodOptional<z.ZodNumber>;
266
- total: z.ZodOptional<z.ZodNumber>;
267
- count: z.ZodNumber;
268
- offset: z.ZodNumber;
269
- limit: z.ZodNumber;
270
- has_more: z.ZodOptional<z.ZodBoolean>;
271
- hasMore: z.ZodOptional<z.ZodBoolean>;
272
- next_offset: z.ZodOptional<z.ZodNumber>;
273
- nextOffset: z.ZodOptional<z.ZodNumber>;
274
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
275
- total_count: z.ZodOptional<z.ZodNumber>;
276
- total: z.ZodOptional<z.ZodNumber>;
277
- count: z.ZodNumber;
278
- offset: z.ZodNumber;
279
- limit: z.ZodNumber;
280
- has_more: z.ZodOptional<z.ZodBoolean>;
281
- hasMore: z.ZodOptional<z.ZodBoolean>;
282
- next_offset: z.ZodOptional<z.ZodNumber>;
283
- nextOffset: z.ZodOptional<z.ZodNumber>;
284
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
285
- total_count: z.ZodOptional<z.ZodNumber>;
286
- total: z.ZodOptional<z.ZodNumber>;
287
- count: z.ZodNumber;
288
- offset: z.ZodNumber;
289
- limit: z.ZodNumber;
290
- has_more: z.ZodOptional<z.ZodBoolean>;
291
- hasMore: z.ZodOptional<z.ZodBoolean>;
292
- next_offset: z.ZodOptional<z.ZodNumber>;
293
- nextOffset: z.ZodOptional<z.ZodNumber>;
294
- }, z.ZodTypeAny, "passthrough">>>;
295
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
296
- designs: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
297
- archivedCount: z.ZodOptional<z.ZodNumber>;
298
- pagination: z.ZodOptional<z.ZodObject<{
299
- total_count: z.ZodOptional<z.ZodNumber>;
300
- total: z.ZodOptional<z.ZodNumber>;
301
- count: z.ZodNumber;
302
- offset: z.ZodNumber;
303
- limit: z.ZodNumber;
304
- has_more: z.ZodOptional<z.ZodBoolean>;
305
- hasMore: z.ZodOptional<z.ZodBoolean>;
306
- next_offset: z.ZodOptional<z.ZodNumber>;
307
- nextOffset: z.ZodOptional<z.ZodNumber>;
308
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
309
- total_count: z.ZodOptional<z.ZodNumber>;
310
- total: z.ZodOptional<z.ZodNumber>;
311
- count: z.ZodNumber;
312
- offset: z.ZodNumber;
313
- limit: z.ZodNumber;
314
- has_more: z.ZodOptional<z.ZodBoolean>;
315
- hasMore: z.ZodOptional<z.ZodBoolean>;
316
- next_offset: z.ZodOptional<z.ZodNumber>;
317
- nextOffset: z.ZodOptional<z.ZodNumber>;
318
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
319
- total_count: z.ZodOptional<z.ZodNumber>;
320
- total: z.ZodOptional<z.ZodNumber>;
321
- count: z.ZodNumber;
322
- offset: z.ZodNumber;
323
- limit: z.ZodNumber;
324
- has_more: z.ZodOptional<z.ZodBoolean>;
325
- hasMore: z.ZodOptional<z.ZodBoolean>;
326
- next_offset: z.ZodOptional<z.ZodNumber>;
327
- nextOffset: z.ZodOptional<z.ZodNumber>;
328
- }, z.ZodTypeAny, "passthrough">>>;
329
- }, z.ZodTypeAny, "passthrough">>;
330
- getDesign: z.ZodObject<{
331
- design: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
332
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
333
- design: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
334
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
335
- design: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
336
- }, z.ZodTypeAny, "passthrough">>;
337
- createBrand: z.ZodObject<{
338
- brand: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
339
- reviewStatus: z.ZodOptional<z.ZodString>;
340
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
341
- brand: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
342
- reviewStatus: z.ZodOptional<z.ZodString>;
343
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
344
- brand: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
345
- reviewStatus: z.ZodOptional<z.ZodString>;
346
- }, z.ZodTypeAny, "passthrough">>;
347
- generate: z.ZodObject<{
348
- designId: z.ZodString;
349
- generationId: z.ZodString;
350
- status: z.ZodString;
351
- editorUrl: z.ZodString;
352
- statusUrl: z.ZodString;
353
- format: z.ZodOptional<z.ZodString>;
354
- formatNote: z.ZodOptional<z.ZodString>;
355
- credits: z.ZodOptional<z.ZodUnknown>;
356
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
357
- designId: z.ZodString;
358
- generationId: z.ZodString;
359
- status: z.ZodString;
360
- editorUrl: z.ZodString;
361
- statusUrl: z.ZodString;
362
- format: z.ZodOptional<z.ZodString>;
363
- formatNote: z.ZodOptional<z.ZodString>;
364
- credits: z.ZodOptional<z.ZodUnknown>;
365
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
366
- designId: z.ZodString;
367
- generationId: z.ZodString;
368
- status: z.ZodString;
369
- editorUrl: z.ZodString;
370
- statusUrl: z.ZodString;
371
- format: z.ZodOptional<z.ZodString>;
372
- formatNote: z.ZodOptional<z.ZodString>;
373
- credits: z.ZodOptional<z.ZodUnknown>;
374
- }, z.ZodTypeAny, "passthrough">>;
375
- poll: z.ZodObject<{
376
- designId: z.ZodString;
377
- generationId: z.ZodString;
378
- status: z.ZodString;
379
- editorUrl: z.ZodString;
380
- imageUrl: z.ZodOptional<z.ZodString>;
381
- completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
- platformBadge: z.ZodOptional<z.ZodBoolean>;
383
- badgeNote: z.ZodOptional<z.ZodString>;
384
- failureMessage: z.ZodOptional<z.ZodString>;
385
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
386
- designId: z.ZodString;
387
- generationId: z.ZodString;
388
- status: z.ZodString;
389
- editorUrl: z.ZodString;
390
- imageUrl: z.ZodOptional<z.ZodString>;
391
- completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
392
- platformBadge: z.ZodOptional<z.ZodBoolean>;
393
- badgeNote: z.ZodOptional<z.ZodString>;
394
- failureMessage: z.ZodOptional<z.ZodString>;
395
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
396
- designId: z.ZodString;
397
- generationId: z.ZodString;
398
- status: z.ZodString;
399
- editorUrl: z.ZodString;
400
- imageUrl: z.ZodOptional<z.ZodString>;
401
- completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
402
- platformBadge: z.ZodOptional<z.ZodBoolean>;
403
- badgeNote: z.ZodOptional<z.ZodString>;
404
- failureMessage: z.ZodOptional<z.ZodString>;
405
- }, z.ZodTypeAny, "passthrough">>;
406
- download: z.ZodObject<{
407
- saved: z.ZodBoolean;
408
- path: z.ZodString;
409
- size: z.ZodNumber;
410
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
411
- saved: z.ZodBoolean;
412
- path: z.ZodString;
413
- size: z.ZodNumber;
414
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
415
- saved: z.ZodBoolean;
416
- path: z.ZodString;
417
- size: z.ZodNumber;
418
- }, z.ZodTypeAny, "passthrough">>;
419
- searchKnowledgeEntries: z.ZodObject<{
420
- entries: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
421
- count: z.ZodOptional<z.ZodNumber>;
422
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
423
- entries: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
424
- count: z.ZodOptional<z.ZodNumber>;
425
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
426
- entries: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
427
- count: z.ZodOptional<z.ZodNumber>;
428
- }, z.ZodTypeAny, "passthrough">>;
429
- createKnowledgeEntry: z.ZodObject<{
430
- slug: z.ZodString;
431
- created: z.ZodBoolean;
432
- node: z.ZodString;
433
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
434
- slug: z.ZodString;
435
- created: z.ZodBoolean;
436
- node: z.ZodString;
437
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
438
- slug: z.ZodString;
439
- created: z.ZodBoolean;
440
- node: z.ZodString;
441
- }, z.ZodTypeAny, "passthrough">>;
442
- };
443
- export declare const readOnly: {
444
- readOnlyHint: boolean;
445
- destructiveHint: boolean;
446
- idempotentHint: boolean;
447
- openWorldHint: boolean;
448
- };
449
- export declare const writeRemote: {
450
- readOnlyHint: boolean;
451
- destructiveHint: boolean;
452
- idempotentHint: boolean;
453
- openWorldHint: boolean;
454
- };
455
- export declare const writeLocal: {
456
- readOnlyHint: boolean;
457
- destructiveHint: boolean;
458
- idempotentHint: boolean;
459
- openWorldHint: boolean;
460
- };
@@ -1,6 +0,0 @@
1
- import { z } from "zod";
2
- import { type Tool } from "./tool-schemas.js";
3
- export declare const accountTools: Tool[];
4
- /** The preset sizes `tday_generate_design` accepts (web/src/lib/mcp/v1-image-formats.ts). */
5
- export declare const IMAGE_FORMATS: readonly ["square", "ig_post", "story", "fb_post", "linkedin_post", "desktop", "a4_page"];
6
- export declare const imageFormatSchema: z.ZodOptional<z.ZodEnum<["square", "ig_post", "story", "fb_post", "linkedin_post", "desktop", "a4_page"]>>;
@@ -1,11 +0,0 @@
1
- import { type Tool } from "./tool-schemas.js";
2
- import type { TdayConfig } from "./config.js";
3
- export declare const demoTools: Tool[];
4
- /**
5
- * Whether the linked account may import demos (GET /api/studio/demo-import: the admin-only
6
- * mcp_demo_import flag, which needs walkthrough_demos). Decides whether the demo tools are
7
- * listed at all, so a customer's agent is never told they exist. Fails closed: no token, an
8
- * older tday without the route, a slow answer or any error hides them. The import routes
9
- * still recheck on every call.
10
- */
11
- export declare function demoImportAvailable(config: TdayConfig): Promise<boolean>;
@@ -1,57 +0,0 @@
1
- import { z } from "zod";
2
- import { api } from "./api-client.js";
3
- import { argsObject, safeIdSchema, stripPresentationArgs, writeRemote } from "./tool-schemas.js";
4
- import { importDemoBundle } from "./demo-import.js";
5
- const metadata = {
6
- brandId: safeIdSchema,
7
- title: z.string().trim().min(1).max(200),
8
- manifest: z.record(z.unknown()).describe("The portable editable/manifest.json produced by the repository demo recorder, not a filesystem path."),
9
- assets: z.array(z.object({ name: z.string(), contentType: z.enum(["video/mp4", "audio/mpeg", "image/png"]),
10
- sizeBytes: z.number().int().positive().max(104857600), sha256: z.string().regex(/^[a-f0-9]{64}$/),
11
- }).strict()).min(3).max(200),
12
- };
13
- export const demoTools = [
14
- {
15
- name: "tday_import_demo", title: "Import local editable demo",
16
- description: "Import an already-recorded local branch demo into the linked tday account and return its Studio edit link. Reads only allowlisted media beside editable/manifest.json within the working directory. Uploads directly to storage, preserves narration, source footage and timeline, and never overwrites editor changes on retry. Requires the admin-only mcp_demo_import flag and an owned brand. First record the local feature with the repository demo skill and ElevenLabs; this tool does not record or synthesize speech.",
17
- inputSchema: argsObject({ brandId: safeIdSchema, title: z.string().trim().min(1).max(200), manifestPath: z.string().min(1) }),
18
- outputSchema: z.object({ projectId: z.string(), editorUrl: z.string(), reused: z.boolean() }),
19
- annotations: { ...writeRemote, idempotentHint: true },
20
- handler: (args, config) => importDemoBundle(config, String(args.manifestPath), String(args.brandId), String(args.title)),
21
- },
22
- {
23
- name: "tday_prepare_demo_import", title: "Prepare editable demo upload",
24
- description: "Prepare direct uploads for a portable narrated demo bundle. Admin-only feature flag, active admin and owned brand required. Supply manifest JSON and each allowlisted asset's byte length and SHA256. PUT each local file to its returned uploadUrl with the returned headers, without the tday bearer token. Then call tday_complete_demo_import with the same metadata and ticket. A reused result already contains the edit link. Does not read local paths or record a demo.",
25
- inputSchema: argsObject(metadata), outputSchema: z.object({}).passthrough(), annotations: writeRemote,
26
- handler: (args, config) => api(config, "/api/studio/demo-import/prepare", { method: "POST", body: JSON.stringify(stripPresentationArgs(args)) }),
27
- },
28
- {
29
- name: "tday_complete_demo_import", title: "Complete editable demo import",
30
- description: "Verify all uploaded demo assets and create an editable Studio project, returning editorUrl. Pass the exact metadata from prepare and its unexpired ticket. Rechecks the admin-only feature flag and ownership. Retries reuse the project without overwriting human edits. Does not publish to social networks or enqueue a generation.",
31
- inputSchema: argsObject({ ...metadata, ticket: z.string().min(1).max(4096) }),
32
- outputSchema: z.object({ projectId: z.string(), editorUrl: z.string(), reused: z.boolean() }), annotations: { ...writeRemote, idempotentHint: true },
33
- handler: (args, config) => api(config, "/api/studio/demo-import/complete", { method: "POST", body: JSON.stringify(stripPresentationArgs(args)) }),
34
- },
35
- ];
36
- /** Longest the server waits on start for the availability answer before hiding the tools. */
37
- const AVAILABILITY_TIMEOUT_MS = 5_000;
38
- /**
39
- * Whether the linked account may import demos (GET /api/studio/demo-import: the admin-only
40
- * mcp_demo_import flag, which needs walkthrough_demos). Decides whether the demo tools are
41
- * listed at all, so a customer's agent is never told they exist. Fails closed: no token, an
42
- * older tday without the route, a slow answer or any error hides them. The import routes
43
- * still recheck on every call.
44
- */
45
- export async function demoImportAvailable(config) {
46
- if (!config.token)
47
- return false;
48
- try {
49
- const result = await api(config, "/api/studio/demo-import", {
50
- signal: AbortSignal.timeout(AVAILABILITY_TIMEOUT_MS),
51
- });
52
- return result?.available === true;
53
- }
54
- catch {
55
- return false;
56
- }
57
- }
@@ -1,4 +0,0 @@
1
- import { type Tool } from "./tool-schemas.js";
2
- /** The frontmatter vocabulary. Closed, so `type` stays a badge somebody can read. */
3
- export declare const KNOWLEDGE_ENTRY_TYPES: readonly ["invariant", "trap", "history", "decision"];
4
- export declare const knowledgeTools: Tool[];
@@ -1,111 +0,0 @@
1
- import { z } from "zod";
2
- import { api, query } from "./api-client.js";
3
- import { argsObject, outputSchemas, readOnly, stripPresentationArgs, writeRemote, } from "./tool-schemas.js";
4
- // The knowledge-base tools: record a fact the moment it is learned, and check what is
5
- // already recorded before recording a near-duplicate. Split from tools.ts per the
6
- // 500-line ceiling, the same way tool-schemas.ts and api-client.ts were.
7
- //
8
- // Both go through /api/v1/knowledge-entries, the bearer-key endpoint next to
9
- // /api/v1/generate. Note what is NOT in the input schemas: `source`. The server stamps
10
- // every write as "mcp" from the route it arrived on, so a caller cannot label its own
11
- // entry as reviewed-by-something-else — and argsObject is strict, so passing it is a
12
- // validation error rather than a silently ignored field.
13
- /**
14
- * The byte ceiling /api/v1/knowledge-entries enforces before it parses (`MAX_BODY_BYTES`
15
- * in web/src/app/api/v1/knowledge-entries/route.ts). Mirrored, not lowered.
16
- *
17
- * The field limits below are in CHARACTERS and the cap is in BYTES, so the two only agree
18
- * for ASCII: every field at its maximum serialises to 30,274 bytes of ASCII — 46% of the
19
- * cap, so the schema cannot overrun it on its own — but the same shape with a CJK body is
20
- * 70,274, and one full of control characters (escaped to \uXXXX, six bytes each) is 120,011.
21
- * Those pass validation and would come back as a bare 400 about a limit the caller was
22
- * never told, so measure the serialised payload here and name the field to shrink.
23
- */
24
- const MAX_REQUEST_BYTES = 64 * 1024;
25
- /** The frontmatter vocabulary. Closed, so `type` stays a badge somebody can read. */
26
- export const KNOWLEDGE_ENTRY_TYPES = ["invariant", "trap", "history", "decision"];
27
- const entryTypeSchema = z
28
- .enum(KNOWLEDGE_ENTRY_TYPES)
29
- .describe("invariant (a rule that must hold), trap (a way this bites you), history (why it ended up like this), or decision (a choice and its reasoning).");
30
- export const knowledgeTools = [
31
- {
32
- name: "tday_search_knowledge_entries",
33
- title: "Search knowledge entries",
34
- description: "Search the tday codebase knowledge base — reviewed entries and unreviewed drafts together — by free text. Call this BEFORE tday_create_knowledge_entry: if a hit with \"draft\": true already states the fact, reuse that slug to update it instead of adding a near-duplicate. A hit with \"draft\": false is a reviewed, committed entry and is READ-ONLY here — recording its slug fails with 409; correct it in a pull request against its `path`, or record the new fact under a different slug. Bodies are truncated to 1200 characters.",
35
- inputSchema: argsObject({
36
- query: z
37
- .string()
38
- .trim()
39
- .min(1)
40
- .max(500)
41
- .optional()
42
- .describe("Free text, matched against slug, name, description, tracked paths, and body. Omit to list what exists."),
43
- type: entryTypeSchema.optional().describe("Restrict results to one entry type."),
44
- limit: z
45
- .number()
46
- .int()
47
- .min(1)
48
- .max(50)
49
- .default(10)
50
- .describe("Maximum entries to return. Defaults to 10."),
51
- }),
52
- outputSchema: outputSchemas.searchKnowledgeEntries,
53
- annotations: readOnly,
54
- handler: (args, config) => api(config, `/api/v1/knowledge-entries${query({
55
- q: args.query,
56
- type: args.type,
57
- limit: Number(args.limit),
58
- })}`),
59
- },
60
- {
61
- name: "tday_create_knowledge_entry",
62
- title: "Record knowledge entry",
63
- description: "Record something learned about the tday codebase as a draft knowledge entry, visible in the knowledge graph immediately and marked as unreviewed. Use it the moment an investigation produces a durable fact, not at the end of a session. Search first with tday_search_knowledge_entries; recording an existing DRAFT's slug (a hit with \"draft\": true) UPDATES that entry rather than creating a second one. Only drafts can be updated: a reviewed, committed entry (\"draft\": false) is read-only through this tool and its slug is rejected with 409 — retrying it will not succeed, so either edit that file in a pull request or pick a different slug. Requires a tday staff account.",
64
- inputSchema: argsObject({
65
- name: z
66
- .string()
67
- .trim()
68
- .min(1)
69
- .max(120)
70
- .describe("Short title for the fact, for example 'Money is stored in microdollars'."),
71
- description: z
72
- .string()
73
- .trim()
74
- .min(1)
75
- .max(300)
76
- .describe("One line, read when deciding whether this entry is relevant."),
77
- type: entryTypeSchema,
78
- body: z
79
- .string()
80
- .trim()
81
- .min(1)
82
- .max(20_000)
83
- .describe("Markdown. State the fact, why it is that way, and what to do about it. [[other-entry-slug]] links become edges in the graph."),
84
- tracks: z
85
- .array(z.string().trim().min(1).max(300))
86
- .max(32)
87
- .optional()
88
- .describe("Repo-relative paths whose change would make this entry false, for example web/src/lib/pricing/constants.ts. Paths that cannot be normalised are dropped."),
89
- slug: z
90
- .string()
91
- .trim()
92
- .min(2)
93
- .max(80)
94
- .optional()
95
- .describe("Kebab-case key, for example money-in-microdollars. Derived from name when omitted. Reuse an existing draft's slug to correct it."),
96
- }),
97
- outputSchema: outputSchemas.createKnowledgeEntry,
98
- annotations: writeRemote,
99
- handler: (args, config) => {
100
- const payload = JSON.stringify(stripPresentationArgs(args));
101
- const bytes = new TextEncoder().encode(payload).length;
102
- if (bytes > MAX_REQUEST_BYTES) {
103
- const body = typeof args.body === "string" ? args.body : "";
104
- throw new Error(`This entry serialises to ${bytes} bytes and /api/v1/knowledge-entries accepts at most ${MAX_REQUEST_BYTES}. ` +
105
- `The per-field limits count characters, not bytes, so non-ASCII text can pass them and still be too large. ` +
106
- `Shorten body (${body.length} characters) and retry.`);
107
- }
108
- return api(config, "/api/v1/knowledge-entries", { method: "POST", body: payload });
109
- },
110
- },
111
- ];
@@ -1,4 +0,0 @@
1
- import { type Tool } from "./tool-schemas.js";
2
- /** A long (50s) film at 1080p is tens of megabytes; this is a generous ceiling, not a target. */
3
- export declare const MAX_VIDEO_BYTES: number;
4
- export declare const launchTools: Tool[];