@kimuson/claude-code-viewer 0.7.1 → 0.7.3

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/main.js CHANGED
@@ -12,7 +12,7 @@ import { Effect as Effect73 } from "effect";
12
12
  // package.json
13
13
  var package_default = {
14
14
  name: "@kimuson/claude-code-viewer",
15
- version: "0.7.1",
15
+ version: "0.7.3",
16
16
  description: "A full-featured web-based Claude Code client that provides complete interactive functionality for managing Claude Code projects.",
17
17
  homepage: "https://github.com/d-kimuson/claude-code-viewer",
18
18
  license: "MIT",
@@ -263,10 +263,10 @@ import { Layer as Layer6 } from "effect";
263
263
  // src/server/core/agent-session/infrastructure/AgentSessionRepository.ts
264
264
  import { FileSystem, Path as Path2 } from "@effect/platform";
265
265
  import { Context as Context3, Effect as Effect5, Layer as Layer4 } from "effect";
266
- import { z as z26 } from "zod";
266
+ import { z as z27 } from "zod";
267
267
 
268
268
  // src/lib/conversation-schema/index.ts
269
- import { z as z24 } from "zod";
269
+ import { z as z25 } from "zod";
270
270
 
271
271
  // src/lib/conversation-schema/entry/AgentNameEntrySchema.ts
272
272
  import { z } from "zod";
@@ -411,204 +411,232 @@ var AssistantEntrySchema = BaseEntrySchema.extend({
411
411
  isApiErrorMessage: z11.boolean().optional()
412
412
  });
413
413
 
414
- // src/lib/conversation-schema/entry/CustomTitleEntrySchema.ts
414
+ // src/lib/conversation-schema/entry/AttachmentEntrySchema.ts
415
415
  import { z as z12 } from "zod";
416
- var CustomTitleEntrySchema = z12.object({
417
- type: z12.literal("custom-title"),
418
- customTitle: z12.string(),
419
- sessionId: z12.string()
416
+ var AttachmentBaseEntrySchema = BaseEntrySchema.extend({
417
+ type: z12.literal("attachment"),
418
+ entrypoint: z12.string().optional(),
419
+ slug: z12.string().optional()
420
+ });
421
+ var DeferredToolsDeltaSchema = AttachmentBaseEntrySchema.extend({
422
+ attachment: z12.object({
423
+ type: z12.literal("deferred_tools_delta"),
424
+ addedNames: z12.array(z12.string()),
425
+ addedLines: z12.array(z12.string()),
426
+ removedNames: z12.array(z12.string())
427
+ })
420
428
  });
429
+ var McpInstructionsDeltaSchema = AttachmentBaseEntrySchema.extend({
430
+ attachment: z12.object({
431
+ type: z12.literal("mcp_instructions_delta"),
432
+ addedNames: z12.array(z12.string()),
433
+ addedBlocks: z12.array(z12.string()),
434
+ removedNames: z12.array(z12.string())
435
+ })
436
+ });
437
+ var AttachmentEntrySchema = z12.union([
438
+ DeferredToolsDeltaSchema,
439
+ McpInstructionsDeltaSchema
440
+ ]);
421
441
 
422
- // src/lib/conversation-schema/entry/FileHIstorySnapshotEntrySchema.ts
442
+ // src/lib/conversation-schema/entry/CustomTitleEntrySchema.ts
423
443
  import { z as z13 } from "zod";
424
- var FileHistorySnapshotEntrySchema = z13.object({
444
+ var CustomTitleEntrySchema = z13.object({
445
+ type: z13.literal("custom-title"),
446
+ customTitle: z13.string(),
447
+ sessionId: z13.string()
448
+ });
449
+
450
+ // src/lib/conversation-schema/entry/FileHIstorySnapshotEntrySchema.ts
451
+ import { z as z14 } from "zod";
452
+ var FileHistorySnapshotEntrySchema = z14.object({
425
453
  // discriminator
426
- type: z13.literal("file-history-snapshot"),
454
+ type: z14.literal("file-history-snapshot"),
427
455
  // required
428
- messageId: z13.string(),
429
- snapshot: z13.object({
430
- messageId: z13.string(),
431
- trackedFileBackups: z13.record(z13.string(), z13.unknown()),
432
- timestamp: z13.string()
456
+ messageId: z14.string(),
457
+ snapshot: z14.object({
458
+ messageId: z14.string(),
459
+ trackedFileBackups: z14.record(z14.string(), z14.unknown()),
460
+ timestamp: z14.string()
433
461
  }),
434
- isSnapshotUpdate: z13.boolean()
462
+ isSnapshotUpdate: z14.boolean()
435
463
  });
436
464
 
437
465
  // src/lib/conversation-schema/entry/LastPromptEntrySchema.ts
438
- import { z as z14 } from "zod";
439
- var LastPromptEntrySchema = z14.object({
440
- type: z14.literal("last-prompt"),
441
- lastPrompt: z14.string(),
442
- sessionId: z14.string()
466
+ import { z as z15 } from "zod";
467
+ var LastPromptEntrySchema = z15.object({
468
+ type: z15.literal("last-prompt"),
469
+ lastPrompt: z15.string(),
470
+ sessionId: z15.string()
443
471
  });
444
472
 
445
473
  // src/lib/conversation-schema/entry/PermissionModeEntrySchema.ts
446
- import { z as z15 } from "zod";
447
- var PermissionModeEntrySchema = z15.object({
448
- type: z15.literal("permission-mode"),
449
- permissionMode: z15.string(),
450
- sessionId: z15.string()
474
+ import { z as z16 } from "zod";
475
+ var PermissionModeEntrySchema = z16.object({
476
+ type: z16.literal("permission-mode"),
477
+ permissionMode: z16.string(),
478
+ sessionId: z16.string()
451
479
  });
452
480
 
453
481
  // src/lib/conversation-schema/entry/PrLinkEntrySchema.ts
454
- import { z as z16 } from "zod";
455
- var PrLinkEntrySchema = z16.object({
456
- type: z16.literal("pr-link"),
457
- sessionId: z16.string(),
458
- prNumber: z16.number(),
459
- prUrl: z16.string(),
460
- prRepository: z16.string(),
461
- timestamp: z16.iso.datetime()
482
+ import { z as z17 } from "zod";
483
+ var PrLinkEntrySchema = z17.object({
484
+ type: z17.literal("pr-link"),
485
+ sessionId: z17.string(),
486
+ prNumber: z17.number(),
487
+ prUrl: z17.string(),
488
+ prRepository: z17.string(),
489
+ timestamp: z17.iso.datetime()
462
490
  });
463
491
 
464
492
  // src/lib/conversation-schema/entry/ProgressEntrySchema.ts
465
- import { z as z17 } from "zod";
493
+ import { z as z18 } from "zod";
466
494
  var ProgressEntrySchema = BaseEntrySchema.extend({
467
495
  // discriminator
468
- type: z17.literal("progress"),
496
+ type: z18.literal("progress"),
469
497
  // required
470
- data: z17.record(z17.string(), z17.any()),
471
- toolUseID: z17.string().optional(),
472
- parentToolUseID: z17.string().optional()
498
+ data: z18.record(z18.string(), z18.any()),
499
+ toolUseID: z18.string().optional(),
500
+ parentToolUseID: z18.string().optional()
473
501
  });
474
502
 
475
503
  // src/lib/conversation-schema/entry/QueueOperationEntrySchema.ts
476
- import { z as z19 } from "zod";
504
+ import { z as z20 } from "zod";
477
505
 
478
506
  // src/lib/conversation-schema/content/DocumentContentSchema.ts
479
- import { z as z18 } from "zod";
480
- var DocumentContentSchema = z18.object({
481
- type: z18.literal("document"),
482
- source: z18.union([
483
- z18.object({
484
- media_type: z18.literal("text/plain"),
485
- type: z18.literal("text"),
486
- data: z18.string()
507
+ import { z as z19 } from "zod";
508
+ var DocumentContentSchema = z19.object({
509
+ type: z19.literal("document"),
510
+ source: z19.union([
511
+ z19.object({
512
+ media_type: z19.literal("text/plain"),
513
+ type: z19.literal("text"),
514
+ data: z19.string()
487
515
  }),
488
- z18.object({
489
- media_type: z18.enum(["application/pdf"]),
490
- type: z18.literal("base64"),
491
- data: z18.string()
516
+ z19.object({
517
+ media_type: z19.enum(["application/pdf"]),
518
+ type: z19.literal("base64"),
519
+ data: z19.string()
492
520
  })
493
521
  ])
494
522
  });
495
523
 
496
524
  // src/lib/conversation-schema/entry/QueueOperationEntrySchema.ts
497
- var QueueOperationContentSchema = z19.union([
498
- z19.string(),
525
+ var QueueOperationContentSchema = z20.union([
526
+ z20.string(),
499
527
  TextContentSchema,
500
528
  ToolResultContentSchema,
501
529
  ImageContentSchema,
502
530
  DocumentContentSchema
503
531
  ]);
504
- var QueueOperationEntrySchema = z19.union([
505
- z19.object({
506
- type: z19.literal("queue-operation"),
507
- operation: z19.literal("enqueue"),
508
- content: z19.union([z19.string(), z19.array(z19.union([z19.string(), QueueOperationContentSchema]))]).optional(),
509
- sessionId: z19.string(),
510
- timestamp: z19.iso.datetime()
532
+ var QueueOperationEntrySchema = z20.union([
533
+ z20.object({
534
+ type: z20.literal("queue-operation"),
535
+ operation: z20.literal("enqueue"),
536
+ content: z20.union([z20.string(), z20.array(z20.union([z20.string(), QueueOperationContentSchema]))]).optional(),
537
+ sessionId: z20.string(),
538
+ timestamp: z20.iso.datetime()
511
539
  }),
512
- z19.object({
513
- type: z19.literal("queue-operation"),
514
- operation: z19.literal("dequeue"),
515
- sessionId: z19.string(),
516
- timestamp: z19.iso.datetime()
540
+ z20.object({
541
+ type: z20.literal("queue-operation"),
542
+ operation: z20.literal("dequeue"),
543
+ sessionId: z20.string(),
544
+ timestamp: z20.iso.datetime()
517
545
  }),
518
- z19.object({
519
- type: z19.literal("queue-operation"),
520
- operation: z19.literal("remove"),
521
- sessionId: z19.string(),
522
- timestamp: z19.iso.datetime()
546
+ z20.object({
547
+ type: z20.literal("queue-operation"),
548
+ operation: z20.literal("remove"),
549
+ sessionId: z20.string(),
550
+ timestamp: z20.iso.datetime()
523
551
  }),
524
- z19.object({
525
- type: z19.literal("queue-operation"),
526
- operation: z19.literal("popAll"),
527
- sessionId: z19.string(),
528
- timestamp: z19.iso.datetime(),
529
- content: z19.string().optional()
552
+ z20.object({
553
+ type: z20.literal("queue-operation"),
554
+ operation: z20.literal("popAll"),
555
+ sessionId: z20.string(),
556
+ timestamp: z20.iso.datetime(),
557
+ content: z20.string().optional()
530
558
  })
531
559
  ]);
532
560
 
533
561
  // src/lib/conversation-schema/entry/SummaryEntrySchema.ts
534
- import { z as z20 } from "zod";
535
- var SummaryEntrySchema = z20.object({
536
- type: z20.literal("summary"),
537
- summary: z20.string(),
538
- leafUuid: z20.uuid()
562
+ import { z as z21 } from "zod";
563
+ var SummaryEntrySchema = z21.object({
564
+ type: z21.literal("summary"),
565
+ summary: z21.string(),
566
+ leafUuid: z21.uuid()
539
567
  });
540
568
 
541
569
  // src/lib/conversation-schema/entry/SystemEntrySchema.ts
542
- import { z as z21 } from "zod";
543
- var HookInfoSchema = z21.object({
544
- command: z21.string()
570
+ import { z as z22 } from "zod";
571
+ var HookInfoSchema = z22.object({
572
+ command: z22.string()
545
573
  });
546
574
  var SystemEntryWithContentSchema = BaseEntrySchema.extend({
547
- type: z21.literal("system"),
548
- content: z21.string(),
549
- toolUseID: z21.string(),
550
- level: z21.enum(["info"]),
551
- subtype: z21.undefined().optional()
575
+ type: z22.literal("system"),
576
+ content: z22.string(),
577
+ toolUseID: z22.string(),
578
+ level: z22.enum(["info"]),
579
+ subtype: z22.undefined().optional()
552
580
  });
553
581
  var StopHookSummaryEntrySchema = BaseEntrySchema.extend({
554
- type: z21.literal("system"),
555
- subtype: z21.literal("stop_hook_summary"),
556
- toolUseID: z21.string(),
557
- level: z21.enum(["info", "suggestion"]),
558
- slug: z21.string().optional(),
559
- hookCount: z21.number(),
560
- hookInfos: z21.array(HookInfoSchema),
561
- hookErrors: z21.array(z21.unknown()),
562
- preventedContinuation: z21.boolean(),
563
- stopReason: z21.string(),
564
- hasOutput: z21.boolean()
582
+ type: z22.literal("system"),
583
+ subtype: z22.literal("stop_hook_summary"),
584
+ toolUseID: z22.string(),
585
+ level: z22.enum(["info", "suggestion"]),
586
+ slug: z22.string().optional(),
587
+ hookCount: z22.number(),
588
+ hookInfos: z22.array(HookInfoSchema),
589
+ hookErrors: z22.array(z22.unknown()),
590
+ preventedContinuation: z22.boolean(),
591
+ stopReason: z22.string(),
592
+ hasOutput: z22.boolean()
565
593
  });
566
594
  var LocalCommandEntrySchema = BaseEntrySchema.extend({
567
- type: z21.literal("system"),
568
- subtype: z21.literal("local_command"),
569
- content: z21.string(),
570
- level: z21.enum(["info"])
595
+ type: z22.literal("system"),
596
+ subtype: z22.literal("local_command"),
597
+ content: z22.string(),
598
+ level: z22.enum(["info"])
571
599
  });
572
600
  var TurnDurationEntrySchema = BaseEntrySchema.extend({
573
- type: z21.literal("system"),
574
- subtype: z21.literal("turn_duration"),
575
- durationMs: z21.number(),
576
- slug: z21.string().optional()
601
+ type: z22.literal("system"),
602
+ subtype: z22.literal("turn_duration"),
603
+ durationMs: z22.number(),
604
+ slug: z22.string().optional()
577
605
  });
578
606
  var CompactBoundaryEntrySchema = BaseEntrySchema.extend({
579
- type: z21.literal("system"),
580
- subtype: z21.literal("compact_boundary"),
581
- content: z21.string(),
582
- level: z21.enum(["info"]),
583
- slug: z21.string().optional(),
584
- logicalParentUuid: z21.string().optional(),
585
- compactMetadata: z21.object({
586
- trigger: z21.string(),
587
- preTokens: z21.number()
607
+ type: z22.literal("system"),
608
+ subtype: z22.literal("compact_boundary"),
609
+ content: z22.string(),
610
+ level: z22.enum(["info"]),
611
+ slug: z22.string().optional(),
612
+ logicalParentUuid: z22.string().optional(),
613
+ compactMetadata: z22.object({
614
+ trigger: z22.string(),
615
+ preTokens: z22.number()
588
616
  }).optional()
589
617
  });
590
618
  var ApiErrorEntrySchema = BaseEntrySchema.extend({
591
- type: z21.literal("system"),
592
- subtype: z21.literal("api_error"),
593
- level: z21.enum(["error", "warning", "info"]),
594
- error: z21.object({
595
- status: z21.number().optional(),
596
- headers: z21.record(z21.string(), z21.unknown()).optional(),
597
- requestID: z21.string().nullable().optional(),
598
- error: z21.object({
599
- type: z21.string(),
600
- error: z21.object({
601
- type: z21.string(),
602
- message: z21.string()
619
+ type: z22.literal("system"),
620
+ subtype: z22.literal("api_error"),
621
+ level: z22.enum(["error", "warning", "info"]),
622
+ error: z22.object({
623
+ status: z22.number().optional(),
624
+ headers: z22.record(z22.string(), z22.unknown()).optional(),
625
+ requestID: z22.string().nullable().optional(),
626
+ error: z22.object({
627
+ type: z22.string(),
628
+ error: z22.object({
629
+ type: z22.string(),
630
+ message: z22.string()
603
631
  }).optional(),
604
- message: z21.string().optional()
632
+ message: z22.string().optional()
605
633
  }).optional()
606
634
  }),
607
- retryInMs: z21.number().optional(),
608
- retryAttempt: z21.number().optional(),
609
- maxRetries: z21.number().optional()
635
+ retryInMs: z22.number().optional(),
636
+ retryAttempt: z22.number().optional(),
637
+ maxRetries: z22.number().optional()
610
638
  });
611
- var SystemEntrySchema = z21.union([
639
+ var SystemEntrySchema = z22.union([
612
640
  StopHookSummaryEntrySchema,
613
641
  LocalCommandEntrySchema,
614
642
  TurnDurationEntrySchema,
@@ -619,32 +647,32 @@ var SystemEntrySchema = z21.union([
619
647
  ]);
620
648
 
621
649
  // src/lib/conversation-schema/entry/UserEntrySchema.ts
622
- import { z as z23 } from "zod";
650
+ import { z as z24 } from "zod";
623
651
 
624
652
  // src/lib/conversation-schema/message/UserMessageSchema.ts
625
- import { z as z22 } from "zod";
626
- var UserMessageContentSchema = z22.union([
627
- z22.string(),
653
+ import { z as z23 } from "zod";
654
+ var UserMessageContentSchema = z23.union([
655
+ z23.string(),
628
656
  TextContentSchema,
629
657
  ToolResultContentSchema,
630
658
  ImageContentSchema,
631
659
  DocumentContentSchema
632
660
  ]);
633
- var UserMessageSchema = z22.object({
634
- role: z22.literal("user"),
635
- content: z22.union([z22.string(), z22.array(z22.union([z22.string(), UserMessageContentSchema]))])
661
+ var UserMessageSchema = z23.object({
662
+ role: z23.literal("user"),
663
+ content: z23.union([z23.string(), z23.array(z23.union([z23.string(), UserMessageContentSchema]))])
636
664
  });
637
665
 
638
666
  // src/lib/conversation-schema/entry/UserEntrySchema.ts
639
667
  var UserEntrySchema = BaseEntrySchema.extend({
640
668
  // discriminator
641
- type: z23.literal("user"),
669
+ type: z24.literal("user"),
642
670
  // required
643
671
  message: UserMessageSchema
644
672
  });
645
673
 
646
674
  // src/lib/conversation-schema/index.ts
647
- var ConversationSchema = z24.union([
675
+ var ConversationSchema = z25.union([
648
676
  UserEntrySchema,
649
677
  AssistantEntrySchema,
650
678
  SummaryEntrySchema,
@@ -657,7 +685,8 @@ var ConversationSchema = z24.union([
657
685
  AgentSettingEntrySchema,
658
686
  PermissionModeEntrySchema,
659
687
  PrLinkEntrySchema,
660
- LastPromptEntrySchema
688
+ LastPromptEntrySchema,
689
+ AttachmentEntrySchema
661
690
  ]);
662
691
 
663
692
  // src/server/core/claude-code/functions/parseJsonl.ts
@@ -741,17 +770,17 @@ var CcvOptionsService = class extends Context.Tag("CcvOptionsService")() {
741
770
  import { Context as Context2, Effect as Effect3, Layer as Layer2, Ref as Ref2 } from "effect";
742
771
 
743
772
  // src/server/core/platform/schema.ts
744
- import { z as z25 } from "zod";
745
- var envSchema = z25.object({
773
+ import { z as z26 } from "zod";
774
+ var envSchema = z26.object({
746
775
  // Frameworks
747
- CCV_ENV: z25.enum(["development", "production", "test"]).optional().default("development"),
748
- NEXT_PHASE: z25.string().optional(),
749
- HOME: z25.string().optional(),
750
- PATH: z25.string().optional(),
751
- SHELL: z25.string().optional(),
752
- CCV_TERMINAL_SHELL: z25.string().optional(),
753
- CCV_TERMINAL_UNRESTRICTED: z25.string().optional(),
754
- CCV_TERMINAL_DISABLED: z25.string().optional()
776
+ CCV_ENV: z26.enum(["development", "production", "test"]).optional().default("development"),
777
+ NEXT_PHASE: z26.string().optional(),
778
+ HOME: z26.string().optional(),
779
+ PATH: z26.string().optional(),
780
+ SHELL: z26.string().optional(),
781
+ CCV_TERMINAL_SHELL: z26.string().optional(),
782
+ CCV_TERMINAL_UNRESTRICTED: z26.string().optional(),
783
+ CCV_TERMINAL_DISABLED: z26.string().optional()
755
784
  });
756
785
 
757
786
  // src/server/core/platform/services/EnvService.ts
@@ -969,7 +998,7 @@ var LayerImpl4 = Effect5.gen(function* () {
969
998
  if (firstLine === void 0 || firstLine.trim() === "") continue;
970
999
  try {
971
1000
  const parsed = JSON.parse(firstLine);
972
- const sessionIdResult = z26.object({ sessionId: z26.string() }).safeParse(parsed);
1001
+ const sessionIdResult = z27.object({ sessionId: z27.string() }).safeParse(parsed);
973
1002
  if (sessionIdResult.success && sessionIdResult.data.sessionId === sessionId) {
974
1003
  yield* processFile(filePath, filename).pipe(Effect5.catchAll(() => Effect5.void));
975
1004
  }
@@ -1040,7 +1069,7 @@ var AgentSessionLayer = Layer6.mergeAll(AgentSessionRepository.Live);
1040
1069
  // src/server/core/claude-code/infrastructure/SessionAllowlistRepository.ts
1041
1070
  import { eq } from "drizzle-orm";
1042
1071
  import { Context as Context6, Effect as Effect8, Layer as Layer8 } from "effect";
1043
- import { z as z27 } from "zod";
1072
+ import { z as z28 } from "zod";
1044
1073
 
1045
1074
  // src/server/lib/db/DrizzleService.ts
1046
1075
  import { DatabaseSync } from "node:sqlite";
@@ -1153,7 +1182,7 @@ var DrizzleService = class extends Context5.Tag("DrizzleService")() {
1153
1182
  };
1154
1183
 
1155
1184
  // src/server/core/claude-code/infrastructure/SessionAllowlistRepository.ts
1156
- var allowlistSchema = z27.array(z27.string());
1185
+ var allowlistSchema = z28.array(z28.string());
1157
1186
  var LayerImpl6 = Effect8.gen(function* () {
1158
1187
  const { db } = yield* DrizzleService;
1159
1188
  const getAllowlist = (sessionId) => Effect8.sync(() => {
@@ -1195,7 +1224,7 @@ import {
1195
1224
  } from "@anthropic-ai/claude-agent-sdk";
1196
1225
  import { Context as Context8, Deferred, Effect as Effect10, Layer as Layer10, Ref as Ref3 } from "effect";
1197
1226
  import { ulid } from "ulid";
1198
- import { z as z28 } from "zod";
1227
+ import { z as z29 } from "zod";
1199
1228
 
1200
1229
  // src/server/core/events/services/EventBus.ts
1201
1230
  import { Context as Context7, Effect as Effect9, Layer as Layer9 } from "effect";
@@ -1303,18 +1332,18 @@ var LayerImpl7 = Effect10.gen(function* () {
1303
1332
  const createMcpServer = (options) => {
1304
1333
  const { turnId, projectId, sessionId } = options;
1305
1334
  const questionInputSchema = {
1306
- questions: z28.array(
1307
- z28.object({
1308
- question: z28.string().describe("The question to ask"),
1309
- header: z28.string().max(12).describe("Short label (max 12 chars)"),
1310
- options: z28.array(
1311
- z28.object({
1312
- label: z28.string().describe("Display text (1-5 words)"),
1313
- description: z28.string().describe("What this option means"),
1314
- preview: z28.string().optional().describe("Optional preview content")
1335
+ questions: z29.array(
1336
+ z29.object({
1337
+ question: z29.string().describe("The question to ask"),
1338
+ header: z29.string().max(12).describe("Short label (max 12 chars)"),
1339
+ options: z29.array(
1340
+ z29.object({
1341
+ label: z29.string().describe("Display text (1-5 words)"),
1342
+ description: z29.string().describe("What this option means"),
1343
+ preview: z29.string().optional().describe("Optional preview content")
1315
1344
  })
1316
1345
  ).min(2).max(4),
1317
- multiSelect: z28.boolean().default(false)
1346
+ multiSelect: z29.boolean().default(false)
1318
1347
  })
1319
1348
  ).min(1).max(4)
1320
1349
  };
@@ -1455,7 +1484,7 @@ import { Context as Context11, Effect as Effect14, Layer as Layer13 } from "effe
1455
1484
  import { FileSystem as FileSystem4, Path as Path5 } from "@effect/platform";
1456
1485
  import { count, eq as eq2 } from "drizzle-orm";
1457
1486
  import { Context as Context10, Effect as Effect13, Layer as Layer12, Option } from "effect";
1458
- import { z as z30 } from "zod";
1487
+ import { z as z31 } from "zod";
1459
1488
 
1460
1489
  // src/server/core/search/functions/extractSearchableText.ts
1461
1490
  var extractSearchableText = (conversation) => {
@@ -1762,26 +1791,26 @@ var decodeSessionId = (projectId, sessionId) => {
1762
1791
  var isRegularSessionFile = (filename) => filename.endsWith(".jsonl") && !filename.startsWith("agent-");
1763
1792
 
1764
1793
  // src/lib/claude-code/parseUserMessage.ts
1765
- import { z as z29 } from "zod";
1794
+ import { z as z30 } from "zod";
1766
1795
  var regExp = /<(?<tag>[^>]+)>(?<content>[\s\S]*?)<\/\k<tag>>/g;
1767
- var matchSchema = z29.object({
1768
- tag: z29.string(),
1769
- content: z29.string()
1770
- });
1771
- var parsedUserMessageSchema = z29.union([
1772
- z29.object({
1773
- kind: z29.literal("command"),
1774
- commandName: z29.string(),
1775
- commandArgs: z29.string().optional(),
1776
- commandMessage: z29.string().optional()
1796
+ var matchSchema = z30.object({
1797
+ tag: z30.string(),
1798
+ content: z30.string()
1799
+ });
1800
+ var parsedUserMessageSchema = z30.union([
1801
+ z30.object({
1802
+ kind: z30.literal("command"),
1803
+ commandName: z30.string(),
1804
+ commandArgs: z30.string().optional(),
1805
+ commandMessage: z30.string().optional()
1777
1806
  }),
1778
- z29.object({
1779
- kind: z29.literal("local-command"),
1780
- stdout: z29.string()
1807
+ z30.object({
1808
+ kind: z30.literal("local-command"),
1809
+ stdout: z30.string()
1781
1810
  }),
1782
- z29.object({
1783
- kind: z29.literal("text"),
1784
- content: z29.string()
1811
+ z30.object({
1812
+ kind: z30.literal("text"),
1813
+ content: z30.string()
1785
1814
  })
1786
1815
  ]);
1787
1816
  var parseUserMessage = (content) => {
@@ -1859,7 +1888,7 @@ var extractActualSessionId = (content) => {
1859
1888
  }
1860
1889
  try {
1861
1890
  const parsed = JSON.parse(firstLine);
1862
- const result = z30.object({ sessionId: z30.string() }).safeParse(parsed);
1891
+ const result = z31.object({ sessionId: z31.string() }).safeParse(parsed);
1863
1892
  if (result.success) {
1864
1893
  return result.data.sessionId;
1865
1894
  }
@@ -1890,8 +1919,8 @@ var LayerImpl9 = Effect13.gen(function* () {
1890
1919
  if (indexContent !== "") {
1891
1920
  try {
1892
1921
  const parsed = JSON.parse(indexContent);
1893
- const indexSchema = z30.object({
1894
- entries: z30.array(z30.looseObject({ projectPath: z30.string() }))
1922
+ const indexSchema = z31.object({
1923
+ entries: z31.array(z31.looseObject({ projectPath: z31.string() }))
1895
1924
  });
1896
1925
  const indexResult = indexSchema.safeParse(parsed);
1897
1926
  if (indexResult.success) {
@@ -2135,6 +2164,20 @@ var LayerImpl9 = Effect13.gen(function* () {
2135
2164
  }
2136
2165
  const fileNames = yield* fs.readDirectory(projectPath).pipe(Effect13.catchAll(() => Effect13.succeed([])));
2137
2166
  const sessionFiles = fileNames.filter(isRegularSessionFile);
2167
+ const existingProject = db.select().from(projects).where(eq2(projects.id, projectId)).get();
2168
+ if (existingProject === void 0) {
2169
+ const projectCwd = yield* extractProjectCwd(projectPath, sessionFiles);
2170
+ const dirStat = yield* fs.stat(projectPath).pipe(Effect13.catchAll(() => Effect13.succeed(null)));
2171
+ const dirMtimeMs = dirStat ? Option.getOrElse(dirStat.mtime, () => /* @__PURE__ */ new Date(0)).getTime() : 0;
2172
+ db.insert(projects).values({
2173
+ id: projectId,
2174
+ name: projectCwd !== null ? path.basename(projectCwd) : null,
2175
+ path: projectCwd,
2176
+ sessionCount: 0,
2177
+ dirMtimeMs,
2178
+ syncedAt: Date.now()
2179
+ }).onConflictDoNothing().run();
2180
+ }
2138
2181
  const knownSessions = db.select().from(sessions).where(eq2(sessions.projectId, projectId)).all();
2139
2182
  const knownSessionPaths = new Set(knownSessions.map((s) => s.filePath));
2140
2183
  const seenFilePaths = /* @__PURE__ */ new Set();
@@ -2375,12 +2418,12 @@ var scanSkillFilesWithMetadata = (dirPath) => Effect16.gen(function* () {
2375
2418
  });
2376
2419
 
2377
2420
  // src/server/core/claude-code/models/ClaudeCodeVersion.ts
2378
- import { z as z31 } from "zod";
2421
+ import { z as z32 } from "zod";
2379
2422
  var versionRegex = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/;
2380
- var versionSchema = z31.object({
2381
- major: z31.string().transform((value) => Number.parseInt(value, 10)),
2382
- minor: z31.string().transform((value) => Number.parseInt(value, 10)),
2383
- patch: z31.string().transform((value) => Number.parseInt(value, 10))
2423
+ var versionSchema = z32.object({
2424
+ major: z32.string().transform((value) => Number.parseInt(value, 10)),
2425
+ minor: z32.string().transform((value) => Number.parseInt(value, 10)),
2426
+ patch: z32.string().transform((value) => Number.parseInt(value, 10))
2384
2427
  }).refine((data) => [data.major, data.minor, data.patch].every((value) => !Number.isNaN(value)));
2385
2428
  var fromCLIString = (versionOutput) => {
2386
2429
  const groups = versionOutput.trim().match(versionRegex)?.groups;
@@ -4120,16 +4163,16 @@ import { FileSystem as FileSystem9, Path as Path11 } from "@effect/platform";
4120
4163
  import { Context as Context23, Effect as Effect28, Fiber, Layer as Layer25, Ref as Ref6, Stream } from "effect";
4121
4164
 
4122
4165
  // src/server/core/events/functions/parseSessionFilePath.ts
4123
- import z32 from "zod";
4166
+ import z33 from "zod";
4124
4167
  var sessionFileRegExp = /(?<projectId>.*?)\/(?<sessionId>.*?)\.jsonl$/;
4125
4168
  var agentFileRegExp = /(?<projectId>.*?)\/agent-(?<agentSessionId>.*?)\.jsonl$/;
4126
- var sessionFileGroupSchema = z32.object({
4127
- projectId: z32.string(),
4128
- sessionId: z32.string()
4169
+ var sessionFileGroupSchema = z33.object({
4170
+ projectId: z33.string(),
4171
+ sessionId: z33.string()
4129
4172
  });
4130
- var agentFileGroupSchema = z32.object({
4131
- projectId: z32.string(),
4132
- agentSessionId: z32.string()
4173
+ var agentFileGroupSchema = z33.object({
4174
+ projectId: z33.string(),
4175
+ agentSessionId: z33.string()
4133
4176
  });
4134
4177
  var parseSessionFilePath = (filePath) => {
4135
4178
  const agentMatch = filePath.match(agentFileRegExp);
@@ -5801,7 +5844,7 @@ import { FileSystem as FileSystem15 } from "@effect/platform";
5801
5844
  import { Context as Context28, Effect as Effect36, Layer as Layer30, Ref as Ref7 } from "effect";
5802
5845
  import { ulid as ulid5 } from "ulid";
5803
5846
  import webpush from "web-push";
5804
- import { z as z33 } from "zod";
5847
+ import { z as z34 } from "zod";
5805
5848
 
5806
5849
  // src/server/core/notification/services/pushError.ts
5807
5850
  var isRecord2 = (value) => typeof value === "object" && value !== null;
@@ -5842,9 +5885,9 @@ var formatPushError = (error) => {
5842
5885
  };
5843
5886
 
5844
5887
  // src/server/core/notification/services/NotificationService.ts
5845
- var vapidKeysSchema = z33.object({
5846
- publicKey: z33.string(),
5847
- privateKey: z33.string()
5888
+ var vapidKeysSchema = z34.object({
5889
+ publicKey: z34.string(),
5890
+ privateKey: z34.string()
5848
5891
  });
5849
5892
  var VAPID_KEYS_FILENAME = ".claude-code-viewer/vapid-keys.json";
5850
5893
  var DEFAULT_VAPID_SUBJECT = "mailto:noreply@example.com";
@@ -6164,25 +6207,25 @@ import { Context as Context32, Effect as Effect41, Layer as Layer34, Option as O
6164
6207
  // src/server/core/session/services/SessionMetaService.ts
6165
6208
  import { eq as eq6 } from "drizzle-orm";
6166
6209
  import { Context as Context31, Effect as Effect40, Layer as Layer33 } from "effect";
6167
- import { z as z34 } from "zod";
6210
+ import { z as z35 } from "zod";
6168
6211
  var parsedUserMessageOrNullSchema = parsedUserMessageSchema.nullable();
6169
- var costBreakdownSchema = z34.object({
6170
- inputTokensUsd: z34.number(),
6171
- outputTokensUsd: z34.number(),
6172
- cacheCreationUsd: z34.number(),
6173
- cacheReadUsd: z34.number()
6174
- });
6175
- var tokenUsageSchema = z34.object({
6176
- inputTokens: z34.number(),
6177
- outputTokens: z34.number(),
6178
- cacheCreationTokens: z34.number(),
6179
- cacheReadTokens: z34.number()
6180
- });
6181
- var prLinksSchema = z34.array(
6182
- z34.object({
6183
- prNumber: z34.number(),
6184
- prUrl: z34.string(),
6185
- prRepository: z34.string()
6212
+ var costBreakdownSchema = z35.object({
6213
+ inputTokensUsd: z35.number(),
6214
+ outputTokensUsd: z35.number(),
6215
+ cacheCreationUsd: z35.number(),
6216
+ cacheReadUsd: z35.number()
6217
+ });
6218
+ var tokenUsageSchema = z35.object({
6219
+ inputTokens: z35.number(),
6220
+ outputTokens: z35.number(),
6221
+ cacheCreationTokens: z35.number(),
6222
+ cacheReadTokens: z35.number()
6223
+ });
6224
+ var prLinksSchema = z35.array(
6225
+ z35.object({
6226
+ prNumber: z35.number(),
6227
+ prUrl: z35.string(),
6228
+ prRepository: z35.string()
6186
6229
  })
6187
6230
  );
6188
6231
  var defaultBreakdown = {
@@ -6452,40 +6495,40 @@ import { FileSystem as FileSystem18, Path as Path19 } from "@effect/platform";
6452
6495
  import { Context as Context34, Data as Data5, Effect as Effect43, Layer as Layer36 } from "effect";
6453
6496
 
6454
6497
  // src/server/core/scheduler/schema.ts
6455
- import { z as z35 } from "zod";
6456
- var concurrencyPolicySchema = z35.enum(["skip", "run"]);
6457
- var cronScheduleSchema = z35.object({
6458
- type: z35.literal("cron"),
6459
- expression: z35.string(),
6498
+ import { z as z36 } from "zod";
6499
+ var concurrencyPolicySchema = z36.enum(["skip", "run"]);
6500
+ var cronScheduleSchema = z36.object({
6501
+ type: z36.literal("cron"),
6502
+ expression: z36.string(),
6460
6503
  concurrencyPolicy: concurrencyPolicySchema
6461
6504
  });
6462
- var reservedScheduleSchema = z35.object({
6463
- type: z35.literal("reserved"),
6464
- reservedExecutionTime: z35.iso.datetime()
6505
+ var reservedScheduleSchema = z36.object({
6506
+ type: z36.literal("reserved"),
6507
+ reservedExecutionTime: z36.iso.datetime()
6465
6508
  });
6466
- var scheduleSchema = z35.discriminatedUnion("type", [
6509
+ var scheduleSchema = z36.discriminatedUnion("type", [
6467
6510
  cronScheduleSchema,
6468
6511
  reservedScheduleSchema
6469
6512
  ]);
6470
- var messageConfigSchema = z35.object({
6471
- content: z35.string(),
6472
- projectId: z35.string(),
6473
- sessionId: z35.uuid(),
6474
- resume: z35.boolean()
6475
- });
6476
- var jobStatusSchema = z35.enum(["success", "failed"]);
6477
- var schedulerJobSchema = z35.object({
6478
- id: z35.string(),
6479
- name: z35.string(),
6513
+ var messageConfigSchema = z36.object({
6514
+ content: z36.string(),
6515
+ projectId: z36.string(),
6516
+ sessionId: z36.uuid(),
6517
+ resume: z36.boolean()
6518
+ });
6519
+ var jobStatusSchema = z36.enum(["success", "failed"]);
6520
+ var schedulerJobSchema = z36.object({
6521
+ id: z36.string(),
6522
+ name: z36.string(),
6480
6523
  schedule: scheduleSchema,
6481
6524
  message: messageConfigSchema,
6482
- enabled: z35.boolean(),
6483
- createdAt: z35.iso.datetime(),
6484
- lastRunAt: z35.iso.datetime().nullable(),
6525
+ enabled: z36.boolean(),
6526
+ createdAt: z36.iso.datetime(),
6527
+ lastRunAt: z36.iso.datetime().nullable(),
6485
6528
  lastRunStatus: jobStatusSchema.nullable()
6486
6529
  });
6487
- var schedulerConfigSchema = z35.object({
6488
- jobs: z35.array(schedulerJobSchema)
6530
+ var schedulerConfigSchema = z36.object({
6531
+ jobs: z36.array(schedulerJobSchema)
6489
6532
  });
6490
6533
  var newSchedulerJobSchema = schedulerJobSchema.omit({
6491
6534
  id: true,
@@ -6493,7 +6536,7 @@ var newSchedulerJobSchema = schedulerJobSchema.omit({
6493
6536
  lastRunAt: true,
6494
6537
  lastRunStatus: true
6495
6538
  }).extend({
6496
- enabled: z35.boolean().default(true)
6539
+ enabled: z36.boolean().default(true)
6497
6540
  });
6498
6541
  var updateSchedulerJobSchema = schedulerJobSchema.partial().pick({
6499
6542
  name: true,
@@ -6857,17 +6900,17 @@ var SchedulerService = class extends Context35.Tag("SchedulerService")() {
6857
6900
  };
6858
6901
 
6859
6902
  // src/server/core/rate-limit/schema.ts
6860
- import { z as z36 } from "zod";
6861
- var RateLimitEntrySchema = z36.object({
6862
- type: z36.literal("assistant"),
6863
- error: z36.literal("rate_limit"),
6864
- isApiErrorMessage: z36.literal(true),
6865
- sessionId: z36.string(),
6866
- message: z36.object({
6867
- content: z36.array(
6868
- z36.object({
6869
- type: z36.literal("text"),
6870
- text: z36.string()
6903
+ import { z as z37 } from "zod";
6904
+ var RateLimitEntrySchema = z37.object({
6905
+ type: z37.literal("assistant"),
6906
+ error: z37.literal("rate_limit"),
6907
+ isApiErrorMessage: z37.literal(true),
6908
+ sessionId: z37.string(),
6909
+ message: z37.object({
6910
+ content: z37.array(
6911
+ z37.object({
6912
+ type: z37.literal("text"),
6913
+ text: z37.string()
6871
6914
  })
6872
6915
  )
6873
6916
  })
@@ -8964,38 +9007,38 @@ import { Context as Context42, Effect as Effect54, Layer as Layer44 } from "effe
8964
9007
  // src/server/core/tasks/services/TasksService.ts
8965
9008
  import { FileSystem as FileSystem22, Path as Path21 } from "@effect/platform";
8966
9009
  import { Context as Context41, Effect as Effect53, Layer as Layer43, Option as Option4 } from "effect";
8967
- import { z as z38 } from "zod";
9010
+ import { z as z39 } from "zod";
8968
9011
 
8969
9012
  // src/server/core/tasks/schema.ts
8970
- import { z as z37 } from "zod";
8971
- var TaskStatusSchema = z37.enum(["pending", "in_progress", "completed", "failed"]);
8972
- var TaskSchema = z37.object({
8973
- id: z37.string(),
8974
- subject: z37.string(),
8975
- description: z37.string().optional(),
9013
+ import { z as z38 } from "zod";
9014
+ var TaskStatusSchema = z38.enum(["pending", "in_progress", "completed", "failed"]);
9015
+ var TaskSchema = z38.object({
9016
+ id: z38.string(),
9017
+ subject: z38.string(),
9018
+ description: z38.string().optional(),
8976
9019
  status: TaskStatusSchema,
8977
- owner: z37.string().optional(),
8978
- blocks: z37.array(z37.string()).optional(),
8979
- blockedBy: z37.array(z37.string()).optional(),
8980
- metadata: z37.record(z37.string(), z37.any()).optional(),
8981
- activeForm: z37.string().optional()
8982
- });
8983
- var TaskCreateSchema = z37.object({
8984
- subject: z37.string(),
8985
- description: z37.string().optional(),
8986
- activeForm: z37.string().optional(),
8987
- metadata: z37.record(z37.string(), z37.any()).optional()
8988
- });
8989
- var TaskUpdateSchema = z37.object({
8990
- taskId: z37.string(),
9020
+ owner: z38.string().optional(),
9021
+ blocks: z38.array(z38.string()).optional(),
9022
+ blockedBy: z38.array(z38.string()).optional(),
9023
+ metadata: z38.record(z38.string(), z38.any()).optional(),
9024
+ activeForm: z38.string().optional()
9025
+ });
9026
+ var TaskCreateSchema = z38.object({
9027
+ subject: z38.string(),
9028
+ description: z38.string().optional(),
9029
+ activeForm: z38.string().optional(),
9030
+ metadata: z38.record(z38.string(), z38.any()).optional()
9031
+ });
9032
+ var TaskUpdateSchema = z38.object({
9033
+ taskId: z38.string(),
8991
9034
  status: TaskStatusSchema.optional(),
8992
- subject: z37.string().optional(),
8993
- description: z37.string().optional(),
8994
- activeForm: z37.string().optional(),
8995
- owner: z37.string().optional(),
8996
- addBlockedBy: z37.array(z37.string()).optional(),
8997
- addBlocks: z37.array(z37.string()).optional(),
8998
- metadata: z37.record(z37.string(), z37.any()).optional()
9035
+ subject: z38.string().optional(),
9036
+ description: z38.string().optional(),
9037
+ activeForm: z38.string().optional(),
9038
+ owner: z38.string().optional(),
9039
+ addBlockedBy: z38.array(z38.string()).optional(),
9040
+ addBlocks: z38.array(z38.string()).optional(),
9041
+ metadata: z38.record(z38.string(), z38.any()).optional()
8999
9042
  });
9000
9043
 
9001
9044
  // src/server/core/tasks/services/TasksService.ts
@@ -9122,11 +9165,11 @@ var TasksService = class extends Context41.Tag("TasksService")() {
9122
9165
  Effect53.runFork(
9123
9166
  Effect53.logWarning(`Invalid task file ${file}: ${parsed.error.message}`)
9124
9167
  );
9125
- const fallbackSchema = z38.object({
9126
- id: z38.string().optional(),
9127
- subject: z38.string().optional(),
9128
- title: z38.string().optional(),
9129
- status: z38.enum(["pending", "in_progress", "completed", "failed"]).optional()
9168
+ const fallbackSchema = z39.object({
9169
+ id: z39.string().optional(),
9170
+ subject: z39.string().optional(),
9171
+ title: z39.string().optional(),
9172
+ status: z39.enum(["pending", "in_progress", "completed", "failed"]).optional()
9130
9173
  });
9131
9174
  const fallbackParsed = fallbackSchema.safeParse(task);
9132
9175
  const fb = fallbackParsed.success ? fallbackParsed.data : {};
@@ -9136,7 +9179,7 @@ var TasksService = class extends Context41.Tag("TasksService")() {
9136
9179
  const fallbackTask = {
9137
9180
  id: taskId,
9138
9181
  subject: taskSubject,
9139
- description: `Validation Error: ${JSON.stringify(z38.treeifyError(parsed.error))}. Raw: ${JSON.stringify(task)}`,
9182
+ description: `Validation Error: ${JSON.stringify(z39.treeifyError(parsed.error))}. Raw: ${JSON.stringify(task)}`,
9140
9183
  status: validStatus,
9141
9184
  blocks: [],
9142
9185
  blockedBy: []
@@ -9746,24 +9789,24 @@ import { createMiddleware as createMiddleware3 } from "hono/factory";
9746
9789
  import prexit from "prexit";
9747
9790
 
9748
9791
  // src/lib/config/userConfig.ts
9749
- import z40 from "zod";
9792
+ import z41 from "zod";
9750
9793
 
9751
9794
  // src/lib/i18n/schema.ts
9752
- import z39 from "zod";
9753
- var localeSchema = z39.enum(["ja", "en", "zh_CN"]);
9795
+ import z40 from "zod";
9796
+ var localeSchema = z40.enum(["ja", "en", "zh_CN"]);
9754
9797
 
9755
9798
  // src/lib/config/userConfig.ts
9756
- var userConfigSchema = z40.object({
9757
- hideNoUserMessageSession: z40.boolean().optional().default(true),
9758
- unifySameTitleSession: z40.boolean().optional().default(false),
9759
- enterKeyBehavior: z40.enum(["shift-enter-send", "enter-send", "command-enter-send"]).optional().default("shift-enter-send"),
9799
+ var userConfigSchema = z41.object({
9800
+ hideNoUserMessageSession: z41.boolean().optional().default(true),
9801
+ unifySameTitleSession: z41.boolean().optional().default(false),
9802
+ enterKeyBehavior: z41.enum(["shift-enter-send", "enter-send", "command-enter-send"]).optional().default("shift-enter-send"),
9760
9803
  locale: localeSchema.optional().default("en"),
9761
- theme: z40.enum(["light", "dark", "system"]).optional().default("system"),
9762
- searchHotkey: z40.enum(["ctrl-k", "command-k"]).optional().default("command-k"),
9763
- findHotkey: z40.enum(["ctrl-f", "command-f"]).optional().default("command-f"),
9764
- autoScheduleContinueOnRateLimit: z40.boolean().optional().default(false),
9765
- modelChoices: z40.array(z40.string()).optional().default(["default", "haiku", "sonnet", "opus"]),
9766
- usageMode: z40.enum(["subscription", "api"]).optional()
9804
+ theme: z41.enum(["light", "dark", "system"]).optional().default("system"),
9805
+ searchHotkey: z41.enum(["ctrl-k", "command-k"]).optional().default("command-k"),
9806
+ findHotkey: z41.enum(["ctrl-f", "command-f"]).optional().default("command-f"),
9807
+ autoScheduleContinueOnRateLimit: z41.boolean().optional().default(false),
9808
+ modelChoices: z41.array(z41.string()).optional().default(["default", "haiku", "sonnet", "opus"]),
9809
+ usageMode: z41.enum(["subscription", "api"]).optional()
9767
9810
  });
9768
9811
  var defaultUserConfig = userConfigSchema.parse({});
9769
9812
 
@@ -9812,7 +9855,7 @@ import { zValidator } from "@hono/zod-validator";
9812
9855
  import { Effect as Effect59 } from "effect";
9813
9856
  import { Hono as Hono2 } from "hono";
9814
9857
  import { deleteCookie, getCookie as getCookie3, setCookie as setCookie2 } from "hono/cookie";
9815
- import { z as z41 } from "zod";
9858
+ import { z as z42 } from "zod";
9816
9859
  var safeEqual2 = (a, b) => {
9817
9860
  if (a.length !== b.length) return false;
9818
9861
  return timingSafeEqual2(Buffer.from(a, "utf-8"), Buffer.from(b, "utf-8"));
@@ -9820,7 +9863,7 @@ var safeEqual2 = (a, b) => {
9820
9863
  var authRoutes = Effect59.gen(function* () {
9821
9864
  const { getAuthState } = yield* AuthMiddleware;
9822
9865
  const { validSessionToken, authEnabled, authPassword } = yield* getAuthState;
9823
- return new Hono2().post("/login", zValidator("json", z41.object({ password: z41.string() })), (c) => {
9866
+ return new Hono2().post("/login", zValidator("json", z42.object({ password: z42.string() })), (c) => {
9824
9867
  const { password } = c.req.valid("json");
9825
9868
  if (!authEnabled) {
9826
9869
  return c.json(
@@ -9857,73 +9900,73 @@ var authRoutes = Effect59.gen(function* () {
9857
9900
  import { zValidator as zValidator2 } from "@hono/zod-validator";
9858
9901
  import { Effect as Effect61 } from "effect";
9859
9902
  import { Hono as Hono3 } from "hono";
9860
- import { z as z43 } from "zod";
9903
+ import { z as z44 } from "zod";
9861
9904
 
9862
9905
  // src/server/core/claude-code/schema.ts
9863
- import { z as z42 } from "zod";
9864
- var mediaTypeSchema = z42.enum(["image/png", "image/jpeg", "image/gif", "image/webp"]);
9865
- var imageBlockSchema = z42.object({
9866
- type: z42.literal("image"),
9867
- source: z42.object({
9868
- type: z42.literal("base64"),
9906
+ import { z as z43 } from "zod";
9907
+ var mediaTypeSchema = z43.enum(["image/png", "image/jpeg", "image/gif", "image/webp"]);
9908
+ var imageBlockSchema = z43.object({
9909
+ type: z43.literal("image"),
9910
+ source: z43.object({
9911
+ type: z43.literal("base64"),
9869
9912
  media_type: mediaTypeSchema,
9870
- data: z42.string()
9913
+ data: z43.string()
9871
9914
  })
9872
9915
  });
9873
- var documentBlockSchema = z42.object({
9874
- type: z42.literal("document"),
9875
- source: z42.union([
9876
- z42.object({
9877
- type: z42.literal("text"),
9878
- media_type: z42.enum(["text/plain"]),
9879
- data: z42.string()
9916
+ var documentBlockSchema = z43.object({
9917
+ type: z43.literal("document"),
9918
+ source: z43.union([
9919
+ z43.object({
9920
+ type: z43.literal("text"),
9921
+ media_type: z43.enum(["text/plain"]),
9922
+ data: z43.string()
9880
9923
  }),
9881
- z42.object({
9882
- type: z42.literal("base64"),
9883
- media_type: z42.enum(["application/pdf"]),
9884
- data: z42.string()
9924
+ z43.object({
9925
+ type: z43.literal("base64"),
9926
+ media_type: z43.enum(["application/pdf"]),
9927
+ data: z43.string()
9885
9928
  })
9886
9929
  ])
9887
9930
  });
9888
- var userMessageInputSchema = z42.object({
9889
- text: z42.string().min(1),
9890
- images: z42.array(imageBlockSchema).optional(),
9891
- documents: z42.array(documentBlockSchema).optional()
9892
- });
9893
- var sandboxNetworkConfigSchema = z42.object({
9894
- allowedDomains: z42.array(z42.string()).optional(),
9895
- allowUnixSockets: z42.array(z42.string()).optional(),
9896
- allowAllUnixSockets: z42.boolean().optional(),
9897
- allowLocalBinding: z42.boolean().optional(),
9898
- httpProxyPort: z42.number().optional(),
9899
- socksProxyPort: z42.number().optional()
9900
- });
9901
- var sandboxSettingsSchema = z42.object({
9902
- enabled: z42.boolean().optional(),
9903
- autoAllowBashIfSandboxed: z42.boolean().optional(),
9904
- allowUnsandboxedCommands: z42.boolean().optional(),
9931
+ var userMessageInputSchema = z43.object({
9932
+ text: z43.string().min(1),
9933
+ images: z43.array(imageBlockSchema).optional(),
9934
+ documents: z43.array(documentBlockSchema).optional()
9935
+ });
9936
+ var sandboxNetworkConfigSchema = z43.object({
9937
+ allowedDomains: z43.array(z43.string()).optional(),
9938
+ allowUnixSockets: z43.array(z43.string()).optional(),
9939
+ allowAllUnixSockets: z43.boolean().optional(),
9940
+ allowLocalBinding: z43.boolean().optional(),
9941
+ httpProxyPort: z43.number().optional(),
9942
+ socksProxyPort: z43.number().optional()
9943
+ });
9944
+ var sandboxSettingsSchema = z43.object({
9945
+ enabled: z43.boolean().optional(),
9946
+ autoAllowBashIfSandboxed: z43.boolean().optional(),
9947
+ allowUnsandboxedCommands: z43.boolean().optional(),
9905
9948
  network: sandboxNetworkConfigSchema.optional()
9906
9949
  });
9907
- var ccOptionsSchema = z42.object({
9908
- disallowedTools: z42.array(z42.string()).optional(),
9909
- settingSources: z42.array(z42.enum(["user", "project", "local"])).optional(),
9910
- systemPrompt: z42.union([
9911
- z42.string(),
9912
- z42.object({
9913
- type: z42.literal("preset"),
9914
- preset: z42.literal("claude_code"),
9915
- append: z42.string().optional()
9950
+ var ccOptionsSchema = z43.object({
9951
+ disallowedTools: z43.array(z43.string()).optional(),
9952
+ settingSources: z43.array(z43.enum(["user", "project", "local"])).optional(),
9953
+ systemPrompt: z43.union([
9954
+ z43.string(),
9955
+ z43.object({
9956
+ type: z43.literal("preset"),
9957
+ preset: z43.literal("claude_code"),
9958
+ append: z43.string().optional()
9916
9959
  })
9917
9960
  ]).optional(),
9918
- model: z42.string().optional(),
9961
+ model: z43.string().optional(),
9919
9962
  sandbox: sandboxSettingsSchema.optional(),
9920
- maxTurns: z42.number().optional(),
9921
- maxThinkingTokens: z42.number().optional(),
9922
- env: z42.record(z42.string(), z42.string().optional()).optional(),
9923
- maxBudgetUsd: z42.number().optional(),
9924
- effort: z42.enum(["low", "medium", "high", "max"]).optional(),
9925
- permissionMode: z42.enum(["acceptEdits", "bypassPermissions", "default", "plan"]).optional(),
9926
- agent: z42.string().optional()
9963
+ maxTurns: z43.number().optional(),
9964
+ maxThinkingTokens: z43.number().optional(),
9965
+ env: z43.record(z43.string(), z43.string().optional()).optional(),
9966
+ maxBudgetUsd: z43.number().optional(),
9967
+ effort: z43.enum(["low", "medium", "high", "max"]).optional(),
9968
+ permissionMode: z43.enum(["acceptEdits", "bypassPermissions", "default", "plan"]).optional(),
9969
+ agent: z43.string().optional()
9927
9970
  });
9928
9971
 
9929
9972
  // src/server/lib/effect/toEffectResponse.ts
@@ -9979,11 +10022,11 @@ var claudeCodeRoutes = Effect61.gen(function* () {
9979
10022
  "/session-processes",
9980
10023
  zValidator2(
9981
10024
  "json",
9982
- z43.object({
9983
- projectId: z43.string(),
9984
- sessionId: z43.uuid(),
10025
+ z44.object({
10026
+ projectId: z44.string(),
10027
+ sessionId: z44.uuid(),
9985
10028
  input: userMessageInputSchema,
9986
- resume: z43.boolean(),
10029
+ resume: z44.boolean(),
9987
10030
  ccOptions: ccOptionsSchema.optional()
9988
10031
  })
9989
10032
  ),
@@ -10003,10 +10046,10 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10003
10046
  "/session-processes/:sessionProcessId/continue",
10004
10047
  zValidator2(
10005
10048
  "json",
10006
- z43.object({
10007
- projectId: z43.string(),
10049
+ z44.object({
10050
+ projectId: z44.string(),
10008
10051
  input: userMessageInputSchema,
10009
- baseSessionId: z43.string()
10052
+ baseSessionId: z44.string()
10010
10053
  })
10011
10054
  ),
10012
10055
  async (c) => {
@@ -10024,7 +10067,7 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10024
10067
  }
10025
10068
  ).post(
10026
10069
  "/session-processes/:sessionProcessId/abort",
10027
- zValidator2("json", z43.object({ projectId: z43.string() })),
10070
+ zValidator2("json", z44.object({ projectId: z44.string() })),
10028
10071
  (c) => {
10029
10072
  const { sessionProcessId } = c.req.param();
10030
10073
  void Effect61.runFork(claudeCodeLifeCycleService.abortTask(sessionProcessId));
@@ -10046,11 +10089,11 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10046
10089
  "/permission-response",
10047
10090
  zValidator2(
10048
10091
  "json",
10049
- z43.object({
10050
- permissionRequestId: z43.string(),
10051
- decision: z43.enum(["allow", "deny", "always_allow"]),
10052
- alwaysAllowRule: z43.string().optional(),
10053
- alwaysAllowScope: z43.enum(["session", "project"]).optional()
10092
+ z44.object({
10093
+ permissionRequestId: z44.string(),
10094
+ decision: z44.enum(["allow", "deny", "always_allow"]),
10095
+ alwaysAllowRule: z44.string().optional(),
10096
+ alwaysAllowScope: z44.enum(["session", "project"]).optional()
10054
10097
  })
10055
10098
  ),
10056
10099
  async (c) => {
@@ -10066,14 +10109,14 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10066
10109
  "/question-response",
10067
10110
  zValidator2(
10068
10111
  "json",
10069
- z43.object({
10070
- questionRequestId: z43.string(),
10071
- answers: z43.record(z43.string(), z43.string()),
10072
- annotations: z43.record(
10073
- z43.string(),
10074
- z43.object({
10075
- notes: z43.string().optional(),
10076
- preview: z43.string().optional()
10112
+ z44.object({
10113
+ questionRequestId: z44.string(),
10114
+ answers: z44.record(z44.string(), z44.string()),
10115
+ annotations: z44.record(
10116
+ z44.string(),
10117
+ z44.object({
10118
+ notes: z44.string().optional(),
10119
+ preview: z44.string().optional()
10077
10120
  })
10078
10121
  )
10079
10122
  })
@@ -10091,10 +10134,10 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10091
10134
  "/generate-permission-rule",
10092
10135
  zValidator2(
10093
10136
  "json",
10094
- z43.object({
10095
- toolName: z43.string(),
10096
- toolInput: z43.record(z43.string(), z43.unknown()),
10097
- projectId: z43.string()
10137
+ z44.object({
10138
+ toolName: z44.string(),
10139
+ toolInput: z44.record(z44.string(), z44.unknown()),
10140
+ projectId: z44.string()
10098
10141
  })
10099
10142
  ),
10100
10143
  async (c) => {
@@ -10127,16 +10170,16 @@ var featureFlagRoutes = Effect62.gen(function* () {
10127
10170
  import { zValidator as zValidator3 } from "@hono/zod-validator";
10128
10171
  import { Effect as Effect63 } from "effect";
10129
10172
  import { Hono as Hono5 } from "hono";
10130
- import { z as z44 } from "zod";
10173
+ import { z as z45 } from "zod";
10131
10174
  var fileSystemRoutes = Effect63.gen(function* () {
10132
10175
  const fileSystemController = yield* FileSystemController;
10133
10176
  return new Hono5().get(
10134
10177
  "/file-completion",
10135
10178
  zValidator3(
10136
10179
  "query",
10137
- z44.object({
10138
- projectId: z44.string(),
10139
- basePath: z44.string().optional().default("/")
10180
+ z45.object({
10181
+ projectId: z45.string(),
10182
+ basePath: z45.string().optional().default("/")
10140
10183
  })
10141
10184
  ),
10142
10185
  async (c) => {
@@ -10152,9 +10195,9 @@ var fileSystemRoutes = Effect63.gen(function* () {
10152
10195
  "/directory-browser",
10153
10196
  zValidator3(
10154
10197
  "query",
10155
- z44.object({
10156
- currentPath: z44.string().optional(),
10157
- showHidden: z44.string().optional().transform((val) => val === "true")
10198
+ z45.object({
10199
+ currentPath: z45.string().optional(),
10200
+ showHidden: z45.string().optional().transform((val) => val === "true")
10158
10201
  })
10159
10202
  ),
10160
10203
  async (c) => {
@@ -10173,12 +10216,12 @@ var fileSystemRoutes = Effect63.gen(function* () {
10173
10216
  import { zValidator as zValidator4 } from "@hono/zod-validator";
10174
10217
  import { Effect as Effect64 } from "effect";
10175
10218
  import { Hono as Hono6 } from "hono";
10176
- import { z as z45 } from "zod";
10177
- var pushSubscriptionSchema = z45.object({
10178
- endpoint: z45.string(),
10179
- keys: z45.object({
10180
- p256dh: z45.string(),
10181
- auth: z45.string()
10219
+ import { z as z46 } from "zod";
10220
+ var pushSubscriptionSchema = z46.object({
10221
+ endpoint: z46.string(),
10222
+ keys: z46.object({
10223
+ p256dh: z46.string(),
10224
+ auth: z46.string()
10182
10225
  })
10183
10226
  });
10184
10227
  var notificationRoutes = Effect64.gen(function* () {
@@ -10190,9 +10233,9 @@ var notificationRoutes = Effect64.gen(function* () {
10190
10233
  "/:sessionId/consume",
10191
10234
  zValidator4(
10192
10235
  "json",
10193
- z45.object({
10194
- types: z45.array(
10195
- z45.enum([
10236
+ z46.object({
10237
+ types: z46.array(
10238
+ z46.enum([
10196
10239
  "session_paused",
10197
10240
  "session_completed",
10198
10241
  "permission_requested",
@@ -10230,24 +10273,24 @@ var notificationRoutes = Effect64.gen(function* () {
10230
10273
  import { zValidator as zValidator5 } from "@hono/zod-validator";
10231
10274
  import { Effect as Effect65 } from "effect";
10232
10275
  import { Hono as Hono7 } from "hono";
10233
- import { z as z47 } from "zod";
10276
+ import { z as z48 } from "zod";
10234
10277
 
10235
10278
  // src/server/core/git/schema.ts
10236
- import { z as z46 } from "zod";
10237
- var CommitRequestSchema = z46.object({
10238
- files: z46.array(z46.string().min(1)).min(1),
10239
- message: z46.string().trim().min(1)
10240
- });
10241
- var CommitResultSuccessSchema = z46.object({
10242
- success: z46.literal(true),
10243
- commitSha: z46.string().length(40),
10244
- filesCommitted: z46.number().int().positive(),
10245
- message: z46.string()
10246
- });
10247
- var CommitResultErrorSchema = z46.object({
10248
- success: z46.literal(false),
10249
- error: z46.string(),
10250
- errorCode: z46.enum([
10279
+ import { z as z47 } from "zod";
10280
+ var CommitRequestSchema = z47.object({
10281
+ files: z47.array(z47.string().min(1)).min(1),
10282
+ message: z47.string().trim().min(1)
10283
+ });
10284
+ var CommitResultSuccessSchema = z47.object({
10285
+ success: z47.literal(true),
10286
+ commitSha: z47.string().length(40),
10287
+ filesCommitted: z47.number().int().positive(),
10288
+ message: z47.string()
10289
+ });
10290
+ var CommitResultErrorSchema = z47.object({
10291
+ success: z47.literal(false),
10292
+ error: z47.string(),
10293
+ errorCode: z47.enum([
10251
10294
  "EMPTY_MESSAGE",
10252
10295
  "NO_FILES",
10253
10296
  "PROJECT_NOT_FOUND",
@@ -10255,22 +10298,22 @@ var CommitResultErrorSchema = z46.object({
10255
10298
  "HOOK_FAILED",
10256
10299
  "GIT_COMMAND_ERROR"
10257
10300
  ]),
10258
- details: z46.string().optional()
10301
+ details: z47.string().optional()
10259
10302
  });
10260
- var CommitResultSchema = z46.discriminatedUnion("success", [
10303
+ var CommitResultSchema = z47.discriminatedUnion("success", [
10261
10304
  CommitResultSuccessSchema,
10262
10305
  CommitResultErrorSchema
10263
10306
  ]);
10264
- var PushResultSuccessSchema = z46.object({
10265
- success: z46.literal(true),
10266
- remote: z46.string(),
10267
- branch: z46.string(),
10268
- objectsPushed: z46.number().int().optional()
10269
- });
10270
- var PushResultErrorSchema = z46.object({
10271
- success: z46.literal(false),
10272
- error: z46.string(),
10273
- errorCode: z46.enum([
10307
+ var PushResultSuccessSchema = z47.object({
10308
+ success: z47.literal(true),
10309
+ remote: z47.string(),
10310
+ branch: z47.string(),
10311
+ objectsPushed: z47.number().int().optional()
10312
+ });
10313
+ var PushResultErrorSchema = z47.object({
10314
+ success: z47.literal(false),
10315
+ error: z47.string(),
10316
+ errorCode: z47.enum([
10274
10317
  "PROJECT_NOT_FOUND",
10275
10318
  "NOT_A_REPOSITORY",
10276
10319
  "NO_UPSTREAM",
@@ -10280,26 +10323,26 @@ var PushResultErrorSchema = z46.object({
10280
10323
  "TIMEOUT",
10281
10324
  "GIT_COMMAND_ERROR"
10282
10325
  ]),
10283
- details: z46.string().optional()
10326
+ details: z47.string().optional()
10284
10327
  });
10285
- var PushResultSchema = z46.discriminatedUnion("success", [
10328
+ var PushResultSchema = z47.discriminatedUnion("success", [
10286
10329
  PushResultSuccessSchema,
10287
10330
  PushResultErrorSchema
10288
10331
  ]);
10289
- var CommitAndPushResultSuccessSchema = z46.object({
10290
- success: z46.literal(true),
10291
- commitSha: z46.string().length(40),
10292
- filesCommitted: z46.number().int().positive(),
10293
- message: z46.string(),
10294
- remote: z46.string(),
10295
- branch: z46.string()
10296
- });
10297
- var CommitAndPushResultErrorSchema = z46.object({
10298
- success: z46.literal(false),
10299
- commitSucceeded: z46.boolean(),
10300
- commitSha: z46.string().length(40).optional(),
10301
- error: z46.string(),
10302
- errorCode: z46.enum([
10332
+ var CommitAndPushResultSuccessSchema = z47.object({
10333
+ success: z47.literal(true),
10334
+ commitSha: z47.string().length(40),
10335
+ filesCommitted: z47.number().int().positive(),
10336
+ message: z47.string(),
10337
+ remote: z47.string(),
10338
+ branch: z47.string()
10339
+ });
10340
+ var CommitAndPushResultErrorSchema = z47.object({
10341
+ success: z47.literal(false),
10342
+ commitSucceeded: z47.boolean(),
10343
+ commitSha: z47.string().length(40).optional(),
10344
+ error: z47.string(),
10345
+ errorCode: z47.enum([
10303
10346
  "EMPTY_MESSAGE",
10304
10347
  "NO_FILES",
10305
10348
  "PROJECT_NOT_FOUND",
@@ -10312,9 +10355,9 @@ var CommitAndPushResultErrorSchema = z46.object({
10312
10355
  "NETWORK_ERROR",
10313
10356
  "TIMEOUT"
10314
10357
  ]),
10315
- details: z46.string().optional()
10358
+ details: z47.string().optional()
10316
10359
  });
10317
- var CommitAndPushResultSchema = z46.discriminatedUnion("success", [
10360
+ var CommitAndPushResultSchema = z47.discriminatedUnion("success", [
10318
10361
  CommitAndPushResultSuccessSchema,
10319
10362
  CommitAndPushResultErrorSchema
10320
10363
  ]);
@@ -10333,7 +10376,7 @@ var projectRoutes = Effect65.gen(function* () {
10333
10376
  return response;
10334
10377
  }).get(
10335
10378
  "/:projectId",
10336
- zValidator5("query", z47.object({ cursor: z47.string().optional() })),
10379
+ zValidator5("query", z48.object({ cursor: z48.string().optional() })),
10337
10380
  async (c) => {
10338
10381
  const response = await effectToResponse(
10339
10382
  c,
@@ -10348,8 +10391,8 @@ var projectRoutes = Effect65.gen(function* () {
10348
10391
  "/",
10349
10392
  zValidator5(
10350
10393
  "json",
10351
- z47.object({
10352
- projectPath: z47.string().min(1, "Project path is required")
10394
+ z48.object({
10395
+ projectPath: z48.string().min(1, "Project path is required")
10353
10396
  })
10354
10397
  ),
10355
10398
  async (c) => {
@@ -10406,7 +10449,7 @@ var projectRoutes = Effect65.gen(function* () {
10406
10449
  return response;
10407
10450
  }).get(
10408
10451
  "/:projectId/agent-sessions/:agentId",
10409
- zValidator5("query", z47.object({ sessionId: z47.string().optional() })),
10452
+ zValidator5("query", z48.object({ sessionId: z48.string().optional() })),
10410
10453
  async (c) => {
10411
10454
  const projectId = c.req.param("projectId");
10412
10455
  const agentId = c.req.param("agentId");
@@ -10441,8 +10484,8 @@ var projectRoutes = Effect65.gen(function* () {
10441
10484
  "/:projectId/files",
10442
10485
  zValidator5(
10443
10486
  "query",
10444
- z47.object({
10445
- filePath: z47.string().min(1, "filePath is required")
10487
+ z48.object({
10488
+ filePath: z48.string().min(1, "filePath is required")
10446
10489
  })
10447
10490
  ),
10448
10491
  async (c) => {
@@ -10470,9 +10513,9 @@ var projectRoutes = Effect65.gen(function* () {
10470
10513
  "/:projectId/git/diff",
10471
10514
  zValidator5(
10472
10515
  "json",
10473
- z47.object({
10474
- fromRef: z47.string().min(1, "fromRef is required"),
10475
- toRef: z47.string().min(1, "toRef is required")
10516
+ z48.object({
10517
+ fromRef: z48.string().min(1, "fromRef is required"),
10518
+ toRef: z48.string().min(1, "toRef is required")
10476
10519
  })
10477
10520
  ),
10478
10521
  async (c) => {
@@ -10532,8 +10575,8 @@ var projectRoutes = Effect65.gen(function* () {
10532
10575
  "/:projectId/git/checkout",
10533
10576
  zValidator5(
10534
10577
  "json",
10535
- z47.object({
10536
- branchName: z47.string().min(1, "branchName is required")
10578
+ z48.object({
10579
+ branchName: z48.string().min(1, "branchName is required")
10537
10580
  })
10538
10581
  ),
10539
10582
  async (c) => {
@@ -10595,7 +10638,7 @@ var schedulerRoutes = Effect66.gen(function* () {
10595
10638
  import { zValidator as zValidator7 } from "@hono/zod-validator";
10596
10639
  import { Effect as Effect67 } from "effect";
10597
10640
  import { Hono as Hono9 } from "hono";
10598
- import { z as z48 } from "zod";
10641
+ import { z as z49 } from "zod";
10599
10642
  var searchRoutes = Effect67.gen(function* () {
10600
10643
  const searchController = yield* SearchController;
10601
10644
  const runtime = yield* getHonoRuntime;
@@ -10603,10 +10646,10 @@ var searchRoutes = Effect67.gen(function* () {
10603
10646
  "/",
10604
10647
  zValidator7(
10605
10648
  "query",
10606
- z48.object({
10607
- q: z48.string().min(2),
10608
- limit: z48.string().optional().transform((val) => val !== void 0 && val !== "" ? parseInt(val, 10) : void 0),
10609
- projectId: z48.string().optional()
10649
+ z49.object({
10650
+ q: z49.string().min(2),
10651
+ limit: z49.string().optional().transform((val) => val !== void 0 && val !== "" ? parseInt(val, 10) : void 0),
10652
+ projectId: z49.string().optional()
10610
10653
  })
10611
10654
  ),
10612
10655
  async (c) => {
@@ -10647,7 +10690,7 @@ import { zValidator as zValidator8 } from "@hono/zod-validator";
10647
10690
  import { Effect as Effect69 } from "effect";
10648
10691
  import { Hono as Hono11 } from "hono";
10649
10692
  import { HTTPException } from "hono/http-exception";
10650
- import { z as z49 } from "zod";
10693
+ import { z as z50 } from "zod";
10651
10694
  var getClaudeProjectsDirPath = Effect69.gen(function* () {
10652
10695
  const applicationContext = yield* ApplicationContext;
10653
10696
  const claudeCodePaths = yield* applicationContext.claudeCodePaths;
@@ -10660,9 +10703,9 @@ var tasksRoutes = Effect69.gen(function* () {
10660
10703
  "/",
10661
10704
  zValidator8(
10662
10705
  "query",
10663
- z49.object({
10664
- projectId: z49.string(),
10665
- sessionId: z49.string().optional()
10706
+ z50.object({
10707
+ projectId: z50.string(),
10708
+ sessionId: z50.string().optional()
10666
10709
  })
10667
10710
  ),
10668
10711
  async (c) => {
@@ -10691,9 +10734,9 @@ var tasksRoutes = Effect69.gen(function* () {
10691
10734
  "/",
10692
10735
  zValidator8(
10693
10736
  "query",
10694
- z49.object({
10695
- projectId: z49.string(),
10696
- sessionId: z49.string().optional()
10737
+ z50.object({
10738
+ projectId: z50.string(),
10739
+ sessionId: z50.string().optional()
10697
10740
  })
10698
10741
  ),
10699
10742
  zValidator8("json", TaskCreateSchema),
@@ -10724,9 +10767,9 @@ var tasksRoutes = Effect69.gen(function* () {
10724
10767
  "/:taskId",
10725
10768
  zValidator8(
10726
10769
  "query",
10727
- z49.object({
10728
- projectId: z49.string(),
10729
- sessionId: z49.string().optional()
10770
+ z50.object({
10771
+ projectId: z50.string(),
10772
+ sessionId: z50.string().optional()
10730
10773
  })
10731
10774
  ),
10732
10775
  zValidator8("json", TaskUpdateSchema.omit({ taskId: true })),
@@ -10844,7 +10887,7 @@ var withServerLogLevel = (verbose) => (effect) => effect.pipe(Logger.withMinimum
10844
10887
  // src/server/terminal/terminalWebSocket.ts
10845
10888
  import { Effect as Effect71, Runtime as Runtime5 } from "effect";
10846
10889
  import WebSocket, { WebSocketServer } from "ws";
10847
- import { z as z50 } from "zod";
10890
+ import { z as z51 } from "zod";
10848
10891
  var parseCookies = (cookieHeader) => {
10849
10892
  const result = {};
10850
10893
  if (cookieHeader === void 0 || cookieHeader === "") return result;
@@ -10856,12 +10899,12 @@ var parseCookies = (cookieHeader) => {
10856
10899
  }
10857
10900
  return result;
10858
10901
  };
10859
- var clientMessageSchema = z50.union([
10860
- z50.object({ type: z50.literal("input"), data: z50.string() }),
10861
- z50.object({ type: z50.literal("resize"), cols: z50.number(), rows: z50.number() }),
10862
- z50.object({ type: z50.literal("signal"), name: z50.string() }),
10863
- z50.object({ type: z50.literal("sync"), lastSeq: z50.number() }),
10864
- z50.object({ type: z50.literal("ping") })
10902
+ var clientMessageSchema = z51.union([
10903
+ z51.object({ type: z51.literal("input"), data: z51.string() }),
10904
+ z51.object({ type: z51.literal("resize"), cols: z51.number(), rows: z51.number() }),
10905
+ z51.object({ type: z51.literal("signal"), name: z51.string() }),
10906
+ z51.object({ type: z51.literal("sync"), lastSeq: z51.number() }),
10907
+ z51.object({ type: z51.literal("ping") })
10865
10908
  ]);
10866
10909
  var parseClientMessage = (payload) => {
10867
10910
  try {