@absolutejs/ai 0.0.35 → 0.0.36
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/types/ai.d.ts +13 -0
- package/package.json +1 -1
package/dist/types/ai.d.ts
CHANGED
|
@@ -259,10 +259,23 @@ export type AIProviderToolDefinition = {
|
|
|
259
259
|
export type AIProviderConfig = {
|
|
260
260
|
stream: (params: AIProviderStreamParams) => AsyncIterable<AIChunk>;
|
|
261
261
|
};
|
|
262
|
+
/** MCP-shaped behavior hints (all optional). Consumers exposing an AIToolMap
|
|
263
|
+
* over MCP pass these straight through as the tool's `annotations`; the ai
|
|
264
|
+
* package's own loops ignore them. readOnlyHint: no state changes at all.
|
|
265
|
+
* destructiveHint: may delete/overwrite (defaults true for writes per MCP —
|
|
266
|
+
* set false explicitly for additive-only writes like queueing a draft). */
|
|
267
|
+
export type AIToolAnnotations = {
|
|
268
|
+
destructiveHint?: boolean;
|
|
269
|
+
idempotentHint?: boolean;
|
|
270
|
+
openWorldHint?: boolean;
|
|
271
|
+
readOnlyHint?: boolean;
|
|
272
|
+
title?: string;
|
|
273
|
+
};
|
|
262
274
|
export type AIToolDefinition = {
|
|
263
275
|
description: string;
|
|
264
276
|
input: Record<string, unknown>;
|
|
265
277
|
handler: (input: unknown) => Promise<string> | string;
|
|
278
|
+
annotations?: AIToolAnnotations;
|
|
266
279
|
};
|
|
267
280
|
export type AIToolMap = Record<string, AIToolDefinition>;
|
|
268
281
|
export type AIAttachment = {
|