@fairyhunter13/ai-anthropic 3.0.58-fork.13 → 3.0.58-fork.15
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.mts +72 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.js +487 -342
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +465 -316
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +87 -0
- package/dist/internal/index.d.ts +87 -0
- package/dist/internal/index.js +481 -336
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +465 -316
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/anthropic-messages-api.ts +16 -0
- package/src/anthropic-messages-language-model.ts +50 -0
- package/src/anthropic-prepare-tools.ts +23 -0
- package/src/anthropic-tools.ts +18 -0
- package/src/tool/web-fetch-20260309.ts +182 -0
package/dist/index.d.mts
CHANGED
|
@@ -896,6 +896,78 @@ declare const anthropicTools: {
|
|
|
896
896
|
};
|
|
897
897
|
retrievedAt: string | null;
|
|
898
898
|
}>;
|
|
899
|
+
/**
|
|
900
|
+
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
901
|
+
* GA version (no beta header required). Includes caller restrictions, cache control,
|
|
902
|
+
* deferred loading, and strict mode.
|
|
903
|
+
*
|
|
904
|
+
* @param maxUses - The max_uses parameter limits the number of web fetches performed
|
|
905
|
+
* @param allowedDomains - Only fetch from these domains
|
|
906
|
+
* @param blockedDomains - Never fetch from these domains
|
|
907
|
+
* @param citations - Citations configuration for fetched documents
|
|
908
|
+
* @param maxContentTokens - Max content tokens included in context
|
|
909
|
+
* @param allowedCallers - Restrict callers (e.g. ["direct"] to prevent code_execution usage)
|
|
910
|
+
* @param useCache - Whether to use cached content (set false for fresh content)
|
|
911
|
+
* @param deferLoading - Defer loading until tool_search discovers it
|
|
912
|
+
* @param strict - Enable strict schema validation
|
|
913
|
+
*/
|
|
914
|
+
webFetch_20260309: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
|
|
915
|
+
url: string;
|
|
916
|
+
}, {
|
|
917
|
+
type: "web_fetch_result";
|
|
918
|
+
url: string;
|
|
919
|
+
content: {
|
|
920
|
+
type: "document";
|
|
921
|
+
title: string | null;
|
|
922
|
+
citations?: {
|
|
923
|
+
enabled: boolean;
|
|
924
|
+
};
|
|
925
|
+
source: {
|
|
926
|
+
type: "base64";
|
|
927
|
+
mediaType: "application/pdf";
|
|
928
|
+
data: string;
|
|
929
|
+
} | {
|
|
930
|
+
type: "text";
|
|
931
|
+
mediaType: "text/plain";
|
|
932
|
+
data: string;
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
retrievedAt: string | null;
|
|
936
|
+
}, {
|
|
937
|
+
maxUses?: number;
|
|
938
|
+
allowedDomains?: string[];
|
|
939
|
+
blockedDomains?: string[];
|
|
940
|
+
citations?: {
|
|
941
|
+
enabled: boolean;
|
|
942
|
+
};
|
|
943
|
+
maxContentTokens?: number;
|
|
944
|
+
allowedCallers?: Array<"direct" | "code_execution_20250825" | "code_execution_20260120">;
|
|
945
|
+
useCache?: boolean;
|
|
946
|
+
deferLoading?: boolean;
|
|
947
|
+
strict?: boolean;
|
|
948
|
+
}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
949
|
+
url: string;
|
|
950
|
+
}, {
|
|
951
|
+
type: "web_fetch_result";
|
|
952
|
+
url: string;
|
|
953
|
+
content: {
|
|
954
|
+
type: "document";
|
|
955
|
+
title: string | null;
|
|
956
|
+
citations?: {
|
|
957
|
+
enabled: boolean;
|
|
958
|
+
};
|
|
959
|
+
source: {
|
|
960
|
+
type: "base64";
|
|
961
|
+
mediaType: "application/pdf";
|
|
962
|
+
data: string;
|
|
963
|
+
} | {
|
|
964
|
+
type: "text";
|
|
965
|
+
mediaType: "text/plain";
|
|
966
|
+
data: string;
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
retrievedAt: string | null;
|
|
970
|
+
}>;
|
|
899
971
|
/**
|
|
900
972
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
901
973
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -896,6 +896,78 @@ declare const anthropicTools: {
|
|
|
896
896
|
};
|
|
897
897
|
retrievedAt: string | null;
|
|
898
898
|
}>;
|
|
899
|
+
/**
|
|
900
|
+
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
901
|
+
* GA version (no beta header required). Includes caller restrictions, cache control,
|
|
902
|
+
* deferred loading, and strict mode.
|
|
903
|
+
*
|
|
904
|
+
* @param maxUses - The max_uses parameter limits the number of web fetches performed
|
|
905
|
+
* @param allowedDomains - Only fetch from these domains
|
|
906
|
+
* @param blockedDomains - Never fetch from these domains
|
|
907
|
+
* @param citations - Citations configuration for fetched documents
|
|
908
|
+
* @param maxContentTokens - Max content tokens included in context
|
|
909
|
+
* @param allowedCallers - Restrict callers (e.g. ["direct"] to prevent code_execution usage)
|
|
910
|
+
* @param useCache - Whether to use cached content (set false for fresh content)
|
|
911
|
+
* @param deferLoading - Defer loading until tool_search discovers it
|
|
912
|
+
* @param strict - Enable strict schema validation
|
|
913
|
+
*/
|
|
914
|
+
webFetch_20260309: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
|
|
915
|
+
url: string;
|
|
916
|
+
}, {
|
|
917
|
+
type: "web_fetch_result";
|
|
918
|
+
url: string;
|
|
919
|
+
content: {
|
|
920
|
+
type: "document";
|
|
921
|
+
title: string | null;
|
|
922
|
+
citations?: {
|
|
923
|
+
enabled: boolean;
|
|
924
|
+
};
|
|
925
|
+
source: {
|
|
926
|
+
type: "base64";
|
|
927
|
+
mediaType: "application/pdf";
|
|
928
|
+
data: string;
|
|
929
|
+
} | {
|
|
930
|
+
type: "text";
|
|
931
|
+
mediaType: "text/plain";
|
|
932
|
+
data: string;
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
retrievedAt: string | null;
|
|
936
|
+
}, {
|
|
937
|
+
maxUses?: number;
|
|
938
|
+
allowedDomains?: string[];
|
|
939
|
+
blockedDomains?: string[];
|
|
940
|
+
citations?: {
|
|
941
|
+
enabled: boolean;
|
|
942
|
+
};
|
|
943
|
+
maxContentTokens?: number;
|
|
944
|
+
allowedCallers?: Array<"direct" | "code_execution_20250825" | "code_execution_20260120">;
|
|
945
|
+
useCache?: boolean;
|
|
946
|
+
deferLoading?: boolean;
|
|
947
|
+
strict?: boolean;
|
|
948
|
+
}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
949
|
+
url: string;
|
|
950
|
+
}, {
|
|
951
|
+
type: "web_fetch_result";
|
|
952
|
+
url: string;
|
|
953
|
+
content: {
|
|
954
|
+
type: "document";
|
|
955
|
+
title: string | null;
|
|
956
|
+
citations?: {
|
|
957
|
+
enabled: boolean;
|
|
958
|
+
};
|
|
959
|
+
source: {
|
|
960
|
+
type: "base64";
|
|
961
|
+
mediaType: "application/pdf";
|
|
962
|
+
data: string;
|
|
963
|
+
} | {
|
|
964
|
+
type: "text";
|
|
965
|
+
mediaType: "text/plain";
|
|
966
|
+
data: string;
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
retrievedAt: string | null;
|
|
970
|
+
}>;
|
|
899
971
|
/**
|
|
900
972
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
901
973
|
*
|