重写插件为V2格式:使用define+id+setup(ctx)+ctx.tool.transform注册工具

This commit is contained in:
ypshidifu
2026-09-21 17:04:34 +08:00
parent 5d43b5ed76
commit 0d19143065
3808 changed files with 1573549 additions and 76 deletions
+63
View File
@@ -0,0 +1,63 @@
{
"name": "@ai-sdk/provider",
"version": "3.0.8",
"license": "Apache-2.0",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"source": "./src/index.ts",
"files": [
"dist/**/*",
"src",
"!src/**/*.test.ts",
"!src/**/*.test-d.ts",
"!src/**/__snapshots__",
"!src/**/__fixtures__",
"CHANGELOG.md",
"README.md"
],
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"dependencies": {
"json-schema": "^0.4.0"
},
"devDependencies": {
"@types/json-schema": "7.0.15",
"@types/node": "20.17.24",
"tsup": "^8",
"typescript": "5.8.3",
"@vercel/ai-tsconfig": "0.0.0"
},
"engines": {
"node": ">=18"
},
"publishConfig": {
"access": "public"
},
"homepage": "https://ai-sdk.dev/docs",
"repository": {
"type": "git",
"url": "git+https://github.com/vercel/ai.git"
},
"bugs": {
"url": "https://github.com/vercel/ai/issues"
},
"keywords": [
"ai"
],
"scripts": {
"build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
"build:watch": "pnpm clean && tsup --watch",
"clean": "del-cli dist *.tsbuildinfo",
"lint": "eslint \"./**/*.ts*\"",
"type-check": "tsc --build",
"prettier-check": "prettier --check \"./**/*.ts*\""
}
}