@cyanheads/federal-regulations-mcp-server 0.2.4 → 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.
- package/AGENTS.md +21 -14
- package/CLAUDE.md +21 -14
- package/README.md +100 -131
- package/changelog/0.2.x/0.2.5.md +23 -0
- package/changelog/0.3.x/0.3.0.md +27 -0
- package/changelog/template.md +9 -26
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/resources/definitions/cfr-section.resource.d.ts +1 -0
- package/dist/mcp-server/resources/definitions/cfr-section.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/cfr-section.resource.js +1 -0
- package/dist/mcp-server/resources/definitions/cfr-section.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/document.resource.js +1 -1
- package/dist/mcp-server/resources/definitions/document.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/index.d.ts +1 -0
- package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts +3 -0
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.js +3 -0
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/date-input.d.ts +14 -0
- package/dist/mcp-server/tools/definitions/date-input.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/date-input.js +27 -0
- package/dist/mcp-server/tools/definitions/date-input.js.map +1 -0
- package/dist/mcp-server/tools/definitions/find-comments.tool.d.ts +2 -0
- package/dist/mcp-server/tools/definitions/find-comments.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/find-comments.tool.js +2 -0
- package/dist/mcp-server/tools/definitions/find-comments.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/format-utils.d.ts +20 -1
- package/dist/mcp-server/tools/definitions/format-utils.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/format-utils.js +22 -2
- package/dist/mcp-server/tools/definitions/format-utils.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts +1 -0
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js +1 -0
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-docket.tool.d.ts +3 -0
- package/dist/mcp-server/tools/definitions/get-docket.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-docket.tool.js +3 -0
- package/dist/mcp-server/tools/definitions/get-docket.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-document.tool.d.ts +23 -4
- package/dist/mcp-server/tools/definitions/get-document.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-document.tool.js +88 -11
- package/dist/mcp-server/tools/definitions/get-document.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +142 -83
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-open-comments.tool.d.ts +26 -6
- package/dist/mcp-server/tools/definitions/list-open-comments.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-open-comments.tool.js +107 -56
- package/dist/mcp-server/tools/definitions/list-open-comments.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-rules.tool.d.ts +18 -3
- package/dist/mcp-server/tools/definitions/search-rules.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-rules.tool.js +38 -26
- package/dist/mcp-server/tools/definitions/search-rules.tool.js.map +1 -1
- package/dist/services/ecfr/ecfr-service.js +2 -2
- package/dist/services/ecfr-mirror/ecfr-mirror.d.ts +10 -6
- package/dist/services/ecfr-mirror/ecfr-mirror.d.ts.map +1 -1
- package/dist/services/ecfr-mirror/ecfr-mirror.js +17 -12
- package/dist/services/ecfr-mirror/ecfr-mirror.js.map +1 -1
- package/dist/services/federal-register/federal-register-service.d.ts +16 -6
- package/dist/services/federal-register/federal-register-service.d.ts.map +1 -1
- package/dist/services/federal-register/federal-register-service.js +233 -35
- package/dist/services/federal-register/federal-register-service.js.map +1 -1
- package/dist/services/federal-register/types.d.ts +38 -8
- package/dist/services/federal-register/types.d.ts.map +1 -1
- package/dist/services/regulations-gov/regulations-gov-service.js +2 -2
- package/dist/services/upstream-failure.d.ts +1 -1
- package/package.json +19 -9
- package/server.json +3 -3
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview regulations_list_open_comments —
|
|
3
|
-
* comment
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* @fileoverview regulations_list_open_comments — documents currently open for
|
|
3
|
+
* public comment (proposed rules and comment-requesting final rules by default,
|
|
4
|
+
* notices on request), filterable by agency and topic. "What can I still weigh in
|
|
5
|
+
* on?" Runs on the Federal Register's open-comment window (keyless), fetched
|
|
6
|
+
* whole, sorted by closing date, and paged locally; the comment count is read
|
|
7
|
+
* from each FR document's own embedded Regulations.gov info when a key is
|
|
8
|
+
* present. Degrades gracefully — fully functional without the key.
|
|
7
9
|
* @module mcp-server/tools/definitions/list-open-comments.tool
|
|
8
10
|
*/
|
|
9
11
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
@@ -11,8 +13,12 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
|
11
13
|
import { today } from '../../../services/ecfr/ecfr-service.js';
|
|
12
14
|
import { getFederalRegisterService } from '../../../services/federal-register/federal-register-service.js';
|
|
13
15
|
import { getRegulationsGovService } from '../../../services/regulations-gov/regulations-gov-service.js';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
+
import { isoDate } from './date-input.js';
|
|
17
|
+
import { escapePipes, formatAgencies } from './format-utils.js';
|
|
18
|
+
/** The most documents the Federal Register serves for one query. */
|
|
19
|
+
const FR_ITEM_LIMIT = 10_000;
|
|
20
|
+
/** Proposed rules plus the final rules (direct final, interim final) that request comment. */
|
|
21
|
+
const DEFAULT_TYPES = ['PRORULE', 'RULE'];
|
|
16
22
|
/** Whole days from `asOf` (YYYY-MM-DD) to `close` (YYYY-MM-DD); negative clamped to 0. */
|
|
17
23
|
function daysBetween(asOf, close) {
|
|
18
24
|
const a = Date.parse(`${asOf}T00:00:00Z`);
|
|
@@ -23,43 +29,41 @@ function daysBetween(asOf, close) {
|
|
|
23
29
|
}
|
|
24
30
|
export const listOpenCommentsTool = tool('regulations_list_open_comments', {
|
|
25
31
|
title: 'regulations_list_open_comments',
|
|
26
|
-
description: 'List
|
|
32
|
+
description: 'List Federal Register documents currently open for public comment, sorted by closing date (soonest first) across the whole open window, filterable by document type, agency slug, and topic. "What can I still weigh in on?" Covers proposed rules and the final rules that take comment (direct final and interim final rules) by default; add NOTICE for the much larger set of notices with comment periods. Runs on the Federal Register\'s open-comment window and is fully functional without a key. When REGULATIONS_GOV_API_KEY is configured, each row is enriched with the comment count from the Federal Register document\'s embedded Regulations.gov info (no extra rate-limited call). Open one row with regulations_get_document for the full document, or pull the comments with regulations_find_comments.',
|
|
27
33
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
28
34
|
input: z.object({
|
|
29
35
|
query: z
|
|
30
36
|
.string()
|
|
31
37
|
.optional()
|
|
32
|
-
.describe('Full-text filter across open
|
|
38
|
+
.describe('Full-text filter across open documents. Omit to list every document currently open for comment.'),
|
|
39
|
+
type: z
|
|
40
|
+
.array(z.enum(['PRORULE', 'RULE', 'NOTICE']))
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Document types to include: PRORULE (proposed rules), RULE (final rules that request comment, including direct final and interim final rules), NOTICE (information-collection and other notices with comment periods — a much larger set). Default, and when empty: ["PRORULE", "RULE"].'),
|
|
33
43
|
agencies: z
|
|
34
44
|
.array(z.string())
|
|
35
45
|
.optional()
|
|
36
|
-
.describe('Filter to one or more agencies by Federal Register agency slug (e.g. "environmental-protection-agency").'),
|
|
46
|
+
.describe('Filter to one or more agencies by Federal Register agency slug (e.g. "environmental-protection-agency") — lowercase kebab-case, not a name or acronym. Every row lists its agencies with their slugs; read agencies[].slug off a row here or in regulations_search_rules. One unrecognized slug fails the whole request.'),
|
|
37
47
|
closing_before: z
|
|
38
|
-
.union([
|
|
39
|
-
z.literal(''),
|
|
40
|
-
z
|
|
41
|
-
.string()
|
|
42
|
-
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
43
|
-
.describe('ISO 8601 date (YYYY-MM-DD).'),
|
|
44
|
-
])
|
|
48
|
+
.union([z.literal(''), isoDate()])
|
|
45
49
|
.optional()
|
|
46
|
-
.describe('Only
|
|
50
|
+
.describe('Only documents whose comment period closes on or before this date, ISO 8601 (YYYY-MM-DD), a real calendar day. Use to find deadlines you need to act on soon.'),
|
|
47
51
|
per_page: z
|
|
48
52
|
.number()
|
|
49
53
|
.int()
|
|
50
|
-
.min(
|
|
54
|
+
.min(1)
|
|
51
55
|
.max(100)
|
|
52
56
|
.optional()
|
|
53
57
|
.default(20)
|
|
54
|
-
.describe('
|
|
58
|
+
.describe('Documents per page (1–100, default 20).'),
|
|
55
59
|
page: z
|
|
56
60
|
.number()
|
|
57
61
|
.int()
|
|
58
62
|
.min(1)
|
|
59
|
-
.max(
|
|
63
|
+
.max(FR_ITEM_LIMIT)
|
|
60
64
|
.optional()
|
|
61
65
|
.default(1)
|
|
62
|
-
.describe('Page number
|
|
66
|
+
.describe('Page number, default 1. Pages run over the whole open window in closing-date order; totalPages and nextPage in the response say how far it goes.'),
|
|
63
67
|
}),
|
|
64
68
|
output: z.object({
|
|
65
69
|
asOf: z.string().describe('The "today" the open-window filter used (ISO 8601).'),
|
|
@@ -72,9 +76,21 @@ export const listOpenCommentsTool = tool('regulations_list_open_comments', {
|
|
|
72
76
|
documentNumber: z
|
|
73
77
|
.string()
|
|
74
78
|
.describe('Federal Register document number — chains into regulations_get_document.'),
|
|
75
|
-
title: z.string().describe('
|
|
76
|
-
type: z
|
|
77
|
-
|
|
79
|
+
title: z.string().describe('Document title.'),
|
|
80
|
+
type: z
|
|
81
|
+
.string()
|
|
82
|
+
.describe('Document type — "Proposed Rule", "Rule", or "Notice"; "Unknown" when unlisted.'),
|
|
83
|
+
agencies: z
|
|
84
|
+
.array(z
|
|
85
|
+
.object({
|
|
86
|
+
name: z.string().describe('Agency name.'),
|
|
87
|
+
slug: z
|
|
88
|
+
.string()
|
|
89
|
+
.nullable()
|
|
90
|
+
.describe('Federal Register agency slug — pass it back as the agencies filter. Null when the Federal Register lists the agency by raw name only, so it cannot be filtered on.'),
|
|
91
|
+
})
|
|
92
|
+
.describe('One issuing agency.'))
|
|
93
|
+
.describe('Issuing agencies.'),
|
|
78
94
|
publicationDate: z.string().describe('Publication date (ISO 8601).'),
|
|
79
95
|
commentsCloseOn: z.string().describe('Comment-period close date (ISO 8601).'),
|
|
80
96
|
daysRemaining: z
|
|
@@ -88,20 +104,32 @@ export const listOpenCommentsTool = tool('regulations_list_open_comments', {
|
|
|
88
104
|
.nullable()
|
|
89
105
|
.describe("Comment count from the FR document's Regulations.gov info; null when unkeyed or not on Regulations.gov."),
|
|
90
106
|
})
|
|
91
|
-
.describe('One open
|
|
92
|
-
.describe('
|
|
107
|
+
.describe('One document open for comment.'))
|
|
108
|
+
.describe('Documents open for comment on this page, closing soonest first; documents closing the same day are ordered by document number.'),
|
|
93
109
|
}),
|
|
94
110
|
enrichment: {
|
|
95
|
-
totalCount: z
|
|
111
|
+
totalCount: z
|
|
112
|
+
.number()
|
|
113
|
+
.describe('Documents open for comment matching the filters — the window the pages run over.'),
|
|
114
|
+
totalPages: z.number().describe('Pages in the window at this per_page.'),
|
|
115
|
+
nextPage: z
|
|
116
|
+
.number()
|
|
117
|
+
.optional()
|
|
118
|
+
.describe('Page to request next — present only when documents remain past this page.'),
|
|
96
119
|
truncated: z
|
|
97
120
|
.boolean()
|
|
98
121
|
.optional()
|
|
99
|
-
.describe('True when
|
|
100
|
-
shown: z.number().optional().describe('
|
|
122
|
+
.describe('True when the Federal Register reported its 10,000-document maximum, so the window holds only the 10,000 most recently published matches.'),
|
|
123
|
+
shown: z.number().optional().describe('Documents returned on this page.'),
|
|
124
|
+
cap: z.number().optional().describe('The Federal Register document limit that was reached.'),
|
|
101
125
|
notice: z
|
|
102
126
|
.string()
|
|
103
127
|
.optional()
|
|
104
|
-
.describe('Guidance when nothing matched, or that comment counts are unavailable without a key.'),
|
|
128
|
+
.describe('Guidance when nothing matched, when the page is past the end, when the window was truncated, or that comment counts are unavailable without a key.'),
|
|
129
|
+
},
|
|
130
|
+
enrichmentTrailer: {
|
|
131
|
+
totalPages: { label: 'Total pages' },
|
|
132
|
+
nextPage: { label: 'Next page' },
|
|
105
133
|
},
|
|
106
134
|
errors: [
|
|
107
135
|
{
|
|
@@ -110,25 +138,59 @@ export const listOpenCommentsTool = tool('regulations_list_open_comments', {
|
|
|
110
138
|
when: 'Federal Register returned a 5xx, timed out, or served an HTML error page.',
|
|
111
139
|
recovery: 'Retry after a brief wait; the Federal Register API may be momentarily down.',
|
|
112
140
|
},
|
|
141
|
+
{
|
|
142
|
+
reason: 'invalid_filter',
|
|
143
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
144
|
+
when: 'The Federal Register rejected a filter value — most often an agency name or acronym passed where a slug belongs.',
|
|
145
|
+
recovery: 'Correct the parameter the message names: agencies takes Federal Register slugs in lowercase kebab-case (e.g. "environmental-protection-agency"; read one off agencies[].slug in a result), and closing_before must be a real YYYY-MM-DD day.',
|
|
146
|
+
severity: 'notice',
|
|
147
|
+
thrownBy: 'service',
|
|
148
|
+
},
|
|
113
149
|
],
|
|
114
150
|
async handler(input, ctx) {
|
|
115
151
|
const fr = getFederalRegisterService();
|
|
116
152
|
const keyed = getRegulationsGovService().hasKey();
|
|
117
153
|
const asOf = today();
|
|
118
|
-
const
|
|
154
|
+
const types = input.type?.length ? [...new Set(input.type)] : DEFAULT_TYPES;
|
|
155
|
+
const window = await fr.listOpenComments({
|
|
119
156
|
query: input.query || undefined,
|
|
120
157
|
agencies: input.agencies?.length ? input.agencies : undefined,
|
|
121
158
|
closingBefore: input.closing_before || undefined,
|
|
122
|
-
|
|
123
|
-
|
|
159
|
+
types,
|
|
160
|
+
includeCommentCounts: keyed,
|
|
124
161
|
}, asOf, ctx);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
162
|
+
const totalCount = window.results.length;
|
|
163
|
+
const totalPages = Math.ceil(totalCount / input.per_page);
|
|
164
|
+
const start = (input.page - 1) * input.per_page;
|
|
165
|
+
const page = window.results.slice(start, start + input.per_page);
|
|
166
|
+
ctx.enrich.total(totalCount);
|
|
167
|
+
ctx.enrich({
|
|
168
|
+
totalPages,
|
|
169
|
+
...(input.page < totalPages && { nextPage: input.page + 1 }),
|
|
170
|
+
});
|
|
171
|
+
// One notice: enrich.truncated() rewrites `notice`, so every source is
|
|
172
|
+
// composed here and written once.
|
|
173
|
+
const notices = [];
|
|
174
|
+
if (totalCount === 0) {
|
|
175
|
+
notices.push(`No documents are open for comment matching the filters. Drop the query, agency, or closing_before filter${types.includes('NOTICE') ? '' : ', or add NOTICE to type'}.`);
|
|
129
176
|
}
|
|
130
|
-
|
|
131
|
-
.
|
|
177
|
+
else if (page.length === 0) {
|
|
178
|
+
notices.push(`Page ${input.page} is past the end: ${totalCount} documents are open, so the last page is ${totalPages} at per_page ${input.per_page}.`);
|
|
179
|
+
}
|
|
180
|
+
if (window.truncated) {
|
|
181
|
+
notices.push(`The Federal Register returned its ${FR_ITEM_LIMIT.toLocaleString('en-US')}-document maximum, so this window holds only the ${FR_ITEM_LIMIT.toLocaleString('en-US')} most recently published matches, sorted by closing date — documents closing sooner may be missing. Narrow by type, agency, query, or closing_before.`);
|
|
182
|
+
}
|
|
183
|
+
if (!keyed) {
|
|
184
|
+
notices.push(`Comment counts are unavailable without REGULATIONS_GOV_API_KEY (free at https://api.data.gov/signup/).${window.truncated ? '' : ' The open-document list itself is complete.'}`);
|
|
185
|
+
}
|
|
186
|
+
const notice = notices.join(' ');
|
|
187
|
+
if (window.truncated) {
|
|
188
|
+
ctx.enrich.truncated({ shown: page.length, cap: FR_ITEM_LIMIT, guidance: notice });
|
|
189
|
+
}
|
|
190
|
+
else if (notice) {
|
|
191
|
+
ctx.enrich.notice(notice);
|
|
192
|
+
}
|
|
193
|
+
const results = page.map((r) => ({
|
|
132
194
|
documentNumber: r.documentNumber,
|
|
133
195
|
title: r.title,
|
|
134
196
|
type: r.type,
|
|
@@ -140,32 +202,21 @@ export const listOpenCommentsTool = tool('regulations_list_open_comments', {
|
|
|
140
202
|
// Counts come from the FR document's own regulations_dot_gov_info block;
|
|
141
203
|
// only surfaced when a key is configured (the degrade contract).
|
|
142
204
|
commentCount: keyed ? r.commentCount : null,
|
|
143
|
-
}))
|
|
144
|
-
.sort((a, b) => a.daysRemaining - b.daysRemaining);
|
|
145
|
-
if (!keyed) {
|
|
146
|
-
ctx.enrich.notice('Comment counts are unavailable without REGULATIONS_GOV_API_KEY (free at https://api.data.gov/signup/). The open-rule list itself is complete.');
|
|
147
|
-
}
|
|
148
|
-
else if (response.totalCount > FR_NAV_CEILING) {
|
|
149
|
-
ctx.enrich.truncated({
|
|
150
|
-
shown: results.length,
|
|
151
|
-
cap: FR_NAV_CEILING,
|
|
152
|
-
guidance: `${response.totalCount} open rules exceed the 5,000-record navigation ceiling. Narrow by agency or closing_before.`,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
205
|
+
}));
|
|
155
206
|
return { asOf, keyed, results };
|
|
156
207
|
},
|
|
157
208
|
format: (result) => {
|
|
158
209
|
const lines = [
|
|
159
|
-
`**
|
|
210
|
+
`**Documents open for comment** (as of ${result.asOf} · keyed: ${result.keyed ? 'yes' : 'no — comment counts unavailable'})`,
|
|
160
211
|
'',
|
|
161
212
|
];
|
|
162
213
|
lines.push('| Title | Type | Agency | Published | Closes | Days Left | Comments | Docket |');
|
|
163
214
|
lines.push('|---|---|---|---|---|---|---|---|');
|
|
164
215
|
for (const r of result.results) {
|
|
165
|
-
|
|
166
|
-
const docket = r.docketIds
|
|
216
|
+
// `; ` because one docket ID can itself carry commas ("FAR Case 2026-003, Docket No. …").
|
|
217
|
+
const docket = r.docketIds.length ? r.docketIds.join('; ') : '—';
|
|
167
218
|
const count = r.commentCount != null ? String(r.commentCount) : '—';
|
|
168
|
-
lines.push(`| ${escapePipes(r.title)} [FR ${r.documentNumber}] | ${r.type} | ${escapePipes(
|
|
219
|
+
lines.push(`| ${escapePipes(r.title)} [FR ${r.documentNumber}] | ${r.type} | ${escapePipes(formatAgencies(r.agencies))} | ${r.publicationDate} | ${r.commentsCloseOn} | ${r.daysRemaining} | ${count} | ${escapePipes(docket)} |`);
|
|
169
220
|
}
|
|
170
221
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
171
222
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-open-comments.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-open-comments.tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"list-open-comments.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-open-comments.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;A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AAG;YACZ,yCAAyC,MAAM,CAAC,IAAI,aAAa,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,iCAAiC,GAAG;YAC5H,EAAE;SACH,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;QAC7F,KAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;QAChD,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC/B,0FAA0F;YAC1F,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YACjE,MAAM,KAAK,GAAG,CAAC,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YACpE,KAAK,CAAC,IAAI,CACR,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,cAAc,OAAO,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,eAAe,MAAM,CAAC,CAAC,eAAe,MAAM,CAAC,CAAC,aAAa,MAAM,KAAK,MAAM,WAAW,CAAC,MAAM,CAAC,IAAI,CACvN,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview regulations_search_rules — the 80% entry point. Searches the
|
|
3
3
|
* Federal Register for proposed rules, final rules, notices, and presidential
|
|
4
|
-
* documents, filterable by agency, document type, date range, topic,
|
|
5
|
-
*
|
|
4
|
+
* documents, filterable by agency, document type, date range, and topic, ranked
|
|
5
|
+
* by relevance or date. Keyless (Federal Register API).
|
|
6
6
|
* @module mcp-server/tools/definitions/search-rules.tool
|
|
7
7
|
*/
|
|
8
8
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
@@ -18,6 +18,11 @@ export declare const searchRulesTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
18
18
|
agencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
19
|
published_after: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
|
|
20
20
|
published_before: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
|
|
21
|
+
order: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
newest: "newest";
|
|
23
|
+
oldest: "oldest";
|
|
24
|
+
relevance: "relevance";
|
|
25
|
+
}>>;
|
|
21
26
|
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
22
27
|
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
23
28
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -27,7 +32,10 @@ export declare const searchRulesTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
27
32
|
type: z.ZodString;
|
|
28
33
|
abstract: z.ZodNullable<z.ZodString>;
|
|
29
34
|
publicationDate: z.ZodString;
|
|
30
|
-
agencies: z.ZodArray<z.
|
|
35
|
+
agencies: z.ZodArray<z.ZodObject<{
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
31
39
|
docketIds: z.ZodArray<z.ZodString>;
|
|
32
40
|
regulationIdNumbers: z.ZodArray<z.ZodString>;
|
|
33
41
|
cfrReferences: z.ZodArray<z.ZodObject<{
|
|
@@ -43,6 +51,13 @@ export declare const searchRulesTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
43
51
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
44
52
|
readonly when: "Federal Register returned a 5xx, timed out, or served an HTML error page.";
|
|
45
53
|
readonly recovery: "Retry after a brief wait; the Federal Register API may be momentarily down.";
|
|
54
|
+
}, {
|
|
55
|
+
readonly reason: "invalid_filter";
|
|
56
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
57
|
+
readonly when: "The Federal Register rejected a filter value — most often an agency name or acronym passed where a slug belongs.";
|
|
58
|
+
readonly recovery: "Correct the parameter the message names: agencies takes Federal Register slugs in lowercase kebab-case (e.g. \"environmental-protection-agency\"; read one off agencies[].slug in a result), and dates must be real YYYY-MM-DD days.";
|
|
59
|
+
readonly severity: "notice";
|
|
60
|
+
readonly thrownBy: "service";
|
|
46
61
|
}], {
|
|
47
62
|
readonly totalCount: z.ZodNumber;
|
|
48
63
|
readonly truncated: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-rules.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-rules.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"search-rules.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-rules.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmN1B,CAAC"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview regulations_search_rules — the 80% entry point. Searches the
|
|
3
3
|
* Federal Register for proposed rules, final rules, notices, and presidential
|
|
4
|
-
* documents, filterable by agency, document type, date range, topic,
|
|
5
|
-
*
|
|
4
|
+
* documents, filterable by agency, document type, date range, and topic, ranked
|
|
5
|
+
* by relevance or date. Keyless (Federal Register API).
|
|
6
6
|
* @module mcp-server/tools/definitions/search-rules.tool
|
|
7
7
|
*/
|
|
8
8
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
9
9
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
10
10
|
import { getFederalRegisterService } from '../../../services/federal-register/federal-register-service.js';
|
|
11
|
-
import {
|
|
11
|
+
import { isoDate } from './date-input.js';
|
|
12
|
+
import { escapePipes, formatAgencies } from './format-utils.js';
|
|
12
13
|
/** Above this match count the FR's 50-page navigation ceiling (5,000 records) bites. */
|
|
13
14
|
const FR_NAV_CEILING = 5000;
|
|
14
15
|
export const searchRulesTool = tool('regulations_search_rules', {
|
|
15
16
|
title: 'regulations_search_rules',
|
|
16
|
-
description: 'Search the Federal Register — the daily journal of US proposed rules, final rules, notices, and presidential documents (1994–present) — filtering by full-text query, document type, agency slug, publication date range
|
|
17
|
+
description: 'Search the Federal Register — the daily journal of US proposed rules, final rules, notices, and presidential documents (1994–present) — filtering by full-text query, document type, agency slug, and publication date range. The primary discovery entry point: results carry the document number (open with regulations_get_document), each issuing agency with its filterable slug, docket IDs, RINs, and affected CFR parts that chain into the comment and codified-text tools. A query ranks by relevance unless order says otherwise; filter-only browsing lists newest first. The Federal Register caps navigation at 50 pages and the match count at 10,000; when a result set is larger, narrow with published_after/published_before rather than paging deeper.',
|
|
17
18
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
18
19
|
input: z.object({
|
|
19
20
|
query: z
|
|
@@ -27,27 +28,19 @@ export const searchRulesTool = tool('regulations_search_rules', {
|
|
|
27
28
|
agencies: z
|
|
28
29
|
.array(z.string())
|
|
29
30
|
.optional()
|
|
30
|
-
.describe('Filter to one or more agencies by Federal Register agency slug (e.g. "environmental-protection-agency", "securities-and-exchange-commission")
|
|
31
|
+
.describe('Filter to one or more agencies by Federal Register agency slug (e.g. "environmental-protection-agency", "securities-and-exchange-commission") — lowercase kebab-case, not a name or acronym. Every result lists its agencies with their slugs; if unsure, search by query and read agencies[].slug off a result. One unrecognized slug fails the whole request.'),
|
|
31
32
|
published_after: z
|
|
32
|
-
.union([
|
|
33
|
-
z.literal(''),
|
|
34
|
-
z
|
|
35
|
-
.string()
|
|
36
|
-
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
37
|
-
.describe('ISO 8601 date (YYYY-MM-DD).'),
|
|
38
|
-
])
|
|
33
|
+
.union([z.literal(''), isoDate()])
|
|
39
34
|
.optional()
|
|
40
|
-
.describe('Earliest publication date, ISO 8601 (YYYY-MM-DD). Combine with published_before to window large result sets — the FR caps navigation at 50 pages.'),
|
|
35
|
+
.describe('Earliest publication date, ISO 8601 (YYYY-MM-DD), a real calendar day. Combine with published_before to window large result sets — the FR caps navigation at 50 pages.'),
|
|
41
36
|
published_before: z
|
|
42
|
-
.union([
|
|
43
|
-
z.literal(''),
|
|
44
|
-
z
|
|
45
|
-
.string()
|
|
46
|
-
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
47
|
-
.describe('ISO 8601 date (YYYY-MM-DD).'),
|
|
48
|
-
])
|
|
37
|
+
.union([z.literal(''), isoDate()])
|
|
49
38
|
.optional()
|
|
50
|
-
.describe('Latest publication date, ISO 8601 (YYYY-MM-DD).'),
|
|
39
|
+
.describe('Latest publication date, ISO 8601 (YYYY-MM-DD), a real calendar day.'),
|
|
40
|
+
order: z
|
|
41
|
+
.enum(['relevance', 'newest', 'oldest'])
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Result order. Defaults to relevance with a query, newest without one. relevance without a query falls back to newest first; oldest lists the earliest publications first.'),
|
|
51
44
|
per_page: z
|
|
52
45
|
.number()
|
|
53
46
|
.int()
|
|
@@ -78,7 +71,17 @@ export const searchRulesTool = tool('regulations_search_rules', {
|
|
|
78
71
|
.describe('Document type: Proposed Rule, Final Rule, Notice, or Presidential Document.'),
|
|
79
72
|
abstract: z.string().nullable().describe('Abstract summary, or null when absent.'),
|
|
80
73
|
publicationDate: z.string().describe('Publication date (ISO 8601).'),
|
|
81
|
-
agencies: z
|
|
74
|
+
agencies: z
|
|
75
|
+
.array(z
|
|
76
|
+
.object({
|
|
77
|
+
name: z.string().describe('Agency name.'),
|
|
78
|
+
slug: z
|
|
79
|
+
.string()
|
|
80
|
+
.nullable()
|
|
81
|
+
.describe('Federal Register agency slug — pass it back as the agencies filter. Null when the Federal Register lists the agency by raw name only, so it cannot be filtered on.'),
|
|
82
|
+
})
|
|
83
|
+
.describe('One issuing agency.'))
|
|
84
|
+
.describe('Issuing agencies.'),
|
|
82
85
|
docketIds: z
|
|
83
86
|
.array(z.string())
|
|
84
87
|
.describe('Docket IDs — chain into regulations_get_docket / regulations_find_comments.'),
|
|
@@ -124,15 +127,25 @@ export const searchRulesTool = tool('regulations_search_rules', {
|
|
|
124
127
|
when: 'Federal Register returned a 5xx, timed out, or served an HTML error page.',
|
|
125
128
|
recovery: 'Retry after a brief wait; the Federal Register API may be momentarily down.',
|
|
126
129
|
},
|
|
130
|
+
{
|
|
131
|
+
reason: 'invalid_filter',
|
|
132
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
133
|
+
when: 'The Federal Register rejected a filter value — most often an agency name or acronym passed where a slug belongs.',
|
|
134
|
+
recovery: 'Correct the parameter the message names: agencies takes Federal Register slugs in lowercase kebab-case (e.g. "environmental-protection-agency"; read one off agencies[].slug in a result), and dates must be real YYYY-MM-DD days.',
|
|
135
|
+
severity: 'notice',
|
|
136
|
+
thrownBy: 'service',
|
|
137
|
+
},
|
|
127
138
|
],
|
|
128
139
|
async handler(input, ctx) {
|
|
129
140
|
const service = getFederalRegisterService();
|
|
141
|
+
const query = input.query || undefined;
|
|
130
142
|
const result = await service.search({
|
|
131
|
-
query
|
|
143
|
+
query,
|
|
132
144
|
types: input.type,
|
|
133
145
|
agencies: input.agencies?.length ? input.agencies : undefined,
|
|
134
146
|
publishedAfter: input.published_after || undefined,
|
|
135
147
|
publishedBefore: input.published_before || undefined,
|
|
148
|
+
order: input.order ?? (query ? 'relevance' : 'newest'),
|
|
136
149
|
perPage: input.per_page,
|
|
137
150
|
page: input.page,
|
|
138
151
|
}, ctx);
|
|
@@ -156,12 +169,11 @@ export const searchRulesTool = tool('regulations_search_rules', {
|
|
|
156
169
|
'|---|---|---|---|---|---|',
|
|
157
170
|
];
|
|
158
171
|
for (const r of result.results) {
|
|
159
|
-
const agency = r.agencies[0] ?? '—';
|
|
160
172
|
const cite = r.cfrReferences.map((c) => `${c.title} CFR ${c.part}`).join(', ');
|
|
161
|
-
lines.push(`| ${r.documentNumber} | ${r.type} | ${escapePipes(r.title)} | ${escapePipes(
|
|
173
|
+
lines.push(`| ${r.documentNumber} | ${r.type} | ${escapePipes(r.title)} | ${escapePipes(formatAgencies(r.agencies))} | ${r.publicationDate} | ${r.commentsCloseOn ?? '—'} |`);
|
|
162
174
|
const tail = [];
|
|
163
175
|
if (r.docketIds.length)
|
|
164
|
-
tail.push(`dockets: ${r.docketIds.join('
|
|
176
|
+
tail.push(`dockets: ${r.docketIds.join('; ')}`);
|
|
165
177
|
if (cite)
|
|
166
178
|
tail.push(`CFR: ${cite}`);
|
|
167
179
|
if (r.regulationIdNumbers.length)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-rules.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-rules.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"search-rules.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-rules.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEhE,wFAAwF;AACxF,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,0BAA0B,EAAE;IAC9D,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,4uBAA4uB;IAC9uB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,iIAAiI,CAClI;QACH,IAAI,EAAE,CAAC;aACJ,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;aACxD,QAAQ,EAAE;aACV,QAAQ,CACP,uIAAuI,CACxI;QACH,QAAQ,EAAE,CAAC;aACR,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,iWAAiW,CAClW;QACH,eAAe,EAAE,CAAC;aACf,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,OAAO,E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tra } from '@cyanheads/mcp-ts-core/utils';
|
|
18
18
|
import { getServerConfig } from '../../config/server-config.js';
|
|
19
|
-
import { requestBudget } from '
|
|
20
|
-
import { rethrowTransportFailure, runUpstream } from '
|
|
19
|
+
import { requestBudget } from '../request-budget.js';
|
|
20
|
+
import { rethrowTransportFailure, runUpstream } from '../upstream-failure.js';
|
|
21
21
|
import { appendixCite, sectionCite } from './cite.js';
|
|
22
22
|
import { parseCfrXml } from './xml.js';
|
|
23
23
|
const TIMEOUT_MS = 20_000;
|
|
@@ -7,12 +7,16 @@
|
|
|
7
7
|
* Build-time ingest uses `better-sqlite3` on Node; runtime reads go through Bun's
|
|
8
8
|
* `bun:sqlite` — both behind the framework's runtime-agnostic SQLite handle.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Build-correctness contract: the auxiliary tables (`cfr_part_index`,
|
|
11
11
|
* `cfr_mirror_meta`) are created idempotently (`CREATE TABLE IF NOT EXISTS`) at
|
|
12
|
-
* the top of the `sync` routine via the raw handle —
|
|
13
|
-
* migration.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* the top of the `sync` routine via the raw handle — not via a framework
|
|
13
|
+
* migration. They are server-owned, sit outside the store's declarative schema,
|
|
14
|
+
* and are rewritten by the same routine that fills them, so their DDL belongs
|
|
15
|
+
* beside it: no schema version to bump, no migration list to keep ordered, and
|
|
16
|
+
* the cold `mirror:init` and every later refresh take the identical path.
|
|
17
|
+
* MirrorStore migrations do run on a brand-new database as well as on upgrade,
|
|
18
|
+
* so a migration would work here — it would only split ownership of these two
|
|
19
|
+
* tables across two places.
|
|
16
20
|
*
|
|
17
21
|
* Those two aux tables also carry the mirror's title coverage — which titles the
|
|
18
22
|
* index holds, and which titles the whole Code had at ingest time — and the
|
|
@@ -24,7 +28,7 @@
|
|
|
24
28
|
* @module services/ecfr-mirror/ecfr-mirror
|
|
25
29
|
*/
|
|
26
30
|
import { type Mirror } from '@cyanheads/mcp-ts-core/mirror';
|
|
27
|
-
import type { EcfrSearchHit, EcfrSectionResult } from '
|
|
31
|
+
import type { EcfrSearchHit, EcfrSectionResult } from '../ecfr/types.js';
|
|
28
32
|
/**
|
|
29
33
|
* The mirror instance. Schema declares the section columns plus an FTS5 index
|
|
30
34
|
* over heading + body_text (handled by the framework's schema-gen). The `sync`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecfr-mirror.d.ts","sourceRoot":"","sources":["../../../src/services/ecfr-mirror/ecfr-mirror.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ecfr-mirror.d.ts","sourceRoot":"","sources":["../../../src/services/ecfr-mirror/ecfr-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAEL,KAAK,MAAM,EAKZ,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AA6IjF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MA2IvB,CAAC;AA0BH;;;;;;GAMG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAMpD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAG1D;AAED,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAexD;AAeD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAYnC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,aAAa,EAAE,CAAA;CAAE,CAAC,CA+B3D"}
|