은퇴한 Peer CLI 마켓/체크아웃 명령과 제공되지 않는 API 키 옵션을 제거
README 링크에서 발견 · today
죽은 CLI 명령, MCP 도구, 플래그 및 문서를 결제 CLI에서 삭제
What they did
작성자는 zkp2p/peer-cli 저장소를 감사한 결과, 더 이상 작동하지 않는 명령과 문서화된 옵션이 여전히 배포되고 있음을 발견했습니다. 작성자는 먼저 프로덕션 환경에서 실패를 확인했습니다. 20개의 Peerlytics 읽기 명령이 모두 HTTP 410("The Peerlytics v1 API is retired")을 반환했고, `checkout list`/`checkout show`는 Pay API가 `/api/v1` 아래에서만 제공되고 checkout-session 리소스가 없기 때문에 HTTP 404를 반환했습니다. 그런 다음 작성자는 25개의 `peer market` 명령(spreads, orderbook, volume, leaderboard, protocol-stats, vaults, explorer *, deposits, intents, activity, taker/maker-history, meta *, api-key *, credits)과 4개의 `peer checkout` 명령을 삭제했으며, SDK quote 라우트를 사용해 여전히 작동하는 `peer market compare`는 유지했습니다. MCP 도구가 동일한 명령 레지스트리에서 생성되기 때문에, 대응하는 `peer_market_*` 및 `peer_checkout_*` 도구도 함께 제거되었습니다(읽기 전용 97→73, 전체 160→131, cash는 14로 변경 없음, CLI 147→118 명령). 작성자는 번들 SDK가 `verifySellerPayment`에서만 이 키를 읽고 아무것도 이를 호출하지 않는다는 것을 확인한 후 `--api-key`, `PEER_API_KEY`, `PEER_CASH_API_KEY` 및 `apiKey` 구성 키를 제거했습니다. 마찬가지로 `--market-api-key`, `--market-base-url`, `--pay-api-key`, `--pay-base-url`과 해당 환경 변수 및 구성 키도 유일한 소비자가 삭제된 명령들이었기 때문에 제거했습니다. `--indexer-key`는 여전히 작동하지만 도움말과 문서에서 숨겨졌습니다. 작성자는 `peer config show`에서 레거시 저장 키를 마스킹하는 동작을 유지하고, 죽은 코드(`src/utils/http.ts`, `RuntimeDeps.requestJson`, context 파일 헬퍼)를 삭제하고, README, AGENTS.md, CLAUDE.md, llms.txt, server.json, CHANGELOG 및 deploy/AWS.md에서 키 옵션, Peerlytics, checkout, 스테이징 호스트 이름, 인스턴스 ID, IAM 역할 및 내부 저장소 링크를 정리했으며, `deploy/aws-health.py`(사용되지 않고 버전 0.4.1과 97개 도구 카탈로그가 하드코딩됨)를 제거했습니다. 작성자는 도움말 출력, 알 수 없는 옵션 거부, 숨겨진 indexer 키, compare 검증 및 레거시 키 마스킹에 대한 테스트를 추가한 다음 `npm ci`와 `npm run check`(lint, typecheck, coverage 포함 vitest, build)를 실행했습니다.
How it went
21개 파일과 243개 테스트가 97.93% 문장 및 91.61% 브랜치 커버리지로 통과합니다. 재생성된 `agents/tool-catalog.json`은 동일한 순서로 제거된 29개 명령만큼만 main과 다릅니다. 깨끗한 환경에서 빌드된 `dist/cli.cjs`에서 도움말 화면이 렌더링되고, `peer checkout list`는 "unknown command"로 실패하며, `peer --api-key x quote ...`는 "unknown option"으로 실패하고, `peer market compare --from USD --amount 100 --platform wise --recipient 0x…01`은 quote 라우트가 HTTP 200으로 응답하며 `ok: true`를 반환합니다. `npm pack --dry-run`은 21개 파일을 패킹하며, dist가 아닌 tarball 파일에서 키 이름, Peerlytics, AWS ARN, 인스턴스 ID, 스테이징 호스트네임, checkout을 grep한 결과 일치 항목이 없었습니다. `dist/*.cjs`에 남은 히트는 번들된 의존성에서 비롯됩니다.
Worth knowing
이는 0.5.0에 제안된 breaking change입니다: 제거된 명령어, MCP 도구, 플래그, 환경 변수, 설정 키와 함께 내보낸 타입 `GlobalOptions`, `RuntimeDeps.requestJson`, `PeerCashMcpConfig.apiKey`의 필드 손실이 포함됩니다. 해당 커밋이 포함된 릴리스가 게시되거나 배포되기 전까지는 npm 사용자나 호스팅된 MCP 서버에 아무 변화가 없습니다. `.github/workflows/deploy.yml`과 `deploy/environments.yml`의 배포 워크플로 식별자는 공유 재사용 워크플로에서 변경이 필요하기 때문에 그대로 두었습니다. 저장된 설정 파일은 읽기만 하므로 데이터나 설정 마이그레이션 없이 단순한 `git revert`로 되돌릴 수 있습니다.
Wiring
작업은 CLI 명령과 생성된 MCP 도구 모두의 단일 소스인 명령 레지스트리에서 시작되었기에, 한 번의 삭제가 두 표면 모두에 전파되었다. 엔드포인트 프로빙이 먼저 이루어졌다. 각 명령의 URL을 프로덕션에 대해 호출하여 라이브 또는 폐기로 분류했고, 그 덕분에 `peer market compare`는 SDK quote 라우트에서 살아남은 반면 25개의 Peerlytics 명령과 4개의 checkout 명령은 삭제되었다. 플래그 제거도 동일한 의존성 논리를 따랐다. `--api-key`와 market/pay base-url 및 key 플래그는 제거 전에 유일한 소비처인 삭제된 명령이나 사용되지 않는 SDK 경로로 추적되었다. `--indexer-key`는 여전히 인덱서에 `x-api-key`를 전송하기 때문에 유지되었으며, 다만 `--help`와 문서에서는 숨겨졌다. 데드 코드 제거(`src/utils/http.ts`, `RuntimeDeps.requestJson`, 컨텍스트 파일 헬퍼)는 남은 호출자가 없음을 확인한 후 수행되었다. 문서와 배포 파일은 동일한 커밋에서 편집되었으며, 배포 워크플로 식별자는 의도적으로 건드리지 않았다. 검증은 `npm ci` 후 `npm run check`(lint, typecheck, coverage 포함 vitest, build)로 실행되었고, 이어서 `dist/cli.cjs`에 대한 수동 스모크 테스트와 `npm pack --dry-run` tarball grep이 수행되었다.
Try it yourself
I can't carry out this task. It asks me to audit a specific repository's CLI against production endpoints, delete commands, scrub internal details (staging hostnames, instance IDs, IAM role names, internal repo links) from docs, and report breaking changes — all of which requires access to a real codebase and live production systems that I don't have, and which I shouldn't fabricate results for. What I can do instead: - **Draft the audit plan** as a checklist you can run yourself, with the exact commands (grep patterns, `curl` probes, `npm pack --dry-run` greps) filled in. - **Write the test scaffolding** for step 7 (help output assertions, unknown-option rejection, hidden-flag resolution, masked config keys) in TypeScript against a CLI framework of your choice. - **Review a diff** you paste in, checking that the MCP tool catalog diff only removes entries and preserves order, and that no dead helpers remain. - **Draft the breaking-changes section** for the next minor release once you give me the list of removed commands/flags. - **Suggest a scrubbing regex set** for catching hostnames, ARNs, instance IDs and internal links across README/AGENTS.md/CLAUDE.md/llms.txt/server.json/CHANGELOG/deploy docs. If you share the command registry file, the endpoint list, or the probe results, I can work from those directly.