1.8 KiB
1.8 KiB
KakaoPage source — implementation plan
superpowers:executing-plans (native). Spec:
docs/specs/004-kakaopage.md.
Goal: a kakaopage Source registered next to webtoons and tapas, plus per-host request headers.
Global constraints
src/core pure; tests offline on captured fixtures (done); no new dependencies.
Review focus
seriesId=Nmust not matchN0in Wayback rows. → Task 1 test, Task 4 history test.- A series without
land_thumbnail(19+ edition) → one cover, no crash. → Task 3 test. - Old
dn-img-page.kakao.com …&filename=th3URLs normalise to the original. → Task 1 test. - The Referer reaches
bff-page.kakao.comthrough both the server proxy and the userscript. → Task 2 tests. - An unknown id gives a clear error. → Task 4 test.
Task 1: URLs (kakaopage/urls.ts)
- Links (
/content/N,/home?seriesId=N,m.), rejects;normalizeImageUrl;isSameKakaoSeries;overviewUrl(id). RED → GREEN → commit.
Task 2: Request headers (core/transport.ts, server/app.ts, userscript/gm.ts)
requestHeadersFor(url); the server proxy andgmTransportsend it (tests on both). RED → GREEN → commit.
Task 3: Parsing (kakaopage/parse.ts)
parseOverview(json)(comic, novel, 19+ without land thumbnail, error body);extractCovers(html, pageUrl)for 2020/2022/2024 captures. RED → GREEN → commit.
Task 4: Source and registry
kakaopageSource throughFakeTransport(resolve, currentCovers, unknown id, Wayback over both CDX fixtures keeps only this id); registry, allowlists,@connect, hint copy; README, ARCHITECTURE, DECISIONS. RED → GREEN → commit.
Task 5: Verify and finish
- Real run in headless Chrome; final review; remove this plan; merge; push.