@cyanheads/federal-regulations-mcp-server 0.2.5 → 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 +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +17 -13
- package/changelog/0.3.x/0.3.0.md +27 -0
- 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/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/format-utils.d.ts +11 -0
- package/dist/mcp-server/tools/definitions/format-utils.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/format-utils.js +12 -0
- package/dist/mcp-server/tools/definitions/format-utils.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 +134 -84
- 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/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 +231 -33
- 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/package.json +1 -1
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** federal-regulations-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
4
|
+
**Version:** 0.3.0
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** federal-regulations-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
4
|
+
**Version:** 0.3.0
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/federal-regulations-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/federal-regulations-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -35,13 +35,13 @@ US federal regulatory law across three official sources: the Federal Register (p
|
|
|
35
35
|
|
|
36
36
|
| Tool | Description |
|
|
37
37
|
|:---|:---|
|
|
38
|
-
| `regulations_search_rules` | Search Federal Register proposed rules, final rules, notices, and presidential documents by query, type, agency, date range,
|
|
38
|
+
| `regulations_search_rules` | Search Federal Register proposed rules, final rules, notices, and presidential documents by query, type, agency, and date range, ranked by relevance or date |
|
|
39
39
|
| `regulations_get_document` | Fetch one Federal Register document by number, with the docket ID, CFR parts, and comment count that chain into other tools |
|
|
40
40
|
| `regulations_browse_cfr` | Walk the CFR hierarchy or full-text-search the codified CFR |
|
|
41
41
|
| `regulations_get_cfr_section` | Read codified CFR text for a section, whole part, or appendix, current or as of a past date |
|
|
42
42
|
| `regulations_get_docket` | Pull a rulemaking docket and its filed documents from Regulations.gov (key required) |
|
|
43
43
|
| `regulations_find_comments` | Fetch public comments on a document or docket, or one comment's full body and attachments (key required) |
|
|
44
|
-
| `regulations_list_open_comments` | List rules currently open for public comment,
|
|
44
|
+
| `regulations_list_open_comments` | List proposed rules, comment-requesting final rules, and optionally notices currently open for public comment, soonest closing first |
|
|
45
45
|
|
|
46
46
|
### Resources
|
|
47
47
|
|
|
@@ -56,18 +56,21 @@ All resource data is also reachable via the tool surface — tool-only MCP clien
|
|
|
56
56
|
|
|
57
57
|
### `regulations_search_rules` <sub>tool</sub>
|
|
58
58
|
|
|
59
|
-
- Keyless; full-text `query` optional, or browse by `type` (`PRORULE`/`RULE`/`NOTICE`/`PRESDOCU`), `agencies` (Federal Register slug), and `published_after`/`published_before`
|
|
59
|
+
- Keyless; full-text `query` optional, or browse by `type` (`PRORULE`/`RULE`/`NOTICE`/`PRESDOCU`), `agencies` (Federal Register slug, e.g. `environmental-protection-agency`), and `published_after`/`published_before` (real calendar days, `YYYY-MM-DD`)
|
|
60
|
+
- `order` is `relevance`, `newest`, or `oldest`; omitted, it is `relevance` with a `query` and `newest` without one
|
|
60
61
|
- `per_page` 2–100 (default 20), `page` 1–50 — the Federal Register caps navigation at 50 pages / 5,000 records and total matches at 10,000; narrow the date window rather than paging deeper
|
|
61
|
-
- Each result carries `documentNumber` (→ `regulations_get_document`), `docketIds` (→ `regulations_get_docket` / `find_comments`), `regulationIdNumbers`, and `cfrReferences` (→ `regulations_get_cfr_section`)
|
|
62
|
-
- `
|
|
62
|
+
- Each result carries `documentNumber` (→ `regulations_get_document`), `agencies` as `{ name, slug }` (the slug feeds back into `agencies`; null when the Federal Register lists an agency by raw name only), `docketIds` (→ `regulations_get_docket` / `find_comments`), `regulationIdNumbers`, and `cfrReferences` (→ `regulations_get_cfr_section`)
|
|
63
|
+
- `invalid_filter` when the Federal Register rejects a filter value (an agency name or acronym instead of a slug), naming the parameter; `upstream_unavailable` on a 5xx/timeout, retryable after a brief wait
|
|
63
64
|
|
|
64
65
|
---
|
|
65
66
|
|
|
66
67
|
### `regulations_get_document` <sub>tool</sub>
|
|
67
68
|
|
|
68
69
|
- Keyless; fetch one document by `document_number` (format `\d{4}-\d+`, e.g. `2025-14555`)
|
|
69
|
-
- Full metadata (title, type, agencies, abstract, action, effective/comment dates, RINs) plus cross-source handles: `docketId`, `regulationsGovDocumentId`, `commentCount`, and `cfrReferences`
|
|
70
|
-
- `include_full_text` (default `
|
|
70
|
+
- Full metadata (title, type, agencies as `{ name, slug }`, abstract, action, effective/comment dates, RINs) plus cross-source handles: `docketId`, `regulationsGovDocumentId`, `commentCount`, and `cfrReferences`
|
|
71
|
+
- `include_full_text` inlines the plain-text body as a character window: `max_chars` (default 64,000, up to 200,000) from `offset` (default 0). `fullTextLength` reports the whole body's length and `fullTextNextOffset` the offset to resume from while text remains; documents of about ten printed pages or fewer come back whole, while a major final rule runs past a million characters
|
|
72
|
+
- Passing `offset` or `max_chars` implies `include_full_text`; pairing either with an explicit `include_full_text: false` fails as `full_text_disabled`. An offset at or past the end returns empty `fullText` with the length and a notice
|
|
73
|
+
- `fullText` is plain text: links reduce to their text, and email addresses the published body obfuscates are decoded
|
|
71
74
|
- `not_found` when the FR number doesn't exist; `upstream_unavailable` on a 5xx/timeout
|
|
72
75
|
|
|
73
76
|
---
|
|
@@ -115,17 +118,18 @@ All resource data is also reachable via the tool surface — tool-only MCP clien
|
|
|
115
118
|
|
|
116
119
|
### `regulations_list_open_comments` <sub>tool</sub>
|
|
117
120
|
|
|
118
|
-
- Keyless; lists
|
|
119
|
-
- `
|
|
120
|
-
-
|
|
121
|
+
- Keyless; lists documents currently open for public comment, sorted by closing date soonest first (same-day closes by document number) across the whole open window — filter by `type`, `query`, `agencies` (Federal Register slug), and `closing_before` (a real calendar day, `YYYY-MM-DD`)
|
|
122
|
+
- `type` takes `PRORULE`, `RULE`, and `NOTICE`; the default (also used for an empty list) is `["PRORULE", "RULE"]` — proposed rules plus the direct final and interim final rules that take comment. `NOTICE` adds several hundred information-collection and other notices
|
|
123
|
+
- `per_page` 1–100 (default 20), `page` from 1; `totalCount`, `totalPages`, and `nextPage` describe the window. The Federal Register can't sort by comment date, so the window is fetched whole (one request up to 2,000 documents, then 2,000 per request) and paged locally; past the Federal Register's 10,000-document limit the response is `truncated` and holds the 10,000 most recently published matches
|
|
124
|
+
- Each row carries `daysRemaining`, `documentNumber` (→ `regulations_get_document`), `agencies` as `{ name, slug }`, and `docketIds` (→ `regulations_find_comments`)
|
|
121
125
|
- Fully functional keyless; when `REGULATIONS_GOV_API_KEY` is set, `commentCount` is enriched from the Federal Register document's own embedded Regulations.gov info (no extra call) — `keyed` reports which
|
|
122
|
-
- `
|
|
126
|
+
- `invalid_filter` when the Federal Register rejects a filter value, naming the parameter; `upstream_unavailable` on a 5xx/timeout
|
|
123
127
|
|
|
124
128
|
---
|
|
125
129
|
|
|
126
130
|
### `regulations://document/{documentNumber}` <sub>resource</sub>
|
|
127
131
|
|
|
128
|
-
- Same payload as `regulations_get_document`
|
|
132
|
+
- Same payload as `regulations_get_document` without full text — metadata plus cross-source handles, the body never inlined
|
|
129
133
|
- `documentNumber` format `\d{4}-\d+` (e.g. `2025-14555`)
|
|
130
134
|
- `not_found` / `upstream_unavailable` mirror the tool's errors
|
|
131
135
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Agencies now expose Federal Register slugs (breaking), full text pages by offset, and the open-comment window covers final rules in true closing-date order."
|
|
3
|
+
breaking: true
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.3.0 — 2026-09-22
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **`agencies`** output changed from `string[]` to `{ name, slug }[]` on `regulations_search_rules`, `regulations_get_document`, `regulations_list_open_comments`, and the `regulations://document/{documentNumber}` resource — each entry's `slug` is the value the `agencies` filter accepts; null when the Federal Register lists an agency by raw name only (#24).
|
|
12
|
+
- **Federal Register `400`s** whose body names a rejected filter now answer `ValidationError` (`-32007`) with reason `invalid_filter`, naming the parameter (`agencies`, `published_after`/`published_before`, `closing_before`) instead of the framework's unlabeled generic `-32602` (#24).
|
|
13
|
+
- **`regulations_list_open_comments` defaults** now include `RULE` (direct and interim final rules that request comment) alongside `PRORULE` (#38); `totalCount` is now the size of the locally paged window, not the Federal Register's reported match count (#32).
|
|
14
|
+
- **`regulations_get_document`'s `include_full_text`** no longer advertises a `false` default — passing `offset` or `max_chars` implies it; pairing either with an explicit `include_full_text: false` fails as `full_text_disabled` (#28).
|
|
15
|
+
- **`content[]` docket IDs** in `regulations_list_open_comments` now join on `; ` instead of `, ` (a docket ID can itself carry a comma) (#36).
|
|
16
|
+
|
|
17
|
+
## Added
|
|
18
|
+
|
|
19
|
+
- **`regulations_search_rules` `order`** input (`relevance` | `newest` | `oldest`), defaulting to `relevance` with a `query` and `newest` without one (#37).
|
|
20
|
+
- **`regulations_get_document` full-text paging** — `include_full_text` now returns a bounded window (`max_chars`, default 64,000, up to 200,000) starting at `offset`; the output reports `fullTextLength` and, while text remains, `fullTextNextOffset` to resume from (#28).
|
|
21
|
+
- **`regulations_list_open_comments` `type`** input (`PRORULE` | `RULE` | `NOTICE`) to choose which document types are included — `NOTICE` adds information-collection and other notices with comment periods (#38). `totalPages` and `nextPage` enrichment fields describe the paged window.
|
|
22
|
+
|
|
23
|
+
## Fixed
|
|
24
|
+
|
|
25
|
+
- **`content[]` tables** in `regulations_search_rules` and `regulations_list_open_comments` now render every agency (and, in `list_open_comments`, every docket ID), not just the first — `structuredContent` already carried the full arrays (#36).
|
|
26
|
+
- **`regulations_list_open_comments` ordering** — the tool now fetches the whole open-comment window and sorts by closing date, then document number, instead of sorting one newest-published page (#32).
|
|
27
|
+
- **Full-text body** (`unwrapRawText`) now decodes Cloudflare-obfuscated email addresses and reduces links to their text instead of leaving raw `<a href>` markup in `fullText`.
|
|
@@ -35,7 +35,7 @@ export const documentResource = resource('regulations://document/{documentNumber
|
|
|
35
35
|
],
|
|
36
36
|
async handler(params, ctx) {
|
|
37
37
|
const service = getFederalRegisterService();
|
|
38
|
-
const detail = await service.getDocument(params.documentNumber,
|
|
38
|
+
const detail = await service.getDocument(params.documentNumber, undefined, ctx);
|
|
39
39
|
// Drop the (absent) fullText field; the resource omits the body by contract.
|
|
40
40
|
const { fullText: _omit, ...rest } = detail;
|
|
41
41
|
return rest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/document.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,yCAAyC,EAAE;IAClF,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,mPAAmP;IACrP,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,KAAK,CAAC,mBAAmB,CAAC;aAC1B,QAAQ,CAAC,uDAAuD,CAAC;KACrE,CAAC;IACF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,uDAAuD;YAC7D,QAAQ,EACN,oFAAoF;SACvF;QACD;YACE,MAAM,EAAE,sBAAsB;YAC9B,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,2EAA2E;YACjF,QAAQ,EAAE,6EAA6E;SACxF;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,OAAO,GAAG,yBAAyB,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"document.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/document.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,yCAAyC,EAAE;IAClF,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,mPAAmP;IACrP,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,KAAK,CAAC,mBAAmB,CAAC;aAC1B,QAAQ,CAAC,uDAAuD,CAAC;KACrE,CAAC;IACF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,uDAAuD;YAC7D,QAAQ,EACN,oFAAoF;SACvF;QACD;YACE,MAAM,EAAE,sBAAsB;YAC9B,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,2EAA2E;YACjF,QAAQ,EAAE,6EAA6E;SACxF;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,OAAO,GAAG,yBAAyB,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,cAAc,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAChF,6EAA6E;QAC7E,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,mCAAmC;gBACxC,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Input schema for the Federal Register date filters.
|
|
3
|
+
* @module mcp-server/tools/definitions/date-input
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
/**
|
|
7
|
+
* An ISO 8601 date that is a real calendar day. The Federal Register answers
|
|
8
|
+
* `2025-13-45` or `2025-02-30` with a 400, so both are refused here, before a
|
|
9
|
+
* request goes out. The refinement adds no JSON Schema keyword: the advertised
|
|
10
|
+
* shape stays the `YYYY-MM-DD` pattern. A fresh schema per call keeps each
|
|
11
|
+
* field's JSON Schema inline rather than shared by reference.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isoDate(): z.ZodString;
|
|
14
|
+
//# sourceMappingURL=date-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-input.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/date-input.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAU3C;;;;;;GAMG;AACH,wBAAgB,OAAO,gBAMtB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Input schema for the Federal Register date filters.
|
|
3
|
+
* @module mcp-server/tools/definitions/date-input
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
/** True when `value` (already `YYYY-MM-DD`) names a day that exists. */
|
|
7
|
+
function isCalendarDate(value) {
|
|
8
|
+
const ms = Date.parse(`${value}T00:00:00Z`);
|
|
9
|
+
// Runtimes differ on whether `2025-02-30` parses (V8 rolls it into March), so
|
|
10
|
+
// the round trip, not the parse, is the test.
|
|
11
|
+
return !Number.isNaN(ms) && new Date(ms).toISOString().slice(0, 10) === value;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* An ISO 8601 date that is a real calendar day. The Federal Register answers
|
|
15
|
+
* `2025-13-45` or `2025-02-30` with a 400, so both are refused here, before a
|
|
16
|
+
* request goes out. The refinement adds no JSON Schema keyword: the advertised
|
|
17
|
+
* shape stays the `YYYY-MM-DD` pattern. A fresh schema per call keeps each
|
|
18
|
+
* field's JSON Schema inline rather than shared by reference.
|
|
19
|
+
*/
|
|
20
|
+
export function isoDate() {
|
|
21
|
+
return z
|
|
22
|
+
.string()
|
|
23
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
24
|
+
.refine(isCalendarDate, { message: 'Not a real calendar date (YYYY-MM-DD).' })
|
|
25
|
+
.describe('ISO 8601 date (YYYY-MM-DD).');
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=date-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-input.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/date-input.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,wEAAwE;AACxE,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,YAAY,CAAC,CAAC;IAC5C,8EAA8E;IAC9E,8CAA8C;IAC9C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC;AAChF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,CAAC;SACL,MAAM,EAAE;SACR,KAAK,CAAC,qBAAqB,CAAC;SAC5B,MAAM,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,wCAAwC,EAAE,CAAC;SAC7E,QAAQ,CAAC,6BAA6B,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -12,4 +12,15 @@
|
|
|
12
12
|
* first makes every backslash in the output stand for itself.
|
|
13
13
|
*/
|
|
14
14
|
export declare function escapePipes(text: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Render a document's issuing agencies: each name, followed by its slug in
|
|
17
|
+
* parentheses when it has one — the slug is what the `agencies` filter takes,
|
|
18
|
+
* so a `content[]`-only reader can pass it back. Joined on `; ` because agency
|
|
19
|
+
* names can carry commas; `—` when there are none. Not escaped — callers
|
|
20
|
+
* placing it in a table cell pass it through {@link escapePipes}.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatAgencies(agencies: ReadonlyArray<{
|
|
23
|
+
name: string;
|
|
24
|
+
slug: string | null;
|
|
25
|
+
}>): string;
|
|
15
26
|
//# sourceMappingURL=format-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-utils.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/format-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
|
1
|
+
{"version":3,"file":"format-utils.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/format-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,GAC7D,MAAM,CAGR"}
|
|
@@ -14,4 +14,16 @@
|
|
|
14
14
|
export function escapePipes(text) {
|
|
15
15
|
return text.replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Render a document's issuing agencies: each name, followed by its slug in
|
|
19
|
+
* parentheses when it has one — the slug is what the `agencies` filter takes,
|
|
20
|
+
* so a `content[]`-only reader can pass it back. Joined on `; ` because agency
|
|
21
|
+
* names can carry commas; `—` when there are none. Not escaped — callers
|
|
22
|
+
* placing it in a table cell pass it through {@link escapePipes}.
|
|
23
|
+
*/
|
|
24
|
+
export function formatAgencies(agencies) {
|
|
25
|
+
if (agencies.length === 0)
|
|
26
|
+
return '—';
|
|
27
|
+
return agencies.map((a) => (a.slug ? `${a.name} (${a.slug})` : a.name)).join('; ');
|
|
28
|
+
}
|
|
17
29
|
//# sourceMappingURL=format-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-utils.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/format-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC"}
|
|
1
|
+
{"version":3,"file":"format-utils.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/format-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,QAA8D;IAE9D,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IACtC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrF,CAAC"}
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
* @fileoverview regulations_get_document — fetch one Federal Register document by
|
|
3
3
|
* FR number: full metadata plus the cross-source handles (docket ID, affected CFR
|
|
4
4
|
* parts, Regulations.gov document ID, comment count) that chain into the comment
|
|
5
|
-
* and codified-text tools. The stitching tool of this server. Keyless.
|
|
5
|
+
* and codified-text tools. The stitching tool of this server. Keyless. The body
|
|
6
|
+
* comes back as a bounded character window over the plain text, resumable by
|
|
7
|
+
* offset.
|
|
6
8
|
* @module mcp-server/tools/definitions/get-document.tool
|
|
7
9
|
*/
|
|
8
10
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
9
11
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
10
12
|
export declare const getDocumentTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
11
13
|
document_number: z.ZodString;
|
|
12
|
-
include_full_text: z.
|
|
14
|
+
include_full_text: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
max_chars: z.ZodOptional<z.ZodNumber>;
|
|
13
17
|
}, z.core.$strip>, z.ZodObject<{
|
|
14
18
|
documentNumber: z.ZodString;
|
|
15
19
|
title: z.ZodString;
|
|
@@ -20,7 +24,10 @@ export declare const getDocumentTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
20
24
|
publicationDate: z.ZodString;
|
|
21
25
|
effectiveOn: z.ZodNullable<z.ZodString>;
|
|
22
26
|
commentsCloseOn: z.ZodNullable<z.ZodString>;
|
|
23
|
-
agencies: z.ZodArray<z.
|
|
27
|
+
agencies: z.ZodArray<z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>>;
|
|
24
31
|
regulationIdNumbers: z.ZodArray<z.ZodString>;
|
|
25
32
|
cfrReferences: z.ZodArray<z.ZodObject<{
|
|
26
33
|
title: z.ZodNumber;
|
|
@@ -37,15 +44,27 @@ export declare const getDocumentTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
37
44
|
rawTextUrl: z.ZodString;
|
|
38
45
|
htmlUrl: z.ZodString;
|
|
39
46
|
fullText: z.ZodOptional<z.ZodString>;
|
|
47
|
+
fullTextOffset: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
fullTextLength: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
fullTextNextOffset: z.ZodOptional<z.ZodNumber>;
|
|
40
50
|
}, z.core.$strip>, readonly [{
|
|
51
|
+
readonly reason: "full_text_disabled";
|
|
52
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
53
|
+
readonly when: "offset or max_chars was passed together with include_full_text: false.";
|
|
54
|
+
readonly recovery: "Drop include_full_text: false to read the body window, or drop offset and max_chars to skip the body.";
|
|
55
|
+
}, {
|
|
41
56
|
readonly reason: "not_found";
|
|
42
57
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
43
58
|
readonly when: "No Federal Register document exists with that number.";
|
|
44
59
|
readonly recovery: "Verify the number via regulations_search_rules; FR numbers look like \"2025-14555\".";
|
|
60
|
+
readonly thrownBy: "service";
|
|
45
61
|
}, {
|
|
46
62
|
readonly reason: "upstream_unavailable";
|
|
47
63
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
48
64
|
readonly when: "Federal Register returned a 5xx, timed out, served an HTML error page, or failed to serve the body URL it published (include_full_text only).";
|
|
49
65
|
readonly recovery: "Retry after a brief wait; the Federal Register API may be momentarily down.";
|
|
50
|
-
|
|
66
|
+
readonly thrownBy: "service";
|
|
67
|
+
}], {
|
|
68
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}>;
|
|
51
70
|
//# sourceMappingURL=get-document.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-document.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-document.tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"get-document.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-document.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyP1B,CAAC"}
|
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
* @fileoverview regulations_get_document — fetch one Federal Register document by
|
|
3
3
|
* FR number: full metadata plus the cross-source handles (docket ID, affected CFR
|
|
4
4
|
* parts, Regulations.gov document ID, comment count) that chain into the comment
|
|
5
|
-
* and codified-text tools. The stitching tool of this server. Keyless.
|
|
5
|
+
* and codified-text tools. The stitching tool of this server. Keyless. The body
|
|
6
|
+
* comes back as a bounded character window over the plain text, resumable by
|
|
7
|
+
* offset.
|
|
6
8
|
* @module mcp-server/tools/definitions/get-document.tool
|
|
7
9
|
*/
|
|
8
10
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
9
11
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
10
12
|
import { getFederalRegisterService } from '../../../services/federal-register/federal-register-service.js';
|
|
13
|
+
import { formatAgencies } from './format-utils.js';
|
|
14
|
+
/** Characters of body text one call returns unless `max_chars` says otherwise. */
|
|
15
|
+
const DEFAULT_MAX_CHARS = 64_000;
|
|
16
|
+
/** Largest window one call may request. */
|
|
17
|
+
const MAX_CHARS_CEILING = 200_000;
|
|
11
18
|
export const getDocumentTool = tool('regulations_get_document', {
|
|
12
19
|
title: 'regulations_get_document',
|
|
13
|
-
description:
|
|
20
|
+
description: "Fetch one Federal Register document by its FR document number — full metadata (title, type, agencies, abstract, action, effective/comment dates, RINs) plus the cross-source handles that make this a workflow server. The output carries the docket ID (chain into regulations_get_docket or regulations_find_comments) and the affected CFR parts (chain into regulations_get_cfr_section). Set include_full_text only when the rule body itself is needed: it returns the plain-text body as a window of up to 64,000 characters (max_chars raises it to 200,000), with the body's total length and, when text remains, the offset to resume from. Short documents return whole; major final rules run past a million characters, so page through with offset rather than reading them in one call.",
|
|
14
21
|
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
15
22
|
input: z.object({
|
|
16
23
|
document_number: z
|
|
@@ -20,8 +27,20 @@ export const getDocumentTool = tool('regulations_get_document', {
|
|
|
20
27
|
include_full_text: z
|
|
21
28
|
.boolean()
|
|
22
29
|
.optional()
|
|
23
|
-
.
|
|
24
|
-
|
|
30
|
+
.describe('When true, inline one window of the document body as plain text (see offset and max_chars). Omitted, the body URLs alone come back unless offset or max_chars is passed; fetch full text only when you need to read the rule itself, not just its metadata and cross-links.'),
|
|
31
|
+
offset: z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.min(0)
|
|
35
|
+
.optional()
|
|
36
|
+
.describe('Character offset into the plain-text body where the window starts (default 0). Pass the fullTextNextOffset from the previous call to read on. Implies include_full_text.'),
|
|
37
|
+
max_chars: z
|
|
38
|
+
.number()
|
|
39
|
+
.int()
|
|
40
|
+
.min(1)
|
|
41
|
+
.max(MAX_CHARS_CEILING)
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Most body characters to return in this window (1–200,000, default 64,000). Implies include_full_text.'),
|
|
25
44
|
}),
|
|
26
45
|
output: z.object({
|
|
27
46
|
documentNumber: z.string().describe('Federal Register document number.'),
|
|
@@ -36,7 +55,17 @@ export const getDocumentTool = tool('regulations_get_document', {
|
|
|
36
55
|
.string()
|
|
37
56
|
.nullable()
|
|
38
57
|
.describe('Comment-period close date (ISO 8601); when set, still open for comment.'),
|
|
39
|
-
agencies: z
|
|
58
|
+
agencies: z
|
|
59
|
+
.array(z
|
|
60
|
+
.object({
|
|
61
|
+
name: z.string().describe('Agency name.'),
|
|
62
|
+
slug: z
|
|
63
|
+
.string()
|
|
64
|
+
.nullable()
|
|
65
|
+
.describe('Federal Register agency slug — the value the agencies filter on regulations_search_rules and regulations_list_open_comments takes. Null when the Federal Register lists the agency by raw name only.'),
|
|
66
|
+
})
|
|
67
|
+
.describe('One issuing agency.'))
|
|
68
|
+
.describe('Issuing agencies.'),
|
|
40
69
|
regulationIdNumbers: z.array(z.string()).describe('Regulation Identifier Number(s) (RIN).'),
|
|
41
70
|
cfrReferences: z
|
|
42
71
|
.array(z
|
|
@@ -72,30 +101,67 @@ export const getDocumentTool = tool('regulations_get_document', {
|
|
|
72
101
|
fullText: z
|
|
73
102
|
.string()
|
|
74
103
|
.optional()
|
|
75
|
-
.describe('
|
|
104
|
+
.describe('One window of the plain-text body, starting at fullTextOffset — present only when full text was requested. Empty when the offset is at or past the end.'),
|
|
105
|
+
fullTextOffset: z
|
|
106
|
+
.number()
|
|
107
|
+
.optional()
|
|
108
|
+
.describe('Character offset fullText starts at — present with fullText.'),
|
|
109
|
+
fullTextLength: z
|
|
110
|
+
.number()
|
|
111
|
+
.optional()
|
|
112
|
+
.describe('Characters in the whole plain-text body — present with fullText.'),
|
|
113
|
+
fullTextNextOffset: z
|
|
114
|
+
.number()
|
|
115
|
+
.optional()
|
|
116
|
+
.describe('Offset to pass as offset to read the next window — present only when body text remains past this window.'),
|
|
76
117
|
}),
|
|
118
|
+
enrichment: {
|
|
119
|
+
notice: z
|
|
120
|
+
.string()
|
|
121
|
+
.optional()
|
|
122
|
+
.describe('Guidance when the requested offset is at or past the end of the body.'),
|
|
123
|
+
},
|
|
77
124
|
errors: [
|
|
125
|
+
{
|
|
126
|
+
reason: 'full_text_disabled',
|
|
127
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
128
|
+
when: 'offset or max_chars was passed together with include_full_text: false.',
|
|
129
|
+
recovery: 'Drop include_full_text: false to read the body window, or drop offset and max_chars to skip the body.',
|
|
130
|
+
},
|
|
78
131
|
{
|
|
79
132
|
reason: 'not_found',
|
|
80
133
|
code: JsonRpcErrorCode.NotFound,
|
|
81
134
|
when: 'No Federal Register document exists with that number.',
|
|
82
135
|
recovery: 'Verify the number via regulations_search_rules; FR numbers look like "2025-14555".',
|
|
136
|
+
thrownBy: 'service',
|
|
83
137
|
},
|
|
84
138
|
{
|
|
85
139
|
reason: 'upstream_unavailable',
|
|
86
140
|
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
87
141
|
when: 'Federal Register returned a 5xx, timed out, served an HTML error page, or failed to serve the body URL it published (include_full_text only).',
|
|
88
142
|
recovery: 'Retry after a brief wait; the Federal Register API may be momentarily down.',
|
|
143
|
+
thrownBy: 'service',
|
|
89
144
|
},
|
|
90
145
|
],
|
|
91
146
|
async handler(input, ctx) {
|
|
92
|
-
const
|
|
93
|
-
|
|
147
|
+
const windowed = input.offset !== undefined || input.max_chars !== undefined;
|
|
148
|
+
if (input.include_full_text === false && windowed) {
|
|
149
|
+
throw ctx.fail('full_text_disabled', 'offset and max_chars select a window of the body text, which include_full_text: false turns off.', ctx.recoveryFor('full_text_disabled'));
|
|
150
|
+
}
|
|
151
|
+
const window = (input.include_full_text ?? windowed)
|
|
152
|
+
? { offset: input.offset ?? 0, maxChars: input.max_chars ?? DEFAULT_MAX_CHARS }
|
|
153
|
+
: undefined;
|
|
154
|
+
const detail = await getFederalRegisterService().getDocument(input.document_number, window, ctx);
|
|
155
|
+
// An empty window over a non-empty body means the offset ran past the end.
|
|
156
|
+
if (detail.fullText === '' && detail.fullTextLength) {
|
|
157
|
+
ctx.enrich.notice(`offset ${detail.fullTextOffset} is past the end of the body, which is ${detail.fullTextLength.toLocaleString('en-US')} characters long. Pass an offset below that, or omit offset to start from the beginning.`);
|
|
158
|
+
}
|
|
159
|
+
return detail;
|
|
94
160
|
},
|
|
95
161
|
format: (result) => {
|
|
96
162
|
const lines = [];
|
|
97
163
|
lines.push(`# ${result.title}`);
|
|
98
|
-
lines.push(`**FR ${result.documentNumber}** · ${result.type} · ${result.agencies
|
|
164
|
+
lines.push(`**FR ${result.documentNumber}** · ${result.type} · ${formatAgencies(result.agencies)} · published ${result.publicationDate}`);
|
|
99
165
|
if (result.action)
|
|
100
166
|
lines.push(`**Action:** ${result.action}`);
|
|
101
167
|
if (result.dates)
|
|
@@ -130,8 +196,19 @@ export const getDocumentTool = tool('regulations_get_document', {
|
|
|
130
196
|
lines.push(`- HTML: ${result.bodyHtmlUrl}`);
|
|
131
197
|
lines.push(`- Raw text: ${result.rawTextUrl}`);
|
|
132
198
|
lines.push(`- Federal Register page: ${result.htmlUrl}`);
|
|
133
|
-
if (result.
|
|
134
|
-
|
|
199
|
+
if (result.fullTextLength !== undefined) {
|
|
200
|
+
const start = result.fullTextOffset ?? 0;
|
|
201
|
+
const end = start + (result.fullText?.length ?? 0);
|
|
202
|
+
const span = result.fullText
|
|
203
|
+
? `characters ${start.toLocaleString('en-US')}–${end.toLocaleString('en-US')}`
|
|
204
|
+
: `nothing from offset ${start.toLocaleString('en-US')}`;
|
|
205
|
+
lines.push(`\n## Full text (${span} of ${result.fullTextLength.toLocaleString('en-US')}; fullTextOffset ${start}, fullTextLength ${result.fullTextLength})`);
|
|
206
|
+
if (result.fullTextNextOffset !== undefined) {
|
|
207
|
+
lines.push(`More text follows — resume with offset=${result.fullTextNextOffset} (fullTextNextOffset).`);
|
|
208
|
+
}
|
|
209
|
+
if (result.fullText)
|
|
210
|
+
lines.push(`\n---\n\n${result.fullText}`);
|
|
211
|
+
}
|
|
135
212
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
136
213
|
},
|
|
137
214
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-document.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-document.tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"get-document.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-document.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;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,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,kFAAkF;AAClF,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEjC,2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