@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.
@@ -1,4 +1,5 @@
1
-
2
- > @kernl-sdk/ai@0.2.4 build /Users/andjones/Documents/projects/kernl/packages/providers/ai
3
- > tsc && tsc-alias
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
@@ -1,5 +1,14 @@
1
1
  # @kernl/ai
2
2
 
3
+ ## 0.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix ESM compatibility by adding --resolve-full-paths to tsc-alias build
8
+ - Updated dependencies
9
+ - @kernl-sdk/shared@0.1.6
10
+ - @kernl-sdk/protocol@0.2.5
11
+
3
12
  ## 0.2.5
4
13
 
5
14
  ### Patch Changes
@@ -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,5 +1,5 @@
1
1
  import { describe, it, expect } from "vitest";
2
- import { WARNING } from "../response";
2
+ import { WARNING } from "../response.js";
3
3
  describe("WARNING codec", () => {
4
4
  describe("decode", () => {
5
5
  it("should decode unsupported-setting warning", () => {
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from "vitest";
2
- import { MODEL_SETTINGS } from "../settings";
2
+ import { MODEL_SETTINGS } from "../settings.js";
3
3
  describe("MODEL_SETTINGS codec", () => {
4
4
  describe("encode", () => {
5
5
  it("should encode temperature setting", () => {
@@ -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", () => {
@@ -1,4 +1,4 @@
1
- import { TOOL_CHOICE } from "./tools";
1
+ import { TOOL_CHOICE } from "./tools.js";
2
2
  export const MODEL_SETTINGS = {
3
3
  encode: (settings) => {
4
4
  const options = {};
@@ -1,5 +1,5 @@
1
1
  import { COMPLETED, FAILED, IN_PROGRESS, } from "@kernl-sdk/protocol";
2
- import { WARNING } from "./response";
2
+ import { WARNING } from "./response.js";
3
3
  /**
4
4
  * Convert AI SDK stream to async iterable of kernl stream events.
5
5
  */
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";
@@ -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
  */
@@ -1,4 +1,4 @@
1
- import { AISDKLanguageModel } from "../language-model";
1
+ import { AISDKLanguageModel } from "../language-model.js";
2
2
  /**
3
3
  * Create a kernl-compatible Anthropic language model.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { anthropic as createAnthropicModel } from "@ai-sdk/anthropic";
2
- import { AISDKLanguageModel } from "../language-model";
2
+ import { AISDKLanguageModel } from "../language-model.js";
3
3
  /**
4
4
  * Create a kernl-compatible Anthropic language model.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { AISDKLanguageModel } from "../language-model";
1
+ import { AISDKLanguageModel } from "../language-model.js";
2
2
  /**
3
3
  * Create a kernl-compatible Google Generative AI language model.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { google as createGoogleModel } from "@ai-sdk/google";
2
- import { AISDKLanguageModel } from "../language-model";
2
+ import { AISDKLanguageModel } from "../language-model.js";
3
3
  /**
4
4
  * Create a kernl-compatible Google Generative AI language model.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { AISDKLanguageModel } from "../language-model";
1
+ import { AISDKLanguageModel } from "../language-model.js";
2
2
  /**
3
3
  * Create a kernl-compatible OpenAI language model.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { openai as createOpenAIModel } from "@ai-sdk/openai";
2
- import { AISDKLanguageModel } from "../language-model";
2
+ import { AISDKLanguageModel } from "../language-model.js";
3
3
  /**
4
4
  * Create a kernl-compatible OpenAI language model.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernl-sdk/ai",
3
- "version": "0.2.5",
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/shared": "^0.1.5",
72
- "@kernl-sdk/protocol": "0.2.4"
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",