@kernl-sdk/ai 0.2.5 → 0.2.6
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/.turbo/turbo-build.log +5 -4
- package/CHANGELOG.md +9 -0
- package/dist/__tests__/integration.test.js +1 -1
- package/dist/__tests__/language-model.test.js +1 -1
- package/dist/convert/__tests__/message.test.js +1 -1
- package/dist/convert/__tests__/response.test.js +1 -1
- package/dist/convert/__tests__/settings.test.js +1 -1
- package/dist/convert/__tests__/stream.test.js +1 -1
- package/dist/convert/__tests__/tools.test.js +1 -1
- package/dist/convert/__tests__/ui-message.test.js +1 -1
- package/dist/convert/__tests__/ui-stream.test.js +1 -1
- package/dist/convert/settings.js +1 -1
- package/dist/convert/stream.js +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +8 -8
- package/dist/language-model.js +5 -5
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/google.d.ts +1 -1
- package/dist/providers/google.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +1 -1
- package/package.json +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @kernl-sdk/ai@0.2.5 build /Users/andjones/Documents/projects/kernl/packages/providers/ai
|
|
4
|
+
> tsc && tsc-alias --resolve-full-paths
|
|
5
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@ import { describe, it, expect, beforeAll } from "vitest";
|
|
|
2
2
|
import { openai } from "@ai-sdk/openai";
|
|
3
3
|
import { anthropic } from "@ai-sdk/anthropic";
|
|
4
4
|
import { IN_PROGRESS } from "@kernl-sdk/protocol";
|
|
5
|
-
import { AISDKLanguageModel } from "../language-model";
|
|
5
|
+
import { AISDKLanguageModel } from "../language-model.js";
|
|
6
6
|
/**
|
|
7
7
|
* Integration tests for AISDKLanguageModel with real AI SDK providers.
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, vi } from "vitest";
|
|
2
2
|
import { IN_PROGRESS } from "@kernl-sdk/protocol";
|
|
3
|
-
import { AISDKLanguageModel } from "../language-model";
|
|
3
|
+
import { AISDKLanguageModel } from "../language-model.js";
|
|
4
4
|
/**
|
|
5
5
|
* Unit tests for AISDKLanguageModel stream accumulation behavior
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { MESSAGE } from "../message";
|
|
2
|
+
import { MESSAGE } from "../message.js";
|
|
3
3
|
describe("MESSAGE codec", () => {
|
|
4
4
|
describe("encode - system messages", () => {
|
|
5
5
|
it("should encode system message with single text part", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import { IN_PROGRESS } from "@kernl-sdk/protocol";
|
|
3
|
-
import { STREAM_PART, convertStream } from "../stream";
|
|
3
|
+
import { STREAM_PART, convertStream } from "../stream.js";
|
|
4
4
|
describe("STREAM_PART codec", () => {
|
|
5
5
|
describe("decode - text events", () => {
|
|
6
6
|
it("should decode text-start event", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { TOOL, TOOL_CHOICE } from "../tools";
|
|
2
|
+
import { TOOL, TOOL_CHOICE } from "../tools.js";
|
|
3
3
|
describe("TOOL codec", () => {
|
|
4
4
|
describe("encode - function tools", () => {
|
|
5
5
|
it("should encode function tool with basic schema", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import { IN_PROGRESS, COMPLETED, FAILED } from "@kernl-sdk/protocol";
|
|
3
|
-
import { UIMessageCodec, historyToUIMessages } from "../ui-message";
|
|
3
|
+
import { UIMessageCodec, historyToUIMessages } from "../ui-message.js";
|
|
4
4
|
describe("UIMessageCodec", () => {
|
|
5
5
|
// ----------------------------
|
|
6
6
|
// Text parts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import { COMPLETED, FAILED, IN_PROGRESS } from "@kernl-sdk/protocol";
|
|
3
|
-
import { STREAM_UI_PART, toUIMessageStream } from "../ui-stream";
|
|
3
|
+
import { STREAM_UI_PART, toUIMessageStream } from "../ui-stream.js";
|
|
4
4
|
describe("STREAM_UI_PART codec", () => {
|
|
5
5
|
describe("encode - text events", () => {
|
|
6
6
|
it("should encode text-start event", () => {
|
package/dist/convert/settings.js
CHANGED
package/dist/convert/stream.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
* const response = await claude.generate([...], {});
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export { AISDKLanguageModel } from "./language-model";
|
|
15
|
-
export { MESSAGE } from "./convert/message";
|
|
16
|
-
export { TOOL, TOOL_CHOICE } from "./convert/tools";
|
|
17
|
-
export { MODEL_SETTINGS } from "./convert/settings";
|
|
18
|
-
export { MODEL_RESPONSE, WARNING } from "./convert/response";
|
|
19
|
-
export { convertStream } from "./convert/stream";
|
|
20
|
-
export { UIMessageCodec, historyToUIMessages } from "./convert/ui-message";
|
|
21
|
-
export { STREAM_UI_PART, toUIMessageStream } from "./convert/ui-stream";
|
|
14
|
+
export { AISDKLanguageModel } from "./language-model.js";
|
|
15
|
+
export { MESSAGE } from "./convert/message.js";
|
|
16
|
+
export { TOOL, TOOL_CHOICE } from "./convert/tools.js";
|
|
17
|
+
export { MODEL_SETTINGS } from "./convert/settings.js";
|
|
18
|
+
export { MODEL_RESPONSE, WARNING } from "./convert/response.js";
|
|
19
|
+
export { convertStream } from "./convert/stream.js";
|
|
20
|
+
export { UIMessageCodec, historyToUIMessages } from "./convert/ui-message.js";
|
|
21
|
+
export { STREAM_UI_PART, toUIMessageStream } from "./convert/ui-stream.js";
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
* const response = await claude.generate([...], {});
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export { AISDKLanguageModel } from "./language-model";
|
|
14
|
+
export { AISDKLanguageModel } from "./language-model.js";
|
|
15
15
|
// Re-export codecs for custom provider implementations
|
|
16
|
-
export { MESSAGE } from "./convert/message";
|
|
17
|
-
export { TOOL, TOOL_CHOICE } from "./convert/tools";
|
|
18
|
-
export { MODEL_SETTINGS } from "./convert/settings";
|
|
19
|
-
export { MODEL_RESPONSE, WARNING } from "./convert/response";
|
|
20
|
-
export { convertStream } from "./convert/stream";
|
|
21
|
-
export { UIMessageCodec, historyToUIMessages } from "./convert/ui-message";
|
|
22
|
-
export { STREAM_UI_PART, toUIMessageStream } from "./convert/ui-stream";
|
|
16
|
+
export { MESSAGE } from "./convert/message.js";
|
|
17
|
+
export { TOOL, TOOL_CHOICE } from "./convert/tools.js";
|
|
18
|
+
export { MODEL_SETTINGS } from "./convert/settings.js";
|
|
19
|
+
export { MODEL_RESPONSE, WARNING } from "./convert/response.js";
|
|
20
|
+
export { convertStream } from "./convert/stream.js";
|
|
21
|
+
export { UIMessageCodec, historyToUIMessages } from "./convert/ui-message.js";
|
|
22
|
+
export { STREAM_UI_PART, toUIMessageStream } from "./convert/ui-stream.js";
|
package/dist/language-model.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { message, reasoning } from "@kernl-sdk/protocol";
|
|
2
|
-
import { MESSAGE } from "./convert/message";
|
|
3
|
-
import { TOOL } from "./convert/tools";
|
|
4
|
-
import { MODEL_SETTINGS } from "./convert/settings";
|
|
5
|
-
import { MODEL_RESPONSE } from "./convert/response";
|
|
6
|
-
import { convertStream } from "./convert/stream";
|
|
2
|
+
import { MESSAGE } from "./convert/message.js";
|
|
3
|
+
import { TOOL } from "./convert/tools.js";
|
|
4
|
+
import { MODEL_SETTINGS } from "./convert/settings.js";
|
|
5
|
+
import { MODEL_RESPONSE } from "./convert/response.js";
|
|
6
|
+
import { convertStream } from "./convert/stream.js";
|
|
7
7
|
/**
|
|
8
8
|
* LanguageModel adapter for the AI SDK LanguageModelV3.
|
|
9
9
|
*/
|
package/dist/providers/google.js
CHANGED
package/dist/providers/openai.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kernl-sdk/ai",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Vercel AI SDK adapter for kernl",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kernl",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"vitest": "^4.0.8"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@kernl-sdk/
|
|
72
|
-
"@kernl-sdk/
|
|
71
|
+
"@kernl-sdk/protocol": "0.2.5",
|
|
72
|
+
"@kernl-sdk/shared": "^0.1.6"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
|
-
"build": "tsc && tsc-alias",
|
|
75
|
+
"build": "tsc && tsc-alias --resolve-full-paths",
|
|
76
76
|
"dev": "tsc --watch",
|
|
77
77
|
"lint": "eslint src/",
|
|
78
78
|
"check-types": "tsc --noEmit",
|