@kinloom/cli 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/assets/cached-ocr.py +786 -0
  2. package/dist/assets/ocr.md +76 -0
  3. package/dist/assets/prep-scan.md +97 -0
  4. package/dist/assets/prep-scan.py +1313 -0
  5. package/dist/bundled-skills/acpl-persi/SKILL.md +103 -0
  6. package/dist/bundled-skills/acpl-persi/scripts/persi +539 -0
  7. package/dist/bundled-skills/archive-org/SKILL.md +162 -0
  8. package/dist/bundled-skills/archive-org/scripts/archive-org +1576 -0
  9. package/dist/bundled-skills/blm-glo/SKILL.md +54 -0
  10. package/dist/bundled-skills/california-archives/SKILL.md +130 -0
  11. package/dist/bundled-skills/california-archives/scripts/ca-archives +614 -0
  12. package/dist/bundled-skills/chronicling-america/SKILL.md +120 -0
  13. package/dist/bundled-skills/chronicling-america/scripts/chronam +553 -0
  14. package/dist/bundled-skills/cyndis-list/SKILL.md +53 -0
  15. package/dist/bundled-skills/findagrave/SKILL.md +129 -0
  16. package/dist/bundled-skills/findagrave/scripts/findagrave +965 -0
  17. package/dist/bundled-skills/hathitrust/SKILL.md +117 -0
  18. package/dist/bundled-skills/hathitrust/scripts/hathi +379 -0
  19. package/dist/bundled-skills/kentucky-archives/SKILL.md +124 -0
  20. package/dist/bundled-skills/kentucky-archives/scripts/ky-archives +646 -0
  21. package/dist/bundled-skills/library-of-michigan/SKILL.md +118 -0
  22. package/dist/bundled-skills/library-of-michigan/scripts/michiganology +515 -0
  23. package/dist/bundled-skills/missouri-archives/SKILL.md +109 -0
  24. package/dist/bundled-skills/missouri-archives/scripts/mo-archives +751 -0
  25. package/dist/bundled-skills/nara-catalog-search/SKILL.md +130 -0
  26. package/dist/bundled-skills/nara-catalog-search/scripts/nara +1387 -0
  27. package/dist/bundled-skills/narrative-audio/SKILL.md +103 -0
  28. package/dist/bundled-skills/narrative-audio/references/script-rules.md +109 -0
  29. package/dist/bundled-skills/narrative-audio/scripts/narrative-audio +290 -0
  30. package/dist/bundled-skills/new-jersey-archives/SKILL.md +135 -0
  31. package/dist/bundled-skills/new-jersey-archives/scripts/nj-archives +869 -0
  32. package/dist/bundled-skills/openarchieven/SKILL.md +97 -0
  33. package/dist/bundled-skills/openarchieven/scripts/openarchieven +624 -0
  34. package/dist/bundled-skills/texas-archives/SKILL.md +102 -0
  35. package/dist/bundled-skills/texas-archives/scripts/texas-archives +666 -0
  36. package/dist/bundled-skills/uk-archives/SKILL.md +110 -0
  37. package/dist/bundled-skills/uk-archives/scripts/uk-archives +631 -0
  38. package/dist/bundled-skills/usgs-gnis/SKILL.md +99 -0
  39. package/dist/bundled-skills/usgs-gnis/scripts/gnis +418 -0
  40. package/dist/bundled-skills/virginia-archives/SKILL.md +144 -0
  41. package/dist/bundled-skills/virginia-archives/scripts/va-archives +1039 -0
  42. package/dist/bundled-skills/wikitree/SKILL.md +154 -0
  43. package/dist/bundled-skills/wikitree/scripts/wikitree +455 -0
  44. package/dist/cli.d.ts +1 -1
  45. package/dist/cli.d.ts.map +1 -1
  46. package/dist/cli.js +488 -26
  47. package/dist/cli.js.map +1 -1
  48. package/dist/client.d.ts.map +1 -1
  49. package/dist/client.js +30 -5
  50. package/dist/client.js.map +1 -1
  51. package/dist/commands/ops/audit.d.ts +138 -0
  52. package/dist/commands/ops/audit.d.ts.map +1 -0
  53. package/dist/commands/ops/audit.js +872 -0
  54. package/dist/commands/ops/audit.js.map +1 -0
  55. package/dist/commands/ops/context.d.ts +100 -0
  56. package/dist/commands/ops/context.d.ts.map +1 -0
  57. package/dist/commands/ops/context.js +917 -0
  58. package/dist/commands/ops/context.js.map +1 -0
  59. package/dist/commands/ops/dates.d.ts +87 -0
  60. package/dist/commands/ops/dates.d.ts.map +1 -0
  61. package/dist/commands/ops/dates.js +228 -0
  62. package/dist/commands/ops/dates.js.map +1 -0
  63. package/dist/commands/ops/help.d.ts +8 -0
  64. package/dist/commands/ops/help.d.ts.map +1 -0
  65. package/dist/commands/ops/help.js +107 -0
  66. package/dist/commands/ops/help.js.map +1 -0
  67. package/dist/commands/ops/index.d.ts +8 -0
  68. package/dist/commands/ops/index.d.ts.map +1 -0
  69. package/dist/commands/ops/index.js +8 -0
  70. package/dist/commands/ops/index.js.map +1 -0
  71. package/dist/commands/ops/integrate.d.ts +61 -0
  72. package/dist/commands/ops/integrate.d.ts.map +1 -0
  73. package/dist/commands/ops/integrate.js +1063 -0
  74. package/dist/commands/ops/integrate.js.map +1 -0
  75. package/dist/commands/ops/sync.d.ts +194 -0
  76. package/dist/commands/ops/sync.d.ts.map +1 -0
  77. package/dist/commands/ops/sync.js +1251 -0
  78. package/dist/commands/ops/sync.js.map +1 -0
  79. package/dist/commands/ops/telemetry.d.ts +79 -0
  80. package/dist/commands/ops/telemetry.d.ts.map +1 -0
  81. package/dist/commands/ops/telemetry.js +249 -0
  82. package/dist/commands/ops/telemetry.js.map +1 -0
  83. package/dist/commands/ops/verify.d.ts +76 -0
  84. package/dist/commands/ops/verify.d.ts.map +1 -0
  85. package/dist/commands/ops/verify.js +325 -0
  86. package/dist/commands/ops/verify.js.map +1 -0
  87. package/dist/commands/records/help.d.ts +18 -0
  88. package/dist/commands/records/help.d.ts.map +1 -0
  89. package/dist/commands/records/help.js +174 -0
  90. package/dist/commands/records/help.js.map +1 -0
  91. package/dist/commands/records/index.d.ts +5 -0
  92. package/dist/commands/records/index.d.ts.map +1 -0
  93. package/dist/commands/records/index.js +5 -0
  94. package/dist/commands/records/index.js.map +1 -0
  95. package/dist/commands/records/registry.d.ts +32 -0
  96. package/dist/commands/records/registry.d.ts.map +1 -0
  97. package/dist/commands/records/registry.js +227 -0
  98. package/dist/commands/records/registry.js.map +1 -0
  99. package/dist/commands/records/resolve.d.ts +14 -0
  100. package/dist/commands/records/resolve.d.ts.map +1 -0
  101. package/dist/commands/records/resolve.js +61 -0
  102. package/dist/commands/records/resolve.js.map +1 -0
  103. package/dist/commands/records/runner.d.ts +27 -0
  104. package/dist/commands/records/runner.d.ts.map +1 -0
  105. package/dist/commands/records/runner.js +255 -0
  106. package/dist/commands/records/runner.js.map +1 -0
  107. package/dist/index.d.ts +2 -0
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +2 -0
  110. package/dist/index.js.map +1 -1
  111. package/package.json +3 -3
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: texas-archives
3
+ description: Research historical and genealogical records in Texas through the Portal to Texas History (UNT), the Texas State Library and Archives Commission Texas Digital Archive (Preservica), and Texas General Land Office land-grant lookup, using the bundled `texas-archives` CLI. Covers Texas county newspapers and local histories, Texas Ranger research pointers, and what is browser-only (Portal HTML, GLO grant search, Ranger muster rolls). Use when tracing ancestors in Texas counties, searching Texas newspapers, local histories, photographs, or state land grants.
4
+ ---
5
+
6
+ # Texas Archives
7
+
8
+ Texas genealogical research splits across three primary repositories. This skill matches the sibling state archive CLIs (`virginia-archives`, `california-archives`, `kentucky-archives`).
9
+
10
+ Portal: https://texashistory.unt.edu/
11
+ TSLAC Texas Digital Archive: https://tsl.access.preservica.com/
12
+ Texas GLO land grants (state, not federal): https://s3.glo.texas.gov/lookup/index.php
13
+ TSLAC home: https://www.tsl.texas.gov/
14
+
15
+ No account or API key is needed for anything the CLI runs. Texas was not a U.S. public-land state, so federal BLM GLO patents do not cover antebellum Texas land. Use the Texas GLO lookup for Spanish and Mexican grants and republic-era patents, and county deed books for later transfers.
16
+
17
+ ## Bundled CLI (`scripts/texas-archives`)
18
+
19
+ Path: `skills/texas-archives/scripts/texas-archives`
20
+
21
+ Executable Python CLI with PEP 723 `#!/usr/bin/env -S uv run --script`, dependencies `click` and `httpx`. Run from the repo root, for example:
22
+
23
+ ```bash
24
+ skills/texas-archives/scripts/texas-archives portal search "Sam Houston" --county Travis --limit 5
25
+ skills/texas-archives/scripts/texas-archives portal search Houston --county Harris --limit 5 --json
26
+ skills/texas-archives/scripts/texas-archives portal search "Texas Rangers" --type text_newspaper --limit 5
27
+ skills/texas-archives/scripts/texas-archives portal item <metapth-id> --json
28
+ skills/texas-archives/scripts/texas-archives tda Houston --limit 10
29
+ skills/texas-archives/scripts/texas-archives url Austin
30
+ ```
31
+
32
+ | Command | Machine interface (verified 2026-11-24) |
33
+ |---|---|
34
+ | `portal search QUERY... [--county] [--date-from] [--date-to] [--type] [--limit N] [--pages N] [--json]` | `GET https://texashistory.unt.edu/search/opensearch/?q=<query>&format=json&pw=<page>` — 100 hits per page, `opensearch:totalResults` in JSON |
35
+ | `portal item ARK [--json]` | `GET https://texashistory.unt.edu/oai/?verb=GetRecord&identifier=ark:/67531/<id>&metadataPrefix=oai_dc` |
36
+ | `tda QUERY [--limit N] [--json]` | `GET https://tsl.access.preservica.com/search/<term>/feed/rss2/` fetched with **curl** (httpx gets HTTP 403 on this host) |
37
+ | `url [QUERY] [--portal] [--tda] [--glo] [--rangers] [--tslac]` | Prints verified URLs only; no HTTP search |
38
+
39
+ `portal search` accepts multiple words (`Texas Rangers`). `--county` adds the county name to the OpenSearch query and filters hits whose title or description mentions that county. `--date-from` / `--date-to` filter on the OpenSearch `dc:date` field after pages are fetched. `--type` filters `dc:type` (for example `text_newspaper`). OpenSearch query parameters for county or type were **not** verified on the server side. The CLI applies filters locally.
40
+
41
+ ## Portal to Texas History (UNT)
42
+
43
+ The Portal holds digitized newspapers, local histories, maps, photographs, and yearbooks from Texas partners across the state.
44
+
45
+ **Search (CLI):** OpenSearch JSON is public. No ALTCHA and no API key. `portal search` returns up to 100 hits per OpenSearch page along with `opensearch:totalResults`, titles, dates, types, and ARK identifiers.
46
+
47
+ **Item metadata (CLI):** OAI-PMH `GetRecord` with `identifier=ark:/67531/<metapth...>` returns Dublin Core metadata (titles, creators, dates, subjects, types, and descriptions).
48
+
49
+ **Browser-only:** HTML search at `/search/?q=...&t=fulltext` redirects to `/dam/` (ALTCHA challenge). Item landing pages, page images (`/m1/`), and per-page OCR URLs return the same challenge or 404 to plain HTTP. Read newspapers and books in the browser after the CLI gives you the ARK and URL.
50
+
51
+ **OCR / IIIF:** No public OCR download URL or IIIF manifest was verified live for sample ARKs (`ocr.txt`, `iiif/manifest`, `mets.xml` returned 404). Use the item page in the browser for full text where the Portal provides it.
52
+
53
+ ## Texas State Library and Archives Commission (TSLAC)
54
+
55
+ **Texas Digital Archive (TDA):** Preservica Universal Access at `tsl.access.preservica.com`. The WordPress search RSS feed lists up to about 25 hits per query. The CLI uses **curl** for that feed because **httpx receives HTTP 403** on this host while curl receives HTTP 200 (verified same day). Full-text search in the feed covers titles, descriptions, and (per TSLAC) document content, so open each hit to see why it matched.
56
+
57
+ Ranger pensions and Adjutant General muster rolls are **not** fully exposed through this RSS route. Use open-records or reading-room paths documented on `tsl.texas.gov`.
58
+
59
+ **Texas Rangers:** Collection pointer `https://www.tsl.texas.gov/agency/items/texas-rangers`. Muster rolls and service files require a specific record series citation from TSLAC or the Adjutant General, then mail or an in-person visit.
60
+
61
+ ## Texas General Land Office (state grants)
62
+
63
+ `https://s3.glo.texas.gov/lookup/index.php` returned HTTP 200 with a Salesforce/semantic UI shell (live 2026-11-24). A POST with name and county fields did not return a parseable results table to the CLI. Treat grant search as **browser-only**. Federal patents belong in the `blm-glo` skill only for public-land states, not for republic-era or state Texas land.
64
+
65
+ ## Research workflow
66
+
67
+ Worked order for tracing a person or family in Texas:
68
+
69
+ 1. `portal search "<Full Name>" --county <County>` and `portal search <Surname> --county <County> --type text_newspaper` for local newspapers and county histories.
70
+ 2. Search name variants (initials, spouse's maiden name, and town names) with `--county` or `--date-from` / `--date-to`.
71
+ 3. For Texas Ranger service claims, search background material in the Portal, then follow TSLAC Ranger collection pointers and open-records request paths for muster rolls.
72
+ 4. Run `portal item <ark>` on promising hits to pull Dublin Core metadata, then open the Portal URL in a browser to read scans.
73
+ 5. Run `tda <Surname>` and `tda <Town>` for state-archive newspapers and agency records not duplicated on the Portal.
74
+ 6. Search the Texas GLO lookup in the browser for land grants, then follow up in county clerk deed books and vital records.
75
+
76
+ ## Verification log (verified live 2026-11-24)
77
+
78
+ - `https://texashistory.unt.edu/` — HTTP 200.
79
+ - OpenSearch JSON (`?q=<query>&format=json`) — HTTP 200, `application/json`, `opensearch:totalResults` present.
80
+ - OAI `ListSets` and `GetRecord` (`metadataPrefix=oai_dc`) — HTTP 200, valid Dublin Core XML.
81
+ - Portal HTML search (`/search/?q=...&t=fulltext`) and item image views (`/ark:/67531/.../m1/`) — HTTP 302 to `/dam/?next=...` (ALTCHA). Browser-only for HTML UI and images.
82
+ - `https://tsl.access.preservica.com/` — HTTP 200.
83
+ - TDA RSS (`/search/<term>/feed/rss2/`) — HTTP 200 via curl (up to 25 `<item>` elements); HTTP 403 via httpx 0.27 (same User-Agent).
84
+ - `https://s3.glo.texas.gov/lookup/index.php` — HTTP 200 SPA shell; no verified machine search API.
85
+ - `https://www.tsl.texas.gov/` — HTTP 200.
86
+ - CLI `texas-archives --help`, `portal search`, `portal item`, `tda`, `url` — all exited 0 on verification runs.
87
+
88
+ ## Disk cache and environment variables
89
+
90
+ `portal search` (per OpenSearch page), `portal item`, and `tda` cache successful responses on disk under `~/.cache/kinloom-texas-archives/` (default TTL `168` hours, advisory `flock` per cache key, atomic temp-file writes). HTTP errors, curl failures, OAI errors, and empty/unverified payloads are never cached.
91
+
92
+ - `--refresh`: bypass cached reads and write the fresh response to disk.
93
+ - `--cache-ttl-hours <hours>`: override TTL for one call (`0` disables cached reads).
94
+ - `KINLOOM_TEXAS_ARCHIVES_CACHE_DIR`: override the cache directory path.
95
+ - `KINLOOM_TEXAS_ARCHIVES_CACHE_TTL_HOURS`: override the default TTL in hours.
96
+
97
+ ## What this skill does not cover
98
+
99
+ - Federal BLM GLO (public-land states) — see `blm-glo`; Texas state land is separate.
100
+ - FamilySearch, Ancestry, or Fold3 indexes; cite them only when a Texas portal points there.
101
+ - County clerk vital records and deed books. The Portal and TDA may name people in newspapers or books, but they do not replace certified copies.
102
+ - Do not claim a machine API for Portal HTML, GLO grant search, or Ranger muster rolls without a live verified endpoint.