@orpc/ai-sdk 0.0.0-next.734a87d → 0.0.0-next.756e0cb
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/README.md +8 -8
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<image align="center" src="https://orpc.
|
|
2
|
+
<image align="center" src="https://orpc.dev/logo.webp" width=280 alt="oRPC logo" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<h1></h1>
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
|
-
<a href="https://codecov.io/gh/
|
|
9
|
-
<img alt="codecov" src="https://codecov.io/gh/
|
|
8
|
+
<a href="https://codecov.io/gh/middleapi/orpc">
|
|
9
|
+
<img alt="codecov" src="https://codecov.io/gh/middleapi/orpc/branch/main/graph/badge.svg">
|
|
10
10
|
</a>
|
|
11
11
|
<a href="https://www.npmjs.com/package/@orpc/ai-sdk">
|
|
12
12
|
<img alt="weekly downloads" src="https://img.shields.io/npm/dw/%40orpc%2Fai-sdk?logo=npm" />
|
|
13
13
|
</a>
|
|
14
|
-
<a href="https://github.com/
|
|
15
|
-
<img alt="MIT License" src="https://img.shields.io/github/license/
|
|
14
|
+
<a href="https://github.com/middleapi/orpc/blob/main/LICENSE">
|
|
15
|
+
<img alt="MIT License" src="https://img.shields.io/github/license/middleapi/orpc?logo=open-source-initiative" />
|
|
16
16
|
</a>
|
|
17
17
|
<a href="https://discord.gg/TXEbwRBvQn">
|
|
18
18
|
<img alt="Discord" src="https://img.shields.io/discord/1308966753044398161?color=7389D8&label&logo=discord&logoColor=ffffff" />
|
|
19
19
|
</a>
|
|
20
|
-
<a href="https://deepwiki.com/
|
|
20
|
+
<a href="https://deepwiki.com/middleapi/orpc">
|
|
21
21
|
<img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki">
|
|
22
22
|
</a>
|
|
23
23
|
</div>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
## Documentation
|
|
47
47
|
|
|
48
|
-
You can find the full documentation [here](https://orpc.
|
|
48
|
+
You can find the full documentation [here](https://orpc.dev).
|
|
49
49
|
|
|
50
50
|
## Packages
|
|
51
51
|
|
|
@@ -78,4 +78,4 @@ The [AI SDK](https://ai-sdk.dev/) integration for oRPC.
|
|
|
78
78
|
|
|
79
79
|
## License
|
|
80
80
|
|
|
81
|
-
Distributed under the MIT License. See [LICENSE](https://github.com/
|
|
81
|
+
Distributed under the MIT License. See [LICENSE](https://github.com/middleapi/orpc/blob/main/LICENSE) for more information.
|
package/dist/index.d.mts
CHANGED
|
@@ -12,11 +12,11 @@ interface AiSdkToolMeta extends Meta {
|
|
|
12
12
|
declare class CreateToolError extends Error {
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Implements [procedure contract](https://orpc.
|
|
15
|
+
* Implements [procedure contract](https://orpc.dev/docs/contract-first/define-contract#procedure-contract)
|
|
16
16
|
* as an [AI SDK Tool](https://ai-sdk.dev/docs/foundations/tools) by leveraging existing contract definitions.
|
|
17
17
|
*
|
|
18
18
|
* @warning Requires a contract with an `input` schema defined.
|
|
19
|
-
* @info Standard [procedures](https://orpc.
|
|
19
|
+
* @info Standard [procedures](https://orpc.dev/docs/procedure) are also compatible with [procedure contracts](https://orpc.dev/docs/contract-first/define-contract).
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```ts
|
|
@@ -34,7 +34,7 @@ declare class CreateToolError extends Error {
|
|
|
34
34
|
* const getWeatherContract = base
|
|
35
35
|
* .meta({
|
|
36
36
|
* [AI_SDK_TOOL_META_SYMBOL]: {
|
|
37
|
-
*
|
|
37
|
+
* title: 'Get Weather', // AI SDK tool title
|
|
38
38
|
* },
|
|
39
39
|
* })
|
|
40
40
|
* .route({
|
|
@@ -62,7 +62,7 @@ declare class CreateToolError extends Error {
|
|
|
62
62
|
*/
|
|
63
63
|
declare function implementTool<TOutInput, TInOutput>(contract: ContractProcedure<Schema<any, TOutInput>, Schema<TInOutput, any>, any, AiSdkToolMeta>, ...rest: MaybeOptionalOptions<SetOptional<Tool<TOutInput, TInOutput>, 'inputSchema' | 'outputSchema'>>): Tool<TOutInput, TInOutput>;
|
|
64
64
|
/**
|
|
65
|
-
* Converts a [procedure](https://orpc.
|
|
65
|
+
* Converts a [procedure](https://orpc.dev/docs/procedure) into an [AI SDK Tool](https://ai-sdk.dev/docs/foundations/tools)
|
|
66
66
|
* by leveraging existing procedure definitions.
|
|
67
67
|
*
|
|
68
68
|
* @warning Requires a contract with an `input` schema defined.
|
|
@@ -83,7 +83,7 @@ declare function implementTool<TOutInput, TInOutput>(contract: ContractProcedure
|
|
|
83
83
|
* const getWeatherProcedure = base
|
|
84
84
|
* .meta({
|
|
85
85
|
* [AI_SDK_TOOL_META_SYMBOL]: {
|
|
86
|
-
*
|
|
86
|
+
* title: 'Get Weather', // AI SDK tool title
|
|
87
87
|
* },
|
|
88
88
|
* })
|
|
89
89
|
* .route({
|
package/dist/index.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ interface AiSdkToolMeta extends Meta {
|
|
|
12
12
|
declare class CreateToolError extends Error {
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Implements [procedure contract](https://orpc.
|
|
15
|
+
* Implements [procedure contract](https://orpc.dev/docs/contract-first/define-contract#procedure-contract)
|
|
16
16
|
* as an [AI SDK Tool](https://ai-sdk.dev/docs/foundations/tools) by leveraging existing contract definitions.
|
|
17
17
|
*
|
|
18
18
|
* @warning Requires a contract with an `input` schema defined.
|
|
19
|
-
* @info Standard [procedures](https://orpc.
|
|
19
|
+
* @info Standard [procedures](https://orpc.dev/docs/procedure) are also compatible with [procedure contracts](https://orpc.dev/docs/contract-first/define-contract).
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```ts
|
|
@@ -34,7 +34,7 @@ declare class CreateToolError extends Error {
|
|
|
34
34
|
* const getWeatherContract = base
|
|
35
35
|
* .meta({
|
|
36
36
|
* [AI_SDK_TOOL_META_SYMBOL]: {
|
|
37
|
-
*
|
|
37
|
+
* title: 'Get Weather', // AI SDK tool title
|
|
38
38
|
* },
|
|
39
39
|
* })
|
|
40
40
|
* .route({
|
|
@@ -62,7 +62,7 @@ declare class CreateToolError extends Error {
|
|
|
62
62
|
*/
|
|
63
63
|
declare function implementTool<TOutInput, TInOutput>(contract: ContractProcedure<Schema<any, TOutInput>, Schema<TInOutput, any>, any, AiSdkToolMeta>, ...rest: MaybeOptionalOptions<SetOptional<Tool<TOutInput, TInOutput>, 'inputSchema' | 'outputSchema'>>): Tool<TOutInput, TInOutput>;
|
|
64
64
|
/**
|
|
65
|
-
* Converts a [procedure](https://orpc.
|
|
65
|
+
* Converts a [procedure](https://orpc.dev/docs/procedure) into an [AI SDK Tool](https://ai-sdk.dev/docs/foundations/tools)
|
|
66
66
|
* by leveraging existing procedure definitions.
|
|
67
67
|
*
|
|
68
68
|
* @warning Requires a contract with an `input` schema defined.
|
|
@@ -83,7 +83,7 @@ declare function implementTool<TOutInput, TInOutput>(contract: ContractProcedure
|
|
|
83
83
|
* const getWeatherProcedure = base
|
|
84
84
|
* .meta({
|
|
85
85
|
* [AI_SDK_TOOL_META_SYMBOL]: {
|
|
86
|
-
*
|
|
86
|
+
* title: 'Get Weather', // AI SDK tool title
|
|
87
87
|
* },
|
|
88
88
|
* })
|
|
89
89
|
* .route({
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/ai-sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.756e0cb",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://orpc.
|
|
6
|
+
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/middleapi/orpc.git",
|
|
10
10
|
"directory": "packages/ai-sdk"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"ai": ">=5.0.76"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@orpc/client": "0.0.0-next.
|
|
31
|
-
"@orpc/contract": "0.0.0-next.
|
|
32
|
-
"@orpc/
|
|
33
|
-
"@orpc/
|
|
30
|
+
"@orpc/client": "0.0.0-next.756e0cb",
|
|
31
|
+
"@orpc/contract": "0.0.0-next.756e0cb",
|
|
32
|
+
"@orpc/server": "0.0.0-next.756e0cb",
|
|
33
|
+
"@orpc/shared": "0.0.0-next.756e0cb"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"ai": "6.0.
|
|
37
|
-
"zod": "^4.
|
|
36
|
+
"ai": "^6.0.23",
|
|
37
|
+
"zod": "^4.3.5"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "unbuild",
|