@tomtom-org/maps-sdk-plugin-agent-toolkit 0.4.3 → 0.5.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 +27 -2
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -83,6 +83,11 @@ export declare type AffectedEntry = {
|
|
|
83
83
|
kind: 'places' | 'customGeometries';
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* @module agent-toolkit-tools
|
|
88
|
+
*/
|
|
89
|
+
export declare const AGENT_TOOLKIT_USER_AGENT = "AgentToolkit";
|
|
90
|
+
|
|
86
91
|
/**
|
|
87
92
|
* Canonical ordering for {@link EntryDataKind}. Used wherever per-kind doc fragments or
|
|
88
93
|
* field lists are concatenated — keeps the layout stable regardless of the order kinds
|
|
@@ -2077,7 +2082,7 @@ export declare const locationInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2077
2082
|
lat: z.ZodNumber;
|
|
2078
2083
|
}, z.core.$strip>;
|
|
2079
2084
|
}, z.core.$strip>, z.ZodObject<{
|
|
2080
|
-
|
|
2085
|
+
placeIdOrEntryId: z.ZodString;
|
|
2081
2086
|
}, z.core.$strip>]>;
|
|
2082
2087
|
|
|
2083
2088
|
/**
|
|
@@ -3920,7 +3925,15 @@ export declare type ToolEntry<S extends ToolState = ToolState, Scope = unknown>
|
|
|
3920
3925
|
inputSchema: z.ZodType;
|
|
3921
3926
|
/** Optional Zod schema describing the tool's structured output. */
|
|
3922
3927
|
outputSchema?: z.ZodType;
|
|
3923
|
-
/**
|
|
3928
|
+
/**
|
|
3929
|
+
* Function that executes the tool. Receives parsed input and the agent's state.
|
|
3930
|
+
*
|
|
3931
|
+
* If this calls a `@tomtom-org/maps-sdk/services` function directly, wrap its params with
|
|
3932
|
+
* `withAgentToolkitHeaders` (`tools/shared/agent-headers.ts`) before passing them in — e.g.
|
|
3933
|
+
* `const requestParams = withAgentToolkitHeaders({ position }); await reverseGeocode(requestParams);`.
|
|
3934
|
+
* This tags the request so TomTom's traffic analytics attribute it to agent-toolkit; an
|
|
3935
|
+
* untagged call is picked up by the guard test in `tools/shared/tests/agent-headers.test.ts`.
|
|
3936
|
+
*/
|
|
3924
3937
|
execute: (input: any, state: S) => Promise<any>;
|
|
3925
3938
|
/** Compact one-liner for the intent classifier prompt. */
|
|
3926
3939
|
classificationPrompt?: string;
|
|
@@ -4674,6 +4687,18 @@ export declare const whereSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4674
4687
|
mode: z.ZodLiteral<"global">;
|
|
4675
4688
|
}, z.core.$strip>]>;
|
|
4676
4689
|
|
|
4690
|
+
/**
|
|
4691
|
+
* Tags an SDK service call as coming from agent-toolkit, via the SDK's own supported per-call
|
|
4692
|
+
* `tomtom-user-agent` override (see `generateTomTomHeaders`, `core/src/util/headers.ts`) — reuses
|
|
4693
|
+
* an existing, already-allow-listed header rather than adding a new one.
|
|
4694
|
+
*
|
|
4695
|
+
* Not applicable to `searchOne`/`geocodeOne` (and the `searchOneFn`/`geocodeOneFn` dispatch in
|
|
4696
|
+
* `locate-places.ts`) — those take a bare query string with no params object to tag.
|
|
4697
|
+
*
|
|
4698
|
+
* @ignore
|
|
4699
|
+
*/
|
|
4700
|
+
export declare const withAgentToolkitHeaders: <P extends object>(params: P) => P;
|
|
4701
|
+
|
|
4677
4702
|
/**
|
|
4678
4703
|
* Fields shared by both locatePlace's and discoverPlaces' `within` schemas — `mode` and the
|
|
4679
4704
|
* `viewport` flag. Spread into each consumer's `z.object({...})`.
|