@youdotcom-oss/ai-sdk-plugin 2.0.4 → 2.0.5

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.
Files changed (2) hide show
  1. package/dist/main.js +18 -4
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -13543,7 +13543,14 @@ function date4(params) {
13543
13543
  config(en_default());
13544
13544
  // ../api/src/contents/contents.schemas.ts
13545
13545
  var ContentsQuerySchema = object({
13546
- urls: array(string2().url()).min(1).describe('Array of webpage URLs to extract content from (e.g., ["https://example.com"])'),
13546
+ urls: array(string2().refine((val) => {
13547
+ try {
13548
+ new URL(val);
13549
+ return true;
13550
+ } catch {
13551
+ return false;
13552
+ }
13553
+ }, { message: "Invalid URL format" })).min(1).describe('Array of webpage URLs to extract content from (e.g., ["https://example.com"])'),
13547
13554
  formats: array(_enum2(["markdown", "html", "metadata"])).optional().describe('Output formats: array of "markdown" (text), "html" (layout), or "metadata" (structured data)'),
13548
13555
  format: _enum2(["markdown", "html"]).optional().describe("(Deprecated) Output format - use formats array instead"),
13549
13556
  crawl_timeout: number2().min(1).max(60).optional().describe("Optional timeout in seconds (1-60) for page crawling")
@@ -13785,7 +13792,14 @@ var SearchResponseSchema = object({
13785
13792
  // ../api/src/shared/api-error.schemas.ts
13786
13793
  var ApiErrorResponseSchema = exports_external.object({
13787
13794
  message: exports_external.string().optional(),
13788
- upgrade_url: exports_external.string().url().optional(),
13795
+ upgrade_url: exports_external.string().refine((val) => {
13796
+ try {
13797
+ new URL(val);
13798
+ return true;
13799
+ } catch {
13800
+ return false;
13801
+ }
13802
+ }, { message: "Invalid URL format" }).optional(),
13789
13803
  reset_at: exports_external.string().optional()
13790
13804
  });
13791
13805
 
@@ -13851,7 +13865,7 @@ import { tool } from "ai";
13851
13865
  // package.json
13852
13866
  var package_default = {
13853
13867
  name: "@youdotcom-oss/ai-sdk-plugin",
13854
- version: "2.0.4",
13868
+ version: "2.0.5",
13855
13869
  description: "Vercel AI SDK plugin for You.com web search, AI agents, and content extraction via MCP",
13856
13870
  license: "MIT",
13857
13871
  engines: {
@@ -13913,7 +13927,7 @@ var package_default = {
13913
13927
  },
13914
13928
  types: "./dist/main.d.ts",
13915
13929
  dependencies: {
13916
- "@youdotcom-oss/api": "0.3.1"
13930
+ "@youdotcom-oss/api": "0.3.2"
13917
13931
  },
13918
13932
  peerDependencies: {
13919
13933
  ai: "^6.0.83"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youdotcom-oss/ai-sdk-plugin",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Vercel AI SDK plugin for You.com web search, AI agents, and content extraction via MCP",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "types": "./dist/main.d.ts",
64
64
  "dependencies": {
65
- "@youdotcom-oss/api": "0.3.1"
65
+ "@youdotcom-oss/api": "0.3.2"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "ai": "^6.0.83"