e2e-agent-runner 1.11.0 → 1.12.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 (2) hide show
  1. package/claude.mjs +26 -1
  2. package/package.json +1 -1
package/claude.mjs CHANGED
@@ -16,6 +16,31 @@ export function parsePhaseMarker(text) {
16
16
  return m.length ? m[m.length - 1][1].toLowerCase() : null;
17
17
  }
18
18
 
19
+ // claude CLI 가 시작 시 stderr 로 찍는 정보성 경고 — 실패 원인이 아니므로 error 보고에서 제외한다.
20
+ // (GLM 프록시 머신은 ANTHROPIC_API_KEY/AUTH_TOKEN env 로 인증 → 매 실행 출력.) 서버
21
+ // (src/e2e/agent_prompts.py STDERR_NOISE_PATTERNS)와 같은 의미를 유지. 넓은 패턴 금지.
22
+ export const STDERR_NOISE = [
23
+ /claude\.ai connectors are disabled/i,
24
+ /^\s*$/,
25
+ ];
26
+
27
+ export function cleanStderr(text) {
28
+ return String(text ?? '')
29
+ .split(/\r?\n/)
30
+ .filter((line) => !STDERR_NOISE.some((re) => re.test(line)))
31
+ .join('\n')
32
+ .trim();
33
+ }
34
+
35
+ /** 실패 error 문구: 정제된 stderr > 최종 보고(finalText) > 종료 코드. */
36
+ export function composeError({ stderr, finalText, code }) {
37
+ const cleaned = cleanStderr(stderr);
38
+ if (cleaned) return cleaned.slice(-1500);
39
+ const ft = (finalText ?? '').trim();
40
+ if (ft) return ft.length <= 1500 ? ft : `…${ft.slice(-600)}`;
41
+ return `claude 종료 코드 ${code}`;
42
+ }
43
+
19
44
  /** 자식 프로세스(claude·deploy_command)에 물려줄 env — 러너 토큰(E2E_RUNNER_TOKEN)은
20
45
  * 머신 신원 그 자체(단계 클레임 = 임의 커맨드 실행 권한)라 제외한다. discover/qa/improve
21
46
  * 페이즈의 claude 는 브라우저 MCP 로 외부 사이트를 직접 보므로, 주입된 지시가
@@ -211,7 +236,7 @@ export function runClaude(opts) {
211
236
  } else {
212
237
  finish({
213
238
  ok: false, model: resolvedModel, finalText, sessionId, usage,
214
- error: stderrTail.trim() || `claude 종료 코드 ${code}`,
239
+ error: composeError({ stderr: stderrTail, finalText, code }),
215
240
  });
216
241
  }
217
242
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "e2e-agent-runner",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "suseona e2e 작업 에이전트 로컬 러너 — 내 컴퓨터의 Claude Code 로 구현→테스트→리뷰→배포와 웹사이트 기능 지도 추출·QA·개선 사이클을 자동 수행",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",