@cliwant/mcp-sam-gov 1.1.0 → 1.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.
@@ -0,0 +1,296 @@
1
+ /**
2
+ * gsa-perdiem.ts — GSA Federal Travel Per-Diem lookup (`api.gsa.gov`, base
3
+ * `/travel/perdiem/v2`) — ADR-0050. The lodging + M&IE rate ceilings the federal
4
+ * government reimburses for official travel, by city/state or ZIP for a given year.
5
+ *
6
+ * WHAT IT ADDS: a NEW travel-cost lane (the per-diem authority) on the SAME
7
+ * `api.gsa.gov` host as datagov-catalog.ts, so it REUSES the audited `datagovKey.ts`
8
+ * key seam VERBATIM (keyHeader / keyModeLabel / pushKeyNote) — keyless by default via
9
+ * the shared DEMO_KEY, upgraded by DATA_GOV_API_KEY. The key rides ONLY in the
10
+ * X-Api-Key header — NEVER the URL / label / _meta / a log (the K-test). This module
11
+ * writes ZERO fetch/coercion/error/meta code: it REUSES `getJson` (redirect:"error",
12
+ * the X-Api-Key header) / `driftError` / `num`·`str` (coerce.ts) / `withMeta`·
13
+ * `buildMeta`, and MIRRORS the datagov-catalog schema_drift catch-ladder verbatim.
14
+ *
15
+ * ★ SSRF: the host is a compile-time literal (`GSA_PERDIEM_HOST`). The two lookup
16
+ * modes ride FIXED path templates; every caller value (city/state/zip/year) is
17
+ * charclass-validated THEN `encodeURIComponent`-escaped into a single path segment
18
+ * (no raw passthrough, no query steer). A post-construction hostname/protocol
19
+ * assertion + `redirect:"error"` lock it (fail closed on any off-host 3xx — a 3xx
20
+ * off api.gsa.gov could carry the X-Api-Key header away).
21
+ *
22
+ * ★ HONESTY (ADR-0050 P1–P5, live-verified 2026-07-15):
23
+ * [INPUT] EITHER (city + state) OR zip — supplying BOTH, or NEITHER, ⇒ invalid_input
24
+ * with 0 fetch (an ambiguous/empty lookup is a caller error, never a guess).
25
+ * [P1] the API returns the COMPLETE rate set for the lookup (no pagination) ⇒
26
+ * totalAvailable = the flattened row count, complete:true. NEVER fabricated.
27
+ * [P2] `errors` non-null ⇒ invalid_input surfacing the message (never a fake
28
+ * empty); a genuine no-match (rates:[] / rate:[]) ⇒ honest empty (returned:0,
29
+ * complete:true); a 429 (DEMO_KEY ~10/hr) ⇒ rate_limited THROW honoring
30
+ * Retry-After; a 5xx ⇒ upstream_unavailable THROW; a 200 non-JSON ⇒
31
+ * schema_drift. A DOWN service is NEVER a returned:0.
32
+ * [P3] `value` (monthly max lodging $) / `meals` (M&IE cap $) via `num` (null-
33
+ * never-0 — a genuine 0 stays 0). `standardRate` / `isOconus` are STRING
34
+ * booleans "true"/"false" ⇒ coerced to a real boolean (an unrecognized value
35
+ * ⇒ null, never a fabricated false). The months array is preserved AS-IS
36
+ * (never padded/fabricated to 12).
37
+ * [P4] `rates` / a group's `rate` / `months.month` absent or non-array ⇒
38
+ * driftError (never a fabricated empty).
39
+ */
40
+ import { ToolErrorCarrier } from "./errors.js";
41
+ import { getJson, driftError } from "./datasource.js";
42
+ import { num, str } from "./coerce.js";
43
+ import { withMeta } from "./meta.js";
44
+ // The SHARED api.data.gov key seam (ADR-0010 §2). api.gsa.gov accepts the SAME
45
+ // DATA_GOV_API_KEY / DEMO_KEY via the X-Api-Key header — this is another consumer
46
+ // of the audited key discipline (a key-leak regression now fails this suite too).
47
+ import { keyHeader, keyModeLabel, pushKeyNote } from "./datagovKey.js";
48
+ // ─── Fixed endpoint (SSRF core — compile-time CONSTANTS) ──────────
49
+ export const GSA_PERDIEM_HOST = "api.gsa.gov";
50
+ const GSA_PERDIEM_BASE = "/travel/perdiem/v2";
51
+ // HOST+path label — surfaces in ToolError.upstreamEndpoint; the key rides ONLY in
52
+ // the X-Api-Key header, so no token can ever appear here.
53
+ const GSA_PERDIEM_LABEL = "gsa-perdiem:/travel/perdiem/v2/rates";
54
+ const GSA_PERDIEM_SOURCE = (mode) => `${GSA_PERDIEM_HOST} via GSA Federal Travel Per-Diem API (${mode})`;
55
+ // The default per-diem fiscal year (ADR-0050 — the current confirmed vintage).
56
+ export const DEFAULT_PERDIEM_YEAR = "2025";
57
+ // ─── Validation charclasses (SSRF + "verify the input" honesty) ───
58
+ // Each rides in a single PATH segment (encodeURIComponent-escaped), so these are
59
+ // belt-and-suspenders against a Zod-bypassing direct handler call.
60
+ const CITY_RE = /^[A-Za-z .'\-]{1,60}$/;
61
+ const STATE_RE = /^[A-Za-z]{2}$/;
62
+ const ZIP_RE = /^\d{5}$/;
63
+ const YEAR_RE = /^\d{4}$/;
64
+ // ─── Honesty notes (ADR-0050 required set) ────────────────────────
65
+ const RATE_MEANING_NOTE = "lodgingUsd (from the API's monthly `value`) is the MAX nightly lodging reimbursement ceiling for that month — it VARIES SEASONALLY, hence a per-month array; mealsUsd (from `meals`) is the daily Meals & Incidental Expenses (M&IE) ceiling. Both are integer US dollars. A withheld/absent figure is null, NEVER 0 (a genuine 0 is preserved).";
66
+ const STANDARD_RATE_NOTE = "standardRate:true means this location falls under the CONUS STANDARD rate (not an individually-set non-standard rate). standardRate/isOconus are booleans coerced from the API's string 'true'/'false'.";
67
+ const NO_PAGINATION_NOTE = "The per-diem API returns the COMPLETE rate set for the lookup (no pagination); totalAvailable equals the number of rows returned.";
68
+ // ─── STRING-boolean coercion (null-never-fabricate) ───────────────
69
+ /** Coerce the API's string 'true'/'false' → a real boolean; anything else ⇒ null. */
70
+ function strBool(v) {
71
+ if (typeof v === "boolean")
72
+ return v;
73
+ if (typeof v === "string") {
74
+ const s = v.trim().toLowerCase();
75
+ if (s === "true")
76
+ return true;
77
+ if (s === "false")
78
+ return false;
79
+ }
80
+ return null;
81
+ }
82
+ /**
83
+ * Map one `months.month[]` entry → the curated per-month shape. `value` and the
84
+ * month `number` via `num` (null-never-0); `long` (month name) via `str`.
85
+ */
86
+ function mapMonth(m) {
87
+ const it = (m ?? {});
88
+ return {
89
+ month: num(it.number),
90
+ monthName: str(it.long),
91
+ lodgingUsd: num(it.value),
92
+ };
93
+ }
94
+ // ─── SSRF-guarded fetch (fixed host + hostname assertion + redirect) ──
95
+ /**
96
+ * GET one GSA per-diem JSON resource. `path` is a fully-assembled, pre-escaped
97
+ * path (NO query params — the key rides in the X-Api-Key header only). Builds
98
+ * `https://${GSA_PERDIEM_HOST}${path}` on the FIXED host, asserts the CONSTRUCTED
99
+ * URL's hostname === the host over https (belt-and-suspenders), sets
100
+ * `redirect:"error"` (an off-host 3xx must NOT be followed — it could carry the
101
+ * X-Api-Key header to a foreign host), and attaches the key ONLY in the header.
102
+ */
103
+ async function getGsaPerdiem(path) {
104
+ const url = `https://${GSA_PERDIEM_HOST}${path}`;
105
+ const built = new URL(url);
106
+ if (built.hostname !== GSA_PERDIEM_HOST || built.protocol !== "https:") {
107
+ throw new ToolErrorCarrier({
108
+ kind: "invalid_input",
109
+ message: `Constructed GSA per-diem URL host ${JSON.stringify(built.hostname)} (${built.protocol}) does not match the fixed host ${JSON.stringify(GSA_PERDIEM_HOST)} over https — refusing to fetch (SSRF safety).`,
110
+ retryable: false,
111
+ upstreamEndpoint: GSA_PERDIEM_LABEL,
112
+ });
113
+ }
114
+ // The key rides in the X-Api-Key header ONLY (never the URL/label/_meta);
115
+ // redirect:"error" (fail closed on any off-host 3xx).
116
+ return getJson(url, {
117
+ label: GSA_PERDIEM_LABEL,
118
+ headers: keyHeader(),
119
+ redirect: "error",
120
+ });
121
+ }
122
+ /**
123
+ * Look up GSA Federal Travel per-diem rates by EITHER (city + state) OR zip, for a
124
+ * given `year` (default 2025). Returns flattened rate rows (each outer state/year
125
+ * group × inner city/rate) + honest `_meta`: totalAvailable = the row count (no
126
+ * pagination — P1), lodging/meals as null-never-0 dollars (P3), standardRate/isOconus
127
+ * as real booleans, the months array preserved as-is. The DEMO_KEY rate disclosure
128
+ * rides in the notes.
129
+ */
130
+ export async function perdiemRates(args) {
131
+ const label = GSA_PERDIEM_LABEL;
132
+ const year = args.year ?? DEFAULT_PERDIEM_YEAR;
133
+ // ── [INPUT] EITHER (city + state) OR zip — never both, never neither. This is a
134
+ // caller-shape check (0 fetch): an ambiguous or empty lookup is invalid_input,
135
+ // never a silent guess. ──
136
+ const hasCityState = args.city !== undefined || args.state !== undefined;
137
+ const hasZip = args.zip !== undefined;
138
+ if (hasCityState && hasZip) {
139
+ throw new ToolErrorCarrier({
140
+ kind: "invalid_input",
141
+ retryable: false,
142
+ message: "Provide EITHER (city + state) OR zip — not both. City/state and ZIP are two distinct lookup modes; supplying both is ambiguous.",
143
+ upstreamEndpoint: label,
144
+ });
145
+ }
146
+ if (!hasCityState && !hasZip) {
147
+ throw new ToolErrorCarrier({
148
+ kind: "invalid_input",
149
+ retryable: false,
150
+ message: "Provide a lookup key: EITHER (city + state, e.g. city:'Washington', state:'DC') OR zip (e.g. zip:'20001').",
151
+ upstreamEndpoint: label,
152
+ });
153
+ }
154
+ // ── Validate + default the inputs (belt-and-suspenders behind the server Zod;
155
+ // a DIRECT handler call bypasses Zod). year rides in the PATH regardless. ──
156
+ if (!YEAR_RE.test(year)) {
157
+ throw new ToolErrorCarrier({
158
+ kind: "invalid_input",
159
+ retryable: false,
160
+ message: `Invalid year ${JSON.stringify(year)} — expected a 4-digit year (^\\d{4}$), e.g. "2025". (year rides in the request PATH; it is strictly validated.)`,
161
+ upstreamEndpoint: label,
162
+ });
163
+ }
164
+ let path;
165
+ const filtersApplied = [`year:${year}`];
166
+ let lookupMode;
167
+ if (hasZip) {
168
+ const zip = args.zip;
169
+ if (!ZIP_RE.test(zip)) {
170
+ throw new ToolErrorCarrier({
171
+ kind: "invalid_input",
172
+ retryable: false,
173
+ message: `Invalid zip ${JSON.stringify(zip)} — expected a 5-digit ZIP code (^\\d{5}$), e.g. "20001".`,
174
+ upstreamEndpoint: label,
175
+ });
176
+ }
177
+ lookupMode = `zip:${zip}`;
178
+ filtersApplied.push(lookupMode);
179
+ // Fixed template; each segment encodeURIComponent-escaped (belt-and-suspenders
180
+ // behind the charclass — no path injection, no query steer).
181
+ path = `${GSA_PERDIEM_BASE}/rates/zip/${encodeURIComponent(zip)}/year/${encodeURIComponent(year)}`;
182
+ }
183
+ else {
184
+ // city + state — BOTH are required together for this mode.
185
+ if (args.city === undefined || args.state === undefined) {
186
+ throw new ToolErrorCarrier({
187
+ kind: "invalid_input",
188
+ retryable: false,
189
+ message: "The city lookup mode requires BOTH city AND state (e.g. city:'Washington', state:'DC'). Provide both, or use zip instead.",
190
+ upstreamEndpoint: label,
191
+ });
192
+ }
193
+ const city = args.city;
194
+ const state = args.state;
195
+ if (!CITY_RE.test(city)) {
196
+ throw new ToolErrorCarrier({
197
+ kind: "invalid_input",
198
+ retryable: false,
199
+ message: `Invalid city ${JSON.stringify(city)} — expected 1–60 letters/spaces/.'- (^[A-Za-z .'\\-]{1,60}$), e.g. "Washington".`,
200
+ upstreamEndpoint: label,
201
+ });
202
+ }
203
+ if (!STATE_RE.test(state)) {
204
+ throw new ToolErrorCarrier({
205
+ kind: "invalid_input",
206
+ retryable: false,
207
+ message: `Invalid state ${JSON.stringify(state)} — expected a 2-letter state code (^[A-Za-z]{2}$), e.g. "DC", "CA".`,
208
+ upstreamEndpoint: label,
209
+ });
210
+ }
211
+ lookupMode = `city:${city}, state:${state}`;
212
+ filtersApplied.push(`city:${city}`, `state:${state}`);
213
+ path = `${GSA_PERDIEM_BASE}/rates/city/${encodeURIComponent(city)}/state/${encodeURIComponent(state)}/year/${encodeURIComponent(year)}`;
214
+ }
215
+ // ── The typed catch-ladder (datagov-catalog searchDatasets shape, VERBATIM).
216
+ // Preserve the 429/404/5xx/400/timeout ToolErrorCarrier taxonomy FIRST
217
+ // (LOAD-BEARING: the DEMO_KEY-~10/hr 429→rate_limited frontier would regress to
218
+ // schema_drift under a broader catch); reclassify a 200 non-JSON `.json()`
219
+ // SyntaxError to schema_drift SECOND; bare-rethrow LAST. The host-assert
220
+ // ToolErrorCarrier is also rethrown first. ──
221
+ let body;
222
+ try {
223
+ body = await getGsaPerdiem(path);
224
+ }
225
+ catch (e) {
226
+ if (e instanceof ToolErrorCarrier)
227
+ throw e;
228
+ if (e instanceof SyntaxError)
229
+ throw driftError(label, "GSA per-diem returned a non-JSON body at HTTP 200 — schema drift.");
230
+ throw e;
231
+ }
232
+ const b = (body ?? {});
233
+ // ── [P2] `errors` non-null ⇒ a lookup problem ⇒ invalid_input surfacing the
234
+ // message (NEVER a fake empty — swallowing this as empty ⇒ RED). ──
235
+ if (b.errors !== null && b.errors !== undefined) {
236
+ const msg = typeof b.errors === "string" ? b.errors : JSON.stringify(b.errors);
237
+ throw new ToolErrorCarrier({
238
+ kind: "invalid_input",
239
+ retryable: false,
240
+ message: `GSA per-diem reported a lookup error for ${lookupMode} (year ${year}): ${msg}`,
241
+ upstreamEndpoint: label,
242
+ });
243
+ }
244
+ // ── [P4] `rates` MUST be an array (a missing/object/null rates is drift, never a
245
+ // fabricated empty — a TypeError must never mask drift as upstream_unavailable). ──
246
+ if (!Array.isArray(b.rates)) {
247
+ throw driftError(label, "GSA per-diem shape drift — response.rates must be an array.");
248
+ }
249
+ // ── Flatten: each outer state/year group × its inner rate[]. ──
250
+ const rows = [];
251
+ for (const group of b.rates) {
252
+ const g = (group ?? {});
253
+ // [P4] a group's `rate` MUST be an array (never a fabricated empty).
254
+ if (!Array.isArray(g.rate)) {
255
+ throw driftError(label, "GSA per-diem shape drift — a rates[].rate must be an array.");
256
+ }
257
+ const gState = str(g.state);
258
+ const gYear = num(g.year);
259
+ const gOconus = strBool(g.isOconus);
260
+ for (const rate of g.rate) {
261
+ const r = (rate ?? {});
262
+ const monthsObj = (r.months ?? {});
263
+ // [P4] months.month MUST be an array (never padded/fabricated to 12).
264
+ if (!Array.isArray(monthsObj.month)) {
265
+ throw driftError(label, "GSA per-diem shape drift — a rate's months.month must be an array.");
266
+ }
267
+ rows.push({
268
+ city: str(r.city),
269
+ county: str(r.county),
270
+ state: gState,
271
+ zip: str(r.zip),
272
+ year: gYear,
273
+ isOconus: gOconus,
274
+ standardRate: strBool(r.standardRate),
275
+ mealsUsd: num(r.meals),
276
+ monthlyLodgingUsd: monthsObj.month.map(mapMonth),
277
+ });
278
+ }
279
+ }
280
+ const returned = rows.length;
281
+ const notes = [RATE_MEANING_NOTE, STANDARD_RATE_NOTE, NO_PAGINATION_NOTE];
282
+ pushKeyNote(notes);
283
+ return withMeta({ rates: rows }, {
284
+ source: GSA_PERDIEM_SOURCE(keyModeLabel()),
285
+ keylessMode: false, // keyed via the api.data.gov X-Api-Key (DEMO_KEY default)
286
+ returned,
287
+ // [P1] the COMPLETE set for the lookup (no pagination) ⇒ totalAvailable = the
288
+ // row count; complete is DERIVED true by buildMeta (returned === total).
289
+ totalAvailable: returned,
290
+ filtersApplied,
291
+ filtersDropped: [],
292
+ fieldsUnavailable: [],
293
+ notes,
294
+ });
295
+ }
296
+ //# sourceMappingURL=gsa-perdiem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gsa-perdiem.js","sourceRoot":"","sources":["../src/gsa-perdiem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAsC,MAAM,WAAW,CAAC;AACzE,+EAA+E;AAC/E,kFAAkF;AAClF,kFAAkF;AAClF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEvE,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC9C,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAC9C,kFAAkF;AAClF,0DAA0D;AAC1D,MAAM,iBAAiB,GAAG,sCAAsC,CAAC;AAEjE,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE,CAC1C,GAAG,gBAAgB,yCAAyC,IAA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AAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7B,MAAM,KAAK,GAAa,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IACpF,WAAW,CAAC,KAAK,CAAC,CAAC;IAEnB,OAAO,QAAQ,CACb,EAAE,KAAK,EAAE,IAAI,EAAE,EACf;QACE,MAAM,EAAE,kBAAkB,CAAC,YAAY,EAAE,CAAC;QAC1C,WAAW,EAAE,KAAK,EAAE,0DAA0D;QAC9E,QAAQ;QACR,8EAA8E;QAC9E,yEAAyE;QACzE,cAAc,EAAE,QAAQ;QACxB,cAAc;QACd,cAAc,EAAE,EAAE;QAClB,iBAAiB,EAAE,EAAE;QACrB,KAAK;KAC0B,CAClC,CAAC;AACJ,CAAC"}
package/dist/keys.d.ts CHANGED
@@ -4,8 +4,8 @@
4
4
  * Why this exists
5
5
  * ----------------
6
6
  * The server rides 31 federal sources. MOST are fully keyless. But the set of
7
- * *optional* keys (raise a rate limit, unlock one filter) plus the two *required*
8
- * keys (Census business-patterns, FRED) has grown to the point where a user — or
7
+ * *optional* keys (raise a rate limit, unlock one filter) plus the four *required*
8
+ * keys (Census business-patterns, FRED, BEA Regional, DOL data) has grown to the point where a user — or
9
9
  * the AI driving the server — cannot tell, without reading source code:
10
10
  * - which env var each source reads,
11
11
  * - whether a key is REQUIRED or merely OPTIONAL,
@@ -19,8 +19,9 @@
19
19
  * Grounding: every `envVar` below is the exact string the code reads via
20
20
  * `process.env.<NAME>` — DATA_GOV_API_KEY (datagovKey.ts), SAM_GOV_API_KEY
21
21
  * (server.ts), BLS_API_KEY (bls.ts), NVD_API_KEY (nvd.ts), SOCRATA_APP_TOKEN
22
- * (socrata.ts), CENSUS_API_KEY (census-economic.ts), FRED_API_KEY (fred.ts).
23
- * No invented keys, sources, or signup URLs.
22
+ * (socrata.ts), CENSUS_API_KEY (census-economic.ts), FRED_API_KEY (fred.ts),
23
+ * BEA_API_KEY (bea.ts), DOL_API_KEY (dol.ts), LDA_API_KEY (lda.ts). No invented
24
+ * keys, sources, or signup URLs.
24
25
  */
25
26
  /** One registry entry describing a single API key the server can use. */
26
27
  export type KeyRegistryEntry = {
@@ -38,11 +39,12 @@ export type KeyRegistryEntry = {
38
39
  note: string;
39
40
  };
40
41
  /**
41
- * The 7 keys the server reads — code-grounded, no inventions.
42
+ * The 10 keys the server reads — code-grounded, no inventions.
42
43
  *
43
- * REQUIRED (2): CENSUS_API_KEY, FRED_API_KEY — those sources have no keyless
44
- * tier, so the tool throws without them. OPTIONAL (5): everything else works
45
- * keyless; a key only raises a rate limit or unlocks a single filter.
44
+ * REQUIRED (4): CENSUS_API_KEY, FRED_API_KEY, BEA_API_KEY, DOL_API_KEY — those sources
45
+ * have no keyless tier, so the tool throws without them (DOL_API_KEY gates ONLY
46
+ * dol_get_dataset; the DOL catalog, dol_list_datasets, is keyless). OPTIONAL (6):
47
+ * everything else works keyless; a key only raises a rate limit or unlocks a single filter.
46
48
  */
47
49
  export declare const KEY_REGISTRY: readonly KeyRegistryEntry[];
48
50
  /** Per-key status: the registry entry + a `currentlySet` boolean. NEVER the value. */
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,yEAAyE;AACzE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAC;IAClB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,E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,CAAC;IAClB,sFAAsF;IACtF,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kDAAkD;IAClD,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,wCAAwC;IACxC,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CAYjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CA4C/C"}
package/dist/keys.js CHANGED
@@ -4,8 +4,8 @@
4
4
  * Why this exists
5
5
  * ----------------
6
6
  * The server rides 31 federal sources. MOST are fully keyless. But the set of
7
- * *optional* keys (raise a rate limit, unlock one filter) plus the two *required*
8
- * keys (Census business-patterns, FRED) has grown to the point where a user — or
7
+ * *optional* keys (raise a rate limit, unlock one filter) plus the four *required*
8
+ * keys (Census business-patterns, FRED, BEA Regional, DOL data) has grown to the point where a user — or
9
9
  * the AI driving the server — cannot tell, without reading source code:
10
10
  * - which env var each source reads,
11
11
  * - whether a key is REQUIRED or merely OPTIONAL,
@@ -19,23 +19,25 @@
19
19
  * Grounding: every `envVar` below is the exact string the code reads via
20
20
  * `process.env.<NAME>` — DATA_GOV_API_KEY (datagovKey.ts), SAM_GOV_API_KEY
21
21
  * (server.ts), BLS_API_KEY (bls.ts), NVD_API_KEY (nvd.ts), SOCRATA_APP_TOKEN
22
- * (socrata.ts), CENSUS_API_KEY (census-economic.ts), FRED_API_KEY (fred.ts).
23
- * No invented keys, sources, or signup URLs.
22
+ * (socrata.ts), CENSUS_API_KEY (census-economic.ts), FRED_API_KEY (fred.ts),
23
+ * BEA_API_KEY (bea.ts), DOL_API_KEY (dol.ts), LDA_API_KEY (lda.ts). No invented
24
+ * keys, sources, or signup URLs.
24
25
  */
25
26
  import { readFileSync } from "node:fs";
26
27
  import { join } from "node:path";
27
28
  /**
28
- * The 7 keys the server reads — code-grounded, no inventions.
29
+ * The 10 keys the server reads — code-grounded, no inventions.
29
30
  *
30
- * REQUIRED (2): CENSUS_API_KEY, FRED_API_KEY — those sources have no keyless
31
- * tier, so the tool throws without them. OPTIONAL (5): everything else works
32
- * keyless; a key only raises a rate limit or unlocks a single filter.
31
+ * REQUIRED (4): CENSUS_API_KEY, FRED_API_KEY, BEA_API_KEY, DOL_API_KEY — those sources
32
+ * have no keyless tier, so the tool throws without them (DOL_API_KEY gates ONLY
33
+ * dol_get_dataset; the DOL catalog, dol_list_datasets, is keyless). OPTIONAL (6):
34
+ * everything else works keyless; a key only raises a rate limit or unlocks a single filter.
33
35
  */
34
36
  export const KEY_REGISTRY = [
35
37
  {
36
38
  envVar: "DATA_GOV_API_KEY",
37
39
  sources: [
38
- "api.data.gov keyed sources: Regulations.gov, Congress.gov, GovInfo, Federal Audit Clearinghouse (FAC), data.gov catalog",
40
+ "api.data.gov keyed sources: Regulations.gov, Congress.gov, GovInfo, Federal Audit Clearinghouse (FAC), data.gov catalog, GSA per-diem",
39
41
  ],
40
42
  required: false,
41
43
  signupUrl: "https://api.data.gov/signup/",
@@ -90,6 +92,32 @@ export const KEY_REGISTRY = [
90
92
  unlocks: "the 2 FRED tools (there is no keyless tier — they throw without a key)",
91
93
  note: "REQUIRED: the FRED API has no keyless access.",
92
94
  },
95
+ {
96
+ envVar: "BEA_API_KEY",
97
+ sources: ["BEA Regional Economic Accounts (bea_regional_data)"],
98
+ required: true,
99
+ signupUrl: "https://apps.bea.gov/API/signup/",
100
+ unlocks: "the bea_regional_data tool (there is no keyless tier — it throws without a key)",
101
+ note: "REQUIRED: the BEA Data API has no keyless access.",
102
+ },
103
+ {
104
+ envVar: "DOL_API_KEY",
105
+ sources: [
106
+ "US DOL enforcement data (dol_get_dataset; dol_list_datasets is keyless)",
107
+ ],
108
+ required: true,
109
+ signupUrl: "https://dol.gov/developer",
110
+ unlocks: "the dol_get_dataset tool (dataset records need a free key; dol_list_datasets works keyless)",
111
+ note: "The DOL data endpoint needs a free key; the dataset CATALOG (dol_list_datasets) and agency list are keyless.",
112
+ },
113
+ {
114
+ envVar: "LDA_API_KEY",
115
+ sources: ["US Senate LDA lobbying (lda_search_filings)"],
116
+ required: false,
117
+ signupUrl: "https://lda.senate.gov/api/register/",
118
+ unlocks: "higher LDA API rate limits (anonymous access already works without it)",
119
+ note: "Keyless by default (anonymous 200); a free token only raises the rate limit.",
120
+ },
93
121
  ];
94
122
  /** true iff the env var is set to a non-empty (after-trim) string. */
95
123
  function isSet(envVar) {
package/dist/keys.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAkBjC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgC;IACvD;QACE,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE;YACP,yHAAyH;SAC1H;QACD,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,8BAA8B;QACzC,OAAO,EACL,0GAA0G;QAC5G,IAAI,EAAE,mLAAmL;KAC1L;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,OAAO,EAAE,CAAC,uBAAuB,CAAC;QAClC,QAAQ,EAAE,KAAK;QACf,SAAS,EACP,wDAAwD;QAC1D,OAAO,EACL,wEAAwE;QAC1E,IAAI,EAAE,mIAAmI;KAC1I;IACD;QACE,MAAM,EAAE,aAAa;QACrB,OAAO,EAAE,CAAC,kCAAkC,CAAC;QAC7C,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,0CAA0C;QACrD,OAAO,EACL,oGAAoG;QACtG,IAAI,EAAE,0EAA0E;KACjF;IACD;QACE,MAAM,EAAE,aAAa;QACrB,OAAO,EAAE,CAAC,uBAAuB,CAAC;QAClC,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,o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rC,IAAI,CAAC,GAAG;YAAE,SAAS;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACtC,sDAAsD;QACtD,IACE,KAAK,CAAC,MAAM,IAAI,CAAC;YACjB,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBAC7C,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EACjD,CAAC;YACD,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QAED,2EAA2E;QAC3E,iEAAiE;QACjE,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS;YAAE,SAAS;QAC7C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACzB,MAAM,EAAE,CAAC;IACX,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/dist/lda.d.ts ADDED
@@ -0,0 +1,105 @@
1
+ /**
2
+ * lda.ts — US Senate LDA (Lobbying Disclosure Act) filings — the LOBBYING / B2G
3
+ * influence lane (ADR-0052). Who is paid HOW MUCH to lobby WHICH federal agency
4
+ * on WHICH issue — the registrant→client→government-entity signal that no
5
+ * contract/spending/grant source carries.
6
+ *
7
+ * ★ THIS IS A KEYLESS SOURCE WITH AN OPTIONAL KEY (the socrata.ts app-token
8
+ * lineage, NOT the census/fred/bea key-required lineage). The LDA REST API
9
+ * (lda.senate.gov/api/v1) serves anonymous GETs at HTTP 200 — it works with NO
10
+ * key. A free `LDA_API_KEY` only RAISES the shared rate limit; when set it rides
11
+ * ONLY as the `Authorization: Token <value>` request header (never the
12
+ * URL/label/_meta/notes/log — the K-test). When unset, NO auth header is sent
13
+ * (genuine keyless). This mirrors socrata's optional `X-App-Token` discipline.
14
+ *
15
+ * The module writes ZERO fetch/coercion/error/meta code of its own: it REUSES
16
+ * `getJson` (the shared fetch envelope, redirect:"error") / `driftError` /
17
+ * `num`·`str` (coerce.ts, null-never-0/empty) / `withMeta`·`buildMeta`.
18
+ *
19
+ * GET https://lda.senate.gov/api/v1/filings/
20
+ * ?filing_year=&filing_type=&registrant_name=&client_name=&lobbyist_name=
21
+ * &filing_specific_lobbying_issues=&government_entity=&page=&page_size=
22
+ * → { count, next, previous, results:[{ filing_uuid, filing_type,
23
+ * filing_type_display, filing_year, filing_period, filing_period_display,
24
+ * filing_document_url, income, expenses, dt_posted, termination_date,
25
+ * registrant:{name,…}|string, client:{name,…}|string,
26
+ * lobbying_activities:[{ general_issue_code, general_issue_code_display,
27
+ * description, government_entities:[{ name }] }], … }] }
28
+ *
29
+ * ★ HONESTY (ADR-0052 P1–P5):
30
+ * [P1] `count` is the API's REAL total (~1.95M) ⇒ totalAvailable = num(count),
31
+ * NEVER results.length. Page-based pagination (page/page_size, 1-based):
32
+ * returned = results.length, hasMore = page*pageSize < count, and the next
33
+ * page number is surfaced in a note. Reverting totalAvailable to
34
+ * results.length must go RED.
35
+ * [P2] getJson → fetchWithRetry taxonomy: a 400 (bad filter/param) ⇒
36
+ * invalid_input SURFACING the API's error body (re-read once on the error
37
+ * path); a 5xx/timeout ⇒ upstream_unavailable THROW; a 429 ⇒ rate_limited
38
+ * THROW honoring Retry-After (NEVER routed around); a genuine no-match
39
+ * (results:[]) ⇒ honest empty (returned:0); a 200 non-JSON ⇒ schema_drift.
40
+ * [P3] `income`/`expenses` are null-or-decimal-string ⇒ num() (null ⇒ null — NOT
41
+ * reported ≠ 0; a genuine "0" stays 0). A missing `lobbying_activities` /
42
+ * `government_entities` ⇒ empty arrays (never fabricated).
43
+ * [P4] `results` non-array or `count` non-number ⇒ driftError (never a
44
+ * fabricated empty/total).
45
+ * [SSRF] fixed host `lda.senate.gov`; a post-construction hostname/protocol
46
+ * assert + `redirect:"error"`; every filter VALUE rides URLSearchParams;
47
+ * `filingYear` / `page` / `pageSize` are charclass/range-guarded pre-fetch.
48
+ */
49
+ import { num } from "./coerce.js";
50
+ import { type MetaBundle } from "./meta.js";
51
+ export { num };
52
+ export declare const LDA_HOST = "lda.senate.gov";
53
+ /**
54
+ * The optional Authorization header (keyless-first, socrata app-token lineage).
55
+ * Present ONLY when LDA_API_KEY is set (non-blank); the value is NEVER logged /
56
+ * never placed in the URL, label, `_meta`, or a note. When unset, `{}` (no header).
57
+ */
58
+ export declare function ldaAuthHeader(): Record<string, string>;
59
+ /** true iff an LDA API key is configured (for the `_meta` note — never the value). */
60
+ export declare function ldaKeyPresent(): boolean;
61
+ export type LdaLobbyingActivity = {
62
+ issueCode: string | null;
63
+ description: string | null;
64
+ governmentEntities: string[];
65
+ };
66
+ export type LdaFiling = {
67
+ filingUuid: string | null;
68
+ filingType: string | null;
69
+ filingYear: number | null;
70
+ filingPeriod: string | null;
71
+ incomeUsd: number | null;
72
+ expensesUsd: number | null;
73
+ registrant: string | null;
74
+ client: string | null;
75
+ lobbyingActivities: LdaLobbyingActivity[];
76
+ documentUrl: string | null;
77
+ postedDate: string | null;
78
+ terminationDate: string | null;
79
+ };
80
+ /**
81
+ * The registrant/client value may be an OBJECT carrying `name` (with address
82
+ * fields) OR a plain string. Defensively resolve either to the display name (or
83
+ * null when absent) — never fabricate, never surface the whole address object.
84
+ */
85
+ export declare function nameOf(x: unknown): string | null;
86
+ export type LdaSearchFilingsArgs = {
87
+ registrantName?: string;
88
+ clientName?: string;
89
+ lobbyistName?: string;
90
+ filingYear?: string;
91
+ filingType?: string;
92
+ agency?: string;
93
+ issue?: string;
94
+ page?: number;
95
+ pageSize?: number;
96
+ };
97
+ /**
98
+ * Search US Senate LDA lobbying filings (`/api/v1/filings/`) → curated filing rows
99
+ * + honest `_meta`. KEYLESS (an optional LDA_API_KEY only raises the rate limit,
100
+ * sent as the Authorization header only). ★totalAvailable is the API's REAL `count`
101
+ * (~1.95M corpus) — never results.length; page-based pagination. income/expenses
102
+ * null-or-decimal-string → null-never-0.
103
+ */
104
+ export declare function searchFilings(args: LdaSearchFilingsArgs): Promise<MetaBundle>;
105
+ //# sourceMappingURL=lda.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lda.d.ts","sourceRoot":"","sources":["../src/lda.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAIH,OAAO,EAAE,GAAG,EAAO,MAAM,aAAa,CAAC;AACvC,OAAO,EAAY,KAAK,UAAU,EAAqB,MAAM,WAAW,CAAC;AAIzE,OAAO,EAAE,GAAG,EAAE,CAAC;AAGf,eAAO,MAAM,QAAQ,mBAAmB,CAAC;AAqBzC;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAItD;AAED,sFAAsF;AACtF,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAGD,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kBAAkB,EAAE,mBAAmB,EAAE,CAA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