vibe-collab 0.8.13 → 0.8.14
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.
|
@@ -139,10 +139,11 @@ export async function authCommand(action) {
|
|
|
139
139
|
case 'login': {
|
|
140
140
|
const existing = readAuthData();
|
|
141
141
|
if (existing) {
|
|
142
|
-
console.log(chalk.yellow(
|
|
142
|
+
console.log(chalk.yellow(`현재 로그인: @${existing.user.login} (${existing.user.name})\n` +
|
|
143
143
|
`만료: ${new Date(existing.expiresAt).toLocaleString('ko-KR')}\n\n` +
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
`다른 계정으로 전환하려면 계속 진행하세요...`));
|
|
145
|
+
// 기존 토큰 제거 후 재로그인 (계정 전환 지원)
|
|
146
|
+
deleteAuthData();
|
|
146
147
|
}
|
|
147
148
|
await loginFlow();
|
|
148
149
|
process.exit(0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { execSync } from 'child_process';
|
|
1
2
|
import { readState } from '../../state/reader.js';
|
|
2
3
|
import { appendWorkLog, updateIssueStage, setActiveWork } from '../../state/writer.js';
|
|
3
4
|
import { resolveActor } from './_actor.js';
|
|
@@ -16,14 +17,45 @@ function stageToKorean(stage) {
|
|
|
16
17
|
};
|
|
17
18
|
return map[stage] ?? stage;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* code_complete 시 자동으로 git add -A → commit → push 실행.
|
|
22
|
+
* state.json이 항상 커밋에 포함됨.
|
|
23
|
+
*/
|
|
24
|
+
function autoGitPush(repoPath, commitMessage) {
|
|
25
|
+
try {
|
|
26
|
+
execSync('git add -A', { cwd: repoPath, stdio: 'pipe' });
|
|
27
|
+
const staged = execSync('git status --porcelain', {
|
|
28
|
+
cwd: repoPath,
|
|
29
|
+
encoding: 'utf-8',
|
|
30
|
+
stdio: 'pipe',
|
|
31
|
+
}).trim();
|
|
32
|
+
if (!staged) {
|
|
33
|
+
return '(커밋할 변경 사항 없음)';
|
|
34
|
+
}
|
|
35
|
+
const safeMsg = commitMessage.replace(/"/g, '\\"').replace(/`/g, '\\`');
|
|
36
|
+
execSync(`git commit -m "${safeMsg}"`, { cwd: repoPath, stdio: 'pipe' });
|
|
37
|
+
execSync('git push -u origin HEAD', { cwd: repoPath, stdio: 'pipe' });
|
|
38
|
+
const sha = execSync('git rev-parse --short HEAD', {
|
|
39
|
+
cwd: repoPath,
|
|
40
|
+
encoding: 'utf-8',
|
|
41
|
+
stdio: 'pipe',
|
|
42
|
+
}).trim();
|
|
43
|
+
return `커밋 & 푸시 완료 (${sha})`;
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const msg = error instanceof Error ? error.message.split('\n')[0] : String(error);
|
|
47
|
+
return `git 자동 푸시 실패 (수동으로 vibe_git_push 호출하세요): ${msg}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function buildCheckpointMessage(stage, details, gitResult) {
|
|
20
51
|
const { filesChanged, violations, retryCount, notes } = details;
|
|
21
52
|
switch (stage) {
|
|
22
53
|
case 'code_complete': {
|
|
23
54
|
const filesText = filesChanged && filesChanged.length > 0
|
|
24
55
|
? `\n변경된 파일:\n${filesChanged.map((f) => ` · ${f}`).join('\n')}`
|
|
25
56
|
: '';
|
|
26
|
-
|
|
57
|
+
const gitText = gitResult ? `\n\n📦 자동 커밋 결과: ${gitResult}` : '';
|
|
58
|
+
return `✅ 코드 작성 완료 — 커밋 & 푸시 자동 완료${filesText}${gitText}\n\n검토를 시작하겠습니다. 계속할까요?\n [예, 검토해주세요] [아니오, 나중에 할게요]`;
|
|
27
59
|
}
|
|
28
60
|
case 'qa_passed':
|
|
29
61
|
return `✅ 검토 완료 — 팀 공유 준비됨\n\n검토 결과:\n · 요청하신 기능이 모두 구현됐습니다 ✓\n · 기존 기능에 영향 없음 ✓\n · 코드 규칙 준수 ✓\n\n지금 팀에 공유하시겠습니까?\n [예, 공유하기] [아니오, 나중에]`;
|
|
@@ -71,8 +103,15 @@ export async function recordCheckpoint(repoPath, input) {
|
|
|
71
103
|
}
|
|
72
104
|
// 3. issues stage 업데이트
|
|
73
105
|
await updateIssueStage(repoPath, issueNumber, { stage });
|
|
74
|
-
// 4.
|
|
75
|
-
|
|
76
|
-
|
|
106
|
+
// 4. code_complete 시 자동 git push (state.json 포함)
|
|
107
|
+
let gitResult;
|
|
108
|
+
if (stage === 'code_complete') {
|
|
109
|
+
const commitMsg = details.commitMessage
|
|
110
|
+
|| `[Vibe] #${issueNumber} 코드 완료`;
|
|
111
|
+
gitResult = autoGitPush(repoPath, commitMsg);
|
|
112
|
+
}
|
|
113
|
+
// 5. 체크포인트 메시지 생성
|
|
114
|
+
const checkpointMessage = buildCheckpointMessage(stage, details, gitResult);
|
|
115
|
+
return JSON.stringify({ checkpointMessage, gitResult });
|
|
77
116
|
}
|
|
78
117
|
//# sourceMappingURL=recordCheckpoint.js.map
|
|
@@ -108,7 +108,7 @@ ${pausedText}
|
|
|
108
108
|
① 사용자 요청 접수 → vibe_analyze_request 호출
|
|
109
109
|
② 작업 항목 확정 → vibe_start_work 호출 (기존 브랜치 자동 checkout+pull 포함)
|
|
110
110
|
③ 코드 수정 완료 → vibe_record_checkpoint(stage: "code_complete") 즉시 호출 ← 절대 생략 금지
|
|
111
|
-
|
|
111
|
+
→ code_complete 호출 시 git commit & push가 자동으로 실행됩니다 (별도 git 명령 불필요)
|
|
112
112
|
⑤ 코드 검토 → vibe_request_qa 호출
|
|
113
113
|
⑥ 검토 통과 → vibe_create_pr 호출
|
|
114
114
|
⑦ 각 단계 완료 후 사용자에게 결과 전달 및 다음 단계 확인
|
|
@@ -122,7 +122,7 @@ ${pausedText}
|
|
|
122
122
|
[절대 금지]
|
|
123
123
|
- vibe_ 도구 없이 코드 수정 또는 git 작업 진행 (팀 기록 파괴)
|
|
124
124
|
- 코드 수정 후 vibe_record_checkpoint 건너뜀 (누락 금지)
|
|
125
|
-
- 터미널로 git commit/push 직접 실행 (
|
|
125
|
+
- 터미널로 git commit/push 직접 실행 (vibe_record_checkpoint가 자동 처리)
|
|
126
126
|
- .vibe/state.json을 커밋에서 제외 (팀 기록 손실)
|
|
127
127
|
- CHARTER 규칙 위반 코드 작성
|
|
128
128
|
- Issue, PR, Merge, Branch 같은 기술 용어 사용자에게 노출
|