@tomtom-org/maps-sdk-plugin-agent-toolkit 0.7.0 → 0.9.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/README.md CHANGED
@@ -79,7 +79,7 @@ function ChatPanel() {
79
79
  }
80
80
  ```
81
81
 
82
- See [`examples/map-chat-agent-react`](../../examples/map-chat-agent-react) for a full working example.
82
+ See [`examples/map-traffic-agent-react`](../../examples/map-traffic-agent-react) for a full working example.
83
83
 
84
84
  ## Tools reference
85
85
 
@@ -105,7 +105,7 @@ The plugin ships a `DEFAULT_TOOLS` registry covering search, routing, traffic, r
105
105
  | `removeWaypointsFromRoute` | Remove one or more waypoints by index from the current route |
106
106
  | `replaceWaypointInRoute` | Overwrite a single waypoint of the current route in place — origin, destination, or by index |
107
107
  | `getCurrentWaypoints` | Get the staged waypoint slots (origin, stops, destination) |
108
- | `findReachableAreas` | Calculate isochrone/isodistance polygons from one or more origins |
108
+ | `findReachableAreas` | Calculate isochrone/isodistance polygons from one or more origins (private preview: the API key needs Calculate Reachable Range access) |
109
109
 
110
110
  ### Traffic
111
111
 
@@ -119,8 +119,7 @@ The plugin ships a `DEFAULT_TOOLS` registry covering search, routing, traffic, r
119
119
  | `queryTrafficAnalytics` | Query cached analytics data or check what is currently displayed |
120
120
  | `toggleTilesTrafficFlow` | Toggle the real-time traffic-flow tile overlay |
121
121
  | `toggleTilesTrafficIncidents` | Toggle the real-time traffic-incidents tile overlay |
122
- | `describeMapStyling` | List the semantic base-map styling knobs (sizes, toggles, POI and traffic colours) with ranges and current values |
123
- | `setMapStyling` | Set or reset base-map styling knobs — label/icon/road sizes, exit numbers, shields, 3D buildings, congestion colours… |
122
+ | `setMapStyling` | Set or reset base-map styling knobs — label/icon/road sizes, exit numbers, shields, 3D buildings, congestion colours, map colours, presets, or a whole theme from a few colours or an image |
124
123
  | `getShownTileIncidents` | List real-time incidents visible in the current viewport |
125
124
 
126
125
  ### Bring-your-own-data (BYOD)
@@ -556,4 +555,4 @@ For the complete, always-current list of exports — factories, tool-registry he
556
555
  - [Bring your own data](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/byod) — ingest customer GeoJSON layers
557
556
  - [AI SDK v6 documentation](https://ai-sdk.dev/)
558
557
  - [TomTom Maps SDK documentation](https://docs.tomtom.com/maps-sdk-js)
559
- - [Example application](../../examples/map-chat-agent-react) — full chat interface implementation
558
+ - [Example application](../../examples/map-traffic-agent-react) — full chat interface implementation
package/THIRD_PARTY.txt CHANGED
@@ -49,7 +49,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
49
  ---
50
50
 
51
51
  Name: ai
52
- Version: 6.0.266
52
+ Version: 6.0.291
53
53
  License: Apache-2.0
54
54
  Bundled: false (peer dependency)
55
55
  Description: AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.
@@ -334,7 +334,7 @@ limitations under the License.
334
334
  ---
335
335
 
336
336
  Name: maplibre-gl
337
- Version: 6.9.0
337
+ Version: 6.11.2
338
338
  License: BSD-3-Clause
339
339
  Bundled: false (peer dependency)
340
340
  Description: BSD licensed community fork of mapbox-gl, a WebGL interactive maps library
@@ -464,7 +464,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
464
464
  ---
465
465
 
466
466
  Name: zod
467
- Version: 4.4.3
467
+ Version: 4.6.5
468
468
  License: MIT
469
469
  Bundled: false (peer dependency)
470
470
  Description: TypeScript-first schema declaration and validation library with static type inference
@@ -39,7 +39,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39
39
  ---
40
40
 
41
41
  Name: ai
42
- Version: 6.0.266
42
+ Version: 6.0.291
43
43
  License: Apache-2.0
44
44
  Bundled: false (peer dependency)
45
45
  Description: AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.
@@ -324,7 +324,7 @@ limitations under the License.
324
324
  ---
325
325
 
326
326
  Name: maplibre-gl
327
- Version: 6.9.0
327
+ Version: 6.11.2
328
328
  License: BSD-3-Clause
329
329
  Bundled: false (peer dependency)
330
330
  Description: BSD licensed community fork of mapbox-gl, a WebGL interactive maps library
@@ -454,7 +454,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
454
454
  ---
455
455
 
456
456
  Name: zod
457
- Version: 4.4.3
457
+ Version: 4.6.5
458
458
  License: MIT
459
459
  Bundled: false (peer dependency)
460
460
  Description: TypeScript-first schema declaration and validation library with static type inference
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseMapModule, CustomGeoJSONLayerSpec, CustomGeoJSONModule, GeometriesModule, GeometryTheme, POIsModule, PlaceConnectionDisplay, PlacesModule, PlanningWaypoint, RoutingModule, StylingModule, TomTomMap, TrafficAreaAnalyticsConfig, TrafficAreaAnalyticsModule, TrafficFlowModule, TrafficIncidentOverlayModule, TrafficIncidentsModule } from "@tomtom-org/maps-sdk/map";
1
+ import { BaseMapModule, CustomGeoJSONLayerSpec, CustomGeoJSONModule, GeometriesModule, GeometryFillStyle, POIsModule, PlaceConnectionDisplay, PlacesModule, PlanningWaypoint, RoutingModule, StylingModule, TomTomMap, TrafficAreaAnalyticsModule, TrafficAreaAnalyticsModuleConfig, TrafficFlowModule, TrafficIncidentOverlayModule, TrafficIncidentsModule } from "@tomtom-org/maps-sdk/map";
2
2
  import { BBox, CommonPlaceProps, GeographyType, POICategory, Place, Places, PolygonFeature, PolygonFeatures, Route, Routes, TrafficAreaAnalytics, TrafficIncident, WaypointLike } from "@tomtom-org/maps-sdk/core";
3
3
  import { ChartConfiguration } from "chart.js";
4
4
  import { Map as Map$1 } from "maplibre-gl";
@@ -734,9 +734,6 @@ export declare const AGENT_TOOLKIT_USER_AGENT: string;
734
734
  * `tomtom-user-agent` override (see `generateTomTomHeaders`, `core/src/util/headers.ts`) — reuses
735
735
  * an existing, already-allow-listed header rather than adding a new one.
736
736
  *
737
- * Not applicable to `searchOne`/`geocodeOne` (and the `searchOneFn`/`geocodeOneFn` dispatch in
738
- * `locate-places.ts`) — those take a bare query string with no params object to tag.
739
- *
740
737
  * @ignore
741
738
  */
742
739
  export declare const withAgentToolkitHeaders: <P extends object>(params: P) => P;
@@ -1214,9 +1211,9 @@ declare class PlacesState implements StateSlice {
1214
1211
  getEntryPlacesModule(entryId: string, markerType: PlacesMarkerType): Promise<PlacesModule>;
1215
1212
  /**
1216
1213
  * Lazy-init and return the entry's place-geometries module (for POI footprints, municipality
1217
- * outlines). Re-applies themed config when the theme changes. Throws on unknown entry id.
1214
+ * outlines). Re-applies the config when the fill style changes. Throws on unknown entry id.
1218
1215
  */
1219
- getEntryGeometriesModule(entryId: string, theme?: GeometryTheme): Promise<GeometriesModule>;
1216
+ getEntryGeometriesModule(entryId: string, fillStyle?: GeometryFillStyle): Promise<GeometriesModule>;
1220
1217
  private _requireEntry;
1221
1218
  get entries(): readonly PlacesEntry[];
1222
1219
  /**
@@ -1262,7 +1259,7 @@ declare class PlacesState implements StateSlice {
1262
1259
  * `entryId` defaults to the latest entry that owns geometries — handy when callers only ever
1263
1260
  * render the most-recently produced footprints. Pass an explicit id to target an older one.
1264
1261
  */
1265
- showPlaceGeometries(features: PolygonFeature<CommonPlaceProps>[], theme?: GeometryTheme, mode?: 'add' | 'replace', entryId?: string): Promise<void>;
1262
+ showPlaceGeometries(features: PolygonFeature<CommonPlaceProps>[], fillStyle?: GeometryFillStyle, mode?: 'add' | 'replace', entryId?: string): Promise<void>;
1266
1263
  private _latestGeometriesEntryId;
1267
1264
  private _buildGeometryIndex;
1268
1265
  /** IDs of all entries currently shown on the map. */
@@ -1389,8 +1386,8 @@ type RangesEntry = BaseEntry<ReachableRange[]> & {
1389
1386
  geometries?: GeometriesModule;
1390
1387
  places?: PlacesModule;
1391
1388
  };
1392
- /** Theme that the geometries module is currently configured with. */
1393
- _shownTheme?: 'filled' | 'outline' | 'inverted';
1389
+ /** Fill style that the geometries module is currently configured with. */
1390
+ _shownFillStyle?: GeometryFillStyle;
1394
1391
  /** True while any of this entry's modules are rendering on the map. */
1395
1392
  _shown?: boolean;
1396
1393
  };
@@ -1448,9 +1445,9 @@ declare class RangeState implements ShownEntriesSlice {
1448
1445
  setEntryMode(mode: EntryMode): Promise<void>;
1449
1446
  /**
1450
1447
  * Lazy-init the entry's GeometriesModule (for the isochrone/isodistance polygons),
1451
- * applying the requested theme. Throws on unknown id.
1448
+ * applying the requested fill style. Throws on unknown id.
1452
1449
  */
1453
- getEntryGeometriesModule(entryId: string, theme?: GeometryTheme): Promise<GeometriesModule>;
1450
+ getEntryGeometriesModule(entryId: string, fillStyle?: GeometryFillStyle): Promise<GeometriesModule>;
1454
1451
  /**
1455
1452
  * Lazy-init the entry's origin-pin PlacesModule. Each entry maintains its own pin module
1456
1453
  * so multiple ranges entries can be on the map simultaneously without the pins of one
@@ -1991,7 +1988,7 @@ type TrafficAreaAnalyticsEntry = BaseEntry<TrafficAreaAnalytics> & {
1991
1988
  */
1992
1989
  _module?: TrafficAreaAnalyticsModule;
1993
1990
  /** Latest viz config reflected from the module (mode / metric / scaleMode / …). */
1994
- _config?: TrafficAreaAnalyticsConfig;
1991
+ _config?: TrafficAreaAnalyticsModuleConfig;
1995
1992
  /** Unsubscribe from this entry's module config-change wiring. Cleared on hide / remove. */
1996
1993
  _configChangeUnsub?: () => void;
1997
1994
  /** True while `_module` is rendering on the map. */
@@ -2020,7 +2017,7 @@ type TrafficAreaAnalyticsStateEvents = {
2020
2017
  /** Per-entry viz config changed (mode / metric / scaleMode / …). */
2021
2018
  'config-change': {
2022
2019
  entryId: string;
2023
- config: TrafficAreaAnalyticsConfig | undefined;
2020
+ config: TrafficAreaAnalyticsModuleConfig | undefined;
2024
2021
  };
2025
2022
  /** Display policy switched between `single` and `multiple`. */
2026
2023
  'mode-change': EntryMode;
@@ -2977,6 +2974,16 @@ export declare const showModeSchema: z.ZodOptional<z.ZodEnum<{
2977
2974
  add: "add";
2978
2975
  replace: "replace";
2979
2976
  }>>;
2977
+ /**
2978
+ * How rendered polygons are filled — the SDK's `GeometryFillStyle`.
2979
+ *
2980
+ * @ignore
2981
+ */
2982
+ export declare const geometryFillStyleSchema: z.ZodEnum<{
2983
+ filled: "filled";
2984
+ outline: "outline";
2985
+ inverted: "inverted";
2986
+ }>;
2980
2987
  /**
2981
2988
  * Shared schema for the geometry-rendering option on tools that produce a places entry
2982
2989
  * (discoverPlaces, locatePlace, ...). When provided, the tool batch-fetches boundary
@@ -2990,7 +2997,7 @@ export declare const showPlaceGeometriesSchema: z.ZodOptional<z.ZodObject<{
2990
2997
  add: "add";
2991
2998
  replace: "replace";
2992
2999
  }>>;
2993
- theme: z.ZodOptional<z.ZodEnum<{
3000
+ fillStyle: z.ZodOptional<z.ZodEnum<{
2994
3001
  filled: "filled";
2995
3002
  outline: "outline";
2996
3003
  inverted: "inverted";
@@ -3005,7 +3012,7 @@ export declare const showPlaceGeometriesSchema: z.ZodOptional<z.ZodObject<{
3005
3012
  * @ignore
3006
3013
  */
3007
3014
  export declare const geometryDisplayConfigSchema: z.ZodObject<{
3008
- theme: z.ZodOptional<z.ZodEnum<{
3015
+ fillStyle: z.ZodOptional<z.ZodEnum<{
3009
3016
  filled: "filled";
3010
3017
  outline: "outline";
3011
3018
  inverted: "inverted";
@@ -3359,12 +3366,12 @@ type CustomGeometriesEntry = BaseEntry<PolygonFeature[]> & {
3359
3366
  provenance: GeometryProvenance;
3360
3367
  /**
3361
3368
  * Per-entry GeometriesModule. Each entry owns its own module so display state
3362
- * (theme, current features) lives on the entry instead of a shared slice-level
3369
+ * (fill style, current features) lives on the entry instead of a shared slice-level
3363
3370
  * module. Lazy-initialised via CustomGeometriesState helpers.
3364
3371
  */
3365
3372
  _module?: GeometriesModule;
3366
- /** Theme that the geometries module is currently configured with. */
3367
- _shownTheme?: 'filled' | 'outline' | 'inverted';
3373
+ /** Fill style that the geometries module is currently configured with. */
3374
+ _shownFillStyle?: GeometryFillStyle;
3368
3375
  /** True while this entry's `_module` is rendering on the map. */
3369
3376
  _shown?: boolean;
3370
3377
  };
@@ -3425,8 +3432,8 @@ declare class CustomGeometriesState implements ShownEntriesSlice, StateSlice {
3425
3432
  * Returns the assigned id. Under `single` mode the new entry replaces every older one.
3426
3433
  */
3427
3434
  addEntry(features: PolygonFeature<CommonPlaceProps>[], provenance: CustomGeometriesEntry['provenance'], label: string, explicitId?: string): Promise<string>;
3428
- /** Lazy-init the entry's GeometriesModule, applying / re-applying the requested theme. */
3429
- getEntryGeometriesModule(entryId: string, theme?: GeometryTheme): Promise<GeometriesModule>;
3435
+ /** Lazy-init the entry's GeometriesModule, applying / re-applying the requested fill style. */
3436
+ getEntryGeometriesModule(entryId: string, fillStyle?: GeometryFillStyle): Promise<GeometriesModule>;
3430
3437
  /**
3431
3438
  * Render this entry's polygons. `mode` is scoped to this entry's own layer:
3432
3439
  * - `'replace'` (default) — show exactly `entry.data`, clearing whatever the
@@ -3438,7 +3445,7 @@ declare class CustomGeometriesState implements ShownEntriesSlice, StateSlice {
3438
3445
  * shown entries are hidden first; otherwise the caller uses `hideEntry` / the
3439
3446
  * tools' `hidePreviousEntries` option.
3440
3447
  */
3441
- showEntry(entryId: string, theme?: GeometryTheme, mode?: 'add' | 'replace'): Promise<void>;
3448
+ showEntry(entryId: string, fillStyle?: GeometryFillStyle, mode?: 'add' | 'replace'): Promise<void>;
3442
3449
  private _hideOthersUnderSingleMode;
3443
3450
  hideEntry(entryId: string): Promise<void>;
3444
3451
  /** Drop a single entry from history (clears its module first). No-op when unknown. */
@@ -3915,7 +3922,6 @@ export declare const DEFAULT_TOOLS: {
3915
3922
  setMapStandardStyle: ToolDefinition;
3916
3923
  setLanguage: ToolDefinition;
3917
3924
  toggleTilesPOIs: ToolDefinition;
3918
- describeMapStyling: ToolDefinition;
3919
3925
  setMapStyling: ToolDefinition;
3920
3926
  toggleTilesTrafficFlow: ToolDefinition;
3921
3927
  toggleTilesTrafficIncidents: ToolDefinition;