add Google Maps route import and plugin corridor search

This commit is contained in:
Maurice
2026-09-12 12:24:33 +02:00
parent af45b0ca74
commit ff5fa55fad
59 changed files with 849 additions and 36 deletions
+4
View File
@@ -407,3 +407,7 @@ It is already silent in CI (any `CI` env var), under `NODE_ENV=test`, and whenev
stdout isn't a terminal (i.e. when piped or redirected).
The SDK tooling in this repo is MIT. Your plugin is your own code under your own license.
### Roadtrip category searches
The `searchProvider.search` request can include `category` and `bounds` (south, west, north, east). Search within that rectangle for the category; `query` remains a readable category query and `near` its centre, so existing providers continue to work. These optional fields are absent on older hosts and ordinary name searches. The host validates and filters coordinates, namespaces IDs, and applies the exact route corridor after combining sources. The existing permission and two-second hook timeout still apply.
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "trek-plugin-sdk",
"version": "1.7.0",
"version": "1.7.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "trek-plugin-sdk",
"version": "1.7.0",
"version": "1.7.1",
"license": "MIT",
"dependencies": {
"@clack/prompts": "^1.7.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "trek-plugin-sdk",
"version": "1.7.0",
"version": "1.7.1",
"description": "SDK for building TREK plugins: types, definePlugin, a mock host, manifest validation, and the create-trek-plugin / trek-plugin CLIs.",
"type": "module",
"license": "MIT",
+3
View File
@@ -505,6 +505,9 @@ export interface SearchRequest {
lang?: string;
/** Where the person is looking, when there is somewhere to bias toward. */
near?: { lat: number; lng: number };
/** Category search within a Roadtrip search rectangle. Older hosts omit these fields. */
category?: string;
bounds?: { south: number; west: number; north: number; east: number };
}
export interface SearchProvider {
/** Places for a query, drawn into TREK's own search list beside the core results.