prjct-cli 0.11.0 → 0.11.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 (80) hide show
  1. package/package.json +11 -1
  2. package/packages/shared/dist/index.d.ts +615 -0
  3. package/packages/shared/dist/index.js +204 -0
  4. package/packages/shared/package.json +29 -0
  5. package/packages/shared/src/index.ts +9 -0
  6. package/packages/shared/src/schemas.ts +124 -0
  7. package/packages/shared/src/types.ts +187 -0
  8. package/packages/shared/src/utils.ts +148 -0
  9. package/packages/shared/tsconfig.json +18 -0
  10. package/packages/web/README.md +36 -0
  11. package/packages/web/app/api/claude/sessions/route.ts +44 -0
  12. package/packages/web/app/api/claude/status/route.ts +34 -0
  13. package/packages/web/app/api/projects/[id]/delete/route.ts +21 -0
  14. package/packages/web/app/api/projects/[id]/icon/route.ts +33 -0
  15. package/packages/web/app/api/projects/[id]/route.ts +29 -0
  16. package/packages/web/app/api/projects/[id]/stats/route.ts +36 -0
  17. package/packages/web/app/api/projects/[id]/status/route.ts +21 -0
  18. package/packages/web/app/api/projects/route.ts +16 -0
  19. package/packages/web/app/api/sessions/history/route.ts +122 -0
  20. package/packages/web/app/api/stats/route.ts +38 -0
  21. package/packages/web/app/error.tsx +34 -0
  22. package/packages/web/app/favicon.ico +0 -0
  23. package/packages/web/app/globals.css +155 -0
  24. package/packages/web/app/layout.tsx +43 -0
  25. package/packages/web/app/loading.tsx +7 -0
  26. package/packages/web/app/not-found.tsx +25 -0
  27. package/packages/web/app/page.tsx +227 -0
  28. package/packages/web/app/project/[id]/error.tsx +41 -0
  29. package/packages/web/app/project/[id]/loading.tsx +9 -0
  30. package/packages/web/app/project/[id]/not-found.tsx +27 -0
  31. package/packages/web/app/project/[id]/page.tsx +253 -0
  32. package/packages/web/app/project/[id]/stats/page.tsx +447 -0
  33. package/packages/web/app/sessions/page.tsx +165 -0
  34. package/packages/web/app/settings/page.tsx +150 -0
  35. package/packages/web/components/AppSidebar.tsx +113 -0
  36. package/packages/web/components/CommandButton.tsx +39 -0
  37. package/packages/web/components/ConnectionStatus.tsx +29 -0
  38. package/packages/web/components/Logo.tsx +65 -0
  39. package/packages/web/components/MarkdownContent.tsx +123 -0
  40. package/packages/web/components/ProjectAvatar.tsx +54 -0
  41. package/packages/web/components/TechStackBadges.tsx +20 -0
  42. package/packages/web/components/TerminalTab.tsx +84 -0
  43. package/packages/web/components/TerminalTabs.tsx +210 -0
  44. package/packages/web/components/charts/SessionsChart.tsx +172 -0
  45. package/packages/web/components/providers.tsx +45 -0
  46. package/packages/web/components/ui/alert-dialog.tsx +157 -0
  47. package/packages/web/components/ui/badge.tsx +46 -0
  48. package/packages/web/components/ui/button.tsx +60 -0
  49. package/packages/web/components/ui/card.tsx +92 -0
  50. package/packages/web/components/ui/chart.tsx +385 -0
  51. package/packages/web/components/ui/dropdown-menu.tsx +257 -0
  52. package/packages/web/components/ui/scroll-area.tsx +58 -0
  53. package/packages/web/components/ui/sheet.tsx +139 -0
  54. package/packages/web/components/ui/tabs.tsx +66 -0
  55. package/packages/web/components/ui/tooltip.tsx +61 -0
  56. package/packages/web/components.json +22 -0
  57. package/packages/web/context/TerminalContext.tsx +45 -0
  58. package/packages/web/context/TerminalTabsContext.tsx +136 -0
  59. package/packages/web/eslint.config.mjs +18 -0
  60. package/packages/web/hooks/useClaudeTerminal.ts +375 -0
  61. package/packages/web/hooks/useProjectStats.ts +38 -0
  62. package/packages/web/hooks/useProjects.ts +73 -0
  63. package/packages/web/hooks/useStats.ts +28 -0
  64. package/packages/web/lib/format.ts +23 -0
  65. package/packages/web/lib/parse-prjct-files.ts +1122 -0
  66. package/packages/web/lib/projects.ts +452 -0
  67. package/packages/web/lib/pty.ts +101 -0
  68. package/packages/web/lib/query-config.ts +44 -0
  69. package/packages/web/lib/utils.ts +6 -0
  70. package/packages/web/next-env.d.ts +6 -0
  71. package/packages/web/next.config.ts +7 -0
  72. package/packages/web/package.json +53 -0
  73. package/packages/web/postcss.config.mjs +7 -0
  74. package/packages/web/public/file.svg +1 -0
  75. package/packages/web/public/globe.svg +1 -0
  76. package/packages/web/public/next.svg +1 -0
  77. package/packages/web/public/vercel.svg +1 -0
  78. package/packages/web/public/window.svg +1 -0
  79. package/packages/web/server.ts +262 -0
  80. package/packages/web/tsconfig.json +34 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Built for Claude - Ship fast, track progress, stay focused. Developer momentum tool for indie hackers.",
5
5
  "main": "core/index.js",
6
6
  "bin": {
@@ -79,6 +79,16 @@
79
79
  "files": [
80
80
  "bin/",
81
81
  "core/",
82
+ "packages/shared/",
83
+ "packages/web/app/",
84
+ "packages/web/components/",
85
+ "packages/web/context/",
86
+ "packages/web/hooks/",
87
+ "packages/web/lib/",
88
+ "packages/web/public/",
89
+ "packages/web/*.ts",
90
+ "packages/web/*.json",
91
+ "packages/web/*.mjs",
82
92
  "templates/",
83
93
  "scripts/postinstall.js",
84
94
  "scripts/install.sh",
@@ -0,0 +1,615 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Core Types for prjct
5
+ */
6
+ interface Session {
7
+ id: string;
8
+ projectId: string;
9
+ task: string;
10
+ status: 'active' | 'paused' | 'completed';
11
+ startedAt: string;
12
+ pausedAt: string | null;
13
+ completedAt: string | null;
14
+ duration: number;
15
+ metrics: SessionMetrics;
16
+ timeline: TimelineEvent[];
17
+ }
18
+ interface SessionMetrics {
19
+ filesChanged: number;
20
+ linesAdded: number;
21
+ linesRemoved: number;
22
+ commits: number;
23
+ snapshots: string[];
24
+ }
25
+ interface TimelineEvent {
26
+ type: 'start' | 'pause' | 'resume' | 'complete' | 'snapshot';
27
+ at: string;
28
+ data?: Record<string, unknown>;
29
+ }
30
+ interface Snapshot {
31
+ hash: string;
32
+ shortHash: string;
33
+ message: string;
34
+ timestamp: string;
35
+ files: string[];
36
+ }
37
+ interface Task {
38
+ id: string;
39
+ title: string;
40
+ description?: string;
41
+ status: 'pending' | 'in_progress' | 'completed' | 'blocked';
42
+ priority: 'low' | 'medium' | 'high' | 'critical';
43
+ createdAt: string;
44
+ completedAt?: string;
45
+ duration?: number;
46
+ tags?: string[];
47
+ }
48
+ interface Idea {
49
+ id: string;
50
+ content: string;
51
+ capturedAt: string;
52
+ source?: string;
53
+ promoted?: boolean;
54
+ promotedTo?: string;
55
+ }
56
+ interface Feature {
57
+ id: string;
58
+ title: string;
59
+ description?: string;
60
+ status: 'planned' | 'in_progress' | 'shipped' | 'cancelled';
61
+ priority: number;
62
+ createdAt: string;
63
+ shippedAt?: string;
64
+ tasks?: Task[];
65
+ version?: string;
66
+ }
67
+ interface Project {
68
+ id: string;
69
+ name: string;
70
+ path: string;
71
+ createdAt: string;
72
+ lastActiveAt: string;
73
+ config: ProjectConfig;
74
+ }
75
+ interface ProjectConfig {
76
+ projectId: string;
77
+ name?: string;
78
+ plugins?: string[];
79
+ [key: string]: unknown;
80
+ }
81
+ interface DailyMetrics {
82
+ date: string;
83
+ sessions: number;
84
+ duration: number;
85
+ commits: number;
86
+ filesChanged: number;
87
+ linesAdded: number;
88
+ linesRemoved: number;
89
+ }
90
+ interface WeeklyMetrics {
91
+ weekStart: string;
92
+ weekEnd: string;
93
+ totalSessions: number;
94
+ totalDuration: number;
95
+ averageDuration: number;
96
+ tasksCompleted: number;
97
+ featuresShipped: number;
98
+ productivityScore: number;
99
+ streak: number;
100
+ byDay: Record<string, DailyMetrics>;
101
+ }
102
+ interface WSMessage {
103
+ type: string;
104
+ payload?: unknown;
105
+ timestamp: string;
106
+ }
107
+ interface WSInputMessage extends WSMessage {
108
+ type: 'input';
109
+ payload: {
110
+ data: string;
111
+ };
112
+ }
113
+ interface WSOutputMessage extends WSMessage {
114
+ type: 'output';
115
+ payload: {
116
+ data: string;
117
+ };
118
+ }
119
+ interface WSResizeMessage extends WSMessage {
120
+ type: 'resize';
121
+ payload: {
122
+ cols: number;
123
+ rows: number;
124
+ };
125
+ }
126
+ interface WSStatusMessage extends WSMessage {
127
+ type: 'status';
128
+ payload: {
129
+ status: 'connected' | 'disconnected' | 'error';
130
+ message?: string;
131
+ };
132
+ }
133
+ interface ApiResponse<T = unknown> {
134
+ success: boolean;
135
+ data?: T;
136
+ error?: string;
137
+ timestamp: string;
138
+ }
139
+ type EventType = 'session.started' | 'session.paused' | 'session.resumed' | 'session.completed' | 'task.created' | 'task.completed' | 'feature.added' | 'feature.shipped' | 'idea.captured' | 'snapshot.created' | 'snapshot.restored' | 'git.commit' | 'git.push' | 'project.init' | 'project.sync';
140
+ interface EventPayload {
141
+ type: EventType;
142
+ timestamp: string;
143
+ projectId: string;
144
+ data: Record<string, unknown>;
145
+ }
146
+
147
+ /**
148
+ * Zod Schemas for validation
149
+ */
150
+
151
+ declare const SessionMetricsSchema: z.ZodObject<{
152
+ filesChanged: z.ZodDefault<z.ZodNumber>;
153
+ linesAdded: z.ZodDefault<z.ZodNumber>;
154
+ linesRemoved: z.ZodDefault<z.ZodNumber>;
155
+ commits: z.ZodDefault<z.ZodNumber>;
156
+ snapshots: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ filesChanged: number;
159
+ linesAdded: number;
160
+ linesRemoved: number;
161
+ commits: number;
162
+ snapshots: string[];
163
+ }, {
164
+ filesChanged?: number | undefined;
165
+ linesAdded?: number | undefined;
166
+ linesRemoved?: number | undefined;
167
+ commits?: number | undefined;
168
+ snapshots?: string[] | undefined;
169
+ }>;
170
+ declare const TimelineEventSchema: z.ZodObject<{
171
+ type: z.ZodEnum<["start", "pause", "resume", "complete", "snapshot"]>;
172
+ at: z.ZodString;
173
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ at: string;
176
+ type: "start" | "pause" | "resume" | "complete" | "snapshot";
177
+ data?: Record<string, unknown> | undefined;
178
+ }, {
179
+ at: string;
180
+ type: "start" | "pause" | "resume" | "complete" | "snapshot";
181
+ data?: Record<string, unknown> | undefined;
182
+ }>;
183
+ declare const SessionSchema: z.ZodObject<{
184
+ id: z.ZodString;
185
+ projectId: z.ZodString;
186
+ task: z.ZodString;
187
+ status: z.ZodEnum<["active", "paused", "completed"]>;
188
+ startedAt: z.ZodString;
189
+ pausedAt: z.ZodNullable<z.ZodString>;
190
+ completedAt: z.ZodNullable<z.ZodString>;
191
+ duration: z.ZodNumber;
192
+ metrics: z.ZodObject<{
193
+ filesChanged: z.ZodDefault<z.ZodNumber>;
194
+ linesAdded: z.ZodDefault<z.ZodNumber>;
195
+ linesRemoved: z.ZodDefault<z.ZodNumber>;
196
+ commits: z.ZodDefault<z.ZodNumber>;
197
+ snapshots: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
198
+ }, "strip", z.ZodTypeAny, {
199
+ filesChanged: number;
200
+ linesAdded: number;
201
+ linesRemoved: number;
202
+ commits: number;
203
+ snapshots: string[];
204
+ }, {
205
+ filesChanged?: number | undefined;
206
+ linesAdded?: number | undefined;
207
+ linesRemoved?: number | undefined;
208
+ commits?: number | undefined;
209
+ snapshots?: string[] | undefined;
210
+ }>;
211
+ timeline: z.ZodArray<z.ZodObject<{
212
+ type: z.ZodEnum<["start", "pause", "resume", "complete", "snapshot"]>;
213
+ at: z.ZodString;
214
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ at: string;
217
+ type: "start" | "pause" | "resume" | "complete" | "snapshot";
218
+ data?: Record<string, unknown> | undefined;
219
+ }, {
220
+ at: string;
221
+ type: "start" | "pause" | "resume" | "complete" | "snapshot";
222
+ data?: Record<string, unknown> | undefined;
223
+ }>, "many">;
224
+ }, "strip", z.ZodTypeAny, {
225
+ projectId: string;
226
+ status: "active" | "paused" | "completed";
227
+ id: string;
228
+ task: string;
229
+ startedAt: string;
230
+ pausedAt: string | null;
231
+ completedAt: string | null;
232
+ duration: number;
233
+ metrics: {
234
+ filesChanged: number;
235
+ linesAdded: number;
236
+ linesRemoved: number;
237
+ commits: number;
238
+ snapshots: string[];
239
+ };
240
+ timeline: {
241
+ at: string;
242
+ type: "start" | "pause" | "resume" | "complete" | "snapshot";
243
+ data?: Record<string, unknown> | undefined;
244
+ }[];
245
+ }, {
246
+ projectId: string;
247
+ status: "active" | "paused" | "completed";
248
+ id: string;
249
+ task: string;
250
+ startedAt: string;
251
+ pausedAt: string | null;
252
+ completedAt: string | null;
253
+ duration: number;
254
+ metrics: {
255
+ filesChanged?: number | undefined;
256
+ linesAdded?: number | undefined;
257
+ linesRemoved?: number | undefined;
258
+ commits?: number | undefined;
259
+ snapshots?: string[] | undefined;
260
+ };
261
+ timeline: {
262
+ at: string;
263
+ type: "start" | "pause" | "resume" | "complete" | "snapshot";
264
+ data?: Record<string, unknown> | undefined;
265
+ }[];
266
+ }>;
267
+ declare const TaskSchema: z.ZodObject<{
268
+ id: z.ZodString;
269
+ title: z.ZodString;
270
+ description: z.ZodOptional<z.ZodString>;
271
+ status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
272
+ priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
273
+ createdAt: z.ZodString;
274
+ completedAt: z.ZodOptional<z.ZodString>;
275
+ duration: z.ZodOptional<z.ZodNumber>;
276
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ status: "completed" | "pending" | "in_progress" | "blocked";
279
+ id: string;
280
+ title: string;
281
+ priority: "low" | "medium" | "high" | "critical";
282
+ createdAt: string;
283
+ completedAt?: string | undefined;
284
+ duration?: number | undefined;
285
+ description?: string | undefined;
286
+ tags?: string[] | undefined;
287
+ }, {
288
+ status: "completed" | "pending" | "in_progress" | "blocked";
289
+ id: string;
290
+ title: string;
291
+ priority: "low" | "medium" | "high" | "critical";
292
+ createdAt: string;
293
+ completedAt?: string | undefined;
294
+ duration?: number | undefined;
295
+ description?: string | undefined;
296
+ tags?: string[] | undefined;
297
+ }>;
298
+ declare const IdeaSchema: z.ZodObject<{
299
+ id: z.ZodString;
300
+ content: z.ZodString;
301
+ capturedAt: z.ZodString;
302
+ source: z.ZodOptional<z.ZodString>;
303
+ promoted: z.ZodOptional<z.ZodBoolean>;
304
+ promotedTo: z.ZodOptional<z.ZodString>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ id: string;
307
+ content: string;
308
+ capturedAt: string;
309
+ source?: string | undefined;
310
+ promoted?: boolean | undefined;
311
+ promotedTo?: string | undefined;
312
+ }, {
313
+ id: string;
314
+ content: string;
315
+ capturedAt: string;
316
+ source?: string | undefined;
317
+ promoted?: boolean | undefined;
318
+ promotedTo?: string | undefined;
319
+ }>;
320
+ declare const FeatureSchema: z.ZodObject<{
321
+ id: z.ZodString;
322
+ title: z.ZodString;
323
+ description: z.ZodOptional<z.ZodString>;
324
+ status: z.ZodEnum<["planned", "in_progress", "shipped", "cancelled"]>;
325
+ priority: z.ZodNumber;
326
+ createdAt: z.ZodString;
327
+ shippedAt: z.ZodOptional<z.ZodString>;
328
+ tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
+ id: z.ZodString;
330
+ title: z.ZodString;
331
+ description: z.ZodOptional<z.ZodString>;
332
+ status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
333
+ priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
334
+ createdAt: z.ZodString;
335
+ completedAt: z.ZodOptional<z.ZodString>;
336
+ duration: z.ZodOptional<z.ZodNumber>;
337
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
338
+ }, "strip", z.ZodTypeAny, {
339
+ status: "completed" | "pending" | "in_progress" | "blocked";
340
+ id: string;
341
+ title: string;
342
+ priority: "low" | "medium" | "high" | "critical";
343
+ createdAt: string;
344
+ completedAt?: string | undefined;
345
+ duration?: number | undefined;
346
+ description?: string | undefined;
347
+ tags?: string[] | undefined;
348
+ }, {
349
+ status: "completed" | "pending" | "in_progress" | "blocked";
350
+ id: string;
351
+ title: string;
352
+ priority: "low" | "medium" | "high" | "critical";
353
+ createdAt: string;
354
+ completedAt?: string | undefined;
355
+ duration?: number | undefined;
356
+ description?: string | undefined;
357
+ tags?: string[] | undefined;
358
+ }>, "many">>;
359
+ version: z.ZodOptional<z.ZodString>;
360
+ }, "strip", z.ZodTypeAny, {
361
+ status: "in_progress" | "planned" | "shipped" | "cancelled";
362
+ id: string;
363
+ title: string;
364
+ priority: number;
365
+ createdAt: string;
366
+ description?: string | undefined;
367
+ shippedAt?: string | undefined;
368
+ tasks?: {
369
+ status: "completed" | "pending" | "in_progress" | "blocked";
370
+ id: string;
371
+ title: string;
372
+ priority: "low" | "medium" | "high" | "critical";
373
+ createdAt: string;
374
+ completedAt?: string | undefined;
375
+ duration?: number | undefined;
376
+ description?: string | undefined;
377
+ tags?: string[] | undefined;
378
+ }[] | undefined;
379
+ version?: string | undefined;
380
+ }, {
381
+ status: "in_progress" | "planned" | "shipped" | "cancelled";
382
+ id: string;
383
+ title: string;
384
+ priority: number;
385
+ createdAt: string;
386
+ description?: string | undefined;
387
+ shippedAt?: string | undefined;
388
+ tasks?: {
389
+ status: "completed" | "pending" | "in_progress" | "blocked";
390
+ id: string;
391
+ title: string;
392
+ priority: "low" | "medium" | "high" | "critical";
393
+ createdAt: string;
394
+ completedAt?: string | undefined;
395
+ duration?: number | undefined;
396
+ description?: string | undefined;
397
+ tags?: string[] | undefined;
398
+ }[] | undefined;
399
+ version?: string | undefined;
400
+ }>;
401
+ declare const ProjectConfigSchema: z.ZodObject<{
402
+ projectId: z.ZodString;
403
+ name: z.ZodOptional<z.ZodString>;
404
+ plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
405
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
406
+ projectId: z.ZodString;
407
+ name: z.ZodOptional<z.ZodString>;
408
+ plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
409
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
410
+ projectId: z.ZodString;
411
+ name: z.ZodOptional<z.ZodString>;
412
+ plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
413
+ }, z.ZodTypeAny, "passthrough">>;
414
+ declare const WSInputMessageSchema: z.ZodObject<{
415
+ type: z.ZodLiteral<"input">;
416
+ payload: z.ZodObject<{
417
+ data: z.ZodString;
418
+ }, "strip", z.ZodTypeAny, {
419
+ data: string;
420
+ }, {
421
+ data: string;
422
+ }>;
423
+ timestamp: z.ZodString;
424
+ }, "strip", z.ZodTypeAny, {
425
+ type: "input";
426
+ payload: {
427
+ data: string;
428
+ };
429
+ timestamp: string;
430
+ }, {
431
+ type: "input";
432
+ payload: {
433
+ data: string;
434
+ };
435
+ timestamp: string;
436
+ }>;
437
+ declare const WSResizeMessageSchema: z.ZodObject<{
438
+ type: z.ZodLiteral<"resize">;
439
+ payload: z.ZodObject<{
440
+ cols: z.ZodNumber;
441
+ rows: z.ZodNumber;
442
+ }, "strip", z.ZodTypeAny, {
443
+ cols: number;
444
+ rows: number;
445
+ }, {
446
+ cols: number;
447
+ rows: number;
448
+ }>;
449
+ timestamp: z.ZodString;
450
+ }, "strip", z.ZodTypeAny, {
451
+ type: "resize";
452
+ payload: {
453
+ cols: number;
454
+ rows: number;
455
+ };
456
+ timestamp: string;
457
+ }, {
458
+ type: "resize";
459
+ payload: {
460
+ cols: number;
461
+ rows: number;
462
+ };
463
+ timestamp: string;
464
+ }>;
465
+ declare const WSMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
466
+ type: z.ZodLiteral<"input">;
467
+ payload: z.ZodObject<{
468
+ data: z.ZodString;
469
+ }, "strip", z.ZodTypeAny, {
470
+ data: string;
471
+ }, {
472
+ data: string;
473
+ }>;
474
+ timestamp: z.ZodString;
475
+ }, "strip", z.ZodTypeAny, {
476
+ type: "input";
477
+ payload: {
478
+ data: string;
479
+ };
480
+ timestamp: string;
481
+ }, {
482
+ type: "input";
483
+ payload: {
484
+ data: string;
485
+ };
486
+ timestamp: string;
487
+ }>, z.ZodObject<{
488
+ type: z.ZodLiteral<"resize">;
489
+ payload: z.ZodObject<{
490
+ cols: z.ZodNumber;
491
+ rows: z.ZodNumber;
492
+ }, "strip", z.ZodTypeAny, {
493
+ cols: number;
494
+ rows: number;
495
+ }, {
496
+ cols: number;
497
+ rows: number;
498
+ }>;
499
+ timestamp: z.ZodString;
500
+ }, "strip", z.ZodTypeAny, {
501
+ type: "resize";
502
+ payload: {
503
+ cols: number;
504
+ rows: number;
505
+ };
506
+ timestamp: string;
507
+ }, {
508
+ type: "resize";
509
+ payload: {
510
+ cols: number;
511
+ rows: number;
512
+ };
513
+ timestamp: string;
514
+ }>]>;
515
+ declare const CreateSessionRequestSchema: z.ZodObject<{
516
+ task: z.ZodString;
517
+ projectId: z.ZodString;
518
+ }, "strip", z.ZodTypeAny, {
519
+ projectId: string;
520
+ task: string;
521
+ }, {
522
+ projectId: string;
523
+ task: string;
524
+ }>;
525
+ declare const CreateTaskRequestSchema: z.ZodObject<{
526
+ title: z.ZodString;
527
+ description: z.ZodOptional<z.ZodString>;
528
+ priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
529
+ }, "strip", z.ZodTypeAny, {
530
+ title: string;
531
+ priority: "low" | "medium" | "high" | "critical";
532
+ description?: string | undefined;
533
+ }, {
534
+ title: string;
535
+ description?: string | undefined;
536
+ priority?: "low" | "medium" | "high" | "critical" | undefined;
537
+ }>;
538
+ declare const CaptureIdeaRequestSchema: z.ZodObject<{
539
+ content: z.ZodString;
540
+ source: z.ZodOptional<z.ZodString>;
541
+ }, "strip", z.ZodTypeAny, {
542
+ content: string;
543
+ source?: string | undefined;
544
+ }, {
545
+ content: string;
546
+ source?: string | undefined;
547
+ }>;
548
+ type SessionInput = z.infer<typeof SessionSchema>;
549
+ type TaskInput = z.infer<typeof TaskSchema>;
550
+ type IdeaInput = z.infer<typeof IdeaSchema>;
551
+ type FeatureInput = z.infer<typeof FeatureSchema>;
552
+ type ProjectConfigInput = z.infer<typeof ProjectConfigSchema>;
553
+ type WSMessageInput = z.infer<typeof WSMessageSchema>;
554
+
555
+ /**
556
+ * Shared Utilities
557
+ */
558
+ /**
559
+ * Generate a unique session ID
560
+ */
561
+ declare function generateSessionId(): string;
562
+ /**
563
+ * Generate a unique ID with prefix
564
+ */
565
+ declare function generateId(prefix?: string): string;
566
+ /**
567
+ * Format duration in seconds to human readable
568
+ */
569
+ declare function formatDuration(seconds: number): string;
570
+ /**
571
+ * Parse duration string to seconds
572
+ */
573
+ declare function parseDuration(duration: string): number;
574
+ /**
575
+ * Get relative time string
576
+ */
577
+ declare function getRelativeTime(date: Date | string): string;
578
+ /**
579
+ * Get ISO timestamp
580
+ */
581
+ declare function getTimestamp(): string;
582
+ /**
583
+ * Get date in YYYY-MM-DD format
584
+ */
585
+ declare function getDate(): string;
586
+ /**
587
+ * Get year-month in YYYY-MM format
588
+ */
589
+ declare function getYearMonth(): string;
590
+ /**
591
+ * Safely parse JSON
592
+ */
593
+ declare function safeJsonParse<T>(json: string, fallback: T): T;
594
+ /**
595
+ * Truncate string with ellipsis
596
+ */
597
+ declare function truncate(str: string, maxLength: number): string;
598
+ /**
599
+ * Slugify string
600
+ */
601
+ declare function slugify(str: string): string;
602
+ /**
603
+ * Deep clone object
604
+ */
605
+ declare function deepClone<T>(obj: T): T;
606
+ /**
607
+ * Check if running in Node.js
608
+ */
609
+ declare function isNode(): boolean;
610
+ /**
611
+ * Check if running in browser
612
+ */
613
+ declare function isBrowser(): boolean;
614
+
615
+ export { type ApiResponse, CaptureIdeaRequestSchema, CreateSessionRequestSchema, CreateTaskRequestSchema, type DailyMetrics, type EventPayload, type EventType, type Feature, type FeatureInput, FeatureSchema, type Idea, type IdeaInput, IdeaSchema, type Project, type ProjectConfig, type ProjectConfigInput, ProjectConfigSchema, type Session, type SessionInput, type SessionMetrics, SessionMetricsSchema, SessionSchema, type Snapshot, type Task, type TaskInput, TaskSchema, type TimelineEvent, TimelineEventSchema, type WSInputMessage, WSInputMessageSchema, type WSMessage, type WSMessageInput, WSMessageSchema, type WSOutputMessage, type WSResizeMessage, WSResizeMessageSchema, type WSStatusMessage, type WeeklyMetrics, deepClone, formatDuration, generateId, generateSessionId, getDate, getRelativeTime, getTimestamp, getYearMonth, isBrowser, isNode, parseDuration, safeJsonParse, slugify, truncate };