@kimuson/claude-code-viewer 0.7.2 → 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.2",
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) {
@@ -2389,12 +2418,12 @@ var scanSkillFilesWithMetadata = (dirPath) => Effect16.gen(function* () {
2389
2418
  });
2390
2419
 
2391
2420
  // src/server/core/claude-code/models/ClaudeCodeVersion.ts
2392
- import { z as z31 } from "zod";
2421
+ import { z as z32 } from "zod";
2393
2422
  var versionRegex = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/;
2394
- var versionSchema = z31.object({
2395
- major: z31.string().transform((value) => Number.parseInt(value, 10)),
2396
- minor: z31.string().transform((value) => Number.parseInt(value, 10)),
2397
- 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))
2398
2427
  }).refine((data) => [data.major, data.minor, data.patch].every((value) => !Number.isNaN(value)));
2399
2428
  var fromCLIString = (versionOutput) => {
2400
2429
  const groups = versionOutput.trim().match(versionRegex)?.groups;
@@ -4134,16 +4163,16 @@ import { FileSystem as FileSystem9, Path as Path11 } from "@effect/platform";
4134
4163
  import { Context as Context23, Effect as Effect28, Fiber, Layer as Layer25, Ref as Ref6, Stream } from "effect";
4135
4164
 
4136
4165
  // src/server/core/events/functions/parseSessionFilePath.ts
4137
- import z32 from "zod";
4166
+ import z33 from "zod";
4138
4167
  var sessionFileRegExp = /(?<projectId>.*?)\/(?<sessionId>.*?)\.jsonl$/;
4139
4168
  var agentFileRegExp = /(?<projectId>.*?)\/agent-(?<agentSessionId>.*?)\.jsonl$/;
4140
- var sessionFileGroupSchema = z32.object({
4141
- projectId: z32.string(),
4142
- sessionId: z32.string()
4169
+ var sessionFileGroupSchema = z33.object({
4170
+ projectId: z33.string(),
4171
+ sessionId: z33.string()
4143
4172
  });
4144
- var agentFileGroupSchema = z32.object({
4145
- projectId: z32.string(),
4146
- agentSessionId: z32.string()
4173
+ var agentFileGroupSchema = z33.object({
4174
+ projectId: z33.string(),
4175
+ agentSessionId: z33.string()
4147
4176
  });
4148
4177
  var parseSessionFilePath = (filePath) => {
4149
4178
  const agentMatch = filePath.match(agentFileRegExp);
@@ -5815,7 +5844,7 @@ import { FileSystem as FileSystem15 } from "@effect/platform";
5815
5844
  import { Context as Context28, Effect as Effect36, Layer as Layer30, Ref as Ref7 } from "effect";
5816
5845
  import { ulid as ulid5 } from "ulid";
5817
5846
  import webpush from "web-push";
5818
- import { z as z33 } from "zod";
5847
+ import { z as z34 } from "zod";
5819
5848
 
5820
5849
  // src/server/core/notification/services/pushError.ts
5821
5850
  var isRecord2 = (value) => typeof value === "object" && value !== null;
@@ -5856,9 +5885,9 @@ var formatPushError = (error) => {
5856
5885
  };
5857
5886
 
5858
5887
  // src/server/core/notification/services/NotificationService.ts
5859
- var vapidKeysSchema = z33.object({
5860
- publicKey: z33.string(),
5861
- privateKey: z33.string()
5888
+ var vapidKeysSchema = z34.object({
5889
+ publicKey: z34.string(),
5890
+ privateKey: z34.string()
5862
5891
  });
5863
5892
  var VAPID_KEYS_FILENAME = ".claude-code-viewer/vapid-keys.json";
5864
5893
  var DEFAULT_VAPID_SUBJECT = "mailto:noreply@example.com";
@@ -6178,25 +6207,25 @@ import { Context as Context32, Effect as Effect41, Layer as Layer34, Option as O
6178
6207
  // src/server/core/session/services/SessionMetaService.ts
6179
6208
  import { eq as eq6 } from "drizzle-orm";
6180
6209
  import { Context as Context31, Effect as Effect40, Layer as Layer33 } from "effect";
6181
- import { z as z34 } from "zod";
6210
+ import { z as z35 } from "zod";
6182
6211
  var parsedUserMessageOrNullSchema = parsedUserMessageSchema.nullable();
6183
- var costBreakdownSchema = z34.object({
6184
- inputTokensUsd: z34.number(),
6185
- outputTokensUsd: z34.number(),
6186
- cacheCreationUsd: z34.number(),
6187
- cacheReadUsd: z34.number()
6188
- });
6189
- var tokenUsageSchema = z34.object({
6190
- inputTokens: z34.number(),
6191
- outputTokens: z34.number(),
6192
- cacheCreationTokens: z34.number(),
6193
- cacheReadTokens: z34.number()
6194
- });
6195
- var prLinksSchema = z34.array(
6196
- z34.object({
6197
- prNumber: z34.number(),
6198
- prUrl: z34.string(),
6199
- 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()
6200
6229
  })
6201
6230
  );
6202
6231
  var defaultBreakdown = {
@@ -6466,40 +6495,40 @@ import { FileSystem as FileSystem18, Path as Path19 } from "@effect/platform";
6466
6495
  import { Context as Context34, Data as Data5, Effect as Effect43, Layer as Layer36 } from "effect";
6467
6496
 
6468
6497
  // src/server/core/scheduler/schema.ts
6469
- import { z as z35 } from "zod";
6470
- var concurrencyPolicySchema = z35.enum(["skip", "run"]);
6471
- var cronScheduleSchema = z35.object({
6472
- type: z35.literal("cron"),
6473
- 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(),
6474
6503
  concurrencyPolicy: concurrencyPolicySchema
6475
6504
  });
6476
- var reservedScheduleSchema = z35.object({
6477
- type: z35.literal("reserved"),
6478
- reservedExecutionTime: z35.iso.datetime()
6505
+ var reservedScheduleSchema = z36.object({
6506
+ type: z36.literal("reserved"),
6507
+ reservedExecutionTime: z36.iso.datetime()
6479
6508
  });
6480
- var scheduleSchema = z35.discriminatedUnion("type", [
6509
+ var scheduleSchema = z36.discriminatedUnion("type", [
6481
6510
  cronScheduleSchema,
6482
6511
  reservedScheduleSchema
6483
6512
  ]);
6484
- var messageConfigSchema = z35.object({
6485
- content: z35.string(),
6486
- projectId: z35.string(),
6487
- sessionId: z35.uuid(),
6488
- resume: z35.boolean()
6489
- });
6490
- var jobStatusSchema = z35.enum(["success", "failed"]);
6491
- var schedulerJobSchema = z35.object({
6492
- id: z35.string(),
6493
- 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(),
6494
6523
  schedule: scheduleSchema,
6495
6524
  message: messageConfigSchema,
6496
- enabled: z35.boolean(),
6497
- createdAt: z35.iso.datetime(),
6498
- lastRunAt: z35.iso.datetime().nullable(),
6525
+ enabled: z36.boolean(),
6526
+ createdAt: z36.iso.datetime(),
6527
+ lastRunAt: z36.iso.datetime().nullable(),
6499
6528
  lastRunStatus: jobStatusSchema.nullable()
6500
6529
  });
6501
- var schedulerConfigSchema = z35.object({
6502
- jobs: z35.array(schedulerJobSchema)
6530
+ var schedulerConfigSchema = z36.object({
6531
+ jobs: z36.array(schedulerJobSchema)
6503
6532
  });
6504
6533
  var newSchedulerJobSchema = schedulerJobSchema.omit({
6505
6534
  id: true,
@@ -6507,7 +6536,7 @@ var newSchedulerJobSchema = schedulerJobSchema.omit({
6507
6536
  lastRunAt: true,
6508
6537
  lastRunStatus: true
6509
6538
  }).extend({
6510
- enabled: z35.boolean().default(true)
6539
+ enabled: z36.boolean().default(true)
6511
6540
  });
6512
6541
  var updateSchedulerJobSchema = schedulerJobSchema.partial().pick({
6513
6542
  name: true,
@@ -6871,17 +6900,17 @@ var SchedulerService = class extends Context35.Tag("SchedulerService")() {
6871
6900
  };
6872
6901
 
6873
6902
  // src/server/core/rate-limit/schema.ts
6874
- import { z as z36 } from "zod";
6875
- var RateLimitEntrySchema = z36.object({
6876
- type: z36.literal("assistant"),
6877
- error: z36.literal("rate_limit"),
6878
- isApiErrorMessage: z36.literal(true),
6879
- sessionId: z36.string(),
6880
- message: z36.object({
6881
- content: z36.array(
6882
- z36.object({
6883
- type: z36.literal("text"),
6884
- 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()
6885
6914
  })
6886
6915
  )
6887
6916
  })
@@ -8978,38 +9007,38 @@ import { Context as Context42, Effect as Effect54, Layer as Layer44 } from "effe
8978
9007
  // src/server/core/tasks/services/TasksService.ts
8979
9008
  import { FileSystem as FileSystem22, Path as Path21 } from "@effect/platform";
8980
9009
  import { Context as Context41, Effect as Effect53, Layer as Layer43, Option as Option4 } from "effect";
8981
- import { z as z38 } from "zod";
9010
+ import { z as z39 } from "zod";
8982
9011
 
8983
9012
  // src/server/core/tasks/schema.ts
8984
- import { z as z37 } from "zod";
8985
- var TaskStatusSchema = z37.enum(["pending", "in_progress", "completed", "failed"]);
8986
- var TaskSchema = z37.object({
8987
- id: z37.string(),
8988
- subject: z37.string(),
8989
- 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(),
8990
9019
  status: TaskStatusSchema,
8991
- owner: z37.string().optional(),
8992
- blocks: z37.array(z37.string()).optional(),
8993
- blockedBy: z37.array(z37.string()).optional(),
8994
- metadata: z37.record(z37.string(), z37.any()).optional(),
8995
- activeForm: z37.string().optional()
8996
- });
8997
- var TaskCreateSchema = z37.object({
8998
- subject: z37.string(),
8999
- description: z37.string().optional(),
9000
- activeForm: z37.string().optional(),
9001
- metadata: z37.record(z37.string(), z37.any()).optional()
9002
- });
9003
- var TaskUpdateSchema = z37.object({
9004
- 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(),
9005
9034
  status: TaskStatusSchema.optional(),
9006
- subject: z37.string().optional(),
9007
- description: z37.string().optional(),
9008
- activeForm: z37.string().optional(),
9009
- owner: z37.string().optional(),
9010
- addBlockedBy: z37.array(z37.string()).optional(),
9011
- addBlocks: z37.array(z37.string()).optional(),
9012
- 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()
9013
9042
  });
9014
9043
 
9015
9044
  // src/server/core/tasks/services/TasksService.ts
@@ -9136,11 +9165,11 @@ var TasksService = class extends Context41.Tag("TasksService")() {
9136
9165
  Effect53.runFork(
9137
9166
  Effect53.logWarning(`Invalid task file ${file}: ${parsed.error.message}`)
9138
9167
  );
9139
- const fallbackSchema = z38.object({
9140
- id: z38.string().optional(),
9141
- subject: z38.string().optional(),
9142
- title: z38.string().optional(),
9143
- 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()
9144
9173
  });
9145
9174
  const fallbackParsed = fallbackSchema.safeParse(task);
9146
9175
  const fb = fallbackParsed.success ? fallbackParsed.data : {};
@@ -9150,7 +9179,7 @@ var TasksService = class extends Context41.Tag("TasksService")() {
9150
9179
  const fallbackTask = {
9151
9180
  id: taskId,
9152
9181
  subject: taskSubject,
9153
- 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)}`,
9154
9183
  status: validStatus,
9155
9184
  blocks: [],
9156
9185
  blockedBy: []
@@ -9760,24 +9789,24 @@ import { createMiddleware as createMiddleware3 } from "hono/factory";
9760
9789
  import prexit from "prexit";
9761
9790
 
9762
9791
  // src/lib/config/userConfig.ts
9763
- import z40 from "zod";
9792
+ import z41 from "zod";
9764
9793
 
9765
9794
  // src/lib/i18n/schema.ts
9766
- import z39 from "zod";
9767
- var localeSchema = z39.enum(["ja", "en", "zh_CN"]);
9795
+ import z40 from "zod";
9796
+ var localeSchema = z40.enum(["ja", "en", "zh_CN"]);
9768
9797
 
9769
9798
  // src/lib/config/userConfig.ts
9770
- var userConfigSchema = z40.object({
9771
- hideNoUserMessageSession: z40.boolean().optional().default(true),
9772
- unifySameTitleSession: z40.boolean().optional().default(false),
9773
- 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"),
9774
9803
  locale: localeSchema.optional().default("en"),
9775
- theme: z40.enum(["light", "dark", "system"]).optional().default("system"),
9776
- searchHotkey: z40.enum(["ctrl-k", "command-k"]).optional().default("command-k"),
9777
- findHotkey: z40.enum(["ctrl-f", "command-f"]).optional().default("command-f"),
9778
- autoScheduleContinueOnRateLimit: z40.boolean().optional().default(false),
9779
- modelChoices: z40.array(z40.string()).optional().default(["default", "haiku", "sonnet", "opus"]),
9780
- 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()
9781
9810
  });
9782
9811
  var defaultUserConfig = userConfigSchema.parse({});
9783
9812
 
@@ -9826,7 +9855,7 @@ import { zValidator } from "@hono/zod-validator";
9826
9855
  import { Effect as Effect59 } from "effect";
9827
9856
  import { Hono as Hono2 } from "hono";
9828
9857
  import { deleteCookie, getCookie as getCookie3, setCookie as setCookie2 } from "hono/cookie";
9829
- import { z as z41 } from "zod";
9858
+ import { z as z42 } from "zod";
9830
9859
  var safeEqual2 = (a, b) => {
9831
9860
  if (a.length !== b.length) return false;
9832
9861
  return timingSafeEqual2(Buffer.from(a, "utf-8"), Buffer.from(b, "utf-8"));
@@ -9834,7 +9863,7 @@ var safeEqual2 = (a, b) => {
9834
9863
  var authRoutes = Effect59.gen(function* () {
9835
9864
  const { getAuthState } = yield* AuthMiddleware;
9836
9865
  const { validSessionToken, authEnabled, authPassword } = yield* getAuthState;
9837
- 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) => {
9838
9867
  const { password } = c.req.valid("json");
9839
9868
  if (!authEnabled) {
9840
9869
  return c.json(
@@ -9871,73 +9900,73 @@ var authRoutes = Effect59.gen(function* () {
9871
9900
  import { zValidator as zValidator2 } from "@hono/zod-validator";
9872
9901
  import { Effect as Effect61 } from "effect";
9873
9902
  import { Hono as Hono3 } from "hono";
9874
- import { z as z43 } from "zod";
9903
+ import { z as z44 } from "zod";
9875
9904
 
9876
9905
  // src/server/core/claude-code/schema.ts
9877
- import { z as z42 } from "zod";
9878
- var mediaTypeSchema = z42.enum(["image/png", "image/jpeg", "image/gif", "image/webp"]);
9879
- var imageBlockSchema = z42.object({
9880
- type: z42.literal("image"),
9881
- source: z42.object({
9882
- 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"),
9883
9912
  media_type: mediaTypeSchema,
9884
- data: z42.string()
9913
+ data: z43.string()
9885
9914
  })
9886
9915
  });
9887
- var documentBlockSchema = z42.object({
9888
- type: z42.literal("document"),
9889
- source: z42.union([
9890
- z42.object({
9891
- type: z42.literal("text"),
9892
- media_type: z42.enum(["text/plain"]),
9893
- 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()
9894
9923
  }),
9895
- z42.object({
9896
- type: z42.literal("base64"),
9897
- media_type: z42.enum(["application/pdf"]),
9898
- data: z42.string()
9924
+ z43.object({
9925
+ type: z43.literal("base64"),
9926
+ media_type: z43.enum(["application/pdf"]),
9927
+ data: z43.string()
9899
9928
  })
9900
9929
  ])
9901
9930
  });
9902
- var userMessageInputSchema = z42.object({
9903
- text: z42.string().min(1),
9904
- images: z42.array(imageBlockSchema).optional(),
9905
- documents: z42.array(documentBlockSchema).optional()
9906
- });
9907
- var sandboxNetworkConfigSchema = z42.object({
9908
- allowedDomains: z42.array(z42.string()).optional(),
9909
- allowUnixSockets: z42.array(z42.string()).optional(),
9910
- allowAllUnixSockets: z42.boolean().optional(),
9911
- allowLocalBinding: z42.boolean().optional(),
9912
- httpProxyPort: z42.number().optional(),
9913
- socksProxyPort: z42.number().optional()
9914
- });
9915
- var sandboxSettingsSchema = z42.object({
9916
- enabled: z42.boolean().optional(),
9917
- autoAllowBashIfSandboxed: z42.boolean().optional(),
9918
- 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(),
9919
9948
  network: sandboxNetworkConfigSchema.optional()
9920
9949
  });
9921
- var ccOptionsSchema = z42.object({
9922
- disallowedTools: z42.array(z42.string()).optional(),
9923
- settingSources: z42.array(z42.enum(["user", "project", "local"])).optional(),
9924
- systemPrompt: z42.union([
9925
- z42.string(),
9926
- z42.object({
9927
- type: z42.literal("preset"),
9928
- preset: z42.literal("claude_code"),
9929
- 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()
9930
9959
  })
9931
9960
  ]).optional(),
9932
- model: z42.string().optional(),
9961
+ model: z43.string().optional(),
9933
9962
  sandbox: sandboxSettingsSchema.optional(),
9934
- maxTurns: z42.number().optional(),
9935
- maxThinkingTokens: z42.number().optional(),
9936
- env: z42.record(z42.string(), z42.string().optional()).optional(),
9937
- maxBudgetUsd: z42.number().optional(),
9938
- effort: z42.enum(["low", "medium", "high", "max"]).optional(),
9939
- permissionMode: z42.enum(["acceptEdits", "bypassPermissions", "default", "plan"]).optional(),
9940
- 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()
9941
9970
  });
9942
9971
 
9943
9972
  // src/server/lib/effect/toEffectResponse.ts
@@ -9993,11 +10022,11 @@ var claudeCodeRoutes = Effect61.gen(function* () {
9993
10022
  "/session-processes",
9994
10023
  zValidator2(
9995
10024
  "json",
9996
- z43.object({
9997
- projectId: z43.string(),
9998
- sessionId: z43.uuid(),
10025
+ z44.object({
10026
+ projectId: z44.string(),
10027
+ sessionId: z44.uuid(),
9999
10028
  input: userMessageInputSchema,
10000
- resume: z43.boolean(),
10029
+ resume: z44.boolean(),
10001
10030
  ccOptions: ccOptionsSchema.optional()
10002
10031
  })
10003
10032
  ),
@@ -10017,10 +10046,10 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10017
10046
  "/session-processes/:sessionProcessId/continue",
10018
10047
  zValidator2(
10019
10048
  "json",
10020
- z43.object({
10021
- projectId: z43.string(),
10049
+ z44.object({
10050
+ projectId: z44.string(),
10022
10051
  input: userMessageInputSchema,
10023
- baseSessionId: z43.string()
10052
+ baseSessionId: z44.string()
10024
10053
  })
10025
10054
  ),
10026
10055
  async (c) => {
@@ -10038,7 +10067,7 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10038
10067
  }
10039
10068
  ).post(
10040
10069
  "/session-processes/:sessionProcessId/abort",
10041
- zValidator2("json", z43.object({ projectId: z43.string() })),
10070
+ zValidator2("json", z44.object({ projectId: z44.string() })),
10042
10071
  (c) => {
10043
10072
  const { sessionProcessId } = c.req.param();
10044
10073
  void Effect61.runFork(claudeCodeLifeCycleService.abortTask(sessionProcessId));
@@ -10060,11 +10089,11 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10060
10089
  "/permission-response",
10061
10090
  zValidator2(
10062
10091
  "json",
10063
- z43.object({
10064
- permissionRequestId: z43.string(),
10065
- decision: z43.enum(["allow", "deny", "always_allow"]),
10066
- alwaysAllowRule: z43.string().optional(),
10067
- 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()
10068
10097
  })
10069
10098
  ),
10070
10099
  async (c) => {
@@ -10080,14 +10109,14 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10080
10109
  "/question-response",
10081
10110
  zValidator2(
10082
10111
  "json",
10083
- z43.object({
10084
- questionRequestId: z43.string(),
10085
- answers: z43.record(z43.string(), z43.string()),
10086
- annotations: z43.record(
10087
- z43.string(),
10088
- z43.object({
10089
- notes: z43.string().optional(),
10090
- 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()
10091
10120
  })
10092
10121
  )
10093
10122
  })
@@ -10105,10 +10134,10 @@ var claudeCodeRoutes = Effect61.gen(function* () {
10105
10134
  "/generate-permission-rule",
10106
10135
  zValidator2(
10107
10136
  "json",
10108
- z43.object({
10109
- toolName: z43.string(),
10110
- toolInput: z43.record(z43.string(), z43.unknown()),
10111
- projectId: z43.string()
10137
+ z44.object({
10138
+ toolName: z44.string(),
10139
+ toolInput: z44.record(z44.string(), z44.unknown()),
10140
+ projectId: z44.string()
10112
10141
  })
10113
10142
  ),
10114
10143
  async (c) => {
@@ -10141,16 +10170,16 @@ var featureFlagRoutes = Effect62.gen(function* () {
10141
10170
  import { zValidator as zValidator3 } from "@hono/zod-validator";
10142
10171
  import { Effect as Effect63 } from "effect";
10143
10172
  import { Hono as Hono5 } from "hono";
10144
- import { z as z44 } from "zod";
10173
+ import { z as z45 } from "zod";
10145
10174
  var fileSystemRoutes = Effect63.gen(function* () {
10146
10175
  const fileSystemController = yield* FileSystemController;
10147
10176
  return new Hono5().get(
10148
10177
  "/file-completion",
10149
10178
  zValidator3(
10150
10179
  "query",
10151
- z44.object({
10152
- projectId: z44.string(),
10153
- basePath: z44.string().optional().default("/")
10180
+ z45.object({
10181
+ projectId: z45.string(),
10182
+ basePath: z45.string().optional().default("/")
10154
10183
  })
10155
10184
  ),
10156
10185
  async (c) => {
@@ -10166,9 +10195,9 @@ var fileSystemRoutes = Effect63.gen(function* () {
10166
10195
  "/directory-browser",
10167
10196
  zValidator3(
10168
10197
  "query",
10169
- z44.object({
10170
- currentPath: z44.string().optional(),
10171
- 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")
10172
10201
  })
10173
10202
  ),
10174
10203
  async (c) => {
@@ -10187,12 +10216,12 @@ var fileSystemRoutes = Effect63.gen(function* () {
10187
10216
  import { zValidator as zValidator4 } from "@hono/zod-validator";
10188
10217
  import { Effect as Effect64 } from "effect";
10189
10218
  import { Hono as Hono6 } from "hono";
10190
- import { z as z45 } from "zod";
10191
- var pushSubscriptionSchema = z45.object({
10192
- endpoint: z45.string(),
10193
- keys: z45.object({
10194
- p256dh: z45.string(),
10195
- 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()
10196
10225
  })
10197
10226
  });
10198
10227
  var notificationRoutes = Effect64.gen(function* () {
@@ -10204,9 +10233,9 @@ var notificationRoutes = Effect64.gen(function* () {
10204
10233
  "/:sessionId/consume",
10205
10234
  zValidator4(
10206
10235
  "json",
10207
- z45.object({
10208
- types: z45.array(
10209
- z45.enum([
10236
+ z46.object({
10237
+ types: z46.array(
10238
+ z46.enum([
10210
10239
  "session_paused",
10211
10240
  "session_completed",
10212
10241
  "permission_requested",
@@ -10244,24 +10273,24 @@ var notificationRoutes = Effect64.gen(function* () {
10244
10273
  import { zValidator as zValidator5 } from "@hono/zod-validator";
10245
10274
  import { Effect as Effect65 } from "effect";
10246
10275
  import { Hono as Hono7 } from "hono";
10247
- import { z as z47 } from "zod";
10276
+ import { z as z48 } from "zod";
10248
10277
 
10249
10278
  // src/server/core/git/schema.ts
10250
- import { z as z46 } from "zod";
10251
- var CommitRequestSchema = z46.object({
10252
- files: z46.array(z46.string().min(1)).min(1),
10253
- message: z46.string().trim().min(1)
10254
- });
10255
- var CommitResultSuccessSchema = z46.object({
10256
- success: z46.literal(true),
10257
- commitSha: z46.string().length(40),
10258
- filesCommitted: z46.number().int().positive(),
10259
- message: z46.string()
10260
- });
10261
- var CommitResultErrorSchema = z46.object({
10262
- success: z46.literal(false),
10263
- error: z46.string(),
10264
- 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([
10265
10294
  "EMPTY_MESSAGE",
10266
10295
  "NO_FILES",
10267
10296
  "PROJECT_NOT_FOUND",
@@ -10269,22 +10298,22 @@ var CommitResultErrorSchema = z46.object({
10269
10298
  "HOOK_FAILED",
10270
10299
  "GIT_COMMAND_ERROR"
10271
10300
  ]),
10272
- details: z46.string().optional()
10301
+ details: z47.string().optional()
10273
10302
  });
10274
- var CommitResultSchema = z46.discriminatedUnion("success", [
10303
+ var CommitResultSchema = z47.discriminatedUnion("success", [
10275
10304
  CommitResultSuccessSchema,
10276
10305
  CommitResultErrorSchema
10277
10306
  ]);
10278
- var PushResultSuccessSchema = z46.object({
10279
- success: z46.literal(true),
10280
- remote: z46.string(),
10281
- branch: z46.string(),
10282
- objectsPushed: z46.number().int().optional()
10283
- });
10284
- var PushResultErrorSchema = z46.object({
10285
- success: z46.literal(false),
10286
- error: z46.string(),
10287
- 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([
10288
10317
  "PROJECT_NOT_FOUND",
10289
10318
  "NOT_A_REPOSITORY",
10290
10319
  "NO_UPSTREAM",
@@ -10294,26 +10323,26 @@ var PushResultErrorSchema = z46.object({
10294
10323
  "TIMEOUT",
10295
10324
  "GIT_COMMAND_ERROR"
10296
10325
  ]),
10297
- details: z46.string().optional()
10326
+ details: z47.string().optional()
10298
10327
  });
10299
- var PushResultSchema = z46.discriminatedUnion("success", [
10328
+ var PushResultSchema = z47.discriminatedUnion("success", [
10300
10329
  PushResultSuccessSchema,
10301
10330
  PushResultErrorSchema
10302
10331
  ]);
10303
- var CommitAndPushResultSuccessSchema = z46.object({
10304
- success: z46.literal(true),
10305
- commitSha: z46.string().length(40),
10306
- filesCommitted: z46.number().int().positive(),
10307
- message: z46.string(),
10308
- remote: z46.string(),
10309
- branch: z46.string()
10310
- });
10311
- var CommitAndPushResultErrorSchema = z46.object({
10312
- success: z46.literal(false),
10313
- commitSucceeded: z46.boolean(),
10314
- commitSha: z46.string().length(40).optional(),
10315
- error: z46.string(),
10316
- 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([
10317
10346
  "EMPTY_MESSAGE",
10318
10347
  "NO_FILES",
10319
10348
  "PROJECT_NOT_FOUND",
@@ -10326,9 +10355,9 @@ var CommitAndPushResultErrorSchema = z46.object({
10326
10355
  "NETWORK_ERROR",
10327
10356
  "TIMEOUT"
10328
10357
  ]),
10329
- details: z46.string().optional()
10358
+ details: z47.string().optional()
10330
10359
  });
10331
- var CommitAndPushResultSchema = z46.discriminatedUnion("success", [
10360
+ var CommitAndPushResultSchema = z47.discriminatedUnion("success", [
10332
10361
  CommitAndPushResultSuccessSchema,
10333
10362
  CommitAndPushResultErrorSchema
10334
10363
  ]);
@@ -10347,7 +10376,7 @@ var projectRoutes = Effect65.gen(function* () {
10347
10376
  return response;
10348
10377
  }).get(
10349
10378
  "/:projectId",
10350
- zValidator5("query", z47.object({ cursor: z47.string().optional() })),
10379
+ zValidator5("query", z48.object({ cursor: z48.string().optional() })),
10351
10380
  async (c) => {
10352
10381
  const response = await effectToResponse(
10353
10382
  c,
@@ -10362,8 +10391,8 @@ var projectRoutes = Effect65.gen(function* () {
10362
10391
  "/",
10363
10392
  zValidator5(
10364
10393
  "json",
10365
- z47.object({
10366
- projectPath: z47.string().min(1, "Project path is required")
10394
+ z48.object({
10395
+ projectPath: z48.string().min(1, "Project path is required")
10367
10396
  })
10368
10397
  ),
10369
10398
  async (c) => {
@@ -10420,7 +10449,7 @@ var projectRoutes = Effect65.gen(function* () {
10420
10449
  return response;
10421
10450
  }).get(
10422
10451
  "/:projectId/agent-sessions/:agentId",
10423
- zValidator5("query", z47.object({ sessionId: z47.string().optional() })),
10452
+ zValidator5("query", z48.object({ sessionId: z48.string().optional() })),
10424
10453
  async (c) => {
10425
10454
  const projectId = c.req.param("projectId");
10426
10455
  const agentId = c.req.param("agentId");
@@ -10455,8 +10484,8 @@ var projectRoutes = Effect65.gen(function* () {
10455
10484
  "/:projectId/files",
10456
10485
  zValidator5(
10457
10486
  "query",
10458
- z47.object({
10459
- filePath: z47.string().min(1, "filePath is required")
10487
+ z48.object({
10488
+ filePath: z48.string().min(1, "filePath is required")
10460
10489
  })
10461
10490
  ),
10462
10491
  async (c) => {
@@ -10484,9 +10513,9 @@ var projectRoutes = Effect65.gen(function* () {
10484
10513
  "/:projectId/git/diff",
10485
10514
  zValidator5(
10486
10515
  "json",
10487
- z47.object({
10488
- fromRef: z47.string().min(1, "fromRef is required"),
10489
- 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")
10490
10519
  })
10491
10520
  ),
10492
10521
  async (c) => {
@@ -10546,8 +10575,8 @@ var projectRoutes = Effect65.gen(function* () {
10546
10575
  "/:projectId/git/checkout",
10547
10576
  zValidator5(
10548
10577
  "json",
10549
- z47.object({
10550
- branchName: z47.string().min(1, "branchName is required")
10578
+ z48.object({
10579
+ branchName: z48.string().min(1, "branchName is required")
10551
10580
  })
10552
10581
  ),
10553
10582
  async (c) => {
@@ -10609,7 +10638,7 @@ var schedulerRoutes = Effect66.gen(function* () {
10609
10638
  import { zValidator as zValidator7 } from "@hono/zod-validator";
10610
10639
  import { Effect as Effect67 } from "effect";
10611
10640
  import { Hono as Hono9 } from "hono";
10612
- import { z as z48 } from "zod";
10641
+ import { z as z49 } from "zod";
10613
10642
  var searchRoutes = Effect67.gen(function* () {
10614
10643
  const searchController = yield* SearchController;
10615
10644
  const runtime = yield* getHonoRuntime;
@@ -10617,10 +10646,10 @@ var searchRoutes = Effect67.gen(function* () {
10617
10646
  "/",
10618
10647
  zValidator7(
10619
10648
  "query",
10620
- z48.object({
10621
- q: z48.string().min(2),
10622
- limit: z48.string().optional().transform((val) => val !== void 0 && val !== "" ? parseInt(val, 10) : void 0),
10623
- 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()
10624
10653
  })
10625
10654
  ),
10626
10655
  async (c) => {
@@ -10661,7 +10690,7 @@ import { zValidator as zValidator8 } from "@hono/zod-validator";
10661
10690
  import { Effect as Effect69 } from "effect";
10662
10691
  import { Hono as Hono11 } from "hono";
10663
10692
  import { HTTPException } from "hono/http-exception";
10664
- import { z as z49 } from "zod";
10693
+ import { z as z50 } from "zod";
10665
10694
  var getClaudeProjectsDirPath = Effect69.gen(function* () {
10666
10695
  const applicationContext = yield* ApplicationContext;
10667
10696
  const claudeCodePaths = yield* applicationContext.claudeCodePaths;
@@ -10674,9 +10703,9 @@ var tasksRoutes = Effect69.gen(function* () {
10674
10703
  "/",
10675
10704
  zValidator8(
10676
10705
  "query",
10677
- z49.object({
10678
- projectId: z49.string(),
10679
- sessionId: z49.string().optional()
10706
+ z50.object({
10707
+ projectId: z50.string(),
10708
+ sessionId: z50.string().optional()
10680
10709
  })
10681
10710
  ),
10682
10711
  async (c) => {
@@ -10705,9 +10734,9 @@ var tasksRoutes = Effect69.gen(function* () {
10705
10734
  "/",
10706
10735
  zValidator8(
10707
10736
  "query",
10708
- z49.object({
10709
- projectId: z49.string(),
10710
- sessionId: z49.string().optional()
10737
+ z50.object({
10738
+ projectId: z50.string(),
10739
+ sessionId: z50.string().optional()
10711
10740
  })
10712
10741
  ),
10713
10742
  zValidator8("json", TaskCreateSchema),
@@ -10738,9 +10767,9 @@ var tasksRoutes = Effect69.gen(function* () {
10738
10767
  "/:taskId",
10739
10768
  zValidator8(
10740
10769
  "query",
10741
- z49.object({
10742
- projectId: z49.string(),
10743
- sessionId: z49.string().optional()
10770
+ z50.object({
10771
+ projectId: z50.string(),
10772
+ sessionId: z50.string().optional()
10744
10773
  })
10745
10774
  ),
10746
10775
  zValidator8("json", TaskUpdateSchema.omit({ taskId: true })),
@@ -10858,7 +10887,7 @@ var withServerLogLevel = (verbose) => (effect) => effect.pipe(Logger.withMinimum
10858
10887
  // src/server/terminal/terminalWebSocket.ts
10859
10888
  import { Effect as Effect71, Runtime as Runtime5 } from "effect";
10860
10889
  import WebSocket, { WebSocketServer } from "ws";
10861
- import { z as z50 } from "zod";
10890
+ import { z as z51 } from "zod";
10862
10891
  var parseCookies = (cookieHeader) => {
10863
10892
  const result = {};
10864
10893
  if (cookieHeader === void 0 || cookieHeader === "") return result;
@@ -10870,12 +10899,12 @@ var parseCookies = (cookieHeader) => {
10870
10899
  }
10871
10900
  return result;
10872
10901
  };
10873
- var clientMessageSchema = z50.union([
10874
- z50.object({ type: z50.literal("input"), data: z50.string() }),
10875
- z50.object({ type: z50.literal("resize"), cols: z50.number(), rows: z50.number() }),
10876
- z50.object({ type: z50.literal("signal"), name: z50.string() }),
10877
- z50.object({ type: z50.literal("sync"), lastSeq: z50.number() }),
10878
- 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") })
10879
10908
  ]);
10880
10909
  var parseClientMessage = (payload) => {
10881
10910
  try {