@tomtom-org/maps-sdk-plugin-agent-toolkit 0.13.0 → 0.14.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/LICENSE.txt +4 -4
- package/README.md +16 -10
- package/THIRD_PARTY.txt +1 -1
- package/dist/THIRD_PARTY.txt +1 -1
- package/dist/index.d.ts +733 -736
- package/dist/index.es.js +1 -2
- package/dist/third-party.json +1 -1
- package/dist/worker-libs-CUm6Y1-t.js +1 -2
- package/package.json +7 -6
- package/dist/index.es.js.map +0 -1
- package/dist/worker-libs-CUm6Y1-t.js.map +0 -1
package/LICENSE.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
TOMTOM MAPS SDK FOR JAVASCRIPT LICENSE AGREEMENT (“AGREEMENT”)
|
|
2
2
|
|
|
3
|
-
Last update:
|
|
3
|
+
Last update: October 2026
|
|
4
4
|
|
|
5
|
-
By downloading or accessing the “TomTom Maps SDK for JavaScript” (the “SDK”), you are entering into a binding agreement with TomTom Global Content B.V. (“TomTom”). The SDK comprises all software, binaries and source code made available by TomTom for it, whether through the TomTom Developer Portal or public code repositories (e.g. GitHub). This Agreement with TomTom consists of the terms and conditions below together with the Data Processing Schedule. You should not use the SDK if you cannot agree to both.
|
|
5
|
+
By downloading or accessing the “TomTom Maps SDK for JavaScript” (the “SDK”), you are entering into a binding agreement with TomTom Global Content B.V. (“TomTom”). The SDK comprises all software, binaries and source code made available by TomTom for it, whether through the TomTom Developer Portal, package registries (e.g. npm) or otherwise. The example applications that TomTom publishes in public code repositories (e.g. GitHub) are not part of the SDK: they are licensed separately, under the license distributed with them. This Agreement with TomTom consists of the terms and conditions below together with the Data Processing Schedule. You should not use the SDK if you cannot agree to both.
|
|
6
6
|
|
|
7
7
|
You may not use the SDK or accept this Agreement if you are barred from receiving it under the laws of the European Union or of any other country, including the country in which you are resident or from which you use the SDK. If you accept this Agreement on behalf of your employer or another entity, you represent and warrant that you have full legal authority to bind that employer or entity. If you do not have that authority, you may not accept this Agreement or use the SDK on their behalf.
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ You may not use the SDK or accept this Agreement if you are barred from receivin
|
|
|
14
14
|
|
|
15
15
|
3.1. You agree to use the SDK only for purposes permitted by (a) this Agreement and (b) any applicable law, regulation or generally accepted practice or guideline in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
|
|
16
16
|
|
|
17
|
-
3.2. Other than as permitted by applicable legislation, you are prohibited from copying (except for backup purposes), modifying, adapting, (re)distributing, renting, lending, publicly presenting, decompiling, reverse engineering, disassembling or creating derivative works of the SDK or any part of it. Notwithstanding the foregoing,
|
|
17
|
+
3.2. Other than as permitted by applicable legislation, you are prohibited from copying (except for backup purposes), modifying, adapting, (re)distributing, renting, lending, publicly presenting, decompiling, reverse engineering, disassembling or creating derivative works of the SDK or any part of it. Notwithstanding the foregoing, you may inspect the SDK as distributed to you, including any source code embedded in its source maps, solely for the purpose of debugging your Permitted Application, provided that it is not shared or redistributed. The readability of the SDK’s source code in its distribution does not constitute “Open-Source” licensing and grants you no rights under any Open Source Initiative (OSI) approved license, nor shall it be construed as a grant of rights to modify, fork or redistribute the SDK beyond those expressly granted in Clause 1 and this Clause 3.2.
|
|
18
18
|
|
|
19
19
|
3.3. You may not use the SDK in connection with any illegal, fraudulent, dishonest or unethical activity or behaviour, and in particular not to create or develop, or help others create or develop, a product, service or library that competes, directly or indirectly, with the SDK or the TomTom APIs.
|
|
20
20
|
|
|
@@ -78,7 +78,7 @@ You may not use the SDK or accept this Agreement if you are barred from receivin
|
|
|
78
78
|
|
|
79
79
|
11.4. The TomTom APIs and the SDK are provided as “Commercial Computer Software” or “restricted computer software”. Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions set forth in 48 C.F.R. Section 12.212 or 48 C.F.R. 227.2702, as applicable, or successor provisions. In respect of the Map API and Search API, the manufacturer is TomTom Global Content B.V.
|
|
80
80
|
|
|
81
|
-
11.5. By submitting any suggestion, bug fix or code contribution (“Contribution”) to TomTom (e.g. via a GitHub
|
|
81
|
+
11.5. By submitting any suggestion, bug fix or code contribution (“Contribution”) to TomTom (e.g. via a GitHub issue or discussion), you grant TomTom a perpetual, irrevocable, worldwide, royalty-free and non-exclusive license to use, reproduce, modify and distribute the Contribution as part of the SDK. You represent that you have the legal right to grant this license and that the Contribution does not infringe any third-party intellectual property rights.
|
|
82
82
|
|
|
83
83
|
THIRD PARTY SOFTWARE NOTICES
|
|
84
84
|
|
package/README.md
CHANGED
|
@@ -118,10 +118,6 @@ The plugin ships a `DEFAULT_TOOLS` registry covering search, routing, traffic, r
|
|
|
118
118
|
| `clusterIncidents` | Group loaded incidents into hotspots (DBSCAN) with road and category labels, delay totals and trends |
|
|
119
119
|
| `focusIncidents` | Highlight a subset of incidents (by id / category / severity) on the map and dim the rest |
|
|
120
120
|
| `getTrafficAreaAnalytics` | Fetch historical traffic analytics (speed, congestion, travel time) for an area |
|
|
121
|
-
| `toggleTilesTrafficFlow` | Toggle the real-time traffic-flow tile overlay |
|
|
122
|
-
| `toggleTilesTrafficIncidents` | Toggle the real-time traffic-incidents tile overlay |
|
|
123
|
-
| `setMapStyling` | Set or reset how the map looks — label/icon/road sizes, exit numbers and road arrows, POI and hillshade looks, congestion colours, map colours, map presets, or a whole theme from a few colours or an image |
|
|
124
|
-
|
|
125
121
|
### Trackers
|
|
126
122
|
|
|
127
123
|
| Tool | Description |
|
|
@@ -152,16 +148,16 @@ The plugin ships a `DEFAULT_TOOLS` registry covering search, routing, traffic, r
|
|
|
152
148
|
|
|
153
149
|
> See [Code generation](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/code-generation) for the injected identifiers, output contracts, and threat model, and [Scope-aware data tools](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/scope-aware-data-tools) for how the per-turn classifier scope keeps the prompt small.
|
|
154
150
|
|
|
155
|
-
`analyseData`
|
|
151
|
+
`analyseData`, `processData`, `createTracker` and `clusterIncidents` code is **always isolated in the browser** — a Web Worker in a sandboxed, opaque-origin iframe (no DOM/network; terminable on timeout), zero-config (the SDK lazily loads its own bundled turf/h3 for the worker). Where the code runs is chosen by environment, not configured: the browser always isolates; Node / SSR always run on the main thread (where that boundary has no equivalent — defense-in-depth only). The optional `codeExecution` only tunes the isolated browser run:
|
|
156
152
|
|
|
157
153
|
```typescript
|
|
158
154
|
const agent = createMapAgent(map, {
|
|
159
155
|
model,
|
|
160
|
-
codeExecution: { timeoutMs: 5000 }, // wall-clock budget per isolated run (default
|
|
156
|
+
codeExecution: { timeoutMs: 5000 }, // wall-clock budget per isolated run (default 10000)
|
|
161
157
|
});
|
|
162
158
|
```
|
|
163
159
|
|
|
164
|
-
> **Experimental** — the isolation boundary is verified by the `e2e-tests/` suite (CSP egress-block, worker termination, opaque-origin isolation), which runs in CI as a dedicated job; if the iframe can't initialise it falls back to the main thread (with a warning). `turf` / `h3` / `routeUtils` are all bundled into the worker, so
|
|
160
|
+
> **Experimental** — the isolation boundary is verified by the `e2e-tests/` suite (CSP egress-block, worker termination, opaque-origin isolation), which runs in CI as a dedicated job; if the iframe can't initialise it falls back to the main thread (with a warning). `turf` / `h3` / `routeUtils` are all bundled into the worker, so that code (route-slicing included) runs fully in the browser. See the [code-generation guide](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/code-generation#data-tool-execution-isolation-experimental).
|
|
165
161
|
|
|
166
162
|
### Map display
|
|
167
163
|
|
|
@@ -183,7 +179,8 @@ const agent = createMapAgent(map, {
|
|
|
183
179
|
| `getStandardMapStyles` | List available standard map style presets |
|
|
184
180
|
| `setMapStandardStyle` | Switch map style (light, dark, satellite, driving, etc.) |
|
|
185
181
|
| `setLanguage` | Change the language for map labels and API responses |
|
|
186
|
-
| `
|
|
182
|
+
| `setGeopoliticalView` | Show disputed borders and territory names from a country's view, for the map and later searches |
|
|
183
|
+
| `setMapStyling` | Set or reset what the base map shows and how it looks, by knob id — layer groups such as 3D buildings, the built-in POI icons and their categories, the live traffic overlays and their filters, the hillshade and 3D terrain, sizes, colours, map presets, or a whole theme from a few colours or an image |
|
|
187
184
|
|
|
188
185
|
### MapLibre direct access
|
|
189
186
|
|
|
@@ -386,6 +383,15 @@ agent.state.fleet; // FleetState — custom slice
|
|
|
386
383
|
agent.state.places; // PlacesState — append-only history of place entries
|
|
387
384
|
```
|
|
388
385
|
|
|
386
|
+
## Privacy
|
|
387
|
+
|
|
388
|
+
> See the [What the agent sends, and where](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/what-the-agent-sends) guide for the full list.
|
|
389
|
+
|
|
390
|
+
- **What reaches your model provider**: every message and the system prompt; the classifier's copy (by default up to 8 earlier messages, 300 characters each; `classifier: false` turns it off); and tool results, including addresses, coordinates, the viewport, the device location, `analyseData` and `processData` output over your BYOD data, and up to 200 events per tracker.
|
|
391
|
+
- **The provider is your processor**: sign a DPA with it and pick an EEA region where it offers one.
|
|
392
|
+
- **What stays in memory**: `agent.state`, until the `resetState` tool or `agent.destroy()`. Nothing goes to browser storage. Chat history is yours, so erasing a user's data means clearing it and calling `agent.destroy()`.
|
|
393
|
+
- **To send less**: remove tools (`getCurrentLocation: false`), turn off the classifier, or replace a tool with one that returns less.
|
|
394
|
+
|
|
389
395
|
## Intent classifier
|
|
390
396
|
|
|
391
397
|
The intent classifier is an optional per-turn optimization that selects which tools the LLM sees, reducing noise and improving accuracy. See the [How it works](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/how-it-works) guide for the full two-phase pipeline (classification → tool loop), prompt assembly, and observability hooks.
|
|
@@ -512,7 +518,7 @@ const agent = createMapAgent(map, {
|
|
|
512
518
|
setLanguage: false,
|
|
513
519
|
setLayoutProperties: false,
|
|
514
520
|
setPaintProperties: false,
|
|
515
|
-
|
|
521
|
+
setMapStyling: false,
|
|
516
522
|
},
|
|
517
523
|
});
|
|
518
524
|
```
|
|
@@ -553,7 +559,7 @@ For the complete, always-current list of exports — factories, tool-registry he
|
|
|
553
559
|
- [Tools](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/tools) — per-tool reference
|
|
554
560
|
- [State](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/state) — per-slice reference, entry modes, custom slices
|
|
555
561
|
- [Customizing tools](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/customizing-tools) — add, replace, remove, or start from a blank slate
|
|
556
|
-
- [Code generation](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/code-generation) — `analyseData` / `processData` / `executeMaplibreCode` (threat model included)
|
|
562
|
+
- [Code generation](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/code-generation) — `analyseData` / `processData` / `createTracker` / `clusterIncidents` / `executeMaplibreCode` (threat model included)
|
|
557
563
|
- [Scope-aware data tools](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/scope-aware-data-tools) — per-turn scope mechanism
|
|
558
564
|
- [Bring your own data](https://docs.tomtom.com/maps-sdk-js/guides/plugins/agent-toolkit/byod) — ingest customer GeoJSON layers
|
|
559
565
|
- [AI SDK v6 documentation](https://ai-sdk.dev/)
|
package/THIRD_PARTY.txt
CHANGED
|
@@ -334,7 +334,7 @@ limitations under the License.
|
|
|
334
334
|
---
|
|
335
335
|
|
|
336
336
|
Name: maplibre-gl
|
|
337
|
-
Version: 6.
|
|
337
|
+
Version: 6.12.0
|
|
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
|
package/dist/THIRD_PARTY.txt
CHANGED
|
@@ -324,7 +324,7 @@ limitations under the License.
|
|
|
324
324
|
---
|
|
325
325
|
|
|
326
326
|
Name: maplibre-gl
|
|
327
|
-
Version: 6.
|
|
327
|
+
Version: 6.12.0
|
|
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
|