HAL 0.3.1: 서버에 설치된 CLI 자동 탐색·연결 가능화 — HAL 서비스 PATH 밖(~/.local/bin 등)의 Claude Code·Codex CLI 를 찾아 버전·로그인 상태·기본 모델을 AI 연동 화면에 보이고(GET /ops/api/ai/cli, "이 CLI 로 연결 추가"), Codex exec --json 지원, 로그인 안 됨은 cli_not_logged_in → reauth_required + 서버 로그인 안내, 확인 실패 응답 424(원인 표시), 점검 결과·개발 지시 v0.3.1(Oz)·docs/HAL-AI.md·VERSION_HISTORY 0.3.1 — test/hal-ai.test.mjs RED → GREEN 12/12, 전체 26파일 183건 통과
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ export function createEngine(d) {
|
||||
function fail(room, conn, relayDepth, e) {
|
||||
const msg = safeError(e); const code = e && e.code ? e.code : 'provider_error';
|
||||
R.appendMessage(d, { roomId: room.id, role: 'assistant', connectionId: conn.id, author: conn.name, content: [{ type: 'text', text: '' }], relayDepth, status: 'failed', error: `${code}: ${msg}` });
|
||||
if (code === 'oauth_required' || code === 'oauth_expired' || code === 'provider_401') d.store.run('UPDATE ai_connections SET status=CASE WHEN status=\'disabled\' THEN status ELSE \'reauth_required\' END, last_error=?, updated_at=? WHERE id=?', msg, nowIso(), conn.id);
|
||||
if (['oauth_required', 'oauth_expired', 'provider_401', 'cli_not_logged_in'].includes(code)) d.store.run('UPDATE ai_connections SET status=CASE WHEN status=\'disabled\' THEN status ELSE \'reauth_required\' END, last_error=?, updated_at=? WHERE id=?', msg, nowIso(), conn.id);
|
||||
else d.store.run('UPDATE ai_connections SET last_error=?, updated_at=? WHERE id=?', msg, nowIso(), conn.id);
|
||||
audit(d.store, { actorType: 'system', actorId: `ai:${conn.id}`, action: 'ai.turn.failed', subjectType: 'ai_room', subjectId: room.id, outcome: 'failed', automatic: true, detail: { connection: conn.id, code, message: msg } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user