@cliwant/mcp-sam-gov 1.4.0 → 1.5.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 (82) hide show
  1. package/README.ja.md +11 -11
  2. package/README.ko.md +11 -11
  3. package/README.md +21 -13
  4. package/dist/cbp-border.d.ts +51 -0
  5. package/dist/cbp-border.d.ts.map +1 -0
  6. package/dist/cbp-border.js +123 -0
  7. package/dist/cbp-border.js.map +1 -0
  8. package/dist/datagov-catalog.d.ts.map +1 -1
  9. package/dist/datagov-catalog.js +16 -2
  10. package/dist/datagov-catalog.js.map +1 -1
  11. package/dist/ecfr.d.ts +2 -2
  12. package/dist/ecfr.d.ts.map +1 -1
  13. package/dist/ecfr.js +24 -10
  14. package/dist/ecfr.js.map +1 -1
  15. package/dist/edgar.d.ts.map +1 -1
  16. package/dist/edgar.js +26 -6
  17. package/dist/edgar.js.map +1 -1
  18. package/dist/epa-envirofacts.d.ts.map +1 -1
  19. package/dist/epa-envirofacts.js +14 -1
  20. package/dist/epa-envirofacts.js.map +1 -1
  21. package/dist/errors.d.ts.map +1 -1
  22. package/dist/errors.js +11 -0
  23. package/dist/errors.js.map +1 -1
  24. package/dist/far.d.ts.map +1 -1
  25. package/dist/far.js +3 -1
  26. package/dist/far.js.map +1 -1
  27. package/dist/federal-register.d.ts +2 -2
  28. package/dist/federal-register.d.ts.map +1 -1
  29. package/dist/federal-register.js +26 -10
  30. package/dist/federal-register.js.map +1 -1
  31. package/dist/fema.d.ts +36 -0
  32. package/dist/fema.d.ts.map +1 -1
  33. package/dist/fema.js +124 -0
  34. package/dist/fema.js.map +1 -1
  35. package/dist/gov-domains.d.ts +66 -0
  36. package/dist/gov-domains.d.ts.map +1 -0
  37. package/dist/gov-domains.js +211 -0
  38. package/dist/gov-domains.js.map +1 -0
  39. package/dist/nist-controls.d.ts +48 -0
  40. package/dist/nist-controls.d.ts.map +1 -0
  41. package/dist/nist-controls.js +174 -0
  42. package/dist/nist-controls.js.map +1 -0
  43. package/dist/nws-weather.d.ts +57 -0
  44. package/dist/nws-weather.d.ts.map +1 -0
  45. package/dist/nws-weather.js +131 -0
  46. package/dist/nws-weather.js.map +1 -0
  47. package/dist/openfda-drugsfda.d.ts +72 -0
  48. package/dist/openfda-drugsfda.d.ts.map +1 -0
  49. package/dist/openfda-drugsfda.js +230 -0
  50. package/dist/openfda-drugsfda.js.map +1 -0
  51. package/dist/openfda.d.ts.map +1 -1
  52. package/dist/openfda.js +31 -8
  53. package/dist/openfda.js.map +1 -1
  54. package/dist/server.d.ts.map +1 -1
  55. package/dist/server.js +331 -10
  56. package/dist/server.js.map +1 -1
  57. package/dist/treasury.d.ts +2 -0
  58. package/dist/treasury.d.ts.map +1 -1
  59. package/dist/treasury.js +7 -0
  60. package/dist/treasury.js.map +1 -1
  61. package/dist/usaspending.d.ts +32 -1
  62. package/dist/usaspending.d.ts.map +1 -1
  63. package/dist/usaspending.js +143 -16
  64. package/dist/usaspending.js.map +1 -1
  65. package/package.json +2 -2
  66. package/src/cbp-border.ts +177 -0
  67. package/src/datagov-catalog.ts +18 -2
  68. package/src/ecfr.ts +27 -10
  69. package/src/edgar.ts +39 -7
  70. package/src/epa-envirofacts.ts +17 -1
  71. package/src/errors.ts +11 -0
  72. package/src/far.ts +3 -1
  73. package/src/federal-register.ts +29 -10
  74. package/src/fema.ts +139 -0
  75. package/src/gov-domains.ts +237 -0
  76. package/src/nist-controls.ts +219 -0
  77. package/src/nws-weather.ts +167 -0
  78. package/src/openfda-drugsfda.ts +313 -0
  79. package/src/openfda.ts +30 -7
  80. package/src/server.ts +352 -10
  81. package/src/treasury.ts +7 -0
  82. package/src/usaspending.ts +189 -17
@@ -0,0 +1,219 @@
1
+ /**
2
+ * nist-controls.ts — NIST SP 800-53 Rev 5 security & privacy CONTROLS catalog
3
+ * (OSCAL, keyless). The cyber-compliance controls backbone for FedRAMP / CMMC / RMF
4
+ * work: look up a control (AC-2, SC-7, …) or a family (Access Control, System &
5
+ * Communications Protection, …) and get its title, requirement STATEMENT, discussion
6
+ * guidance, and control enhancements. No other tool here exposes the controls catalog
7
+ * (we have NVD CVEs + CISA KEV, but not the requirement side).
8
+ *
9
+ * SOURCE: NIST's OFFICIAL OSCAL content, published at github.com/usnistgov/oscal-content
10
+ * (the canonical machine-readable release; the .gov PDF is the human copy). NOT a
11
+ * .gov API host, so provenance is disclosed on every response (the ProPublica /
12
+ * CourtListener / get.gov republisher idiom — here NIST is the first-party author).
13
+ *
14
+ * PATTERN: the CISA-KEV static-file idiom (nvd.ts) — a fixed-host const URL fetched
15
+ * via getJson (redirect:"error" + 30s timeout), memoized 6h, with a plausibility
16
+ * FLOOR (a truncated catalog must NEVER read as "control not found"), then
17
+ * client-side filter/lookup. An outage/4xx/timeout THROWS (never a fake empty).
18
+ *
19
+ * SSRF: fixed host `raw.githubusercontent.com` + a fixed, pinned path (no free
20
+ * host/path). Filtering is CLIENT-SIDE over the parsed catalog.
21
+ */
22
+
23
+ import { getJson, driftError } from "./datasource.js";
24
+ import { memoize } from "./cache.js";
25
+ import { withMeta, type MetaBundle, type ResponseMeta } from "./meta.js";
26
+
27
+ export const OSCAL_HOST = "raw.githubusercontent.com";
28
+ const OSCAL_URL =
29
+ "https://raw.githubusercontent.com/usnistgov/oscal-content/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_catalog.json";
30
+ const OSCAL_LABEL = "nist-oscal:sp800-53r5";
31
+ const OSCAL_TIMEOUT_MS = 30_000;
32
+ const OSCAL_CACHE_TTL_MS = 6 * 60 * 60 * 1000;
33
+ // Plausibility floor: 800-53 Rev5 has 20 control families and ~1000 controls. A
34
+ // truncated catalog with far fewer must THROW, never read as "control not found".
35
+ const FAMILY_FLOOR = 15;
36
+
37
+ const PROVENANCE_NOTE =
38
+ "Source: NIST SP 800-53 Rev 5 OSCAL catalog, published at github.com/usnistgov/oscal-content (NIST's canonical machine-readable release; authoritative first-party data served from GitHub, not a .gov API host).";
39
+ const CLIENT_FILTER_NOTE =
40
+ "The catalog has no query API — the full published OSCAL JSON is fetched (cached 6h) and filtered CLIENT-SIDE (controlId exact, family exact, keyword = case-insensitive substring over title+statement). totalAvailable is the EXACT match count.";
41
+ const REFERENCE_NOTE =
42
+ "This is the REQUIREMENT catalog (control text), NOT an assessment or an authorization. A control's applicability depends on the system's FIPS-199 impact baseline (Low/Moderate/High) and overlay — which this catalog does not encode.";
43
+
44
+ // ─── Parsed shapes ────────────────────────────────────────────────
45
+ export type NistControl = {
46
+ id: string; // display form, e.g. "AC-2"
47
+ family: string; // e.g. "AC — Access Control"
48
+ title: string;
49
+ statement: string; // assembled requirement prose (labelled, multi-line)
50
+ guidance: string | null; // discussion prose
51
+ enhancements: { id: string; title: string }[]; // e.g. AC-2(1)
52
+ };
53
+
54
+ type OscalPart = {
55
+ name?: string;
56
+ prose?: string;
57
+ props?: { name?: string; value?: string }[];
58
+ parts?: OscalPart[];
59
+ };
60
+ type OscalControl = {
61
+ id?: string;
62
+ title?: string;
63
+ parts?: OscalPart[];
64
+ controls?: OscalControl[];
65
+ };
66
+ type OscalGroup = { id?: string; title?: string; controls?: OscalControl[] };
67
+
68
+ /** OSCAL control id ("ac-2", "ac-2.1") → display id ("AC-2", "AC-2(1)"). */
69
+ function displayId(rawId: string): string {
70
+ const m = /^([a-z]+)-(\d+)(?:\.(\d+))?$/i.exec(rawId.trim());
71
+ if (!m) return rawId.toUpperCase();
72
+ const fam = (m[1] ?? "").toUpperCase();
73
+ // Strip leading zeros so a zero-padded input ('AC-02') normalizes to the catalog's
74
+ // canonical unpadded form ('AC-2') — else an exact controlId lookup would miss.
75
+ const num = String(Number(m[2] ?? "0"));
76
+ const enh = m[3] !== undefined ? String(Number(m[3])) : undefined;
77
+ return enh !== undefined ? `${fam}-${num}(${enh})` : `${fam}-${num}`;
78
+ }
79
+
80
+ /** Recursively collect a statement part's prose as labelled, indented lines. */
81
+ function collectProse(part: OscalPart, depth: number, out: string[]): void {
82
+ const label = part.props?.find((p) => p.name === "label")?.value;
83
+ const indent = " ".repeat(depth);
84
+ const prefix = label ? `${label} ` : "";
85
+ if (part.prose && part.prose.trim().length > 0) {
86
+ out.push(`${indent}${prefix}${part.prose.trim()}`);
87
+ } else if (label) {
88
+ out.push(`${indent}${prefix}`.trimEnd());
89
+ }
90
+ for (const sub of part.parts ?? []) collectProse(sub, depth + 1, out);
91
+ }
92
+
93
+ function partProse(control: OscalControl, name: string): string | null {
94
+ const part = (control.parts ?? []).find((p) => p.name === name);
95
+ if (!part) return null;
96
+ const out: string[] = [];
97
+ collectProse(part, 0, out);
98
+ const text = out.join("\n").trim();
99
+ return text.length > 0 ? text : null;
100
+ }
101
+
102
+ function mapControl(control: OscalControl, family: string): NistControl {
103
+ return {
104
+ id: displayId(control.id ?? ""),
105
+ family,
106
+ title: (control.title ?? "").trim(),
107
+ statement: partProse(control, "statement") ?? "",
108
+ guidance: partProse(control, "guidance"),
109
+ enhancements: (control.controls ?? []).map((e) => ({
110
+ id: displayId(e.id ?? ""),
111
+ title: (e.title ?? "").trim(),
112
+ })),
113
+ };
114
+ }
115
+
116
+ /**
117
+ * Fetch + parse the OSCAL catalog into a flat list of TOP-LEVEL controls, memoized
118
+ * 6h. Header/shape guarded: `catalog.groups` MUST be an array with ≥ FAMILY_FLOOR
119
+ * families (else driftError — a truncated catalog is NEVER a fake empty). Enhancements
120
+ * are carried on each control (not indexed as top-level entries).
121
+ */
122
+ async function loadControls(): Promise<NistControl[]> {
123
+ return memoize(
124
+ "nist:sp800-53r5",
125
+ async () => {
126
+ const built = new URL(OSCAL_URL);
127
+ if (built.hostname !== OSCAL_HOST || built.protocol !== "https:") {
128
+ throw driftError(OSCAL_LABEL, `Constructed OSCAL URL host ${JSON.stringify(built.hostname)} is not ${OSCAL_HOST} over https — refusing to fetch (SSRF safety).`);
129
+ }
130
+ const body = (await getJson(OSCAL_URL, {
131
+ label: OSCAL_LABEL,
132
+ redirect: "error",
133
+ timeoutMs: OSCAL_TIMEOUT_MS,
134
+ })) as { catalog?: { groups?: unknown } };
135
+ const groups = body.catalog?.groups;
136
+ if (!Array.isArray(groups) || groups.length < FAMILY_FLOOR) {
137
+ throw driftError(
138
+ OSCAL_LABEL,
139
+ `OSCAL catalog.groups missing or implausibly small (${Array.isArray(groups) ? groups.length : "not-an-array"} < ${FAMILY_FLOOR} families) — treating as schema drift / truncation, never a fake-empty catalog.`,
140
+ );
141
+ }
142
+ const controls: NistControl[] = [];
143
+ for (const g of groups as OscalGroup[]) {
144
+ const family = `${(g.id ?? "").toUpperCase()} — ${(g.title ?? "").trim()}`;
145
+ for (const c of g.controls ?? []) controls.push(mapControl(c, family));
146
+ }
147
+ return controls;
148
+ },
149
+ OSCAL_CACHE_TTL_MS,
150
+ );
151
+ }
152
+
153
+ // ─── Tool: nist_800_53_controls ───────────────────────────────────
154
+ /**
155
+ * Look up NIST SP 800-53 Rev 5 controls by controlId (exact, e.g. "AC-2"), family
156
+ * (exact family letter or name, e.g. "AC" / "Access Control"), and/or keyword
157
+ * (case-insensitive substring over title + statement). Client-side filters over the
158
+ * cached OSCAL catalog; honest `_meta` (exact match total; provenance disclosed).
159
+ */
160
+ export async function searchControls(args: {
161
+ controlId?: string;
162
+ family?: string;
163
+ keyword?: string;
164
+ limit?: number;
165
+ offset?: number;
166
+ }): Promise<MetaBundle> {
167
+ const limit = args.limit ?? 25;
168
+ const offset = args.offset ?? 0;
169
+ const all = await loadControls();
170
+
171
+ const filtersApplied: string[] = [];
172
+ const idQ = args.controlId !== undefined ? displayId(args.controlId) : undefined;
173
+ const famQ = args.family?.trim().toLowerCase();
174
+ const kwQ = args.keyword?.trim().toLowerCase();
175
+ if (args.controlId !== undefined) filtersApplied.push("controlId");
176
+ if (args.family !== undefined) filtersApplied.push("family");
177
+ if (args.keyword !== undefined) filtersApplied.push("keyword");
178
+
179
+ const matched = all.filter((c) => {
180
+ if (idQ && c.id.toUpperCase() !== idQ.toUpperCase()) return false;
181
+ if (famQ) {
182
+ // family field is "AC — Access Control"; match either the letter code or a
183
+ // substring of the title (both case-insensitive).
184
+ const fam = c.family.toLowerCase();
185
+ const code = (fam.split("—")[0] ?? "").trim();
186
+ if (code !== famQ && !fam.includes(famQ)) return false;
187
+ }
188
+ if (kwQ) {
189
+ // Search the title + requirement statement AND each enhancement's title, so a
190
+ // term that lives only in an enhancement (e.g. "multi-factor" → IA-2(1)) still
191
+ // surfaces the parent control. filtersApplied still lists 'keyword'.
192
+ const hay = `${c.title}\n${c.statement}\n${c.enhancements.map((e) => e.title).join("\n")}`.toLowerCase();
193
+ if (!hay.includes(kwQ)) return false;
194
+ }
195
+ return true;
196
+ });
197
+
198
+ const totalAvailable = matched.length;
199
+ const page = matched.slice(offset, offset + limit);
200
+ const returned = page.length;
201
+ const hasMore = offset + returned < totalAvailable;
202
+ const nextOffset = hasMore ? offset + returned : null;
203
+
204
+ return withMeta(
205
+ { controls: page },
206
+ {
207
+ source: "NIST SP 800-53 Rev 5 (OSCAL catalog, keyless)",
208
+ keylessMode: true,
209
+ returned,
210
+ totalAvailable,
211
+ truncated: hasMore,
212
+ filtersApplied,
213
+ filtersDropped: [],
214
+ fieldsUnavailable: [],
215
+ pagination: { offset, limit, hasMore, nextOffset },
216
+ notes: [PROVENANCE_NOTE, CLIENT_FILTER_NOTE, REFERENCE_NOTE],
217
+ } satisfies Partial<ResponseMeta>,
218
+ );
219
+ }
@@ -0,0 +1,167 @@
1
+ /**
2
+ * nws-weather.ts — National Weather Service active alerts (api.weather.gov, KEYLESS)
3
+ * — the DISASTER / CLIMATE-READINESS lane. Current watches, warnings, and advisories
4
+ * (event, severity, urgency, area, effective/expires window, instructions). Pairs
5
+ * directly with the FEMA tools (disaster declarations → public assistance → hazard
6
+ * mitigation → LIVE active weather) to complete a disaster-response-readiness view:
7
+ * where severe-weather events are active NOW, ahead of the declarations/contracts
8
+ * that follow.
9
+ *
10
+ * SOURCE: NWS api.weather.gov (a .gov host), keyless. Requires a descriptive
11
+ * User-Agent (NWS policy) — sent from a fixed constant; no token. Returns a GeoJSON
12
+ * FeatureCollection. This is REAL-TIME data (currently-active alerts) — freshness is
13
+ * disclosed and never implied to be a historical series.
14
+ *
15
+ * HONESTY: fixed host + redirect:"error" (SSRF); `state` is a 2-letter charclass (the
16
+ * server-side ?area= filter); event/severity are applied CLIENT-SIDE over the returned
17
+ * set; a non-FeatureCollection / non-array body ⇒ driftError; an outage/4xx/timeout
18
+ * THROWS. A genuine no-active-alerts result ⇒ an HONEST EMPTY (returned:0), never an
19
+ * error. totalAvailable = the EXACT count of matched active alerts. Every scalar via
20
+ * `str` (null-never-empty-string); dates preserved as ISO strings.
21
+ */
22
+
23
+ import { ToolErrorCarrier } from "./errors.js";
24
+ import { getJson, driftError } from "./datasource.js";
25
+ import { str } from "./coerce.js";
26
+ import { withMeta, type MetaBundle, type ResponseMeta } from "./meta.js";
27
+
28
+ export const NWS_HOST = "api.weather.gov";
29
+ const NWS_ACTIVE_URL = "https://api.weather.gov/alerts/active";
30
+ const NWS_LABEL = "nws:/alerts/active";
31
+ const NWS_TIMEOUT_MS = 15_000;
32
+ // NWS asks every client to send a descriptive User-Agent (with contact). No token.
33
+ const NWS_USER_AGENT = "cliwant-mcp-sam-gov (https://github.com/cliwant/mcp-sam-gov)";
34
+ const STATE_RE = /^[A-Za-z]{2}$/;
35
+
36
+ const PROVENANCE_NOTE =
37
+ "Source: NWS api.weather.gov active-alerts feed (keyless; a descriptive User-Agent is sent per NWS policy).";
38
+ const FRESHNESS_NOTE =
39
+ "REAL-TIME: these are the alerts ACTIVE at request time (a live snapshot, not a historical archive). Read effective/onset/expires/ends for each alert's window; an expired alert is not returned. A no-active-alerts result is an HONEST empty (returned:0), never an error.";
40
+
41
+ export type NwsAlert = {
42
+ id: string | null;
43
+ event: string | null; // e.g. "Wind Advisory", "Flood Warning"
44
+ headline: string | null;
45
+ severity: string | null; // Extreme | Severe | Moderate | Minor | Unknown
46
+ urgency: string | null; // Immediate | Expected | Future | Past | Unknown
47
+ certainty: string | null;
48
+ category: string | null;
49
+ status: string | null; // Actual | Exercise | Test | …
50
+ messageType: string | null; // Alert | Update | Cancel
51
+ areaDesc: string | null;
52
+ effective: string | null;
53
+ onset: string | null;
54
+ expires: string | null;
55
+ ends: string | null;
56
+ senderName: string | null;
57
+ description: string | null;
58
+ instruction: string | null;
59
+ response: string | null;
60
+ };
61
+
62
+ function mapAlert(feature: unknown): NwsAlert {
63
+ const p = ((feature ?? {}) as { properties?: Record<string, unknown> }).properties ?? {};
64
+ return {
65
+ id: str(p.id),
66
+ event: str(p.event),
67
+ headline: str(p.headline),
68
+ severity: str(p.severity),
69
+ urgency: str(p.urgency),
70
+ certainty: str(p.certainty),
71
+ category: str(p.category),
72
+ status: str(p.status),
73
+ messageType: str(p.messageType),
74
+ areaDesc: str(p.areaDesc),
75
+ effective: str(p.effective),
76
+ onset: str(p.onset),
77
+ expires: str(p.expires),
78
+ ends: str(p.ends),
79
+ senderName: str(p.senderName),
80
+ description: str(p.description),
81
+ instruction: str(p.instruction),
82
+ response: str(p.response),
83
+ };
84
+ }
85
+
86
+ async function loadActiveAlerts(state: string | undefined): Promise<NwsAlert[]> {
87
+ const params = new URLSearchParams();
88
+ if (state !== undefined) params.set("area", state.toUpperCase());
89
+ const url = params.toString() ? `${NWS_ACTIVE_URL}?${params.toString()}` : NWS_ACTIVE_URL;
90
+ const built = new URL(url);
91
+ if (built.hostname !== NWS_HOST || built.protocol !== "https:") {
92
+ throw driftError(NWS_LABEL, `Constructed NWS URL host ${JSON.stringify(built.hostname)} is not ${NWS_HOST} over https — refusing to fetch (SSRF safety).`);
93
+ }
94
+ const body = (await getJson(url, {
95
+ label: NWS_LABEL,
96
+ redirect: "error",
97
+ timeoutMs: NWS_TIMEOUT_MS,
98
+ headers: { "User-Agent": NWS_USER_AGENT, Accept: "application/geo+json" },
99
+ })) as { type?: unknown; features?: unknown };
100
+ if (body.type !== "FeatureCollection" || !Array.isArray(body.features)) {
101
+ throw driftError(NWS_LABEL, "NWS active-alerts body is not a GeoJSON FeatureCollection with a features[] array — schema drift, never a fake-empty result.");
102
+ }
103
+ return (body.features as unknown[]).map(mapAlert);
104
+ }
105
+
106
+ // ─── Tool: nws_active_alerts ──────────────────────────────────────
107
+ /**
108
+ * List CURRENTLY-ACTIVE NWS weather alerts, optionally scoped by `state` (server-side
109
+ * ?area=) and filtered client-side by `event` (substring) and/or `severity` (exact).
110
+ * Honest `_meta` (exact match total + real-time freshness; a no-alerts result is an
111
+ * honest empty).
112
+ */
113
+ export async function activeAlerts(args: {
114
+ state?: string;
115
+ event?: string;
116
+ severity?: string;
117
+ limit?: number;
118
+ offset?: number;
119
+ }): Promise<MetaBundle> {
120
+ if (args.state !== undefined && !STATE_RE.test(args.state)) {
121
+ throw new ToolErrorCarrier({
122
+ kind: "invalid_input",
123
+ retryable: false,
124
+ message: `Invalid state ${JSON.stringify(args.state)} — expected a 2-letter US state/territory code (^[A-Za-z]{2}$), e.g. "CA".`,
125
+ upstreamEndpoint: NWS_LABEL,
126
+ });
127
+ }
128
+ const limit = args.limit ?? 50;
129
+ const offset = args.offset ?? 0;
130
+
131
+ const all = await loadActiveAlerts(args.state);
132
+
133
+ const filtersApplied: string[] = [];
134
+ if (args.state !== undefined) filtersApplied.push("state");
135
+ const eventQ = args.event?.trim().toLowerCase();
136
+ const sevQ = args.severity?.trim().toLowerCase();
137
+ if (args.event !== undefined) filtersApplied.push("event");
138
+ if (args.severity !== undefined) filtersApplied.push("severity");
139
+
140
+ const matched = all.filter((a) => {
141
+ if (eventQ && !(a.event ?? "").toLowerCase().includes(eventQ)) return false;
142
+ if (sevQ && (a.severity ?? "").toLowerCase() !== sevQ) return false;
143
+ return true;
144
+ });
145
+
146
+ const totalAvailable = matched.length;
147
+ const page = matched.slice(offset, offset + limit);
148
+ const returned = page.length;
149
+ const hasMore = offset + returned < totalAvailable;
150
+ const nextOffset = hasMore ? offset + returned : null;
151
+
152
+ return withMeta(
153
+ { alerts: page },
154
+ {
155
+ source: "api.weather.gov active alerts (NWS, keyless)",
156
+ keylessMode: true,
157
+ returned,
158
+ totalAvailable,
159
+ truncated: hasMore,
160
+ filtersApplied,
161
+ filtersDropped: [],
162
+ fieldsUnavailable: [],
163
+ pagination: { offset, limit, hasMore, nextOffset },
164
+ notes: [PROVENANCE_NOTE, FRESHNESS_NOTE],
165
+ } satisfies Partial<ResponseMeta>,
166
+ );
167
+ }