Files
teamai-cli/scripts
jeffandClaude Opus 4.8 1b7e054dbb refactor(http): remove the dead /repo team-repo snapshot path (#180)
The `GET {baseUrl}/repo` endpoint (方案一 HTTP team-repo snapshot) was never
implemented on the backend — it answers 200 with the SPA HTML shell, so
`fetchRepoSnapshot` always threw RepoNotAvailableError and both `init --http`
and `pull` permanently fell through to their reporting-only branch. Skills,
rules and CLAUDE.md are delivered entirely via the report/sync/ack lifecycle
(the local-agent bypass), which is verified live against the backend.

Remove the client for a path that never runs:

- delete src/source-http.ts (fetchRepoSnapshot / materializeHttpRepo /
  removeMaterializedSkill / RepoSnapshot / RepoFile / RepoNotAvailableError)
- init --http: drop the /repo fetch + reporting-only fallback; always write the
  teamai.yaml stub and wire report/sync/ack
- pull: the http backend has no tree to clone — return report/sync delivery
- tests/mock: delete source-http.test.ts, drop /repo + seedRepo from the mock
  server, rewrite the http-repo integration case to the no-clone behavior
- scripts/mock-teamai-server.mjs + README (EN/zh): drop the /repo contract; the
  download_url shape now hangs off the sync response

Also folds in small HTTP cleanups: reuse manifestKind() in removeLocalAgentHttp
and hoist the static config.js import in sourceAddHttp.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 17:36:37 +08:00
..