@tienne/gestalt 0.122.0 → 0.124.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/package.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/skills/_shared/pr-base.md +169 -0
- package/dist/plugin/skills/_shared/proactive-routing.md +1 -1
- package/dist/plugin/skills/jira-create/SKILL.md +39 -4
- package/dist/plugin/skills/pr/SKILL.md +32 -12
- package/dist/plugin/skills/review/SKILL.md +94 -29
- package/dist/plugin/skills/review/references/approve-when-no-blocking.md +7 -0
- package/dist/plugin/skills/review/references/post-confirm.md +30 -0
- package/dist/plugin/skills/review/references/result-lines.md +32 -0
- package/dist/plugin/skills/review/references/user-profile.md +19 -0
- package/dist/plugin/skills/review-loop/SKILL.md +83 -20
- package/dist/plugin/skills/review-reply/SKILL.md +4 -0
- package/dist/plugin/skills/ship/SKILL.md +276 -29
- package/dist/src/architecture/ir-schema.d.ts +26 -26
- package/dist/src/cli/commands/profile.d.ts +13 -0
- package/dist/src/cli/commands/profile.d.ts.map +1 -0
- package/dist/src/cli/commands/profile.js +26 -0
- package/dist/src/cli/commands/profile.js.map +1 -0
- package/dist/src/cli/commands/ship.d.ts +35 -0
- package/dist/src/cli/commands/ship.d.ts.map +1 -0
- package/dist/src/cli/commands/ship.js +146 -0
- package/dist/src/cli/commands/ship.js.map +1 -0
- package/dist/src/cli/index.d.ts.map +1 -1
- package/dist/src/cli/index.js +52 -0
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/core/config.d.ts +12 -12
- package/dist/src/core/types.d.ts +64 -0
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/core/user-profile.d.ts +29 -0
- package/dist/src/core/user-profile.d.ts.map +1 -0
- package/dist/src/core/user-profile.js +97 -0
- package/dist/src/core/user-profile.js.map +1 -0
- package/dist/src/digest/blocks.d.ts +34 -34
- package/dist/src/digest/comments.d.ts +6 -6
- package/dist/src/digest/lens-schema.d.ts +2 -2
- package/dist/src/digest/lint-lens-context.d.ts +4 -4
- package/dist/src/digest/schema.d.ts +55 -55
- package/dist/src/lens/attach.d.ts +10 -10
- package/dist/src/mcp/schemas.d.ts +238 -225
- package/dist/src/mcp/schemas.d.ts.map +1 -1
- package/dist/src/mcp/schemas.js +86 -16
- package/dist/src/mcp/schemas.js.map +1 -1
- package/dist/src/mcp/tools/review-passthrough.d.ts.map +1 -1
- package/dist/src/mcp/tools/review-passthrough.js +61 -2
- package/dist/src/mcp/tools/review-passthrough.js.map +1 -1
- package/dist/src/mcp/tools/status.d.ts +1 -1
- package/dist/src/research/schema.d.ts +66 -66
- package/dist/src/research/target.d.ts +6 -6
- package/dist/src/review/consensus-input.d.ts +11 -0
- package/dist/src/review/consensus-input.d.ts.map +1 -0
- package/dist/src/review/consensus-input.js +102 -0
- package/dist/src/review/consensus-input.js.map +1 -0
- package/dist/src/review/passthrough-engine.d.ts +9 -2
- package/dist/src/review/passthrough-engine.d.ts.map +1 -1
- package/dist/src/review/passthrough-engine.js +58 -10
- package/dist/src/review/passthrough-engine.js.map +1 -1
- package/dist/src/review/verification.d.ts +48 -7
- package/dist/src/review/verification.d.ts.map +1 -1
- package/dist/src/review/verification.js +109 -23
- package/dist/src/review/verification.js.map +1 -1
- package/dist/src/review/verifier-record.d.ts +55 -0
- package/dist/src/review/verifier-record.d.ts.map +1 -0
- package/dist/src/review/verifier-record.js +228 -0
- package/dist/src/review/verifier-record.js.map +1 -0
- package/dist/src/ship/checkpoint.d.ts +145 -0
- package/dist/src/ship/checkpoint.d.ts.map +1 -0
- package/dist/src/ship/checkpoint.js +282 -0
- package/dist/src/ship/checkpoint.js.map +1 -0
- package/dist/src/ship/ci.d.ts +110 -0
- package/dist/src/ship/ci.d.ts.map +1 -0
- package/dist/src/ship/ci.js +270 -0
- package/dist/src/ship/ci.js.map +1 -0
- package/package.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +1 -1
- package/plugin/mcp.json +1 -1
- package/plugin/skills/_shared/pr-base.md +169 -0
- package/plugin/skills/_shared/proactive-routing.md +1 -1
- package/plugin/skills/jira-create/SKILL.md +39 -4
- package/plugin/skills/pr/SKILL.md +32 -12
- package/plugin/skills/review/SKILL.md +94 -29
- package/plugin/skills/review/references/approve-when-no-blocking.md +7 -0
- package/plugin/skills/review/references/post-confirm.md +30 -0
- package/plugin/skills/review/references/result-lines.md +32 -0
- package/plugin/skills/review/references/user-profile.md +19 -0
- package/plugin/skills/review-loop/SKILL.md +83 -20
- package/plugin/skills/review-reply/SKILL.md +4 -0
- package/plugin/skills/ship/SKILL.md +276 -29
|
@@ -145,13 +145,13 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
145
145
|
line: z.ZodOptional<z.ZodNumber>;
|
|
146
146
|
}, "strip", z.ZodTypeAny, {
|
|
147
147
|
kind: "gap" | "unverified";
|
|
148
|
-
text?: string | undefined;
|
|
149
148
|
line?: number | undefined;
|
|
149
|
+
text?: string | undefined;
|
|
150
150
|
owner?: string | undefined;
|
|
151
151
|
}, {
|
|
152
152
|
kind: "gap" | "unverified";
|
|
153
|
-
text?: string | undefined;
|
|
154
153
|
line?: number | undefined;
|
|
154
|
+
text?: string | undefined;
|
|
155
155
|
owner?: string | undefined;
|
|
156
156
|
}>, "many">>;
|
|
157
157
|
evidenceMix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
@@ -163,14 +163,14 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
163
163
|
unchecked: z.ZodNumber;
|
|
164
164
|
}, "strip", z.ZodTypeAny, {
|
|
165
165
|
broken: number;
|
|
166
|
-
pinned: number;
|
|
167
166
|
total: number;
|
|
167
|
+
pinned: number;
|
|
168
168
|
unchecked: number;
|
|
169
169
|
branchOnly: number;
|
|
170
170
|
}, {
|
|
171
171
|
broken: number;
|
|
172
|
-
pinned: number;
|
|
173
172
|
total: number;
|
|
173
|
+
pinned: number;
|
|
174
174
|
unchecked: number;
|
|
175
175
|
branchOnly: number;
|
|
176
176
|
}>>;
|
|
@@ -239,15 +239,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
239
239
|
}[] | undefined;
|
|
240
240
|
gaps?: {
|
|
241
241
|
kind: "gap" | "unverified";
|
|
242
|
-
text?: string | undefined;
|
|
243
242
|
line?: number | undefined;
|
|
243
|
+
text?: string | undefined;
|
|
244
244
|
owner?: string | undefined;
|
|
245
245
|
}[] | undefined;
|
|
246
246
|
updatedAt?: string | undefined;
|
|
247
247
|
links?: {
|
|
248
248
|
broken: number;
|
|
249
|
-
pinned: number;
|
|
250
249
|
total: number;
|
|
250
|
+
pinned: number;
|
|
251
251
|
unchecked: number;
|
|
252
252
|
branchOnly: number;
|
|
253
253
|
} | undefined;
|
|
@@ -278,15 +278,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
278
278
|
}[] | undefined;
|
|
279
279
|
gaps?: {
|
|
280
280
|
kind: "gap" | "unverified";
|
|
281
|
-
text?: string | undefined;
|
|
282
281
|
line?: number | undefined;
|
|
282
|
+
text?: string | undefined;
|
|
283
283
|
owner?: string | undefined;
|
|
284
284
|
}[] | undefined;
|
|
285
285
|
updatedAt?: string | undefined;
|
|
286
286
|
links?: {
|
|
287
287
|
broken: number;
|
|
288
|
-
pinned: number;
|
|
289
288
|
total: number;
|
|
289
|
+
pinned: number;
|
|
290
290
|
unchecked: number;
|
|
291
291
|
branchOnly: number;
|
|
292
292
|
} | undefined;
|
|
@@ -454,15 +454,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
454
454
|
}[] | undefined;
|
|
455
455
|
gaps?: {
|
|
456
456
|
kind: "gap" | "unverified";
|
|
457
|
-
text?: string | undefined;
|
|
458
457
|
line?: number | undefined;
|
|
458
|
+
text?: string | undefined;
|
|
459
459
|
owner?: string | undefined;
|
|
460
460
|
}[] | undefined;
|
|
461
461
|
updatedAt?: string | undefined;
|
|
462
462
|
links?: {
|
|
463
463
|
broken: number;
|
|
464
|
-
pinned: number;
|
|
465
464
|
total: number;
|
|
465
|
+
pinned: number;
|
|
466
466
|
unchecked: number;
|
|
467
467
|
branchOnly: number;
|
|
468
468
|
} | undefined;
|
|
@@ -560,15 +560,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
560
560
|
}[] | undefined;
|
|
561
561
|
gaps?: {
|
|
562
562
|
kind: "gap" | "unverified";
|
|
563
|
-
text?: string | undefined;
|
|
564
563
|
line?: number | undefined;
|
|
564
|
+
text?: string | undefined;
|
|
565
565
|
owner?: string | undefined;
|
|
566
566
|
}[] | undefined;
|
|
567
567
|
updatedAt?: string | undefined;
|
|
568
568
|
links?: {
|
|
569
569
|
broken: number;
|
|
570
|
-
pinned: number;
|
|
571
570
|
total: number;
|
|
571
|
+
pinned: number;
|
|
572
572
|
unchecked: number;
|
|
573
573
|
branchOnly: number;
|
|
574
574
|
} | undefined;
|
|
@@ -666,15 +666,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
666
666
|
}[] | undefined;
|
|
667
667
|
gaps?: {
|
|
668
668
|
kind: "gap" | "unverified";
|
|
669
|
-
text?: string | undefined;
|
|
670
669
|
line?: number | undefined;
|
|
670
|
+
text?: string | undefined;
|
|
671
671
|
owner?: string | undefined;
|
|
672
672
|
}[] | undefined;
|
|
673
673
|
updatedAt?: string | undefined;
|
|
674
674
|
links?: {
|
|
675
675
|
broken: number;
|
|
676
|
-
pinned: number;
|
|
677
676
|
total: number;
|
|
677
|
+
pinned: number;
|
|
678
678
|
unchecked: number;
|
|
679
679
|
branchOnly: number;
|
|
680
680
|
} | undefined;
|
|
@@ -772,15 +772,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
772
772
|
}[] | undefined;
|
|
773
773
|
gaps?: {
|
|
774
774
|
kind: "gap" | "unverified";
|
|
775
|
-
text?: string | undefined;
|
|
776
775
|
line?: number | undefined;
|
|
776
|
+
text?: string | undefined;
|
|
777
777
|
owner?: string | undefined;
|
|
778
778
|
}[] | undefined;
|
|
779
779
|
updatedAt?: string | undefined;
|
|
780
780
|
links?: {
|
|
781
781
|
broken: number;
|
|
782
|
-
pinned: number;
|
|
783
782
|
total: number;
|
|
783
|
+
pinned: number;
|
|
784
784
|
unchecked: number;
|
|
785
785
|
branchOnly: number;
|
|
786
786
|
} | undefined;
|
|
@@ -1307,8 +1307,8 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
1307
1307
|
}>, "many">;
|
|
1308
1308
|
lineStyle: z.ZodEnum<["solid", "dashed"]>;
|
|
1309
1309
|
}, "strip", z.ZodTypeAny, {
|
|
1310
|
-
path: "main" | "side";
|
|
1311
1310
|
id: string;
|
|
1311
|
+
path: "main" | "side";
|
|
1312
1312
|
from: string;
|
|
1313
1313
|
to: string;
|
|
1314
1314
|
evidence: {
|
|
@@ -1326,8 +1326,8 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
1326
1326
|
condition?: string | undefined;
|
|
1327
1327
|
actors?: string[] | undefined;
|
|
1328
1328
|
}, {
|
|
1329
|
-
path: "main" | "side";
|
|
1330
1329
|
id: string;
|
|
1330
|
+
path: "main" | "side";
|
|
1331
1331
|
from: string;
|
|
1332
1332
|
to: string;
|
|
1333
1333
|
evidence: {
|
|
@@ -1349,8 +1349,8 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
1349
1349
|
id: string;
|
|
1350
1350
|
title: string;
|
|
1351
1351
|
transitions: {
|
|
1352
|
-
path: "main" | "side";
|
|
1353
1352
|
id: string;
|
|
1353
|
+
path: "main" | "side";
|
|
1354
1354
|
from: string;
|
|
1355
1355
|
to: string;
|
|
1356
1356
|
evidence: {
|
|
@@ -1400,8 +1400,8 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
1400
1400
|
id: string;
|
|
1401
1401
|
title: string;
|
|
1402
1402
|
transitions: {
|
|
1403
|
-
path: "main" | "side";
|
|
1404
1403
|
id: string;
|
|
1404
|
+
path: "main" | "side";
|
|
1405
1405
|
from: string;
|
|
1406
1406
|
to: string;
|
|
1407
1407
|
evidence: {
|
|
@@ -1730,15 +1730,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
1730
1730
|
}[] | undefined;
|
|
1731
1731
|
gaps?: {
|
|
1732
1732
|
kind: "gap" | "unverified";
|
|
1733
|
-
text?: string | undefined;
|
|
1734
1733
|
line?: number | undefined;
|
|
1734
|
+
text?: string | undefined;
|
|
1735
1735
|
owner?: string | undefined;
|
|
1736
1736
|
}[] | undefined;
|
|
1737
1737
|
updatedAt?: string | undefined;
|
|
1738
1738
|
links?: {
|
|
1739
1739
|
broken: number;
|
|
1740
|
-
pinned: number;
|
|
1741
1740
|
total: number;
|
|
1741
|
+
pinned: number;
|
|
1742
1742
|
unchecked: number;
|
|
1743
1743
|
branchOnly: number;
|
|
1744
1744
|
} | undefined;
|
|
@@ -1859,8 +1859,8 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
1859
1859
|
id: string;
|
|
1860
1860
|
title: string;
|
|
1861
1861
|
transitions: {
|
|
1862
|
-
path: "main" | "side";
|
|
1863
1862
|
id: string;
|
|
1863
|
+
path: "main" | "side";
|
|
1864
1864
|
from: string;
|
|
1865
1865
|
to: string;
|
|
1866
1866
|
evidence: {
|
|
@@ -2001,15 +2001,15 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
2001
2001
|
}[] | undefined;
|
|
2002
2002
|
gaps?: {
|
|
2003
2003
|
kind: "gap" | "unverified";
|
|
2004
|
-
text?: string | undefined;
|
|
2005
2004
|
line?: number | undefined;
|
|
2005
|
+
text?: string | undefined;
|
|
2006
2006
|
owner?: string | undefined;
|
|
2007
2007
|
}[] | undefined;
|
|
2008
2008
|
updatedAt?: string | undefined;
|
|
2009
2009
|
links?: {
|
|
2010
2010
|
broken: number;
|
|
2011
|
-
pinned: number;
|
|
2012
2011
|
total: number;
|
|
2012
|
+
pinned: number;
|
|
2013
2013
|
unchecked: number;
|
|
2014
2014
|
branchOnly: number;
|
|
2015
2015
|
} | undefined;
|
|
@@ -2130,8 +2130,8 @@ export declare const architectureIrSchema: z.ZodObject<{
|
|
|
2130
2130
|
id: string;
|
|
2131
2131
|
title: string;
|
|
2132
2132
|
transitions: {
|
|
2133
|
-
path: "main" | "side";
|
|
2134
2133
|
id: string;
|
|
2134
|
+
path: "main" | "side";
|
|
2135
2135
|
from: string;
|
|
2136
2136
|
to: string;
|
|
2137
2137
|
evidence: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `gestalt profile show`.
|
|
3
|
+
*
|
|
4
|
+
* 스킬은 남의 레포에서 돌아서 홈 아래 파일 경로를 스스로 계산하지 못한다. `GESTALT_HOME`
|
|
5
|
+
* 해석까지 여기서 끝내고 값만 넘긴다. 프로필이 정한 칸만 싣는다 — 기본값은 스킬이 들고
|
|
6
|
+
* 있어서 여기서 채우면 두 자리가 갈린다.
|
|
7
|
+
*
|
|
8
|
+
* 깨진 파일도 종료 코드 0이다. 경고를 싣고 그 칸을 비워 두면 스킬은 기본값으로 계속 돈다.
|
|
9
|
+
*/
|
|
10
|
+
export declare function profileShowCommand(opts: {
|
|
11
|
+
json?: boolean;
|
|
12
|
+
}): void;
|
|
13
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/profile.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAYjE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { loadUserProfile } from '../../core/user-profile.js';
|
|
2
|
+
/**
|
|
3
|
+
* `gestalt profile show`.
|
|
4
|
+
*
|
|
5
|
+
* 스킬은 남의 레포에서 돌아서 홈 아래 파일 경로를 스스로 계산하지 못한다. `GESTALT_HOME`
|
|
6
|
+
* 해석까지 여기서 끝내고 값만 넘긴다. 프로필이 정한 칸만 싣는다 — 기본값은 스킬이 들고
|
|
7
|
+
* 있어서 여기서 채우면 두 자리가 갈린다.
|
|
8
|
+
*
|
|
9
|
+
* 깨진 파일도 종료 코드 0이다. 경고를 싣고 그 칸을 비워 두면 스킬은 기본값으로 계속 돈다.
|
|
10
|
+
*/
|
|
11
|
+
export function profileShowCommand(opts) {
|
|
12
|
+
const profile = loadUserProfile();
|
|
13
|
+
if (opts.json) {
|
|
14
|
+
console.log(JSON.stringify(profile));
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
console.log(`프로필: ${profile.path}${profile.exists ? '' : ' (파일 없음, 전부 기본값)'}`);
|
|
18
|
+
const entries = Object.entries(profile.review);
|
|
19
|
+
if (entries.length === 0)
|
|
20
|
+
console.log('review: 프로필이 정한 값 없음');
|
|
21
|
+
for (const [key, value] of entries)
|
|
22
|
+
console.log(`review.${key} = ${JSON.stringify(value)}`);
|
|
23
|
+
for (const w of profile.warnings)
|
|
24
|
+
console.log(`경고: ${w}`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../../../src/cli/commands/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAwB;IACzD,MAAM,OAAO,GAAG,eAAe,EAAE,CAAC;IAClC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACrC,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,QAAQ,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC/E,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IAC9D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,OAAO;QAAE,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5F,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ;QAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `gestalt ship` — ship 스킬이 셸로 하던 대기와 상태 기록을 맡는 명령.
|
|
3
|
+
*
|
|
4
|
+
* 실패하면 stderr 에 이유를 쓰고 1 로 끝나며 stdout 은 비운다. 스킬이 JSON 을 파일로
|
|
5
|
+
* 받아 읽는데, 반쯤 쓴 출력이 남으면 판정을 지어낸 것과 같아진다.
|
|
6
|
+
*/
|
|
7
|
+
export interface ShipCiWaitOptions {
|
|
8
|
+
pr: string;
|
|
9
|
+
head?: string;
|
|
10
|
+
repo?: string;
|
|
11
|
+
timeout?: string;
|
|
12
|
+
grace?: string;
|
|
13
|
+
interval?: string;
|
|
14
|
+
json?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function shipCiWaitCommand(opts: ShipCiWaitOptions): Promise<void>;
|
|
17
|
+
export interface ShipCheckpointSaveOptions {
|
|
18
|
+
dir?: string;
|
|
19
|
+
phase: string;
|
|
20
|
+
next: string;
|
|
21
|
+
round?: string;
|
|
22
|
+
localPr?: string;
|
|
23
|
+
pr?: string;
|
|
24
|
+
prUrl?: string;
|
|
25
|
+
base?: string;
|
|
26
|
+
verifyCmd?: string;
|
|
27
|
+
issues?: string;
|
|
28
|
+
stopped?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function shipCheckpointSaveCommand(opts: ShipCheckpointSaveOptions): void;
|
|
31
|
+
export declare function shipCheckpointCheckCommand(opts: {
|
|
32
|
+
dir?: string;
|
|
33
|
+
json?: boolean;
|
|
34
|
+
}): void;
|
|
35
|
+
//# sourceMappingURL=ship.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ship.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/ship.ts"],"names":[],"mappings":"AAcA;;;;;GAKG;AAEH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB9E;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,yBAAyB,GAAG,IAAI,CAoB/E;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAsBvF"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { assertDir, BRANCH_NAME_RE, checkCheckpoint, defaultObserveDeps, isShipPhase, LOCAL_PR_ID_RE, PR_URL_RE, saveCheckpoint, } from '../../ship/checkpoint.js';
|
|
2
|
+
import { waitForCi } from '../../ship/ci.js';
|
|
3
|
+
export async function shipCiWaitCommand(opts) {
|
|
4
|
+
try {
|
|
5
|
+
const result = await waitForCi({
|
|
6
|
+
prNumber: positiveInt(opts.pr, '--pr'),
|
|
7
|
+
head: matching(opts.head, /^[0-9a-f]{7,64}$/i, '--head'),
|
|
8
|
+
repo: matching(opts.repo,
|
|
9
|
+
// host 와 owner 는 영숫자로 시작하고 repo 는 `.github` 처럼 `.` 으로 시작해도 받는다
|
|
10
|
+
/^(?:[A-Za-z0-9][\w.-]*\/)?[A-Za-z0-9][\w.-]*\/(?!\.\.?$)[\w.][\w.-]*$/, '--repo'),
|
|
11
|
+
timeoutSec: positiveInt(opts.timeout ?? '900', '--timeout'),
|
|
12
|
+
graceSec: positiveInt(opts.grace ?? '120', '--grace'),
|
|
13
|
+
intervalSec: positiveInt(opts.interval ?? '30', '--interval'),
|
|
14
|
+
});
|
|
15
|
+
if (opts.json) {
|
|
16
|
+
console.log(JSON.stringify(result, null, 2));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
printCi(result);
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
exitWithError(e);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export function shipCheckpointSaveCommand(opts) {
|
|
26
|
+
run(() => {
|
|
27
|
+
const dir = assertDir(opts.dir);
|
|
28
|
+
if (!isShipPhase(opts.phase))
|
|
29
|
+
throw new Error(`--phase 를 모르겠어요: ${opts.phase}`);
|
|
30
|
+
if (!opts.next.trim())
|
|
31
|
+
throw new Error('--next 가 비었어요');
|
|
32
|
+
const patch = { phase: opts.phase, next: opts.next.trim() };
|
|
33
|
+
if (opts.round !== undefined)
|
|
34
|
+
patch.round = nonNegativeInt(opts.round, '--round');
|
|
35
|
+
if (opts.issues !== undefined)
|
|
36
|
+
patch.issues = nonNegativeInt(opts.issues, '--issues');
|
|
37
|
+
if (opts.pr !== undefined)
|
|
38
|
+
patch.prNumber = positiveInt(opts.pr, '--pr');
|
|
39
|
+
const localPr = matching(opts.localPr, LOCAL_PR_ID_RE, '--local-pr');
|
|
40
|
+
if (localPr)
|
|
41
|
+
patch.localPrId = localPr;
|
|
42
|
+
const prUrl = matching(opts.prUrl, PR_URL_RE, '--pr-url');
|
|
43
|
+
if (prUrl)
|
|
44
|
+
patch.prUrl = prUrl;
|
|
45
|
+
const base = matching(opts.base, BRANCH_NAME_RE, '--base');
|
|
46
|
+
if (base)
|
|
47
|
+
patch.base = base;
|
|
48
|
+
if (opts.verifyCmd)
|
|
49
|
+
patch.verifyCmd = opts.verifyCmd;
|
|
50
|
+
if (opts.stopped !== undefined)
|
|
51
|
+
patch.stopped = stopKind(opts.stopped);
|
|
52
|
+
saveCheckpoint(dir, patch);
|
|
53
|
+
console.log(`${dir}/checkpoint.json`);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export function shipCheckpointCheckCommand(opts) {
|
|
57
|
+
run(() => {
|
|
58
|
+
const report = checkCheckpoint(assertDir(opts.dir), defaultObserveDeps());
|
|
59
|
+
if (opts.json) {
|
|
60
|
+
console.log(JSON.stringify(report, null, 2));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (report.status === 'none') {
|
|
64
|
+
console.log('체크포인트 없음');
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const cp = report.checkpoint;
|
|
68
|
+
if (cp)
|
|
69
|
+
console.log(`체크포인트: ${cp.phase}단계${cp.round !== null ? ` ${cp.round}라운드` : ''} — 다음: ${cp.next}`);
|
|
70
|
+
if (report.status === 'match') {
|
|
71
|
+
console.log('git과 PR 상태가 체크포인트와 맞아요');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
for (const m of report.mismatches)
|
|
75
|
+
console.log(`- ${m.detail}`);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
// default 를 두지 않는다. CiStatus 에 값이 늘면 반환이 빠져 여기서 컴파일이 깨진다
|
|
79
|
+
function ciLabel(r) {
|
|
80
|
+
switch (r.status) {
|
|
81
|
+
case 'pass':
|
|
82
|
+
return '통과';
|
|
83
|
+
case 'none':
|
|
84
|
+
return 'CI 없음';
|
|
85
|
+
case 'skipped':
|
|
86
|
+
return `전부 건너뜀 (${r.checks.length}개)`;
|
|
87
|
+
case 'pending':
|
|
88
|
+
return `진행 중 (${r.pending.length}개 안 끝남)`;
|
|
89
|
+
case 'fail':
|
|
90
|
+
return `실패 ${r.failed.length}개`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function printCi(r) {
|
|
94
|
+
const mins = Math.round(r.waitedSec / 60);
|
|
95
|
+
console.log(`CI: ${ciLabel(r)} — ${mins}분 기다림`);
|
|
96
|
+
for (const f of r.failed) {
|
|
97
|
+
console.log(`- ${f.name} ${f.link}`);
|
|
98
|
+
if (f.logError)
|
|
99
|
+
console.log(` (로그 못 읽음: ${f.logError})`);
|
|
100
|
+
if (f.causeFromTail)
|
|
101
|
+
console.log(' (원인 표시를 못 찾아 로그 끝 줄을 대신 보여요)');
|
|
102
|
+
for (const line of f.causeLines)
|
|
103
|
+
console.log(` ${line}`);
|
|
104
|
+
const rest = f.causeLinesTotal - f.causeLines.length;
|
|
105
|
+
if (rest > 0)
|
|
106
|
+
console.log(` … 외 ${rest}줄`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function positiveInt(v, flag) {
|
|
110
|
+
const n = Number(v);
|
|
111
|
+
if (!Number.isInteger(n) || n <= 0)
|
|
112
|
+
throw new Error(`${flag} 는 양의 정수여야 해요: ${v}`);
|
|
113
|
+
return n;
|
|
114
|
+
}
|
|
115
|
+
function nonNegativeInt(v, flag) {
|
|
116
|
+
const n = Number(v);
|
|
117
|
+
if (!Number.isInteger(n) || n < 0)
|
|
118
|
+
throw new Error(`${flag} 는 0 이상의 정수여야 해요: ${v}`);
|
|
119
|
+
return n;
|
|
120
|
+
}
|
|
121
|
+
/** gh, git, gestalt pr 인자로 넘기는 값이라 `-` 로 시작하는 값이 옵션으로 읽히지 않게 형식을 본다 */
|
|
122
|
+
function matching(v, re, flag) {
|
|
123
|
+
if (!v)
|
|
124
|
+
return undefined;
|
|
125
|
+
if (!re.test(v))
|
|
126
|
+
throw new Error(`${flag} 값이 형식에 안 맞아요: ${v}`);
|
|
127
|
+
return v;
|
|
128
|
+
}
|
|
129
|
+
function stopKind(v) {
|
|
130
|
+
if (v === 'blocked' || v === 'escalated')
|
|
131
|
+
return v;
|
|
132
|
+
throw new Error(`--stopped 는 blocked, escalated 중 하나예요: ${v}`);
|
|
133
|
+
}
|
|
134
|
+
function run(body) {
|
|
135
|
+
try {
|
|
136
|
+
body();
|
|
137
|
+
}
|
|
138
|
+
catch (e) {
|
|
139
|
+
exitWithError(e);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function exitWithError(e) {
|
|
143
|
+
console.error(e instanceof Error ? e.message : String(e));
|
|
144
|
+
process.exit(1);
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=ship.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ship.js","sourceRoot":"","sources":["../../../../src/cli/commands/ship.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,SAAS,EACT,cAAc,GAGf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAAqB,MAAM,kBAAkB,CAAC;A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AC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAgH5C,wBAAgB,SAAS,IAAI,OAAO,CA42BnC"}
|
package/dist/src/cli/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { explainCheckCommand } from './commands/explain-check.js';
|
|
|
15
15
|
import { DEFAULT_CASES_PATH, explainEvalCommand } from './commands/explain-eval.js';
|
|
16
16
|
import { reviewLoopDirCommand, reviewLoopParseCommand, reviewLoopResolveCommand, reviewLoopStateCommand, } from './commands/review-loop.js';
|
|
17
17
|
import { approveGateCommand, reviewRoundsCommand } from './commands/approve-gate.js';
|
|
18
|
+
import { shipCheckpointCheckCommand, shipCheckpointSaveCommand, shipCiWaitCommand, } from './commands/ship.js';
|
|
18
19
|
import { harnessRefsClonesPruneCommand, harnessRefsCollectCommand, } from './commands/harness-refs.js';
|
|
19
20
|
import { harnessRefsFollowupBuildCommand, harnessRefsFollowupCheckCommand, harnessRefsFollowupFindCommand, harnessRefsRelatedPrsCommand, harnessRefsThreeStateCommand, } from './commands/harness-refs-cross-pr.js';
|
|
20
21
|
import { digestCommentsCommand, digestExportCommand, digestFramesCommand, digestOcrCommand, digestScenesCommand, digestIngestCommand, digestMergeCommand, digestTemplateCommand, digestTemplatesCommand, digestSliceCommand, digestTranslateApplyCommand, digestRenderCommand, digestServeCommand, digestValidateCommand, } from './commands/digest.js';
|
|
@@ -431,6 +432,17 @@ export function createCli() {
|
|
|
431
432
|
.option('--no-browser', '브라우저를 열지 않는다')
|
|
432
433
|
.option('--allow-host <name...>', '127.0.0.1 말고 받을 Host 이름. 테일스케일 serve 같은 앞단 프록시 이름을 직접 넘길 때만 쓴다')
|
|
433
434
|
.action((slug, o, cmd) => digestServeCommand(slug, { ...digestInherited(cmd), ...o }));
|
|
435
|
+
const profile = program
|
|
436
|
+
.command('profile')
|
|
437
|
+
.description('사용자 전역 프로필(~/.gestalt/profile.json). 리뷰 스킬이 기본값을 여기서 읽는다');
|
|
438
|
+
profile
|
|
439
|
+
.command('show')
|
|
440
|
+
.description('프로필이 정한 값과 경고. 파일이 없거나 깨졌으면 비어 있는 채로 나온다')
|
|
441
|
+
.option('--json', '에이전트가 파싱할 JSON으로')
|
|
442
|
+
.action(async (o) => {
|
|
443
|
+
const { profileShowCommand } = await import('./commands/profile.js');
|
|
444
|
+
profileShowCommand(o);
|
|
445
|
+
});
|
|
434
446
|
const reviewLoop = program
|
|
435
447
|
.command('review-loop')
|
|
436
448
|
.description('남의 PR 리뷰 루프가 쓰는 조회 — 판정에 쓰는 수를 여기서 낸다');
|
|
@@ -614,6 +626,46 @@ export function createCli() {
|
|
|
614
626
|
.action(() => {
|
|
615
627
|
usageReportCommand();
|
|
616
628
|
});
|
|
629
|
+
const ship = program
|
|
630
|
+
.command('ship')
|
|
631
|
+
.description('ship 스킬이 쓰는 CI 대기와 체크포인트. 셸로 판정하던 자리를 여기서 맡는다');
|
|
632
|
+
ship
|
|
633
|
+
.command('ci-wait')
|
|
634
|
+
.description('PR의 CI가 끝나거나 상한에 닿을 때까지 기다려 결과와 실패 원인 줄을 낸다')
|
|
635
|
+
.requiredOption('--pr <number>', 'GitHub PR 번호')
|
|
636
|
+
.option('--head <sha>', '이 커밋이 PR head가 될 때까지 먼저 기다린다')
|
|
637
|
+
.option('--repo <owner/name>', '대상 레포. 없으면 gh가 현재 레포를 쓴다')
|
|
638
|
+
.option('--timeout <sec>', '대기 상한(초)', '900')
|
|
639
|
+
.option('--grace <sec>', '체크가 하나도 안 붙었을 때 CI 없음으로 정하기까지(초)', '120')
|
|
640
|
+
.option('--interval <sec>', '조회 간격(초)', '30')
|
|
641
|
+
.option('--json', '에이전트가 파싱할 JSON으로')
|
|
642
|
+
.action(async (o) => {
|
|
643
|
+
await shipCiWaitCommand(o);
|
|
644
|
+
});
|
|
645
|
+
const checkpoint = ship
|
|
646
|
+
.command('checkpoint')
|
|
647
|
+
.description('단계와 라운드가 끝날 때 남기고 다시 부를 때 git과 PR 상태를 맞춰 본다');
|
|
648
|
+
checkpoint
|
|
649
|
+
.command('save')
|
|
650
|
+
.description('지금 단계와 다음 할 일을 남긴다. 앞에서 넘긴 값은 그대로 둔다')
|
|
651
|
+
.requiredOption('--dir <path>', 'ship 상태 자리의 절대 경로')
|
|
652
|
+
.requiredOption('--phase <phase>', '0, 1, 2, a, 3, 4, ci 중 하나')
|
|
653
|
+
.requiredOption('--next <text>', '다음에 할 일 한 줄')
|
|
654
|
+
.option('--round <n>', '라운드 번호')
|
|
655
|
+
.option('--local-pr <id>', '로컬 PR id (8자 16진수)')
|
|
656
|
+
.option('--pr <number>', 'GitHub PR 번호')
|
|
657
|
+
.option('--pr-url <url>', 'GitHub PR URL')
|
|
658
|
+
.option('--base <ref>', 'Phase 0에서 정한 base')
|
|
659
|
+
.option('--verify-cmd <cmd>', 'Phase 0에서 정한 검증 명령')
|
|
660
|
+
.option('--issues <n>', '이번 라운드 이슈 수. --round와 함께')
|
|
661
|
+
.option('--stopped <kind>', '멈춘 자리 blocked|escalated. 다음 저장에서 저절로 지워진다')
|
|
662
|
+
.action((o) => shipCheckpointSaveCommand(o));
|
|
663
|
+
checkpoint
|
|
664
|
+
.command('check')
|
|
665
|
+
.description('체크포인트를 읽고 git과 로컬 PR, GitHub PR 상태가 그대로인지 본다')
|
|
666
|
+
.requiredOption('--dir <path>', 'ship 상태 자리의 절대 경로')
|
|
667
|
+
.option('--json', '에이전트가 파싱할 JSON으로')
|
|
668
|
+
.action((o) => shipCheckpointCheckCommand(o));
|
|
617
669
|
return program;
|
|
618
670
|
}
|
|
619
671
|
//# sourceMappingURL=index.js.map
|