UNPKG

@ansvar/singapore-law-mcp

Version:

Complete Singapore law database — 523 Acts, 28K+ provisions from Singapore Statutes Online (sso.agc.gov.sg) with full-text search, definitions, and citation support

26 lines 1.08 kB
#!/usr/bin/env tsx /** * Singapore Law MCP -- Census-Driven Ingestion Pipeline * * Fetches ALL Singapore legislation from Singapore Statutes Online (sso.agc.gov.sg) * using data/census.json as the source of truth for what to ingest. * * SSO provides public access to all current Singapore legislation under the * Singapore Open Data Licence. * * The pipeline performs the same sequence a browser would: * 1. GET the Act page (receives Part 1 inline + ToC with series IDs) * 2. For each series ID, GET /Details/GetLazyLoadContent to fetch that part * 3. Parse the combined HTML into structured provision data * * Usage: * npm run ingest # Full census-driven ingestion * npm run ingest -- --limit 5 # Test with 5 acts * npm run ingest -- --skip-fetch # Reuse cached HTML * npm run ingest -- --resume # Skip acts that already have seed files * npm run ingest -- --start-from ID # Resume from a specific act ID * * Data is sourced under the Singapore Open Data Licence. */ export {}; //# sourceMappingURL=ingest.d.ts.map