v0.1.11: Dataset counts, row_count provenance, and upstream-text framing
Dataset counts, row_count provenance, and upstream-text framing
Real per-portal dataset counts, derived row_count with a provenance field, and a shared upstream-text framing convention across tool/resource formatters.
Added:
- socrata_list_portals / socrata://portals: real per-portal dataset_count from a live Discovery only=dataset&limit=0 catalog query, ~24h TTL cache, bounded concurrency; required-but-nullable (null = temporarily unavailable, 0 = genuinely none). (#12)
- socrata_get_dataset / socrata://datasets: new row_count_source ('top_level_cached_contents' | 'column_cached_contents') alongside row_count derived from column-level cachedContents.count when the top-level field is absent. (#14)
- src/mcp-server/tools/upstream-text.ts: shared framing helpers (inlineUpstream, upstreamBlockquote, escapeTableCell, fencedJson) applied across find-datasets, get-dataset, query-dataset, and dataframe-query formatters. (#13)
Changed:
- list-portals, portals.resource, and README no longer claim "hundreds" of Discovery-backed portals — the catalog is a curated, static 36-domain list with live counts layered on top. (#12)
Fixed:
- get-dataset: a cachedContents object without count fields no longer fabricates row_count: 0 — falls through to column-level derivation. (#14)
- get-dataset/find-datasets/query-dataset/dataframe-query format(): table-cell escaping now covers backslashes and newlines (not just pipes), and the wide-row JSON fallback fence is sized past embedded backtick runs. (#13)
148 tests pass; bun run devcheck clean.