Repository navigation
feat(minimax-code): 헬퍼 파드·egress 경계·승인 게이트 + K3s MCP 프록시를 헬퍼 파드로 (AC-G6) - #157
Merged
Merged
Conversation
minimax-code 세션에도 plugin-marketplace의 mcp-servers 플러그인(홈랩 K3s MCP 도구)을
싣는다. mcode는 플러그인 MCP 헤더의 ${VAR}를 치환하지 않고 OAuth 필드를 거부하므로,
토큰을 HOME(아카이브 대상)에 쓰지 않도록 워크로드 파드에 세 번째 컨테이너
k3s-mcp-proxy를 둔다.
- data plane: credential-proxy 구현을 헤더 허용 목록만 바꿔 재사용하는 k3s-mcp-proxy
워크로드(127.0.0.1:8093, MCP Streamable HTTP 헤더, origin 고정, Bearer 주입).
토큰이 없으면 configured:false로 기동하고 그 밖의 요청은 503.
- entrypoint: minimax-code에서 사이드카 /healthz 확인 → loopback 경유로
github_app_installation_token → URL 범위 extraheader로 marketplace 클론 →
mcp-servers의 K3s MCP 서버를 loopback URL로 바꾸고 oauthClientId·Authorization을
지워 상태 트리 밖 seed로 스테이징. K3s MCP가 아닌 서버는 거부.
- agent: 기동·복원마다 seed를 ~/.minimax/plugins로 통째 복사하고 플랫폼 표식만 관리.
- control plane: minimax-code 파드에 k3s-mcp-proxy 사이드카, 이 타입 Secret의 선택
키 k3s-mcp-token만 참조. 주 컨테이너는 그대로 K3S_MCP_TOKEN 없음(AC-G3).
- PRD AC-G5 신설, AC-G1·G3 개정, README·Secret 예시 갱신.
mcode 0.6.12가 exec --config 아래서도 HOME의 Claude 형식 플러그인 MCP를 로드해
mcp__k3s__* 도구를 모델 요청에 싣는 것은 shell 세션에서 가짜 MCP·캡처 서버로 실측.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011MtKFxuPycK3WQah8Kdwcr
…C-G6) minimax-code 를 approval-gated 와 같은 파드 배치로 옮긴다. 워크로드 파드는 사이드카 없이 에이전트만 돌고, egress 는 kube-dns 와 자기 세션 헬퍼 파드로만 열린다. 헬퍼 파드는 세션 MCP(승인 게이트), 이 타입 Secret 을 읽는 provider credential-proxy, k3s-mcp-token 을 쥔 K3s MCP 프록시 셋을 담는다. - control plane: WorkloadType.HasApprovalGate() 로 헬퍼 파드·네트워크 정책· 승인 대기 유휴 보류를 approval-gated 와 함께 적용. minimax 헬퍼 포트는 8091/8092/8093, approval-gated 는 두 포트 그대로. - data plane: 워크로드 env 는 헬퍼 주소 셋(loopback 거부). agent 가 기동·복원마다 세션 MCP 플러그인과(프록시 configured 일 때) K3s MCP 플러그인을 직접 생성해 ~/.minimax/plugins 에 설치하고, 승인 대기 notice 를 출력에 쓴다. k3s-mcp-proxy 는 DATA_PLANE_PROXY_PLACEMENT 를 따른다. - 워크로드 파드가 github.com 에 닿지 못하므로 entrypoint 의 marketplace 부트스트랩(#156)은 걷어냈다. - K3s MCP 도구는 세션 게이트를 지나지 않는다 — K3s MCP 자체 게이트가 있어 이중 승인을 피한다(PRD AC-G6 에 AC-F6 C2 예외로 명시). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MUyooFMnpZEbS4ReCahFBo
워크로드 파드가 github.com 에 닿지 못하므로, 플러그인을 agent 가 직접 만들던 방식 대신 marketplace 클론을 K3s 토큰을 이미 쥔 헬퍼 파드 k3s-mcp-proxy 가 한다. - proxy: 토큰이 있으면 기동 직후 자기 핸들러를 프로세스 안에서 거쳐 github_app_installation_token 을 받고, URL 범위 extraheader 로 emptyDir 에 얕게 클론한 뒤 MINIMAX_CODE_PLUGINS(기본 mcp-servers)의 manifest + 경로 필드 파일만 비밀 없는 번들로 GET /plugin-seed 에 내놓는다(503 → ready/failed/ unconfigured). hook·symlink·marketplace 밖 경로는 거부, 크기 상한. - agent: 번들을 기다려 받아 그대로 설치하고 MCP 서버 중 K3s MCP 만 프록시로 재배선(oauthClientId·Authorization 제거), 닿지 못하는 서버는 경고 후 제외. 세션 MCP 플러그인 이름은 session-platform-session-mcp 로 바꿔 marketplace 와 충돌하지 않게 했다. - control plane: k3s-mcp-proxy 에 marketplace emptyDir 와 MINIMAX_CODE_MARKETPLACE_DIR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MUyooFMnpZEbS4ReCahFBo
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.
무엇을
minimax-code를approval-gated와 같은 파드 배치로 옮긴다 — 헬퍼 파드 + egress 경계 + 승인 게이트. 그리고 #156의 K3s MCP 토큰을 그 헬퍼 파드에 싣는다. PRD AC-G6 신설, AC-G1/G3/G4/G5 개정.구조
:8091, 세션 MCP:8092, K3s MCP 프록시:8093. loopback 주소·자격 증명 변수가 있으면 agent가 기동 거부.minimax-code-credentials) ·k3s-mcp-proxy(같은 Secret의 선택 키k3s-mcp-token, 헬퍼 배치로:8093).8093이 더해지고 approval-gated는 두 포트 그대로.K3s MCP는 세션 게이트를 지나지 않는다
K3s MCP는 자체 승인 게이트로 쓰기를 막으므로 이중 승인을 피한다(사용자 결정). approval-gated의 AC-F6 C2를 이 타입·이 프록시 하나에 한해 적용하지 않는다는 점을 AC-G6에 명시했다. 프록시 상류는 고정 origin 하나라 예외가 임의 외부 목적지로 번지지 않는다.
#156에서 바뀐 것 — marketplace 부트스트랩은 헬퍼 파드의 k3s-mcp-proxy가
워크로드 파드가
github.com에 닿지 못하므로 entrypoint의 클론을 K3s 토큰을 이미 쥔k3s-mcp-proxy컨테이너로 옮겼다(헬퍼 파드 egress는 열려 있음).github_app_installation_token을 받고, URL 범위 extraheader로 전용 emptyDir에 클론 →MINIMAX_CODE_PLUGINS(기본mcp-servers)의 manifest +skills·commands·agents·mcpServers파일만 비밀 없는 번들로GET /plugin-seed(503 →ready/failed/unconfigured). hook·symlink·marketplace 밖 경로 거부, 크기 상한.oauthClientId·Authorization제거). 닿지 못하는 다른 서버는 경고 후 제외(#156의 「전체 실패」에서 완화 — 플러그인이 늘어도 하나가 나머지를 막지 않게).session-platform-session-mcp로 해 marketplace 플러그인과 충돌하지 않게 했다.MINIMAX_CODE_PLUGINS에 이름만 더하면 된다.검증
TestMiniMaxCode_*— 파드 쌍·컨테이너 셋, 워크로드 무자격 증명·헬퍼 주소, Secret 분리(claude Secret 미참조), K3s 토큰은 k3s-mcp-proxy에만, 게이트웨이는 세션 MCP에만, 정책 포트 8091/8092/8093, 공유 볼륨 마운트, 복원 시 새 쌍.TestMiniMaxCodeApprovalWaitHoldsTheIdleCount./plugin-seed라우트.go vet(+integration/e2e)·gofmt·주석 정책·시나리오 매핑·render fidelity 통과. 등재 파일의 주석은 건드리지 않았다.알려진 한계 (PRD 남은 일)
git_clone결과물은 동결 뒤 사라진다.mcode가 플러그인 여럿을 함께 읽는 것, marketplace 스킬을 읽는지는 운영 반영 뒤 세션에서 확인 필요.프리뷰에서는 minimax 헬퍼 파드가 뜨지 않는다— 정정: 프리뷰 ResourceSet이approval-gateway-credentials도copyFrom하므로 프리뷰에서도 뜬다. 대신 프리뷰의 승인 요청도 실제 gatekeeper로 간다.운영 반영 순서
k3s-mcp-token없이도 동작 — K3s 도구 없는 세션)k3s-mcp-token키 추가(#156의 2단계 그대로)CreatedOnce라minimax-code-credentialsSecret을 한 번 지워 재생성https://claude.ai/code/session_01MUyooFMnpZEbS4ReCahFBo
Generated by Claude Code