FEAT: ChatGPT·Google 로그인으로 쓰기 — 외부 에이전트(ACP) 지원 - #55
Merged
Merged
Conversation
ChatGPT·Google 구독 로그인은 다른 앱이 토큰을 쓸 수 없어서, Codex·Gemini CLI 같은 공식 CLI를 Agent Client Protocol로 부리고 로그인은 그 CLI가 직접 하게 함. 에이전트의 진행은 기존 agent 이벤트로 바꾸고, 권한 요청은 승인 카드로, 파일 읽기·쓰기는 프로젝트 안에서만 하며 원본을 되돌리기 체크포인트로 남김. 로그인이 필요하면 에이전트가 알려 준 방법을 카드로 띄움. 질문마다 Lantern 맥락을 붙이고 앱을 MCP 서버(--mcp)로 넘김. 신뢰한 폴더에서만 켜짐.
외부 에이전트가 로그인을 요구하면 채팅에 로그인 카드를 띄우고, 로그인이 끝나면 같은 질문을 다시 보낼 수 있게 함. 환경변수로만 되는 방법은 버튼 대신 안내로 보임. 첫 실행 화면에 ChatGPT 구독·Google 계정으로 쓰는 방법을 안내함.
실제 Gemini CLI·Codex와 같은 순서로 움직이는 가짜 에이전트로, 로그인 카드 → 로그인 → 읽기 요청 → 승인 카드(영향 반경) → 적용 → 프로젝트 밖 쓰기 거절까지 확인함.
외부 에이전트 설치·로그인 방법과, Claude 구독은 약관상 이렇게 쓸 수 없다는 점을 README 두 벌에 적음. Closes #54
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을
ChatGPT 구독이나 Google 계정으로 Lantern을 쓰게 합니다(#54). 회사들은 다른 앱이 구독 로그인 토큰을 쓰는 것을 허용하지 않으므로(Anthropic은 2026-02 약관으로 금지, OpenAI는 공식 방법 없음), 각 회사의 공식 CLI를 Agent Client Protocol(ACP)로 부리고 로그인은 그 CLI가 직접 합니다. Zed 등이 쓰는 방식입니다. Lantern은 토큰을 만지지 않습니다.
어떻게
백엔드 (
acp.rs, 줄 단위 JSON-RPC 2.0 over stdio, 작업마다 에이전트 프로세스 하나)gemini --acp), Codex(codex-acp).config.toml의[acp.<이름>]로 덮어쓰거나 다른 ACP 에이전트를 더함session/update→ 기존agent이벤트(글, 도구 호출·결과). 채팅·발자취·지도를 그대로 씀session/request_permission→ 기존 승인 카드. 수정이면 diff를 만들어 영향 반경까지 그대로.auto_approve·allowed_commands설정도 존중fs/read_text_file,fs/write_text_file→ 프로젝트(격리 작업이면 작업 공간) 안만. 비밀 파일 읽기는 묻고, 쓰기는 원본을 되돌리기 체크포인트로 남기며 권한 요청 없이 쓰려 하면 승인을 받음. 터미널은 넘기지 않음session/new·session/prompt가 -32000이면auth_required이벤트(에이전트가 알려 준 방법).acp_authenticate명령으로 에이전트가 브라우저 로그인을 진행lantern-app --mcp <폴더>)로 넘김session/cancel, 작업을 닫거나 프로젝트를 바꾸면 프로세스를 끔agent.rs의 승인·체크포인트 저장을 공유하도록 꺼냄 (동작 변화 없음)화면: 에이전트 선택에 'Codex (외부)', 'Gemini CLI (외부)' (설치 안 됐으면 설명에 설치 명령), 로그인 카드(로그인 → 다시 보내기), 첫 실행 화면 안내, 영어 번역
확인
lantern-app --mcp단독: initialize → tools/list(4개) → get_context가 코드를 찾음한계
Closes #54