2 Commits

Author SHA1 Message Date
Gabriel Wu a808f0965d fix(api): adapt Typst API generation for new docs infra
Add stable and upstream-main API channels, keep api.json as the stable alias,
and switch CI to export and update only api-main.* from the current Typst main
checkout.
2026-06-01 17:47:18 +08:00
Gabriel Wu 4bb2b404c2 skill: add Typst API reference index and search
Build API index from typst-docs JSON output with BM25 search.
Covers functions, methods, constructors, types, and symbols
(including LaTeX alias search via unicode-math-table).

- tools/fetch-api-docs.py: extract API data, build BM25 index with
  category weighting, symbol abbreviation expansion, LaTeX alias
  integration, and compound word splitting
- scripts/search-api.py: BM25 search with kind/category filters,
  exact name lookup, and category weight scoring
- tests/test_api_search.py: regression tests for function, method,
  symbol, LaTeX alias, and edge case searches
- .github/workflows/update-api.yml: weekly CI refresh
2026-04-14 17:19:33 +08:00