@tomtom-org/maps-sdk-plugin-agent-toolkit 0.12.0 → 0.13.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/dist/index.d.ts
CHANGED
|
@@ -4148,7 +4148,7 @@ export type EntryDataKind = 'places' | 'routes' | 'incidents' | 'customGeometrie
|
|
|
4148
4148
|
* function createMyTool(state: ToolState) {
|
|
4149
4149
|
* return tool({
|
|
4150
4150
|
* execute: async () => {
|
|
4151
|
-
* const
|
|
4151
|
+
* const places = await state.places.getEntryPlacesModule('places-0', 'pin');
|
|
4152
4152
|
* state.routing.currentRoutes; // most recent routes
|
|
4153
4153
|
* state.baseMap.mapLibreMap; // MapLibre instance
|
|
4154
4154
|
* }
|
|
@@ -4214,7 +4214,7 @@ export type ToolState = {
|
|
|
4214
4214
|
* @group Agent Toolkit
|
|
4215
4215
|
*/
|
|
4216
4216
|
export type CodeExecutionConfig = {
|
|
4217
|
-
/** Wall-clock budget per isolated (browser) run, in ms. Default:
|
|
4217
|
+
/** Wall-clock budget per isolated (browser) run, in ms. Default: 10000. */
|
|
4218
4218
|
timeoutMs?: number;
|
|
4219
4219
|
/**
|
|
4220
4220
|
* Optional override of the worker's library source. By default the SDK loads its own
|
|
@@ -4516,7 +4516,8 @@ export type MapAgentOptions<CS extends ToolState = ToolState> = {
|
|
|
4516
4516
|
includeDefaultTools?: boolean;
|
|
4517
4517
|
/**
|
|
4518
4518
|
* Tool overrides merged with default tools.
|
|
4519
|
-
* - `ToolEntry
|
|
4519
|
+
* - {@link ToolDefinition} values (a `ToolEntry`, a builder, or a `DEFAULT_TOOLS` value) add a new
|
|
4520
|
+
* tool or replace a default.
|
|
4520
4521
|
* - `false` values exclude a default tool.
|
|
4521
4522
|
*
|
|
4522
4523
|
* When omitted, all default tools are used as-is.
|
|
@@ -4536,7 +4537,7 @@ export type MapAgentOptions<CS extends ToolState = ToolState> = {
|
|
|
4536
4537
|
* });
|
|
4537
4538
|
* ```
|
|
4538
4539
|
*/
|
|
4539
|
-
tools?: { [K in ToolNameHint]?:
|
|
4540
|
+
tools?: { [K in ToolNameHint]?: ToolDefinition<CS> | false | undefined; };
|
|
4540
4541
|
/**
|
|
4541
4542
|
* Custom state slices merged alongside built-in state.
|
|
4542
4543
|
* Only custom slices need to be provided — built-in slices are created automatically.
|
|
@@ -4547,9 +4548,9 @@ export type MapAgentOptions<CS extends ToolState = ToolState> = {
|
|
|
4547
4548
|
* Per-kind data-entry configuration. Each {@link DataEntryKind} accepts
|
|
4548
4549
|
* `{ enabled?, entryMode? }`. Setting `enabled: false` removes the kind from the
|
|
4549
4550
|
* agent's tool surface entirely — it disappears from `analyseData` / `processData`
|
|
4550
|
-
* scope and input fields, and
|
|
4551
|
-
* are dropped from the registry
|
|
4552
|
-
* right after the agent state is built — before any tool runs.
|
|
4551
|
+
* scope and input fields, and its slice-specific display / fetch tools
|
|
4552
|
+
* ({@link TOOLS_BY_DATA_ENTRY_KIND}) are dropped from the registry; `recallState` stays.
|
|
4553
|
+
* `entryMode` is applied to the underlying slice right after the agent state is built — before any tool runs.
|
|
4553
4554
|
*
|
|
4554
4555
|
* Keys are LLM-facing kind names (`routes`, `incidents`) — not slice names
|
|
4555
4556
|
* (`routing`, `trafficIncidents`). The slice mapping is internal.
|
|
@@ -4561,8 +4562,8 @@ export type MapAgentOptions<CS extends ToolState = ToolState> = {
|
|
|
4561
4562
|
* dataEntries: {
|
|
4562
4563
|
* routes: { entryMode: 'single' },
|
|
4563
4564
|
* incidents: { entryMode: 'single' },
|
|
4564
|
-
* byod: { enabled: false }, //
|
|
4565
|
-
* ranges: { enabled: false }, //
|
|
4565
|
+
* byod: { enabled: false }, // drops addByodSource, setByodLayers, updateByodDisplay + byod scope on analyse/process
|
|
4566
|
+
* ranges: { enabled: false }, // drops findReachableAreas
|
|
4566
4567
|
* },
|
|
4567
4568
|
* });
|
|
4568
4569
|
* ```
|
|
@@ -4750,7 +4751,7 @@ export declare const createMapAgent: <CS extends ToolState = ToolState>(map: Tom
|
|
|
4750
4751
|
*
|
|
4751
4752
|
* @group Agent Toolkit
|
|
4752
4753
|
*/
|
|
4753
|
-
export declare const resolveTools: <S extends ToolState>(defaults: Record<string, ToolDefinition<S>>, overrides?:
|
|
4754
|
+
export declare const resolveTools: <S extends ToolState>(defaults: Record<string, ToolDefinition<S>>, overrides?: MapAgentOptions<S>["tools"]) => Record<string, ToolDefinition<S>>;
|
|
4754
4755
|
//#endregion
|
|
4755
4756
|
//#region src/tools/utilities/clarify-user-intent.d.ts
|
|
4756
4757
|
/** A single clarification question shown to the user. Exported so a host can type its form state. */
|