@sayren/store-sdk 0.40.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -165,8 +165,8 @@ export declare const auditLogPageSchema: z.ZodObject<{
165
165
  }, z.core.$strip>;
166
166
  export type AuditLogPage = z.infer<typeof auditLogPageSchema>;
167
167
  export declare const agentPolicyDecisionSchema: z.ZodEnum<{
168
- DENIED: "DENIED";
169
168
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
169
+ DENIED: "DENIED";
170
170
  ALLOW: "ALLOW";
171
171
  }>;
172
172
  export type AgentPolicyDecision = z.infer<typeof agentPolicyDecisionSchema>;
@@ -191,8 +191,8 @@ export type WritePreview = z.infer<typeof writePreviewSchema>;
191
191
  export declare const writeDryRunResultSchema: z.ZodObject<{
192
192
  dryRun: z.ZodLiteral<true>;
193
193
  decision: z.ZodEnum<{
194
- DENIED: "DENIED";
195
194
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
195
+ DENIED: "DENIED";
196
196
  ALLOW: "ALLOW";
197
197
  }>;
198
198
  reason: z.ZodNullable<z.ZodString>;
@@ -424,6 +424,10 @@ export declare class ApprovalPendingError extends Error {
424
424
  type TokenSource = string | null | undefined | (() => string | null | undefined);
425
425
  type Query = Record<string, string | number | boolean | undefined>;
426
426
  export declare function buildQuery(query?: Query): string;
427
+ /** 운영 관리 API 주소(버전 경로 포함) — 클라이언트·세션의 `baseUrl` 기본값. 개발·로컬에서만 지정한다 */
428
+ export declare const SAYREN_API_BASE_URL = "https://api.sayren.io/v1";
429
+ /** 운영 api 오리진 — 경로를 스스로 붙이는 함수(`delegateMember`)의 `baseUrl` 기본값 */
430
+ export declare const SAYREN_API_ORIGIN = "https://api.sayren.io";
427
431
  //#endregion
428
432
  //#region src/schemas/ai.d.ts
429
433
  /**
@@ -495,10 +499,10 @@ export type AiRun = z.infer<typeof aiRunSchema>;
495
499
  * AI가 지금 하는 일의 종류 — 도구 이름·operationId·파일 경로로 서버가 정한다(상점 만들기 진행 화면이 아이콘·문구를 고른다). 정하지 못한 도구는 없다
496
500
  */
497
501
  export declare const aiActivitySchema: z.ZodEnum<{
498
- check: "check";
499
502
  code: "code";
500
- version: "version";
501
503
  status: "status";
504
+ check: "check";
505
+ version: "version";
502
506
  shipping: "shipping";
503
507
  category: "category";
504
508
  brief: "brief";
@@ -513,9 +517,14 @@ export declare const aiActivitySchema: z.ZodEnum<{
513
517
  verify: "verify";
514
518
  }>;
515
519
  export type AiActivity = z.infer<typeof aiActivitySchema>;
520
+ /** 바뀐 줄 미리보기 한 줄의 최대 길이 — 서버가 이 길이로 자르고 화면은 이보다 긴 줄을 앞부분으로 비교한다 */
521
+ export declare const AI_TOOL_CHANGE_LINE_MAX = 300;
522
+ /** 바뀐 줄 범위(`lines`) 개수 상한 */
523
+ export declare const AI_TOOL_CHANGE_RANGES_MAX = 200;
516
524
  /**
517
525
  * 도구가 바꾼 파일 하나(2026-10-13, AI 상점 도우미 작업 공간의 수정 중인 코드) — 서버가 도구 입력으로 계산한다.
518
- * `edit`는 바꾼 부분의 줄 비교, `write`는 새로 쓴 내용(이전 내용을 모르므로 모두 추가로 센다). `preview`는 바뀐 줄 앞부분 12줄까지다
526
+ * `edit`는 바꾼 부분의 줄 비교, `write`는 새로 쓴 내용(이전 내용을 모르므로 모두 추가로 센다). `preview`는 바뀐 줄 앞부분 12줄까지다.
527
+ * `lines`는 바꾼 뒤 파일에서 추가된 줄의 범위(1부터, 양끝 포함)다 — `edit`가 성공한 뒤에만 실행기가 채운다(옛 기록·`write`에는 없다)
519
528
  */
520
529
  export declare const aiToolChangeSchema: z.ZodObject<{
521
530
  path: z.ZodString;
@@ -532,6 +541,7 @@ export declare const aiToolChangeSchema: z.ZodObject<{
532
541
  }>;
533
542
  text: z.ZodString;
534
543
  }, z.core.$strip>>;
544
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
535
545
  }, z.core.$strip>;
536
546
  export type AiToolChange = z.infer<typeof aiToolChangeSchema>;
537
547
  /**
@@ -549,15 +559,27 @@ export declare const aiAgentPhaseSchema: z.ZodEnum<{
549
559
  }>;
550
560
  export type AiAgentPhase = z.infer<typeof aiAgentPhaseSchema>;
551
561
  /**
552
- * AI 상점 도우미의 작업 메모 폴더(2026-10-14) — 회차마다 읽는 숨은 규칙(`rules.md`)과 디자인 계획(`design.md`). 셀러 화면(타임라인·코드 탭·변경 기록)에
553
- * 보이지 않는다. 편집 Sandbox가 점(.)으로 시작하는 경로를 받지 않아 작업 트리의 `src` 아래에 둔다(앱이 import하지 않는 문서라 빌드에 들어가지 않는다)
562
+ * AI 상점 도우미의 작업 메모 폴더(2026-10-14) — 회차마다 읽는 숨은 규칙(`rules.md`)과 디자인 계획(`design.md`). 편집 Sandbox가 점(.)으로 시작하는
563
+ * 경로를 받지 않아 작업 트리의 `src` 아래에 둔다(앱이 import하지 않는 문서라 빌드에 들어가지 않는다). 숨은 규칙은 셀러 화면(타임라인·코드 탭·변경 기록)에
564
+ * 보이지 않는다. 디자인 계획은 2026-10-24부터 셀러 문서(작업 공간 문서 탭의 「디자인 가이드라인」)라 숨기지 않는다(`AI_DESIGN_GUIDE_PATH`)
554
565
  */
555
566
  export declare const AI_AGENT_NOTES_DIR = "src/site/agent";
567
+ /** 디자인 가이드라인(디자인 계획) — 작업 메모 폴더에 있지만 셀러가 읽는 문서다 */
568
+ export declare const AI_DESIGN_GUIDE_PATH = "src/site/agent/design.md";
569
+ /** 사이트맵 — 에이전트가 쓰는 화면 구성 문서(`{version:1,pages:[…]}`) */
570
+ export declare const AI_SITEMAP_PATH = "src/site/sitemap.json";
571
+ /** 작업 공간 문서 탭의 문서 파일인가(사이트맵·디자인 가이드라인) — 앱 코드가 아니라서 코드 탭·미리보기 점검·코드 변경 판정에서 뺀다 */
572
+ export declare function isAiWorkspaceDocPath(path: string): boolean;
573
+ /** 「이어서 진행」 버튼(실패한 실행 잇기)이 보내는 선택 값 — 선택지 답처럼 같은 할 일 목록을 잇는다 */
574
+ export declare const AI_RUN_RESUME_CHOICE = "run:resume";
556
575
  /**
557
576
  * 에이전트의 할 일 목록(2026-10-14, Claude Code의 TaskCreate·TaskUpdate·TaskList와 같다) — 에이전트가 패널 도구로 할 일을 만들고 상태를 바꾼다.
558
- * 이벤트·조각은 그 시점의 목록 전체이고 작업 공간 왼쪽 패널이 마지막 목록을 체크리스트로 그린다. 진행중은 한 번에 하나다
577
+ * 이벤트·조각은 그 시점의 목록 전체이고 작업 공간 로드맵 탭이 마지막 목록을 칸반으로 그린다. 진행중은 한 번에 하나다.
578
+ * 목록은 셀러 요청 하나(사이클)의 일이다 — 새 요청이면 빈 목록에서 시작하고 선택지 답이면 잇는다(2026-10-24). 개수 상한은 없다
579
+ * (옛 30개 상한은 대화 전체에 할 일이 쌓여 넘쳤다 — 크기는 사이클 범위가, 폭주는 턴 예산이 막는다).
580
+ * `blocked`는 같은 문제를 거듭 고쳐도 남아 멈춘 일이고 `note`가 그 사유다(이어 가기 리마인더가 남은 일로 세지 않는다)
559
581
  */
560
- export declare const AI_TODO_STATUSES: readonly ["pending", "in_progress", "completed"];
582
+ export declare const AI_TODO_STATUSES: readonly ["pending", "in_progress", "completed", "blocked"];
561
583
  export declare const aiTodoSchema: z.ZodObject<{
562
584
  id: z.ZodOptional<z.ZodString>;
563
585
  content: z.ZodString;
@@ -565,6 +587,7 @@ export declare const aiTodoSchema: z.ZodObject<{
565
587
  pending: "pending";
566
588
  in_progress: "in_progress";
567
589
  completed: "completed";
590
+ blocked: "blocked";
568
591
  }>;
569
592
  phase: z.ZodOptional<z.ZodEnum<{
570
593
  STORE: "STORE";
@@ -574,9 +597,12 @@ export declare const aiTodoSchema: z.ZodObject<{
574
597
  BUILD: "BUILD";
575
598
  DONE: "DONE";
576
599
  }>>;
600
+ note: z.ZodOptional<z.ZodString>;
577
601
  }, z.core.$strip>;
578
602
  export type AiTodo = z.infer<typeof aiTodoSchema>;
603
+ /** @deprecated 할 일 개수 상한은 없앴다(2026-10-24). 공개 export라 값만 남긴다 */
579
604
  export declare const AI_TODOS_MAX = 30;
605
+ /** 셀러에게 보이지 않는 작업 메모인가 — 작업 메모 폴더에서 디자인 가이드라인을 뺀 나머지다 */
580
606
  export declare function isAiAgentNotesPath(path: string): boolean;
581
607
  /**
582
608
  * 디자인 아트보드 폴더(2026-10-14 사용자 결정, Claude Code Design 캔버스의 파일 계약을 옮겼다) — DESIGN 단계에 에이전트가 쓰는 자기완결 HTML 아트보드와
@@ -715,22 +741,23 @@ export declare const AI_DESIGN_CONFIRM_APPROVE = "design:approve";
715
741
  export declare const aiMessagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
716
742
  type: z.ZodLiteral<"text">;
717
743
  text: z.ZodString;
744
+ choice: z.ZodOptional<z.ZodString>;
718
745
  }, z.core.$strip>, z.ZodObject<{
719
746
  type: z.ZodLiteral<"tool">;
720
747
  toolCallId: z.ZodString;
721
748
  name: z.ZodString;
722
749
  label: z.ZodString;
723
750
  status: z.ZodEnum<{
724
- error: "error";
725
751
  unknown: "unknown";
752
+ error: "error";
726
753
  ok: "ok";
727
754
  }>;
728
755
  summary: z.ZodNullable<z.ZodString>;
729
756
  activity: z.ZodOptional<z.ZodEnum<{
730
- check: "check";
731
757
  code: "code";
732
- version: "version";
733
758
  status: "status";
759
+ check: "check";
760
+ version: "version";
734
761
  shipping: "shipping";
735
762
  category: "category";
736
763
  brief: "brief";
@@ -760,6 +787,7 @@ export declare const aiMessagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
760
787
  }>;
761
788
  text: z.ZodString;
762
789
  }, z.core.$strip>>;
790
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
763
791
  }, z.core.$strip>>>;
764
792
  }, z.core.$strip>, z.ZodObject<{
765
793
  type: z.ZodLiteral<"choices">;
@@ -846,6 +874,7 @@ export declare const aiMessagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
846
874
  pending: "pending";
847
875
  in_progress: "in_progress";
848
876
  completed: "completed";
877
+ blocked: "blocked";
849
878
  }>;
850
879
  phase: z.ZodOptional<z.ZodEnum<{
851
880
  STORE: "STORE";
@@ -855,6 +884,7 @@ export declare const aiMessagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
855
884
  BUILD: "BUILD";
856
885
  DONE: "DONE";
857
886
  }>>;
887
+ note: z.ZodOptional<z.ZodString>;
858
888
  }, z.core.$strip>>;
859
889
  }, z.core.$strip>], "type">;
860
890
  export type AiMessagePart = z.infer<typeof aiMessagePartSchema>;
@@ -867,22 +897,23 @@ export declare const aiMessageSchema: z.ZodObject<{
867
897
  parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
868
898
  type: z.ZodLiteral<"text">;
869
899
  text: z.ZodString;
900
+ choice: z.ZodOptional<z.ZodString>;
870
901
  }, z.core.$strip>, z.ZodObject<{
871
902
  type: z.ZodLiteral<"tool">;
872
903
  toolCallId: z.ZodString;
873
904
  name: z.ZodString;
874
905
  label: z.ZodString;
875
906
  status: z.ZodEnum<{
876
- error: "error";
877
907
  unknown: "unknown";
908
+ error: "error";
878
909
  ok: "ok";
879
910
  }>;
880
911
  summary: z.ZodNullable<z.ZodString>;
881
912
  activity: z.ZodOptional<z.ZodEnum<{
882
- check: "check";
883
913
  code: "code";
884
- version: "version";
885
914
  status: "status";
915
+ check: "check";
916
+ version: "version";
886
917
  shipping: "shipping";
887
918
  category: "category";
888
919
  brief: "brief";
@@ -912,6 +943,7 @@ export declare const aiMessageSchema: z.ZodObject<{
912
943
  }>;
913
944
  text: z.ZodString;
914
945
  }, z.core.$strip>>;
946
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
915
947
  }, z.core.$strip>>>;
916
948
  }, z.core.$strip>, z.ZodObject<{
917
949
  type: z.ZodLiteral<"choices">;
@@ -998,6 +1030,7 @@ export declare const aiMessageSchema: z.ZodObject<{
998
1030
  pending: "pending";
999
1031
  in_progress: "in_progress";
1000
1032
  completed: "completed";
1033
+ blocked: "blocked";
1001
1034
  }>;
1002
1035
  phase: z.ZodOptional<z.ZodEnum<{
1003
1036
  STORE: "STORE";
@@ -1007,6 +1040,7 @@ export declare const aiMessageSchema: z.ZodObject<{
1007
1040
  BUILD: "BUILD";
1008
1041
  DONE: "DONE";
1009
1042
  }>>;
1043
+ note: z.ZodOptional<z.ZodString>;
1010
1044
  }, z.core.$strip>>;
1011
1045
  }, z.core.$strip>], "type">>;
1012
1046
  runId: z.ZodNullable<z.ZodString>;
@@ -1034,22 +1068,23 @@ export declare const aiConversationSchema: z.ZodObject<{
1034
1068
  parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1035
1069
  type: z.ZodLiteral<"text">;
1036
1070
  text: z.ZodString;
1071
+ choice: z.ZodOptional<z.ZodString>;
1037
1072
  }, z.core.$strip>, z.ZodObject<{
1038
1073
  type: z.ZodLiteral<"tool">;
1039
1074
  toolCallId: z.ZodString;
1040
1075
  name: z.ZodString;
1041
1076
  label: z.ZodString;
1042
1077
  status: z.ZodEnum<{
1043
- error: "error";
1044
1078
  unknown: "unknown";
1079
+ error: "error";
1045
1080
  ok: "ok";
1046
1081
  }>;
1047
1082
  summary: z.ZodNullable<z.ZodString>;
1048
1083
  activity: z.ZodOptional<z.ZodEnum<{
1049
- check: "check";
1050
1084
  code: "code";
1051
- version: "version";
1052
1085
  status: "status";
1086
+ check: "check";
1087
+ version: "version";
1053
1088
  shipping: "shipping";
1054
1089
  category: "category";
1055
1090
  brief: "brief";
@@ -1079,6 +1114,7 @@ export declare const aiConversationSchema: z.ZodObject<{
1079
1114
  }>;
1080
1115
  text: z.ZodString;
1081
1116
  }, z.core.$strip>>;
1117
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1082
1118
  }, z.core.$strip>>>;
1083
1119
  }, z.core.$strip>, z.ZodObject<{
1084
1120
  type: z.ZodLiteral<"choices">;
@@ -1165,6 +1201,7 @@ export declare const aiConversationSchema: z.ZodObject<{
1165
1201
  pending: "pending";
1166
1202
  in_progress: "in_progress";
1167
1203
  completed: "completed";
1204
+ blocked: "blocked";
1168
1205
  }>;
1169
1206
  phase: z.ZodOptional<z.ZodEnum<{
1170
1207
  STORE: "STORE";
@@ -1174,6 +1211,7 @@ export declare const aiConversationSchema: z.ZodObject<{
1174
1211
  BUILD: "BUILD";
1175
1212
  DONE: "DONE";
1176
1213
  }>>;
1214
+ note: z.ZodOptional<z.ZodString>;
1177
1215
  }, z.core.$strip>>;
1178
1216
  }, z.core.$strip>], "type">>;
1179
1217
  runId: z.ZodNullable<z.ZodString>;
@@ -1495,6 +1533,7 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1495
1533
  pending: "pending";
1496
1534
  in_progress: "in_progress";
1497
1535
  completed: "completed";
1536
+ blocked: "blocked";
1498
1537
  }>;
1499
1538
  phase: z.ZodOptional<z.ZodEnum<{
1500
1539
  STORE: "STORE";
@@ -1504,6 +1543,7 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1504
1543
  BUILD: "BUILD";
1505
1544
  DONE: "DONE";
1506
1545
  }>>;
1546
+ note: z.ZodOptional<z.ZodString>;
1507
1547
  }, z.core.$strip>>;
1508
1548
  }, z.core.$strip>, z.ZodObject<{
1509
1549
  type: z.ZodLiteral<"tool_start">;
@@ -1537,10 +1577,10 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1537
1577
  id: z.ZodOptional<z.ZodString>;
1538
1578
  }, z.core.$strip>>;
1539
1579
  activity: z.ZodOptional<z.ZodEnum<{
1540
- check: "check";
1541
1580
  code: "code";
1542
- version: "version";
1543
1581
  status: "status";
1582
+ check: "check";
1583
+ version: "version";
1544
1584
  shipping: "shipping";
1545
1585
  category: "category";
1546
1586
  brief: "brief";
@@ -1570,17 +1610,35 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1570
1610
  }>;
1571
1611
  text: z.ZodString;
1572
1612
  }, z.core.$strip>>;
1613
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1573
1614
  }, z.core.$strip>>>;
1574
1615
  }, z.core.$strip>, z.ZodObject<{
1575
1616
  type: z.ZodLiteral<"tool_result">;
1576
1617
  messageId: z.ZodString;
1577
1618
  toolCallId: z.ZodString;
1578
1619
  status: z.ZodEnum<{
1579
- error: "error";
1580
1620
  unknown: "unknown";
1621
+ error: "error";
1581
1622
  ok: "ok";
1582
1623
  }>;
1583
1624
  summary: z.ZodNullable<z.ZodString>;
1625
+ changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1626
+ path: z.ZodString;
1627
+ mode: z.ZodEnum<{
1628
+ edit: "edit";
1629
+ write: "write";
1630
+ }>;
1631
+ added: z.ZodNumber;
1632
+ removed: z.ZodNumber;
1633
+ preview: z.ZodArray<z.ZodObject<{
1634
+ kind: z.ZodEnum<{
1635
+ added: "added";
1636
+ removed: "removed";
1637
+ }>;
1638
+ text: z.ZodString;
1639
+ }, z.core.$strip>>;
1640
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1641
+ }, z.core.$strip>>>;
1584
1642
  }, z.core.$strip>, z.ZodObject<{
1585
1643
  type: z.ZodLiteral<"choices">;
1586
1644
  messageId: z.ZodString;
@@ -1634,22 +1692,23 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1634
1692
  parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1635
1693
  type: z.ZodLiteral<"text">;
1636
1694
  text: z.ZodString;
1695
+ choice: z.ZodOptional<z.ZodString>;
1637
1696
  }, z.core.$strip>, z.ZodObject<{
1638
1697
  type: z.ZodLiteral<"tool">;
1639
1698
  toolCallId: z.ZodString;
1640
1699
  name: z.ZodString;
1641
1700
  label: z.ZodString;
1642
1701
  status: z.ZodEnum<{
1643
- error: "error";
1644
1702
  unknown: "unknown";
1703
+ error: "error";
1645
1704
  ok: "ok";
1646
1705
  }>;
1647
1706
  summary: z.ZodNullable<z.ZodString>;
1648
1707
  activity: z.ZodOptional<z.ZodEnum<{
1649
- check: "check";
1650
1708
  code: "code";
1651
- version: "version";
1652
1709
  status: "status";
1710
+ check: "check";
1711
+ version: "version";
1653
1712
  shipping: "shipping";
1654
1713
  category: "category";
1655
1714
  brief: "brief";
@@ -1679,6 +1738,7 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1679
1738
  }>;
1680
1739
  text: z.ZodString;
1681
1740
  }, z.core.$strip>>;
1741
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1682
1742
  }, z.core.$strip>>>;
1683
1743
  }, z.core.$strip>, z.ZodObject<{
1684
1744
  type: z.ZodLiteral<"choices">;
@@ -1765,6 +1825,7 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1765
1825
  pending: "pending";
1766
1826
  in_progress: "in_progress";
1767
1827
  completed: "completed";
1828
+ blocked: "blocked";
1768
1829
  }>;
1769
1830
  phase: z.ZodOptional<z.ZodEnum<{
1770
1831
  STORE: "STORE";
@@ -1774,6 +1835,7 @@ export declare const aiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1774
1835
  BUILD: "BUILD";
1775
1836
  DONE: "DONE";
1776
1837
  }>>;
1838
+ note: z.ZodOptional<z.ZodString>;
1777
1839
  }, z.core.$strip>>;
1778
1840
  }, z.core.$strip>], "type">>;
1779
1841
  runId: z.ZodNullable<z.ZodString>;
@@ -1827,6 +1889,7 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1827
1889
  pending: "pending";
1828
1890
  in_progress: "in_progress";
1829
1891
  completed: "completed";
1892
+ blocked: "blocked";
1830
1893
  }>;
1831
1894
  phase: z.ZodOptional<z.ZodEnum<{
1832
1895
  STORE: "STORE";
@@ -1836,6 +1899,7 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1836
1899
  BUILD: "BUILD";
1837
1900
  DONE: "DONE";
1838
1901
  }>>;
1902
+ note: z.ZodOptional<z.ZodString>;
1839
1903
  }, z.core.$strip>>;
1840
1904
  }, z.core.$strip>, z.ZodObject<{
1841
1905
  type: z.ZodLiteral<"tool_start">;
@@ -1869,10 +1933,10 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1869
1933
  id: z.ZodOptional<z.ZodString>;
1870
1934
  }, z.core.$strip>>;
1871
1935
  activity: z.ZodOptional<z.ZodEnum<{
1872
- check: "check";
1873
1936
  code: "code";
1874
- version: "version";
1875
1937
  status: "status";
1938
+ check: "check";
1939
+ version: "version";
1876
1940
  shipping: "shipping";
1877
1941
  category: "category";
1878
1942
  brief: "brief";
@@ -1902,17 +1966,35 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1902
1966
  }>;
1903
1967
  text: z.ZodString;
1904
1968
  }, z.core.$strip>>;
1969
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1905
1970
  }, z.core.$strip>>>;
1906
1971
  }, z.core.$strip>, z.ZodObject<{
1907
1972
  type: z.ZodLiteral<"tool_result">;
1908
1973
  messageId: z.ZodString;
1909
1974
  toolCallId: z.ZodString;
1910
1975
  status: z.ZodEnum<{
1911
- error: "error";
1912
1976
  unknown: "unknown";
1977
+ error: "error";
1913
1978
  ok: "ok";
1914
1979
  }>;
1915
1980
  summary: z.ZodNullable<z.ZodString>;
1981
+ changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1982
+ path: z.ZodString;
1983
+ mode: z.ZodEnum<{
1984
+ edit: "edit";
1985
+ write: "write";
1986
+ }>;
1987
+ added: z.ZodNumber;
1988
+ removed: z.ZodNumber;
1989
+ preview: z.ZodArray<z.ZodObject<{
1990
+ kind: z.ZodEnum<{
1991
+ added: "added";
1992
+ removed: "removed";
1993
+ }>;
1994
+ text: z.ZodString;
1995
+ }, z.core.$strip>>;
1996
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
1997
+ }, z.core.$strip>>>;
1916
1998
  }, z.core.$strip>, z.ZodObject<{
1917
1999
  type: z.ZodLiteral<"choices">;
1918
2000
  messageId: z.ZodString;
@@ -1966,22 +2048,23 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
1966
2048
  parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1967
2049
  type: z.ZodLiteral<"text">;
1968
2050
  text: z.ZodString;
2051
+ choice: z.ZodOptional<z.ZodString>;
1969
2052
  }, z.core.$strip>, z.ZodObject<{
1970
2053
  type: z.ZodLiteral<"tool">;
1971
2054
  toolCallId: z.ZodString;
1972
2055
  name: z.ZodString;
1973
2056
  label: z.ZodString;
1974
2057
  status: z.ZodEnum<{
1975
- error: "error";
1976
2058
  unknown: "unknown";
2059
+ error: "error";
1977
2060
  ok: "ok";
1978
2061
  }>;
1979
2062
  summary: z.ZodNullable<z.ZodString>;
1980
2063
  activity: z.ZodOptional<z.ZodEnum<{
1981
- check: "check";
1982
2064
  code: "code";
1983
- version: "version";
1984
2065
  status: "status";
2066
+ check: "check";
2067
+ version: "version";
1985
2068
  shipping: "shipping";
1986
2069
  category: "category";
1987
2070
  brief: "brief";
@@ -2011,6 +2094,7 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
2011
2094
  }>;
2012
2095
  text: z.ZodString;
2013
2096
  }, z.core.$strip>>;
2097
+ lines: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
2014
2098
  }, z.core.$strip>>>;
2015
2099
  }, z.core.$strip>, z.ZodObject<{
2016
2100
  type: z.ZodLiteral<"choices">;
@@ -2097,6 +2181,7 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
2097
2181
  pending: "pending";
2098
2182
  in_progress: "in_progress";
2099
2183
  completed: "completed";
2184
+ blocked: "blocked";
2100
2185
  }>;
2101
2186
  phase: z.ZodOptional<z.ZodEnum<{
2102
2187
  STORE: "STORE";
@@ -2106,6 +2191,7 @@ export declare const aiStreamRecordSchema: z.ZodObject<{
2106
2191
  BUILD: "BUILD";
2107
2192
  DONE: "DONE";
2108
2193
  }>>;
2194
+ note: z.ZodOptional<z.ZodString>;
2109
2195
  }, z.core.$strip>>;
2110
2196
  }, z.core.$strip>], "type">>;
2111
2197
  runId: z.ZodNullable<z.ZodString>;
@@ -2174,6 +2260,15 @@ export declare const storeDraftPreviewSchema: z.ZodObject<{
2174
2260
  used: z.ZodBoolean;
2175
2261
  }, z.core.$strip>;
2176
2262
  export type StoreDraftPreview = z.infer<typeof storeDraftPreviewSchema>;
2263
+ /**
2264
+ * 셀러 메시지가 선택지에서 고른 답인가(조각에 `choice`가 있다) — 할 일 목록은 셀러 요청 하나(사이클)의 일이고, 고른 답(선택지·만들기 확인·계획 승인·발행 확인·
2265
+ * 「이어서 진행」)은 같은 사이클을 잇고 새로 쓴 글은 새 사이클이다(2026-10-24). api(`currentCycleRows`)와 상점 플랫폼(로드맵)이 이 판정 하나를 쓴다.
2266
+ * 직전 답에 선택지가 있었는지로 가르면 선택지를 무시하고 새 요청을 쓴 경우도 옛 사이클에 묶였다
2267
+ */
2268
+ export declare function isAiChoiceAnswer(parts: readonly {
2269
+ type: string;
2270
+ choice?: string;
2271
+ }[]): boolean;
2177
2272
  //#endregion
2178
2273
  //#region src/schemas/analytics.d.ts
2179
2274
  export declare const analyticsRangeQuerySchema: z.ZodObject<{
@@ -11948,13 +12043,13 @@ export declare const discountSchema: z.ZodObject<{
11948
12043
  }, z.core.$strip>;
11949
12044
  export type Discount = z.infer<typeof discountSchema>;
11950
12045
  export declare const productSchema: z.ZodObject<{
11951
- salePrice: z.ZodNumber;
11952
12046
  status: z.ZodEnum<{
11953
12047
  SALE: "SALE";
11954
12048
  SUSPENDED: "SUSPENDED";
11955
12049
  OUT_OF_STOCK: "OUT_OF_STOCK";
11956
12050
  CLOSED: "CLOSED";
11957
12051
  }>;
12052
+ salePrice: z.ZodNumber;
11958
12053
  name: z.ZodString;
11959
12054
  stockQuantity: z.ZodNumber;
11960
12055
  categoryId: z.ZodNullable<z.ZodString>;
@@ -13008,9 +13103,9 @@ export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
13008
13103
  export declare const productSortSchema: z.ZodEnum<{
13009
13104
  "createdAt.desc": "createdAt.desc";
13010
13105
  "createdAt.asc": "createdAt.asc";
13011
- "updatedAt.desc": "updatedAt.desc";
13012
13106
  "salePrice.asc": "salePrice.asc";
13013
13107
  "salePrice.desc": "salePrice.desc";
13108
+ "updatedAt.desc": "updatedAt.desc";
13014
13109
  }>;
13015
13110
  export type ProductSort = z.infer<typeof productSortSchema>;
13016
13111
  export interface ProductListParams extends PageParams {
@@ -13039,9 +13134,9 @@ export declare const productListQuerySchema: z.ZodObject<{
13039
13134
  sort: z.ZodOptional<z.ZodEnum<{
13040
13135
  "createdAt.desc": "createdAt.desc";
13041
13136
  "createdAt.asc": "createdAt.asc";
13042
- "updatedAt.desc": "updatedAt.desc";
13043
13137
  "salePrice.asc": "salePrice.asc";
13044
13138
  "salePrice.desc": "salePrice.desc";
13139
+ "updatedAt.desc": "updatedAt.desc";
13045
13140
  }>>;
13046
13141
  }, z.core.$strip>;
13047
13142
  export declare const discountRequestSchema: z.ZodObject<{
@@ -15703,8 +15798,8 @@ interface StoreAuthServer {
15703
15798
  resource?: string;
15704
15799
  }
15705
15800
  interface StoreSessionOptions {
15706
- /** api 주소(예: https://api.example.com/v1) — `userinfo()`의 `GET /me`에 쓴다 */
15707
- baseUrl: string;
15801
+ /** api 주소(버전 경로 포함) — `userinfo()`의 `GET /me`에 쓴다. 생략하면 운영 주소(`https://api.sayren.io/v1`) */
15802
+ baseUrl?: string;
15708
15803
  /** 인가 서버(accounts) 주소들 */
15709
15804
  authServer: StoreAuthServer;
15710
15805
  /** OAuth public client id (예: avarlabs) */
@@ -15770,8 +15865,8 @@ export declare function createStoreSession(options: StoreSessionOptions): StoreS
15770
15865
  //#endregion
15771
15866
  //#region src/client.d.ts
15772
15867
  interface StoreClientOptions {
15773
- /** 예: https://api.example.com/v1 */
15774
- baseUrl: string;
15868
+ /** 관리 API 주소(버전 경로 포함). 생략하면 운영 주소(`SAYREN_API_BASE_URL`, `https://api.sayren.io/v1`) — 개발·로컬에서만 지정한다 */
15869
+ baseUrl?: string;
15775
15870
  /**
15776
15871
  * 계정 토큰(accounts가 발급한 JWT — 상점 플랫폼 로그인, 개인 액세스 토큰, 연결된 앱의 토큰).
15777
15872
  * 계정 API(`/me/*`)와 상점 API 모두에 Bearer로 싣는다. `session`을 주면 생략해도 세션 토큰을 쓴다.
@@ -15871,8 +15966,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
15871
15966
  }[];
15872
15967
  }>;
15873
15968
  get: (productId: string) => Promise<{
15874
- salePrice: number;
15875
15969
  status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
15970
+ salePrice: number;
15876
15971
  name: string;
15877
15972
  stockQuantity: number;
15878
15973
  categoryId: string | null;
@@ -16020,8 +16115,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
16020
16115
  createdAt?: string | undefined;
16021
16116
  }>;
16022
16117
  create: (body: ProductCreateRequestInput, idempotencyKey?: string) => Promise<{
16023
- salePrice: number;
16024
16118
  status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
16119
+ salePrice: number;
16025
16120
  name: string;
16026
16121
  stockQuantity: number;
16027
16122
  categoryId: string | null;
@@ -16169,8 +16264,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
16169
16264
  createdAt?: string | undefined;
16170
16265
  }>;
16171
16266
  update: (productId: string, body: ProductReplaceRequestInput) => Promise<{
16172
- salePrice: number;
16173
16267
  status: "SALE" | "SUSPENDED" | "OUT_OF_STOCK" | "CLOSED";
16268
+ salePrice: number;
16174
16269
  name: string;
16175
16270
  stockQuantity: number;
16176
16271
  categoryId: string | null;
@@ -23064,14 +23159,15 @@ export declare function createStoreClient(options: StoreClientOptions): {
23064
23159
  parts: ({
23065
23160
  type: "text";
23066
23161
  text: string;
23162
+ choice?: string | undefined;
23067
23163
  } | {
23068
23164
  type: "tool";
23069
23165
  toolCallId: string;
23070
23166
  name: string;
23071
23167
  label: string;
23072
- status: "error" | "unknown" | "ok";
23168
+ status: "unknown" | "error" | "ok";
23073
23169
  summary: string | null;
23074
- activity?: "check" | "code" | "version" | "status" | "shipping" | "category" | "brief" | "files" | "preview" | "template" | "site" | "info" | "upload" | "design" | "product" | "verify" | undefined;
23170
+ activity?: "code" | "status" | "check" | "version" | "shipping" | "category" | "brief" | "files" | "preview" | "template" | "site" | "info" | "upload" | "design" | "product" | "verify" | undefined;
23075
23171
  target?: string | undefined;
23076
23172
  changes?: {
23077
23173
  path: string;
@@ -23082,6 +23178,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
23082
23178
  kind: "added" | "removed";
23083
23179
  text: string;
23084
23180
  }[];
23181
+ lines?: [number, number][] | undefined;
23085
23182
  }[] | undefined;
23086
23183
  } | {
23087
23184
  type: "choices";
@@ -23149,9 +23246,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
23149
23246
  type: "todos";
23150
23247
  todos: {
23151
23248
  content: string;
23152
- status: "pending" | "in_progress" | "completed";
23249
+ status: "pending" | "in_progress" | "completed" | "blocked";
23153
23250
  id?: string | undefined;
23154
23251
  phase?: "STORE" | "STRUCTURE" | "DESIGN" | "ENVIRONMENT" | "BUILD" | "DONE" | undefined;
23252
+ note?: string | undefined;
23155
23253
  }[];
23156
23254
  })[];
23157
23255
  runId: string | null;
@@ -26542,10 +26640,10 @@ export declare const storeIndustrySchema: z.ZodEnum<{
26542
26640
  export type StoreIndustry = z.infer<typeof storeIndustrySchema>;
26543
26641
  /** 상품 자료 — 인터뷰의 「상품 자료」 답. 상품 등록 단계의 방법을 고른다 */
26544
26642
  export declare const brandBriefProductSourceSchema: z.ZodEnum<{
26643
+ NONE: "NONE";
26545
26644
  SPREADSHEET: "SPREADSHEET";
26546
26645
  EXISTING_STORE: "EXISTING_STORE";
26547
26646
  PHOTOS: "PHOTOS";
26548
- NONE: "NONE";
26549
26647
  }>;
26550
26648
  export type BrandBriefProductSource = z.infer<typeof brandBriefProductSourceSchema>;
26551
26649
  export declare const BRAND_BRIEF_MAX_REFERENCES = 5;
@@ -26570,10 +26668,10 @@ export declare const brandBriefSchema: z.ZodObject<{
26570
26668
  summary: z.ZodString;
26571
26669
  }, z.core.$strip>>;
26572
26670
  productSource: z.ZodNullable<z.ZodEnum<{
26671
+ NONE: "NONE";
26573
26672
  SPREADSHEET: "SPREADSHEET";
26574
26673
  EXISTING_STORE: "EXISTING_STORE";
26575
26674
  PHOTOS: "PHOTOS";
26576
- NONE: "NONE";
26577
26675
  }>>;
26578
26676
  notes: z.ZodNullable<z.ZodString>;
26579
26677
  }, z.core.$strip>;
@@ -26593,10 +26691,10 @@ export declare const putBrandBriefRequestSchema: z.ZodObject<{
26593
26691
  summary: z.ZodString;
26594
26692
  }, z.core.$strip>>>;
26595
26693
  productSource: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
26694
+ NONE: "NONE";
26596
26695
  SPREADSHEET: "SPREADSHEET";
26597
26696
  EXISTING_STORE: "EXISTING_STORE";
26598
26697
  PHOTOS: "PHOTOS";
26599
- NONE: "NONE";
26600
26698
  }>>>;
26601
26699
  notes: z.ZodDefault<z.ZodNullable<z.ZodString>>;
26602
26700
  }, z.core.$strip>;
@@ -26617,10 +26715,10 @@ export declare const brandBriefViewSchema: z.ZodObject<{
26617
26715
  summary: z.ZodString;
26618
26716
  }, z.core.$strip>>;
26619
26717
  productSource: z.ZodNullable<z.ZodEnum<{
26718
+ NONE: "NONE";
26620
26719
  SPREADSHEET: "SPREADSHEET";
26621
26720
  EXISTING_STORE: "EXISTING_STORE";
26622
26721
  PHOTOS: "PHOTOS";
26623
- NONE: "NONE";
26624
26722
  }>>;
26625
26723
  notes: z.ZodNullable<z.ZodString>;
26626
26724
  }, z.core.$strip>>;