@tienne/gestalt 0.123.0 → 0.125.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.
Files changed (87) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/plugin/.codex-plugin/plugin.json +1 -1
  3. package/dist/plugin/role-agents/lens-context/AGENT.md +67 -15
  4. package/dist/plugin/skills/_shared/proactive-routing.md +2 -2
  5. package/dist/plugin/skills/jira-create/SKILL.md +39 -4
  6. package/dist/plugin/skills/lens/SKILL.md +56 -56
  7. package/dist/plugin/skills/pr/SKILL.md +12 -2
  8. package/dist/plugin/skills/review/SKILL.md +51 -15
  9. package/dist/plugin/skills/review/references/approve-when-no-blocking.md +7 -0
  10. package/dist/plugin/skills/review/references/post-confirm.md +30 -0
  11. package/dist/plugin/skills/review/references/result-lines.md +32 -0
  12. package/dist/plugin/skills/review/references/user-profile.md +19 -0
  13. package/dist/plugin/skills/review-loop/SKILL.md +83 -20
  14. package/dist/plugin/skills/review-reply/SKILL.md +4 -0
  15. package/dist/plugin/skills/ship/SKILL.md +150 -7
  16. package/dist/plugin/skills/video-digest/SKILL.md +182 -42
  17. package/dist/src/cli/commands/profile.d.ts +13 -0
  18. package/dist/src/cli/commands/profile.d.ts.map +1 -0
  19. package/dist/src/cli/commands/profile.js +26 -0
  20. package/dist/src/cli/commands/profile.js.map +1 -0
  21. package/dist/src/cli/commands/ship.d.ts +35 -0
  22. package/dist/src/cli/commands/ship.d.ts.map +1 -0
  23. package/dist/src/cli/commands/ship.js +146 -0
  24. package/dist/src/cli/commands/ship.js.map +1 -0
  25. package/dist/src/cli/index.d.ts.map +1 -1
  26. package/dist/src/cli/index.js +52 -0
  27. package/dist/src/cli/index.js.map +1 -1
  28. package/dist/src/core/user-profile.d.ts +29 -0
  29. package/dist/src/core/user-profile.d.ts.map +1 -0
  30. package/dist/src/core/user-profile.js +97 -0
  31. package/dist/src/core/user-profile.js.map +1 -0
  32. package/dist/src/digest/lens-schema.d.ts +19 -5
  33. package/dist/src/digest/lens-schema.d.ts.map +1 -1
  34. package/dist/src/digest/lens-schema.js +21 -3
  35. package/dist/src/digest/lens-schema.js.map +1 -1
  36. package/dist/src/digest/lint-lens-context.d.ts +3 -2
  37. package/dist/src/digest/lint-lens-context.d.ts.map +1 -1
  38. package/dist/src/digest/lint-lens-context.js +25 -3
  39. package/dist/src/digest/lint-lens-context.js.map +1 -1
  40. package/dist/src/digest/lint.d.ts.map +1 -1
  41. package/dist/src/digest/lint.js +9 -5
  42. package/dist/src/digest/lint.js.map +1 -1
  43. package/dist/src/digest/render-lens.d.ts +8 -4
  44. package/dist/src/digest/render-lens.d.ts.map +1 -1
  45. package/dist/src/digest/render-lens.js +34 -3
  46. package/dist/src/digest/render-lens.js.map +1 -1
  47. package/dist/src/digest/render-md.d.ts.map +1 -1
  48. package/dist/src/digest/render-md.js +7 -5
  49. package/dist/src/digest/render-md.js.map +1 -1
  50. package/dist/src/digest/schema.d.ts +58 -23
  51. package/dist/src/digest/schema.d.ts.map +1 -1
  52. package/dist/src/digest/schema.js +6 -3
  53. package/dist/src/digest/schema.js.map +1 -1
  54. package/dist/src/lens/attach.d.ts +36 -14
  55. package/dist/src/lens/attach.d.ts.map +1 -1
  56. package/dist/src/lens/attach.js +6 -3
  57. package/dist/src/lens/attach.js.map +1 -1
  58. package/dist/src/ship/checkpoint.d.ts +145 -0
  59. package/dist/src/ship/checkpoint.d.ts.map +1 -0
  60. package/dist/src/ship/checkpoint.js +282 -0
  61. package/dist/src/ship/checkpoint.js.map +1 -0
  62. package/dist/src/ship/ci.d.ts +110 -0
  63. package/dist/src/ship/ci.d.ts.map +1 -0
  64. package/dist/src/ship/ci.js +270 -0
  65. package/dist/src/ship/ci.js.map +1 -0
  66. package/package.json +1 -1
  67. package/plugin/.codex-plugin/plugin.json +1 -1
  68. package/plugin/.mcp.json +1 -1
  69. package/plugin/mcp.json +1 -1
  70. package/plugin/role-agents/lens-context/AGENT.md +67 -15
  71. package/plugin/skills/_shared/proactive-routing.md +2 -2
  72. package/plugin/skills/jira-create/SKILL.md +39 -4
  73. package/plugin/skills/lens/SKILL.md +56 -56
  74. package/plugin/skills/pr/SKILL.md +12 -2
  75. package/plugin/skills/review/SKILL.md +51 -15
  76. package/plugin/skills/review/references/approve-when-no-blocking.md +7 -0
  77. package/plugin/skills/review/references/post-confirm.md +30 -0
  78. package/plugin/skills/review/references/result-lines.md +32 -0
  79. package/plugin/skills/review/references/user-profile.md +19 -0
  80. package/plugin/skills/review-loop/SKILL.md +83 -20
  81. package/plugin/skills/review-reply/SKILL.md +4 -0
  82. package/plugin/skills/ship/SKILL.md +150 -7
  83. package/plugin/skills/video-digest/SKILL.md +182 -42
  84. package/dist/plugin/skills/video-digest/templates/background.md +0 -15
  85. package/dist/plugin/skills/video-digest/templates/counterpoints.md +0 -15
  86. package/plugin/skills/video-digest/templates/background.md +0 -15
  87. package/plugin/skills/video-digest/templates/counterpoints.md +0 -15
@@ -1,10 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import { type MergeResult } from '../digest/merge.js';
3
- /** lens-context의 카드(cards)와 한계 줄(limits), lens-link의 연결 카드(links)를 스킬이 한 파일로 합친 것이다 */
3
+ /**
4
+ * lens-context의 카드(cards)와 한계 줄(limits), lens-link의 연결 카드(links)를 스킬이 한 파일로 합친 것이다.
5
+ * 카드 상한은 영상 기준으로 받고 읽기 렌즈의 네 장 상한은 merge의 lint가 본다
6
+ */
4
7
  export declare const contextFileSchema: z.ZodObject<{
5
8
  cards: z.ZodDefault<z.ZodArray<z.ZodObject<{
6
9
  id: z.ZodString;
7
- kind: z.ZodEnum<["lineage", "interpretation", "counter", "unverified"]>;
10
+ kind: z.ZodEnum<["lineage", "interpretation", "counter", "unverified", "background"]>;
8
11
  section: z.ZodString;
9
12
  anchor: z.ZodEffects<z.ZodObject<{
10
13
  key: z.ZodNumber;
@@ -53,12 +56,15 @@ export declare const contextFileSchema: z.ZodObject<{
53
56
  points: z.ZodArray<z.ZodObject<{
54
57
  text: z.ZodString;
55
58
  sources: z.ZodArray<z.ZodString, "many">;
59
+ verdict: z.ZodOptional<z.ZodEnum<["correct", "depends", "incorrect", "unverifiable"]>>;
56
60
  }, "strip", z.ZodTypeAny, {
57
61
  text: string;
58
62
  sources: string[];
63
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
59
64
  }, {
60
65
  text: string;
61
66
  sources: string[];
67
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
62
68
  }>, "many">;
63
69
  sources: z.ZodArray<z.ZodObject<{
64
70
  id: z.ZodString;
@@ -81,7 +87,7 @@ export declare const contextFileSchema: z.ZodObject<{
81
87
  }>, "many">;
82
88
  }, "strip", z.ZodTypeAny, {
83
89
  id: string;
84
- kind: "unverified" | "interpretation" | "lineage" | "counter";
90
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
85
91
  anchor: {
86
92
  key: number;
87
93
  from: number;
@@ -98,6 +104,7 @@ export declare const contextFileSchema: z.ZodObject<{
98
104
  points: {
99
105
  text: string;
100
106
  sources: string[];
107
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
101
108
  }[];
102
109
  section: string;
103
110
  lineage?: {
@@ -110,7 +117,7 @@ export declare const contextFileSchema: z.ZodObject<{
110
117
  }[] | undefined;
111
118
  }, {
112
119
  id: string;
113
- kind: "unverified" | "interpretation" | "lineage" | "counter";
120
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
114
121
  anchor: {
115
122
  key: number;
116
123
  from: number;
@@ -127,6 +134,7 @@ export declare const contextFileSchema: z.ZodObject<{
127
134
  points: {
128
135
  text: string;
129
136
  sources: string[];
137
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
130
138
  }[];
131
139
  section: string;
132
140
  lineage?: {
@@ -322,7 +330,7 @@ export declare const contextFileSchema: z.ZodObject<{
322
330
  }[];
323
331
  cards: {
324
332
  id: string;
325
- kind: "unverified" | "interpretation" | "lineage" | "counter";
333
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
326
334
  anchor: {
327
335
  key: number;
328
336
  from: number;
@@ -339,6 +347,7 @@ export declare const contextFileSchema: z.ZodObject<{
339
347
  points: {
340
348
  text: string;
341
349
  sources: string[];
350
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
342
351
  }[];
343
352
  section: string;
344
353
  lineage?: {
@@ -383,7 +392,7 @@ export declare const contextFileSchema: z.ZodObject<{
383
392
  }[] | undefined;
384
393
  cards?: {
385
394
  id: string;
386
- kind: "unverified" | "interpretation" | "lineage" | "counter";
395
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
387
396
  anchor: {
388
397
  key: number;
389
398
  from: number;
@@ -400,6 +409,7 @@ export declare const contextFileSchema: z.ZodObject<{
400
409
  points: {
401
410
  text: string;
402
411
  sources: string[];
412
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
403
413
  }[];
404
414
  section: string;
405
415
  lineage?: {
@@ -432,7 +442,7 @@ export type ContextFile = z.infer<typeof contextFileSchema>;
432
442
  export declare const cardsFileSchema: z.ZodObject<Pick<{
433
443
  cards: z.ZodDefault<z.ZodArray<z.ZodObject<{
434
444
  id: z.ZodString;
435
- kind: z.ZodEnum<["lineage", "interpretation", "counter", "unverified"]>;
445
+ kind: z.ZodEnum<["lineage", "interpretation", "counter", "unverified", "background"]>;
436
446
  section: z.ZodString;
437
447
  anchor: z.ZodEffects<z.ZodObject<{
438
448
  key: z.ZodNumber;
@@ -481,12 +491,15 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
481
491
  points: z.ZodArray<z.ZodObject<{
482
492
  text: z.ZodString;
483
493
  sources: z.ZodArray<z.ZodString, "many">;
494
+ verdict: z.ZodOptional<z.ZodEnum<["correct", "depends", "incorrect", "unverifiable"]>>;
484
495
  }, "strip", z.ZodTypeAny, {
485
496
  text: string;
486
497
  sources: string[];
498
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
487
499
  }, {
488
500
  text: string;
489
501
  sources: string[];
502
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
490
503
  }>, "many">;
491
504
  sources: z.ZodArray<z.ZodObject<{
492
505
  id: z.ZodString;
@@ -509,7 +522,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
509
522
  }>, "many">;
510
523
  }, "strip", z.ZodTypeAny, {
511
524
  id: string;
512
- kind: "unverified" | "interpretation" | "lineage" | "counter";
525
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
513
526
  anchor: {
514
527
  key: number;
515
528
  from: number;
@@ -526,6 +539,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
526
539
  points: {
527
540
  text: string;
528
541
  sources: string[];
542
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
529
543
  }[];
530
544
  section: string;
531
545
  lineage?: {
@@ -538,7 +552,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
538
552
  }[] | undefined;
539
553
  }, {
540
554
  id: string;
541
- kind: "unverified" | "interpretation" | "lineage" | "counter";
555
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
542
556
  anchor: {
543
557
  key: number;
544
558
  from: number;
@@ -555,6 +569,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
555
569
  points: {
556
570
  text: string;
557
571
  sources: string[];
572
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
558
573
  }[];
559
574
  section: string;
560
575
  lineage?: {
@@ -735,7 +750,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
735
750
  }, "cards" | "limits">, "strip", z.ZodTypeAny, {
736
751
  cards: {
737
752
  id: string;
738
- kind: "unverified" | "interpretation" | "lineage" | "counter";
753
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
739
754
  anchor: {
740
755
  key: number;
741
756
  from: number;
@@ -752,6 +767,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
752
767
  points: {
753
768
  text: string;
754
769
  sources: string[];
770
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
755
771
  }[];
756
772
  section: string;
757
773
  lineage?: {
@@ -781,7 +797,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
781
797
  }, {
782
798
  cards?: {
783
799
  id: string;
784
- kind: "unverified" | "interpretation" | "lineage" | "counter";
800
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
785
801
  anchor: {
786
802
  key: number;
787
803
  from: number;
@@ -798,6 +814,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
798
814
  points: {
799
815
  text: string;
800
816
  sources: string[];
817
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
801
818
  }[];
802
819
  section: string;
803
820
  lineage?: {
@@ -829,7 +846,7 @@ export declare const cardsFileSchema: z.ZodObject<Pick<{
829
846
  export declare const linksFileSchema: z.ZodObject<Pick<{
830
847
  cards: z.ZodDefault<z.ZodArray<z.ZodObject<{
831
848
  id: z.ZodString;
832
- kind: z.ZodEnum<["lineage", "interpretation", "counter", "unverified"]>;
849
+ kind: z.ZodEnum<["lineage", "interpretation", "counter", "unverified", "background"]>;
833
850
  section: z.ZodString;
834
851
  anchor: z.ZodEffects<z.ZodObject<{
835
852
  key: z.ZodNumber;
@@ -878,12 +895,15 @@ export declare const linksFileSchema: z.ZodObject<Pick<{
878
895
  points: z.ZodArray<z.ZodObject<{
879
896
  text: z.ZodString;
880
897
  sources: z.ZodArray<z.ZodString, "many">;
898
+ verdict: z.ZodOptional<z.ZodEnum<["correct", "depends", "incorrect", "unverifiable"]>>;
881
899
  }, "strip", z.ZodTypeAny, {
882
900
  text: string;
883
901
  sources: string[];
902
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
884
903
  }, {
885
904
  text: string;
886
905
  sources: string[];
906
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
887
907
  }>, "many">;
888
908
  sources: z.ZodArray<z.ZodObject<{
889
909
  id: z.ZodString;
@@ -906,7 +926,7 @@ export declare const linksFileSchema: z.ZodObject<Pick<{
906
926
  }>, "many">;
907
927
  }, "strip", z.ZodTypeAny, {
908
928
  id: string;
909
- kind: "unverified" | "interpretation" | "lineage" | "counter";
929
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
910
930
  anchor: {
911
931
  key: number;
912
932
  from: number;
@@ -923,6 +943,7 @@ export declare const linksFileSchema: z.ZodObject<Pick<{
923
943
  points: {
924
944
  text: string;
925
945
  sources: string[];
946
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
926
947
  }[];
927
948
  section: string;
928
949
  lineage?: {
@@ -935,7 +956,7 @@ export declare const linksFileSchema: z.ZodObject<Pick<{
935
956
  }[] | undefined;
936
957
  }, {
937
958
  id: string;
938
- kind: "unverified" | "interpretation" | "lineage" | "counter";
959
+ kind: "unverified" | "interpretation" | "lineage" | "counter" | "background";
939
960
  anchor: {
940
961
  key: number;
941
962
  from: number;
@@ -952,6 +973,7 @@ export declare const linksFileSchema: z.ZodObject<Pick<{
952
973
  points: {
953
974
  text: string;
954
975
  sources: string[];
976
+ verdict?: "correct" | "incorrect" | "depends" | "unverifiable" | undefined;
955
977
  }[];
956
978
  section: string;
957
979
  lineage?: {
@@ -1 +1 @@
1
- {"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../../src/lens/attach.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKnE,uFAAuF;AACvF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,GAAG,CAAC,EAAE,MAAM,GACX,WAAW,CA4Bb"}
@@ -1,12 +1,15 @@
1
1
  import { z } from 'zod';
2
- import { contextCardSchema, knowledgeLinkSchema, limitSchema } from '../digest/lens-schema.js';
2
+ import { CARDS_MAX_VIDEO, contextCardSchema, knowledgeLinkSchema, limitSchema, } from '../digest/lens-schema.js';
3
3
  import { mergeReport } from '../digest/merge.js';
4
4
  import { findReport, initialReportIndex } from '../digest/reports.js';
5
5
  import { DigestStore } from '../digest/store.js';
6
6
  import { parseDigest } from '../digest/schema.js';
7
- /** lens-context의 카드(cards)와 한계 줄(limits), lens-link의 연결 카드(links)를 스킬이 한 파일로 합친 것이다 */
7
+ /**
8
+ * lens-context의 카드(cards)와 한계 줄(limits), lens-link의 연결 카드(links)를 스킬이 한 파일로 합친 것이다.
9
+ * 카드 상한은 영상 기준으로 받고 읽기 렌즈의 네 장 상한은 merge의 lint가 본다
10
+ */
8
11
  export const contextFileSchema = z.object({
9
- cards: z.array(contextCardSchema).max(4).default([]),
12
+ cards: z.array(contextCardSchema).max(CARDS_MAX_VIDEO).default([]),
10
13
  links: z.array(knowledgeLinkSchema).max(6).default([]),
11
14
  limits: z
12
15
  .array(limitSchema)
@@ -1 +1 @@
1
- {"version":3,"file":"attach.js","sourceRoot":"","sources":["../../../src/lens/attach.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAoB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,O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가 끝날 때마다 남기는 체크포인트.
4
+ *
5
+ * 라운드가 길면 대화가 압축되거나 세션이 끊기고 다시 부르면 처음부터 돌았다. 어디까지
6
+ * 갔는지는 로컬 PR 과 GitHub PR 에 흩어져 있어 사람이 맞춰야 했다. 다시 부르면 이 파일을
7
+ * 읽고 git 과 PR 상태가 그대로인지 확인한 뒤 이어서 돈다.
8
+ *
9
+ * 자리는 ship 이 이미 쓰는 git 디렉토리 아래 상태 자리다. 워크트리 안(`.gestalt/`)에 두면
10
+ * 그걸 무시 목록에 안 넣은 남의 레포에서 커밋에 딸려 들어간다.
11
+ */
12
+ export declare const SHIP_PHASES: readonly ["0", "1", "2", "a", "3", "4", "ci"];
13
+ export type ShipPhase = (typeof SHIP_PHASES)[number];
14
+ export type StopKind = 'blocked' | 'escalated';
15
+ export interface RoundRecord {
16
+ phase: ShipPhase;
17
+ round: number;
18
+ issues: number;
19
+ head: string;
20
+ }
21
+ export interface ShipCheckpoint {
22
+ version: 1;
23
+ branch: string;
24
+ phase: ShipPhase;
25
+ round: number | null;
26
+ localPrId: string | null;
27
+ prNumber: number | null;
28
+ prUrl: string | null;
29
+ base: string | null;
30
+ verifyCmd: string | null;
31
+ /** 저장할 때의 HEAD. 다시 부를 때 이 커밋에서 이어지는지 본다 */
32
+ head: string;
33
+ /** 다음에 할 일 한 줄. 이어서 돌 자리를 사람과 에이전트가 같이 읽는다 */
34
+ next: string;
35
+ stopped: StopKind | null;
36
+ /** 라운드별 이슈 수. 완료 보고의 "7 → 2 → 0" 이 여기서 나온다 */
37
+ history: RoundRecord[];
38
+ savedAt: string;
39
+ }
40
+ export interface CheckpointPatch {
41
+ phase: ShipPhase;
42
+ next: string;
43
+ round?: number;
44
+ localPrId?: string;
45
+ prNumber?: number;
46
+ prUrl?: string;
47
+ base?: string;
48
+ verifyCmd?: string;
49
+ stopped?: StopKind;
50
+ issues?: number;
51
+ }
52
+ export declare const CHECKPOINT_FILE = "checkpoint.json";
53
+ export declare function checkpointPath(dir: string): string;
54
+ /**
55
+ * 상대 경로를 막는다. 스킬 문서의 Bash 블록은 서로 변수를 안 나눠서 `$shipTmp` 가 빈
56
+ * 문자열로 풀릴 수 있는데, 그러면 작업 디렉토리에 파일이 생겨 커밋에 섞인다.
57
+ */
58
+ export declare function assertDir(dir: string | undefined): string;
59
+ export declare function isShipPhase(v: string): v is ShipPhase;
60
+ export type CheckpointRead = {
61
+ kind: 'none';
62
+ } | {
63
+ kind: 'ok';
64
+ checkpoint: ShipCheckpoint;
65
+ } | {
66
+ kind: 'unreadable';
67
+ error: string;
68
+ };
69
+ /** pr-base 0절의 이름 검사와 같은 규칙. base 는 셸 명령의 큰따옴표 안에 들어간다 */
70
+ export declare const BRANCH_NAME_RE: RegExp;
71
+ /** 로컬 PR id 는 randomUUID().slice(0, 8) 로 만든다. `gestalt pr close <id>` 처럼 셸 명령에 들어간다 */
72
+ export declare const LOCAL_PR_ID_RE: RegExp;
73
+ /** 완료 보고에 그대로 옮겨 사용자에게 보이는 값이라 링크로 열리는 꼴만 받는다 */
74
+ export declare const PR_URL_RE: RegExp;
75
+ export declare function readCheckpoint(dir: string): CheckpointRead;
76
+ /**
77
+ * 앞 체크포인트에 이번 값을 덧씌운다. 단계마다 아는 값이 달라서(로컬 PR id 는 1단계,
78
+ * GitHub PR 번호는 3단계) 매번 전부 넘기게 하면 뒤 단계에서 앞 값을 잃는다.
79
+ *
80
+ * 라운드는 같은 단계에서만 이어받는다. 단계가 바뀌면 앞 단계의 라운드 번호는 뜻이 없다.
81
+ * 멈춤 표시는 이어받지 않는다. 다시 저장했다면 멈췄던 자리를 이미 넘어선 것이다.
82
+ */
83
+ export declare function mergeCheckpoint(prev: ShipCheckpoint | null, patch: CheckpointPatch, observed: {
84
+ branch: string;
85
+ head: string;
86
+ }, savedAt: string): ShipCheckpoint;
87
+ export declare function writeCheckpoint(dir: string, cp: ShipCheckpoint): string;
88
+ export interface ObservedState {
89
+ branch: string;
90
+ head: string;
91
+ /** 추적 중인 파일에 커밋 안 한 변경이 있는지. 새 파일은 안 본다 */
92
+ dirty: boolean;
93
+ /** 체크포인트의 head 가 지금 HEAD 의 조상인지(같으면 true) */
94
+ cpHeadIsAncestor: boolean;
95
+ /** 체크포인트 뒤에 쌓인 커밋 수 */
96
+ aheadBy: number;
97
+ localPr?: {
98
+ found: false;
99
+ } | {
100
+ found: true;
101
+ status: string;
102
+ headSha: string;
103
+ };
104
+ pr?: {
105
+ ok: false;
106
+ error: string;
107
+ } | {
108
+ ok: true;
109
+ state: string;
110
+ isDraft: boolean;
111
+ headRefOid: string;
112
+ url: string;
113
+ };
114
+ }
115
+ export type MismatchKind = 'branch' | 'head-ahead' | 'head-diverged' | 'dirty' | 'local-pr-missing' | 'local-pr-closed' | 'local-pr-head' | 'pr-closed' | 'pr-head' | 'pr-lookup-failed' | 'unreadable';
116
+ export interface Mismatch {
117
+ kind: MismatchKind;
118
+ detail: string;
119
+ }
120
+ export declare function compareCheckpoint(cp: ShipCheckpoint, obs: ObservedState): Mismatch[];
121
+ export interface ObserveDeps {
122
+ run: CmdRunner;
123
+ localPr: (id: string) => {
124
+ status: string;
125
+ headSha: string;
126
+ } | null;
127
+ }
128
+ export declare function observeState(cp: ShipCheckpoint, deps: ObserveDeps): ObservedState;
129
+ export declare function defaultObserveDeps(run?: CmdRunner): ObserveDeps;
130
+ export type CheckReport = {
131
+ status: 'none';
132
+ } | {
133
+ status: 'match';
134
+ checkpoint: ShipCheckpoint;
135
+ observed: ObservedState;
136
+ mismatches: [];
137
+ } | {
138
+ status: 'mismatch';
139
+ checkpoint: ShipCheckpoint | null;
140
+ observed: ObservedState | null;
141
+ mismatches: Mismatch[];
142
+ };
143
+ export declare function checkCheckpoint(dir: string, deps: ObserveDeps): CheckReport;
144
+ export declare function saveCheckpoint(dir: string, patch: CheckpointPatch, run?: CmdRunner, now?: Date): ShipCheckpoint;
145
+ //# sourceMappingURL=checkpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkpoint.d.ts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