@cyanheads/wsdot-mcp-server 0.2.6 → 0.4.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 +32 -23
- package/changelog/0.3.x/0.3.0.md +30 -0
- package/changelog/0.4.x/0.4.0.md +26 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.js +40 -5
- package/dist/mcp-server/tools/definitions/get-ferry-routes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.d.ts +10 -3
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.js +96 -20
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.js +12 -5
- package/dist/mcp-server/tools/definitions/get-ferry-terminals.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.js +9 -4
- package/dist/mcp-server/tools/definitions/get-mountain-passes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.js +2 -0
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.d.ts +4 -0
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.js +123 -79
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.js +103 -101
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts +10 -0
- package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-alerts.tool.js +152 -130
- package/dist/mcp-server/tools/definitions/search-alerts.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-cameras.tool.d.ts +12 -0
- package/dist/mcp-server/tools/definitions/search-cameras.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-cameras.tool.js +118 -67
- package/dist/mcp-server/tools/definitions/search-cameras.tool.js.map +1 -1
- package/dist/mcp-server/tools/page-budget.d.ts +56 -0
- package/dist/mcp-server/tools/page-budget.d.ts.map +1 -0
- package/dist/mcp-server/tools/page-budget.js +76 -0
- package/dist/mcp-server/tools/page-budget.js.map +1 -0
- package/dist/services/ferry/ferry-service.d.ts +20 -0
- package/dist/services/ferry/ferry-service.d.ts.map +1 -1
- package/dist/services/ferry/ferry-service.js +186 -49
- package/dist/services/ferry/ferry-service.js.map +1 -1
- package/dist/services/ferry/types.d.ts +52 -4
- package/dist/services/ferry/types.d.ts.map +1 -1
- package/dist/services/text-field.d.ts +31 -0
- package/dist/services/text-field.d.ts.map +1 -0
- package/dist/services/text-field.js +41 -0
- package/dist/services/text-field.js.map +1 -0
- package/dist/services/traffic/traffic-service.d.ts.map +1 -1
- package/dist/services/traffic/traffic-service.js +66 -86
- package/dist/services/traffic/traffic-service.js.map +1 -1
- package/dist/services/traffic/types.d.ts +3 -3
- package/dist/services/traffic/types.d.ts.map +1 -1
- package/dist/services/wcf-date.d.ts +6 -4
- package/dist/services/wcf-date.d.ts.map +1 -1
- package/dist/services/wcf-date.js +8 -4
- package/dist/services/wcf-date.js.map +1 -1
- package/package.json +2 -2
- package/server.json +3 -3
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
7
|
import { coordinatePair } from '../coordinate-pair.js';
|
|
8
|
+
import { continuationNotice, fitPageToBudget, MAX_FILTER_LENGTH, PAGE_BYTE_BUDGET, renderPage, } from '../page-budget.js';
|
|
9
|
+
import { routeMatches } from '../../../services/traffic/route-match.js';
|
|
8
10
|
import { getTrafficApiService } from '../../../services/traffic/traffic-service.js';
|
|
9
11
|
const DEFAULT_LIMIT = 50;
|
|
10
12
|
const MAX_LIMIT = 500;
|
|
@@ -19,16 +21,47 @@ function routeDesignation(stateRoute) {
|
|
|
19
21
|
const number = stateRoute.replace(/^0+(?=\d)/, '');
|
|
20
22
|
return INTERSTATE_ROUTE_NUMBERS.has(number) ? `I-${number}` : `SR ${number}`;
|
|
21
23
|
}
|
|
24
|
+
const TollRateSchema = z
|
|
25
|
+
.object({
|
|
26
|
+
tripName: z.string().optional().describe('Name of the tolled trip or lane segment.'),
|
|
27
|
+
stateRoute: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('Route number as the feed reports it: bare and zero-padded, with no route type ("099", "405"). The rendered text shows the posted designation (SR 99, I-405).'),
|
|
31
|
+
travelDirection: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Direction code the feed assigns the toll trip: N, S, E, or W. On SR 99, SR 509, and SR 520 it is one fixed code per facility (S, S, and E) although trips run both ways, so read the direction of travel from the segment ends — startLocationName/endLocationName and startMilepost → endMilepost — not from this code.'),
|
|
35
|
+
startMilepost: z.number().optional().describe('Starting milepost of the toll segment.'),
|
|
36
|
+
endMilepost: z.number().optional().describe('Ending milepost of the toll segment.'),
|
|
37
|
+
tollRateInDollars: z.number().optional().describe('Current toll rate in US dollars.'),
|
|
38
|
+
message: z.string().optional().describe('Dynamic message associated with this toll.'),
|
|
39
|
+
startLocationName: z.string().optional().describe('Human-readable start location name.'),
|
|
40
|
+
endLocationName: z.string().optional().describe('Human-readable end location name.'),
|
|
41
|
+
startLatitude: z.number().optional().describe('Latitude of the segment start point.'),
|
|
42
|
+
startLongitude: z.number().optional().describe('Longitude of the segment start point.'),
|
|
43
|
+
endLatitude: z.number().optional().describe('Latitude of the segment end point.'),
|
|
44
|
+
endLongitude: z.number().optional().describe('Longitude of the segment end point.'),
|
|
45
|
+
timeUpdated: z.string().optional().describe('When this toll rate was last updated (ISO 8601).'),
|
|
46
|
+
})
|
|
47
|
+
.describe('Current toll rate for one segment or trip.');
|
|
22
48
|
export const getTollRates = tool('wsdot_get_toll_rates', {
|
|
23
49
|
title: 'Get Toll Rates',
|
|
24
50
|
description: 'Returns current dynamic toll rates for WA express lanes and tolled facilities: SR 99 (WSDOT Tunnel), ' +
|
|
25
51
|
'SR 167 HOT Lanes, I-405 Express Lanes, SR 509 tolled segment, and the SR 520 Bridge. ' +
|
|
26
52
|
'Rates are time-banded and change dynamically based on traffic conditions. ' +
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
53
|
+
'Filter to one facility with stateRoute ("SR 520", "520", "I-405", or "405" all work). ' +
|
|
54
|
+
'Each row reports stateRoute as the bare, zero-padded number the feed carries ("099", "405") — ' +
|
|
55
|
+
'the posted designation is in the rendered text. Results are paged — pass offset/limit to page ' +
|
|
56
|
+
'through the matching set. ' +
|
|
57
|
+
`A page ends at limit or at a ${PAGE_BYTE_BUDGET.toLocaleString('en-US')}-byte response budget, whichever comes first; the notice reports the next offset.`,
|
|
30
58
|
annotations: { readOnlyHint: true },
|
|
31
59
|
input: z.object({
|
|
60
|
+
stateRoute: z
|
|
61
|
+
.string()
|
|
62
|
+
.max(MAX_FILTER_LENGTH)
|
|
63
|
+
.optional()
|
|
64
|
+
.describe('Tolled route to filter by. Accepts natural forms — "SR 520", "520", "0520", "I-405", "405" — matched case- and space-insensitively against each row\'s posted designation, so a route-type prefix must agree: "SR 405" matches nothing because the I-405 Express Lanes are an Interstate. A route with no tolled facility returns an empty page whose notice names the tolled routes. Omit to include every facility.'),
|
|
32
65
|
offset: z
|
|
33
66
|
.number()
|
|
34
67
|
.int()
|
|
@@ -41,52 +74,39 @@ export const getTollRates = tool('wsdot_get_toll_rates', {
|
|
|
41
74
|
.min(1)
|
|
42
75
|
.max(MAX_LIMIT)
|
|
43
76
|
.optional()
|
|
44
|
-
.describe(`Maximum toll rates to return in this page (1–${MAX_LIMIT}). Defaults to ${DEFAULT_LIMIT}.`),
|
|
77
|
+
.describe(`Maximum toll rates to return in this page (1–${MAX_LIMIT}). Defaults to ${DEFAULT_LIMIT}. A large page ends sooner, at the ${PAGE_BYTE_BUDGET.toLocaleString('en-US')}-byte response budget.`),
|
|
45
78
|
}),
|
|
46
79
|
output: z.object({
|
|
47
80
|
rates: z
|
|
48
|
-
.array(
|
|
49
|
-
.
|
|
50
|
-
tripName: z.string().optional().describe('Name of the tolled trip or lane segment.'),
|
|
51
|
-
stateRoute: z.string().optional().describe('State route number.'),
|
|
52
|
-
travelDirection: z
|
|
53
|
-
.string()
|
|
54
|
-
.optional()
|
|
55
|
-
.describe('Travel direction code for this toll segment: N (north), S (south), E (east), W (west).'),
|
|
56
|
-
startMilepost: z.number().optional().describe('Starting milepost of the toll segment.'),
|
|
57
|
-
endMilepost: z.number().optional().describe('Ending milepost of the toll segment.'),
|
|
58
|
-
tollRateInDollars: z.number().optional().describe('Current toll rate in US dollars.'),
|
|
59
|
-
message: z.string().optional().describe('Dynamic message associated with this toll.'),
|
|
60
|
-
startLocationName: z
|
|
61
|
-
.string()
|
|
62
|
-
.optional()
|
|
63
|
-
.describe('Human-readable start location name.'),
|
|
64
|
-
endLocationName: z.string().optional().describe('Human-readable end location name.'),
|
|
65
|
-
startLatitude: z.number().optional().describe('Latitude of the segment start point.'),
|
|
66
|
-
startLongitude: z.number().optional().describe('Longitude of the segment start point.'),
|
|
67
|
-
endLatitude: z.number().optional().describe('Latitude of the segment end point.'),
|
|
68
|
-
endLongitude: z.number().optional().describe('Longitude of the segment end point.'),
|
|
69
|
-
timeUpdated: z
|
|
70
|
-
.string()
|
|
71
|
-
.optional()
|
|
72
|
-
.describe('When this toll rate was last updated (ISO 8601).'),
|
|
73
|
-
})
|
|
74
|
-
.describe('Current toll rate for one segment or trip.'))
|
|
75
|
-
.describe('Current toll rates for all active tolled facilities.'),
|
|
81
|
+
.array(TollRateSchema)
|
|
82
|
+
.describe('Current toll rates for the matching tolled facilities.'),
|
|
76
83
|
}),
|
|
77
84
|
enrichment: {
|
|
78
85
|
totalCount: z
|
|
79
86
|
.number()
|
|
80
|
-
.describe('Total toll rate entries across all pages (not just this page).'),
|
|
87
|
+
.describe('Total toll rate entries matching the filter across all pages (not just this page).'),
|
|
81
88
|
nextOffset: z
|
|
82
89
|
.number()
|
|
83
90
|
.nullable()
|
|
84
91
|
.describe('Offset to pass to retrieve the next page, or null when this is the last page.'),
|
|
85
92
|
hasMore: z.boolean().describe('True when more toll rates remain beyond the current page.'),
|
|
93
|
+
appliedFilters: z
|
|
94
|
+
.object({
|
|
95
|
+
stateRoute: z.string().optional().describe('State route filter applied.'),
|
|
96
|
+
})
|
|
97
|
+
.optional()
|
|
98
|
+
.describe('Active filters applied to the toll rates. Absent when no filter was applied.'),
|
|
86
99
|
notice: z
|
|
87
100
|
.string()
|
|
88
101
|
.optional()
|
|
89
|
-
.describe('Informational note about the page window, or guidance when no toll rate data is available or the offset ran past the end.'),
|
|
102
|
+
.describe('Informational note about the page window, or guidance when no toll rate data is available, the route has no tolled facility, or the offset ran past the end.'),
|
|
103
|
+
},
|
|
104
|
+
enrichmentTrailer: {
|
|
105
|
+
appliedFilters: {
|
|
106
|
+
render: (filters) => filters?.stateRoute
|
|
107
|
+
? `**Applied Filters:**\n- **Route:** ${filters.stateRoute}`
|
|
108
|
+
: '**Applied Filters:** none',
|
|
109
|
+
},
|
|
90
110
|
},
|
|
91
111
|
errors: [
|
|
92
112
|
{
|
|
@@ -107,27 +127,51 @@ export const getTollRates = tool('wsdot_get_toll_rates', {
|
|
|
107
127
|
},
|
|
108
128
|
],
|
|
109
129
|
async handler(input, ctx) {
|
|
130
|
+
const stateRoute = input.stateRoute?.trim() || undefined;
|
|
110
131
|
const allRates = await getTrafficApiService().getTollRates(ctx);
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
|
|
132
|
+
// The feed value carries no route type, so it is matched as its posted designation — a bare
|
|
133
|
+
// "405" would otherwise let "SR 405" return the I-405 Express Lanes.
|
|
134
|
+
const matched = stateRoute
|
|
135
|
+
? allRates.filter((r) => r.stateRoute != null && routeMatches(stateRoute, routeDesignation(r.stateRoute)))
|
|
136
|
+
: allRates;
|
|
137
|
+
// Page the matching set so structuredContent and content[] carry the identical page (the
|
|
138
|
+
// service stays fetch-only; filtering and paging are tool-handler concerns). totalCount
|
|
139
|
+
// stays the full match count so the agent knows how much lies beyond this page.
|
|
140
|
+
const totalCount = matched.length;
|
|
115
141
|
const offset = input.offset ?? 0;
|
|
116
142
|
const limit = input.limit ?? DEFAULT_LIMIT;
|
|
117
|
-
const
|
|
143
|
+
const requested = matched.slice(offset, offset + limit);
|
|
144
|
+
const rates = fitPageToBudget(requested, renderTollRate, stateRoute);
|
|
118
145
|
const hasMore = offset + rates.length < totalCount;
|
|
119
146
|
const nextOffset = hasMore ? offset + rates.length : null;
|
|
120
147
|
ctx.log.info('Toll rates fetched', { totalCount, offset, limit, returned: rates.length });
|
|
121
|
-
ctx.enrich({
|
|
122
|
-
|
|
148
|
+
ctx.enrich({
|
|
149
|
+
totalCount,
|
|
150
|
+
nextOffset,
|
|
151
|
+
hasMore,
|
|
152
|
+
...(stateRoute && { appliedFilters: { stateRoute } }),
|
|
153
|
+
});
|
|
154
|
+
if (allRates.length === 0) {
|
|
123
155
|
ctx.enrich.notice('No toll rate data available. The WSDOT API may be temporarily unavailable — retry in 30 seconds.');
|
|
124
156
|
}
|
|
157
|
+
else if (totalCount === 0) {
|
|
158
|
+
// Dedupe the designations, not the raw values — "099" and "99" are one facility.
|
|
159
|
+
const tolled = [
|
|
160
|
+
...new Set(allRates
|
|
161
|
+
.flatMap((r) => (r.stateRoute ? [r.stateRoute] : []))
|
|
162
|
+
.toSorted((a, b) => Number.parseInt(a, 10) - Number.parseInt(b, 10))
|
|
163
|
+
.map(routeDesignation)),
|
|
164
|
+
];
|
|
165
|
+
ctx.enrich.notice(`No tolled facility on ${stateRoute}. The feed carries tolls on ${tolled.join(', ')} — pass one of those, or omit stateRoute for every facility.`);
|
|
166
|
+
}
|
|
125
167
|
else if (rates.length === 0) {
|
|
126
168
|
ctx.enrich.notice(`Offset ${offset} is past the end of ${totalCount} toll rate entries. Use an offset between 0 and ${totalCount - 1}.`);
|
|
127
169
|
}
|
|
128
170
|
else {
|
|
129
|
-
const
|
|
130
|
-
ctx.enrich.notice(
|
|
171
|
+
const shown = `Showing toll rates ${offset + 1}–${offset + rates.length} of ${totalCount}.`;
|
|
172
|
+
ctx.enrich.notice(nextOffset === null
|
|
173
|
+
? shown
|
|
174
|
+
: `${shown} ${continuationNotice(nextOffset, rates.length < requested.length)}`);
|
|
131
175
|
}
|
|
132
176
|
return { rates };
|
|
133
177
|
},
|
|
@@ -135,42 +179,42 @@ export const getTollRates = tool('wsdot_get_toll_rates', {
|
|
|
135
179
|
if (result.rates.length === 0) {
|
|
136
180
|
return [{ type: 'text', text: 'No toll rate data available.' }];
|
|
137
181
|
}
|
|
138
|
-
|
|
139
|
-
for (const r of result.rates) {
|
|
140
|
-
// tripName is an opaque upstream key ("099tp03268"); the endpoint names read as a segment,
|
|
141
|
-
// so they lead. A segment whose ends carry the same name collapses to one.
|
|
142
|
-
const ends = [r.startLocationName, r.endLocationName].filter(Boolean);
|
|
143
|
-
const segment = [...new Set(ends)].join(' → ');
|
|
144
|
-
lines.push(`### ${segment || r.tripName || 'Toll segment'}`);
|
|
145
|
-
if (r.tripName)
|
|
146
|
-
lines.push(`**Trip:** ${r.tripName}`);
|
|
147
|
-
if (r.stateRoute)
|
|
148
|
-
lines.push(`**Route:** ${routeDesignation(r.stateRoute)}`);
|
|
149
|
-
if (r.travelDirection)
|
|
150
|
-
lines.push(`**Direction:** ${r.travelDirection}`);
|
|
151
|
-
if (r.startLocationName)
|
|
152
|
-
lines.push(`**From:** ${r.startLocationName}`);
|
|
153
|
-
if (r.endLocationName)
|
|
154
|
-
lines.push(`**To:** ${r.endLocationName}`);
|
|
155
|
-
if (r.startMilepost != null)
|
|
156
|
-
lines.push(`**Start MP:** ${r.startMilepost}`);
|
|
157
|
-
if (r.endMilepost != null)
|
|
158
|
-
lines.push(`**End MP:** ${r.endMilepost}`);
|
|
159
|
-
if (r.tollRateInDollars != null)
|
|
160
|
-
lines.push(`**Rate:** $${r.tollRateInDollars.toFixed(2)}`);
|
|
161
|
-
if (r.message)
|
|
162
|
-
lines.push(`**Message:** ${r.message}`);
|
|
163
|
-
const startCoords = coordinatePair(r.startLatitude, r.startLongitude);
|
|
164
|
-
if (startCoords)
|
|
165
|
-
lines.push(`**Start Coords:** ${startCoords}`);
|
|
166
|
-
const endCoords = coordinatePair(r.endLatitude, r.endLongitude);
|
|
167
|
-
if (endCoords)
|
|
168
|
-
lines.push(`**End Coords:** ${endCoords}`);
|
|
169
|
-
if (r.timeUpdated)
|
|
170
|
-
lines.push(`**Updated:** ${r.timeUpdated}`);
|
|
171
|
-
lines.push('');
|
|
172
|
-
}
|
|
173
|
-
return [{ type: 'text', text: lines.join('\n') }];
|
|
182
|
+
return [{ type: 'text', text: renderPage(result.rates, renderTollRate) }];
|
|
174
183
|
},
|
|
175
184
|
});
|
|
185
|
+
/** One toll rate's `content[]` block — shared by `format()` and the page-budget charge. */
|
|
186
|
+
function renderTollRate(r) {
|
|
187
|
+
// tripName is an opaque upstream key ("099tp03268"); the endpoint names read as a segment,
|
|
188
|
+
// so they lead. A segment whose ends carry the same name collapses to one.
|
|
189
|
+
const ends = [r.startLocationName, r.endLocationName].filter(Boolean);
|
|
190
|
+
const segment = [...new Set(ends)].join(' → ');
|
|
191
|
+
const lines = [`### ${segment || r.tripName || 'Toll segment'}`];
|
|
192
|
+
if (r.tripName)
|
|
193
|
+
lines.push(`**Trip:** ${r.tripName}`);
|
|
194
|
+
if (r.stateRoute)
|
|
195
|
+
lines.push(`**Route:** ${routeDesignation(r.stateRoute)}`);
|
|
196
|
+
if (r.travelDirection)
|
|
197
|
+
lines.push(`**Direction:** ${r.travelDirection}`);
|
|
198
|
+
if (r.startLocationName)
|
|
199
|
+
lines.push(`**From:** ${r.startLocationName}`);
|
|
200
|
+
if (r.endLocationName)
|
|
201
|
+
lines.push(`**To:** ${r.endLocationName}`);
|
|
202
|
+
if (r.startMilepost != null)
|
|
203
|
+
lines.push(`**Start MP:** ${r.startMilepost}`);
|
|
204
|
+
if (r.endMilepost != null)
|
|
205
|
+
lines.push(`**End MP:** ${r.endMilepost}`);
|
|
206
|
+
if (r.tollRateInDollars != null)
|
|
207
|
+
lines.push(`**Rate:** $${r.tollRateInDollars.toFixed(2)}`);
|
|
208
|
+
if (r.message)
|
|
209
|
+
lines.push(`**Message:** ${r.message}`);
|
|
210
|
+
const startCoords = coordinatePair(r.startLatitude, r.startLongitude);
|
|
211
|
+
if (startCoords)
|
|
212
|
+
lines.push(`**Start Coords:** ${startCoords}`);
|
|
213
|
+
const endCoords = coordinatePair(r.endLatitude, r.endLongitude);
|
|
214
|
+
if (endCoords)
|
|
215
|
+
lines.push(`**End Coords:** ${endCoords}`);
|
|
216
|
+
if (r.timeUpdated)
|
|
217
|
+
lines.push(`**Updated:** ${r.timeUpdated}`);
|
|
218
|
+
return lines.join('\n');
|
|
219
|
+
}
|
|
176
220
|
//# sourceMappingURL=get-toll-rates.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-toll-rates.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-toll-rates.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAExF,oGAAoG;AACpG,SAAS,gBAAgB,CAAC,UAAkB;IAC1C,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACnD,OAAO,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,MAAM,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"get-toll-rates.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-toll-rates.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EACL,kBAAkB,EAClB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IAAI,CAAC,CAAC,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACvD,MAAM,WAAW,GAAG,cAAc,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC;IACtE,IAAI,WAAW;QAAE,KAAK,CAAC,IAAI,CAAC,qBAAqB,WAAW,EAAE,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;IAChE,IAAI,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAC;IAC1D,IAAI,CAAC,CAAC,WAAW;QAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/D,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-travel-times.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-travel-times.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"get-travel-times.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-travel-times.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqEjE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2JzB,CAAC"}
|
|
@@ -4,8 +4,55 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
import { continuationNotice, fitPageToBudget, MAX_FILTER_LENGTH, PAGE_BYTE_BUDGET, renderPage, } from '../page-budget.js';
|
|
7
8
|
import { routeMatches } from '../../../services/traffic/route-match.js';
|
|
8
9
|
import { getTrafficApiService } from '../../../services/traffic/traffic-service.js';
|
|
10
|
+
const CorridorSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
travelTimeId: z.number().optional().describe('Unique corridor identifier.'),
|
|
13
|
+
name: z.string().optional().describe('Corridor name (e.g. "I-5: Northgate to Downtown").'),
|
|
14
|
+
description: z.string().optional().describe('Additional corridor description.'),
|
|
15
|
+
currentTimeInMinutes: z
|
|
16
|
+
.number()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Current travel time in minutes. Absent when WSDOT reports no measurement for the corridor — a reversible express lane closed in this direction reports none.'),
|
|
19
|
+
averageTimeInMinutes: z
|
|
20
|
+
.number()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Historical average travel time in minutes. Absent when WSDOT reports no measurement for the corridor.'),
|
|
23
|
+
delayInMinutes: z
|
|
24
|
+
.number()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('Delay above average in minutes. Positive means congestion. Absent when either travel time is unavailable.'),
|
|
27
|
+
timeUpdated: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('When the travel time data was last updated (ISO 8601).'),
|
|
31
|
+
distanceInMiles: z.number().optional().describe('Corridor distance in miles.'),
|
|
32
|
+
startPoint: z
|
|
33
|
+
.object({
|
|
34
|
+
roadName: z.string().optional().describe('Road name at the start.'),
|
|
35
|
+
direction: z
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
39
|
+
milePost: z.number().optional().describe('Starting milepost.'),
|
|
40
|
+
})
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Start of the measured corridor.'),
|
|
43
|
+
endPoint: z
|
|
44
|
+
.object({
|
|
45
|
+
roadName: z.string().optional().describe('Road name at the end.'),
|
|
46
|
+
direction: z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
50
|
+
milePost: z.number().optional().describe('Ending milepost.'),
|
|
51
|
+
})
|
|
52
|
+
.optional()
|
|
53
|
+
.describe('End of the measured corridor.'),
|
|
54
|
+
})
|
|
55
|
+
.describe('Travel time data for one highway corridor.');
|
|
9
56
|
const DEFAULT_LIMIT = 50;
|
|
10
57
|
const MAX_LIMIT = 500;
|
|
11
58
|
export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
@@ -15,11 +62,13 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
15
62
|
'The route filter matches two ways: a route designation ("I-5", "5", "SR 520") returns every ' +
|
|
16
63
|
'corridor measured on that route, and any text also matches corridor names ("Everett"). ' +
|
|
17
64
|
'When current time exceeds average, the corridor is congested. ' +
|
|
18
|
-
'Results are paged — pass offset/limit to page through the full set
|
|
65
|
+
'Results are paged — pass offset/limit to page through the full set. ' +
|
|
66
|
+
`A page ends at limit or at a ${PAGE_BYTE_BUDGET.toLocaleString('en-US')}-byte response budget, whichever comes first; the notice reports the next offset.`,
|
|
19
67
|
annotations: { readOnlyHint: true },
|
|
20
68
|
input: z.object({
|
|
21
69
|
route: z
|
|
22
70
|
.string()
|
|
71
|
+
.max(MAX_FILTER_LENGTH)
|
|
23
72
|
.optional()
|
|
24
73
|
.describe('Optional filter. A route designation — "I-5", "5", "005", "SR 520", "520" — matches every ' +
|
|
25
74
|
'corridor whose start or end point is on that route, whichever form the feed reports. ' +
|
|
@@ -37,60 +86,10 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
37
86
|
.min(1)
|
|
38
87
|
.max(MAX_LIMIT)
|
|
39
88
|
.optional()
|
|
40
|
-
.describe(`Maximum corridors to return in this page (1–${MAX_LIMIT}). Defaults to ${DEFAULT_LIMIT}.`),
|
|
89
|
+
.describe(`Maximum corridors to return in this page (1–${MAX_LIMIT}). Defaults to ${DEFAULT_LIMIT}. A large page ends sooner, at the ${PAGE_BYTE_BUDGET.toLocaleString('en-US')}-byte response budget.`),
|
|
41
90
|
}),
|
|
42
91
|
output: z.object({
|
|
43
|
-
corridors: z
|
|
44
|
-
.array(z
|
|
45
|
-
.object({
|
|
46
|
-
travelTimeId: z.number().optional().describe('Unique corridor identifier.'),
|
|
47
|
-
name: z
|
|
48
|
-
.string()
|
|
49
|
-
.optional()
|
|
50
|
-
.describe('Corridor name (e.g. "I-5: Northgate to Downtown").'),
|
|
51
|
-
description: z.string().optional().describe('Additional corridor description.'),
|
|
52
|
-
currentTimeInMinutes: z
|
|
53
|
-
.number()
|
|
54
|
-
.optional()
|
|
55
|
-
.describe('Current travel time in minutes. Absent when WSDOT reports no measurement for the corridor — a reversible express lane closed in this direction reports none.'),
|
|
56
|
-
averageTimeInMinutes: z
|
|
57
|
-
.number()
|
|
58
|
-
.optional()
|
|
59
|
-
.describe('Historical average travel time in minutes. Absent when WSDOT reports no measurement for the corridor.'),
|
|
60
|
-
delayInMinutes: z
|
|
61
|
-
.number()
|
|
62
|
-
.optional()
|
|
63
|
-
.describe('Delay above average in minutes. Positive means congestion. Absent when either travel time is unavailable.'),
|
|
64
|
-
timeUpdated: z
|
|
65
|
-
.string()
|
|
66
|
-
.optional()
|
|
67
|
-
.describe('When the travel time data was last updated (ISO 8601).'),
|
|
68
|
-
distanceInMiles: z.number().optional().describe('Corridor distance in miles.'),
|
|
69
|
-
startPoint: z
|
|
70
|
-
.object({
|
|
71
|
-
roadName: z.string().optional().describe('Road name at the start.'),
|
|
72
|
-
direction: z
|
|
73
|
-
.string()
|
|
74
|
-
.optional()
|
|
75
|
-
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
76
|
-
milePost: z.number().optional().describe('Starting milepost.'),
|
|
77
|
-
})
|
|
78
|
-
.optional()
|
|
79
|
-
.describe('Start of the measured corridor.'),
|
|
80
|
-
endPoint: z
|
|
81
|
-
.object({
|
|
82
|
-
roadName: z.string().optional().describe('Road name at the end.'),
|
|
83
|
-
direction: z
|
|
84
|
-
.string()
|
|
85
|
-
.optional()
|
|
86
|
-
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
87
|
-
milePost: z.number().optional().describe('Ending milepost.'),
|
|
88
|
-
})
|
|
89
|
-
.optional()
|
|
90
|
-
.describe('End of the measured corridor.'),
|
|
91
|
-
})
|
|
92
|
-
.describe('Travel time data for one highway corridor.'))
|
|
93
|
-
.describe('Travel time corridors matching the filter.'),
|
|
92
|
+
corridors: z.array(CorridorSchema).describe('Travel time corridors matching the filter.'),
|
|
94
93
|
}),
|
|
95
94
|
enrichment: {
|
|
96
95
|
totalCount: z
|
|
@@ -144,12 +143,13 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
144
143
|
const totalCount = filtered.length;
|
|
145
144
|
const offset = input.offset ?? 0;
|
|
146
145
|
const limit = input.limit ?? DEFAULT_LIMIT;
|
|
147
|
-
const
|
|
146
|
+
const requested = filtered.slice(offset, offset + limit).map((t) => ({
|
|
148
147
|
...t,
|
|
149
148
|
delayInMinutes: t.currentTimeInMinutes != null && t.averageTimeInMinutes != null
|
|
150
149
|
? t.currentTimeInMinutes - t.averageTimeInMinutes
|
|
151
150
|
: undefined,
|
|
152
151
|
}));
|
|
152
|
+
const corridors = fitPageToBudget(requested, renderCorridor, routeFilter);
|
|
153
153
|
const hasMore = offset + corridors.length < totalCount;
|
|
154
154
|
const nextOffset = hasMore ? offset + corridors.length : null;
|
|
155
155
|
ctx.log.info('Travel times fetched', {
|
|
@@ -169,8 +169,10 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
169
169
|
ctx.enrich.notice(`Offset ${offset} is past the end of ${totalCount} matching corridors. Use an offset between 0 and ${totalCount - 1}.`);
|
|
170
170
|
}
|
|
171
171
|
else {
|
|
172
|
-
const
|
|
173
|
-
ctx.enrich.notice(
|
|
172
|
+
const shown = `Showing corridors ${offset + 1}–${offset + corridors.length} of ${totalCount}.`;
|
|
173
|
+
ctx.enrich.notice(nextOffset === null
|
|
174
|
+
? shown
|
|
175
|
+
: `${shown} ${continuationNotice(nextOffset, corridors.length < requested.length)}`);
|
|
174
176
|
}
|
|
175
177
|
return { corridors };
|
|
176
178
|
},
|
|
@@ -178,51 +180,51 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
178
180
|
if (result.corridors.length === 0) {
|
|
179
181
|
return [{ type: 'text', text: 'No corridors matched.' }];
|
|
180
182
|
}
|
|
181
|
-
|
|
182
|
-
for (const c of result.corridors) {
|
|
183
|
-
lines.push(`### ${c.name ?? 'Corridor'}`);
|
|
184
|
-
if (c.description)
|
|
185
|
-
lines.push(c.description);
|
|
186
|
-
lines.push(c.currentTimeInMinutes != null
|
|
187
|
-
? `**Current:** ${c.currentTimeInMinutes} min`
|
|
188
|
-
: '**Current:** Not available — WSDOT reports no measurement for this corridor');
|
|
189
|
-
if (c.averageTimeInMinutes != null)
|
|
190
|
-
lines.push(`**Average:** ${c.averageTimeInMinutes} min`);
|
|
191
|
-
if (c.delayInMinutes != null) {
|
|
192
|
-
const sign = c.delayInMinutes > 0 ? '+' : '';
|
|
193
|
-
lines.push(`**Delay:** ${sign}${c.delayInMinutes} min${c.delayInMinutes > 0 ? ' (congested)' : ''}`);
|
|
194
|
-
}
|
|
195
|
-
if (c.distanceInMiles != null)
|
|
196
|
-
lines.push(`**Distance:** ${c.distanceInMiles} mi`);
|
|
197
|
-
if (c.startPoint) {
|
|
198
|
-
const sp = [
|
|
199
|
-
c.startPoint.roadName,
|
|
200
|
-
c.startPoint.direction,
|
|
201
|
-
c.startPoint.milePost != null ? `MP ${c.startPoint.milePost}` : undefined,
|
|
202
|
-
]
|
|
203
|
-
.filter(Boolean)
|
|
204
|
-
.join(' ');
|
|
205
|
-
if (sp)
|
|
206
|
-
lines.push(`**From:** ${sp}`);
|
|
207
|
-
}
|
|
208
|
-
if (c.endPoint) {
|
|
209
|
-
const ep = [
|
|
210
|
-
c.endPoint.roadName,
|
|
211
|
-
c.endPoint.direction,
|
|
212
|
-
c.endPoint.milePost != null ? `MP ${c.endPoint.milePost}` : undefined,
|
|
213
|
-
]
|
|
214
|
-
.filter(Boolean)
|
|
215
|
-
.join(' ');
|
|
216
|
-
if (ep)
|
|
217
|
-
lines.push(`**To:** ${ep}`);
|
|
218
|
-
}
|
|
219
|
-
if (c.timeUpdated)
|
|
220
|
-
lines.push(`**Updated:** ${c.timeUpdated}`);
|
|
221
|
-
if (c.travelTimeId != null)
|
|
222
|
-
lines.push(`**ID:** ${c.travelTimeId}`);
|
|
223
|
-
lines.push('');
|
|
224
|
-
}
|
|
225
|
-
return [{ type: 'text', text: lines.join('\n') }];
|
|
183
|
+
return [{ type: 'text', text: renderPage(result.corridors, renderCorridor) }];
|
|
226
184
|
},
|
|
227
185
|
});
|
|
186
|
+
/** One corridor's `content[]` block — shared by `format()` and the page-budget charge. */
|
|
187
|
+
function renderCorridor(c) {
|
|
188
|
+
const lines = [`### ${c.name ?? 'Corridor'}`];
|
|
189
|
+
if (c.description)
|
|
190
|
+
lines.push(c.description);
|
|
191
|
+
lines.push(c.currentTimeInMinutes != null
|
|
192
|
+
? `**Current:** ${c.currentTimeInMinutes} min`
|
|
193
|
+
: '**Current:** Not available — WSDOT reports no measurement for this corridor');
|
|
194
|
+
if (c.averageTimeInMinutes != null)
|
|
195
|
+
lines.push(`**Average:** ${c.averageTimeInMinutes} min`);
|
|
196
|
+
if (c.delayInMinutes != null) {
|
|
197
|
+
const sign = c.delayInMinutes > 0 ? '+' : '';
|
|
198
|
+
lines.push(`**Delay:** ${sign}${c.delayInMinutes} min${c.delayInMinutes > 0 ? ' (congested)' : ''}`);
|
|
199
|
+
}
|
|
200
|
+
if (c.distanceInMiles != null)
|
|
201
|
+
lines.push(`**Distance:** ${c.distanceInMiles} mi`);
|
|
202
|
+
if (c.startPoint) {
|
|
203
|
+
const sp = [
|
|
204
|
+
c.startPoint.roadName,
|
|
205
|
+
c.startPoint.direction,
|
|
206
|
+
c.startPoint.milePost != null ? `MP ${c.startPoint.milePost}` : undefined,
|
|
207
|
+
]
|
|
208
|
+
.filter(Boolean)
|
|
209
|
+
.join(' ');
|
|
210
|
+
if (sp)
|
|
211
|
+
lines.push(`**From:** ${sp}`);
|
|
212
|
+
}
|
|
213
|
+
if (c.endPoint) {
|
|
214
|
+
const ep = [
|
|
215
|
+
c.endPoint.roadName,
|
|
216
|
+
c.endPoint.direction,
|
|
217
|
+
c.endPoint.milePost != null ? `MP ${c.endPoint.milePost}` : undefined,
|
|
218
|
+
]
|
|
219
|
+
.filter(Boolean)
|
|
220
|
+
.join(' ');
|
|
221
|
+
if (ep)
|
|
222
|
+
lines.push(`**To:** ${ep}`);
|
|
223
|
+
}
|
|
224
|
+
if (c.timeUpdated)
|
|
225
|
+
lines.push(`**Updated:** ${c.timeUpdated}`);
|
|
226
|
+
if (c.travelTimeId != null)
|
|
227
|
+
lines.push(`**ID:** ${c.travelTimeId}`);
|
|
228
|
+
return lines.join('\n');
|
|
229
|
+
}
|
|
228
230
|
//# sourceMappingURL=get-travel-times.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-travel-times.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-travel-times.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,MAAM,
|
|
1
|
+
{"version":3,"file":"get-travel-times.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-travel-times.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,MAAM,cAAc,GAAG,CAAC;KACrB,MAAM,CAAC;IACN,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IAC3E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IAC1F,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC/E,oBAAoB,EAAE,CAAC;SACpB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,8JAA8J,CAC/J;IACH,oBAAoB,EAAE,CAAC;SACpB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,uGAAuG,CACxG;IACH,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,2GAA2G,CAC5G;IACH,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,wDAAwD,CAAC;IACrE,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;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