kernl 0.2.1 → 0.6.1
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/.turbo/turbo-check-types.log +4 -0
- package/CHANGELOG.md +147 -0
- package/LICENSE +1 -1
- package/dist/agent/__tests__/concurrency.test.d.ts +2 -0
- package/dist/agent/__tests__/concurrency.test.d.ts.map +1 -0
- package/dist/agent/__tests__/concurrency.test.js +152 -0
- package/dist/agent/__tests__/run.test.d.ts +2 -0
- package/dist/agent/__tests__/run.test.d.ts.map +1 -0
- package/dist/agent/__tests__/run.test.js +357 -0
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent.d.ts +35 -12
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +102 -15
- package/dist/api/__tests__/cursor-page.test.d.ts +2 -0
- package/dist/api/__tests__/cursor-page.test.d.ts.map +1 -0
- package/dist/api/__tests__/cursor-page.test.js +414 -0
- package/dist/api/__tests__/offset-page.test.d.ts +2 -0
- package/dist/api/__tests__/offset-page.test.d.ts.map +1 -0
- package/dist/api/__tests__/offset-page.test.js +510 -0
- package/dist/api/__tests__/threads.test.d.ts +2 -0
- package/dist/api/__tests__/threads.test.d.ts.map +1 -0
- package/dist/api/__tests__/threads.test.js +338 -0
- package/dist/api/models/index.d.ts +2 -0
- package/dist/api/models/index.d.ts.map +1 -0
- package/dist/api/models/thread.d.ts +120 -0
- package/dist/api/models/thread.d.ts.map +1 -0
- package/dist/api/pagination/base.d.ts +48 -0
- package/dist/api/pagination/base.d.ts.map +1 -0
- package/dist/api/pagination/base.js +45 -0
- package/dist/api/pagination/cursor.d.ts +44 -0
- package/dist/api/pagination/cursor.d.ts.map +1 -0
- package/dist/api/pagination/cursor.js +52 -0
- package/dist/api/pagination/offset.d.ts +42 -0
- package/dist/api/pagination/offset.d.ts.map +1 -0
- package/dist/api/pagination/offset.js +55 -0
- package/dist/api/resources/threads/events.d.ts +21 -0
- package/dist/api/resources/threads/events.d.ts.map +1 -0
- package/dist/api/resources/threads/events.js +24 -0
- package/dist/api/resources/threads/index.d.ts +4 -0
- package/dist/api/resources/threads/index.d.ts.map +1 -0
- package/dist/api/resources/threads/index.js +2 -0
- package/dist/api/resources/threads/threads.d.ts +57 -0
- package/dist/api/resources/threads/threads.d.ts.map +1 -0
- package/dist/api/resources/threads/threads.js +199 -0
- package/dist/api/resources/threads/types.d.ts +123 -0
- package/dist/api/resources/threads/types.d.ts.map +1 -0
- package/dist/api/resources/threads/utils.d.ts +18 -0
- package/dist/api/resources/threads/utils.d.ts.map +1 -0
- package/dist/api/resources/threads/utils.js +78 -0
- package/dist/context.d.ts +5 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +6 -1
- package/dist/guardrail.d.ts +4 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/internal.d.ts +4 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +2 -0
- package/dist/kernl/index.d.ts +3 -0
- package/dist/kernl/index.d.ts.map +1 -0
- package/dist/kernl/index.js +2 -0
- package/dist/kernl/kernl.d.ts +64 -0
- package/dist/kernl/kernl.d.ts.map +1 -0
- package/dist/kernl/kernl.js +116 -0
- package/dist/kernl/threads.d.ts +110 -0
- package/dist/kernl/threads.d.ts.map +1 -0
- package/dist/kernl/threads.js +126 -0
- package/dist/kernl.d.ts +27 -11
- package/dist/kernl.d.ts.map +1 -1
- package/dist/kernl.js +74 -11
- package/dist/lib/env.d.ts +3 -3
- package/dist/lib/env.js +1 -1
- package/dist/lib/error.d.ts +3 -3
- package/dist/lib/logger.js +1 -1
- package/dist/lifecycle.d.ts +5 -5
- package/dist/mcp/__tests__/base.test.js +2 -2
- package/dist/mcp/__tests__/fixtures/utils.d.ts +1 -1
- package/dist/mcp/__tests__/fixtures/utils.js +1 -1
- package/dist/mcp/__tests__/integration.test.js +16 -16
- package/dist/mcp/__tests__/stdio.test.js +2 -2
- package/dist/mcp/__tests__/utils.test.js +8 -8
- package/dist/mcp/base.d.ts +2 -2
- package/dist/mcp/http.d.ts +3 -3
- package/dist/mcp/http.d.ts.map +1 -1
- package/dist/mcp/http.js +11 -11
- package/dist/mcp/sse.d.ts +3 -3
- package/dist/mcp/sse.d.ts.map +1 -1
- package/dist/mcp/sse.js +9 -9
- package/dist/mcp/stdio.d.ts +2 -2
- package/dist/mcp/stdio.js +2 -2
- package/dist/mcp/types.d.ts +3 -3
- package/dist/mcp/utils.d.ts +4 -4
- package/dist/mcp/utils.d.ts.map +1 -1
- package/dist/mcp/utils.js +5 -6
- package/dist/storage/__tests__/in-memory.test.d.ts +2 -0
- package/dist/storage/__tests__/in-memory.test.d.ts.map +1 -0
- package/dist/storage/__tests__/in-memory.test.js +455 -0
- package/dist/storage/base.d.ts +64 -0
- package/dist/storage/base.d.ts.map +1 -0
- package/dist/storage/base.js +4 -0
- package/dist/storage/in-memory.d.ts +62 -0
- package/dist/storage/in-memory.d.ts.map +1 -0
- package/dist/storage/in-memory.js +283 -0
- package/dist/storage/index.d.ts +10 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +7 -0
- package/dist/storage/thread.d.ts +123 -0
- package/dist/storage/thread.d.ts.map +1 -0
- package/dist/storage/thread.js +4 -0
- package/dist/task.d.ts +8 -6
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +10 -8
- package/dist/thread/__tests__/fixtures/mock-model.d.ts +1 -2
- package/dist/thread/__tests__/fixtures/mock-model.d.ts.map +1 -1
- package/dist/thread/__tests__/integration.test.js +10 -10
- package/dist/thread/__tests__/mock.d.ts +1 -1
- package/dist/thread/__tests__/namespace.test.d.ts +2 -0
- package/dist/thread/__tests__/namespace.test.d.ts.map +1 -0
- package/dist/thread/__tests__/namespace.test.js +131 -0
- package/dist/thread/__tests__/thread-persistence.test.d.ts +2 -0
- package/dist/thread/__tests__/thread-persistence.test.d.ts.map +1 -0
- package/dist/thread/__tests__/thread-persistence.test.js +351 -0
- package/dist/thread/__tests__/thread.test.js +55 -57
- package/dist/thread/index.d.ts +1 -1
- package/dist/thread/index.js +1 -1
- package/dist/thread/thread.d.ts +74 -22
- package/dist/thread/thread.d.ts.map +1 -1
- package/dist/thread/thread.js +212 -74
- package/dist/thread/utils.d.ts +38 -10
- package/dist/thread/utils.d.ts.map +1 -1
- package/dist/thread/utils.js +53 -9
- package/dist/tool/__tests__/fixtures.d.ts +8 -8
- package/dist/tool/__tests__/fixtures.js +3 -3
- package/dist/tool/__tests__/tool.test.js +2 -2
- package/dist/tool/__tests__/toolkit.test.js +17 -14
- package/dist/tool/index.d.ts +3 -3
- package/dist/tool/index.js +2 -2
- package/dist/tool/tool.d.ts +2 -2
- package/dist/tool/tool.js +5 -5
- package/dist/tool/toolkit.d.ts +4 -4
- package/dist/tool/toolkit.js +1 -1
- package/dist/tool/types.d.ts +4 -4
- package/dist/trace/traces.js +2 -2
- package/dist/types/agent.d.ts +4 -4
- package/dist/types/kernl.d.ts +42 -0
- package/dist/types/kernl.d.ts.map +1 -0
- package/dist/types/thread.d.ts +110 -24
- package/dist/types/thread.d.ts.map +1 -1
- package/dist/types/thread.js +12 -0
- package/package.json +12 -8
- package/src/agent/__tests__/concurrency.test.ts +194 -0
- package/src/agent/__tests__/run.test.ts +441 -0
- package/src/agent/index.ts +0 -0
- package/src/agent.ts +139 -24
- package/src/api/__tests__/cursor-page.test.ts +512 -0
- package/src/api/__tests__/offset-page.test.ts +624 -0
- package/src/api/__tests__/threads.test.ts +415 -0
- package/src/api/models/index.ts +6 -0
- package/src/api/models/thread.ts +138 -0
- package/src/api/pagination/base.ts +79 -0
- package/src/api/pagination/cursor.ts +86 -0
- package/src/api/pagination/offset.ts +89 -0
- package/src/api/resources/threads/events.ts +26 -0
- package/src/api/resources/threads/index.ts +9 -0
- package/src/api/resources/threads/threads.ts +256 -0
- package/src/api/resources/threads/types.ts +143 -0
- package/src/api/resources/threads/utils.ts +104 -0
- package/src/context.ts +10 -1
- package/src/index.ts +49 -1
- package/src/internal.ts +15 -0
- package/src/kernl.ts +86 -17
- package/src/mcp/__tests__/integration.test.ts +8 -9
- package/src/mcp/__tests__/utils.test.ts +6 -6
- package/src/mcp/http.ts +9 -9
- package/src/mcp/sse.ts +7 -7
- package/src/mcp/utils.ts +6 -5
- package/src/storage/__tests__/in-memory.test.ts +534 -0
- package/src/storage/base.ts +77 -0
- package/src/storage/in-memory.ts +372 -0
- package/src/storage/index.ts +21 -0
- package/src/storage/thread.ts +141 -0
- package/src/task.ts +12 -10
- package/src/thread/__tests__/fixtures/mock-model.ts +2 -4
- package/src/thread/__tests__/integration.test.ts +13 -12
- package/src/thread/__tests__/namespace.test.ts +158 -0
- package/src/thread/__tests__/thread-persistence.test.ts +367 -0
- package/src/thread/__tests__/thread.test.ts +52 -54
- package/src/thread/thread.ts +247 -96
- package/src/thread/utils.ts +76 -13
- package/src/tool/__tests__/fixtures.ts +1 -1
- package/src/tool/__tests__/toolkit.test.ts +15 -12
- package/src/tool/tool.ts +3 -3
- package/src/types/kernl.ts +51 -0
- package/src/types/thread.ts +139 -25
- package/vitest.config.ts +1 -0
- package/dist/env.d.ts +0 -45
- package/dist/env.d.ts.map +0 -1
- package/dist/env.js +0 -31
- package/dist/error.d.ts +0 -1
- package/dist/error.d.ts.map +0 -1
- package/dist/kernel.d.ts +0 -7
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js +0 -7
- package/dist/lib/serde/__tests__/codec.test.d.ts +0 -2
- package/dist/lib/serde/__tests__/codec.test.d.ts.map +0 -1
- package/dist/lib/serde/__tests__/codec.test.js +0 -75
- package/dist/lib/serde/codec.d.ts +0 -12
- package/dist/lib/serde/codec.d.ts.map +0 -1
- package/dist/lib/serde/codec.js +0 -54
- package/dist/lib/serde/thread.d.ts +0 -1
- package/dist/lib/serde/thread.d.ts.map +0 -1
- package/dist/lib/serde/thread.js +0 -172
- package/dist/lib/serde/tool.d.ts +0 -36
- package/dist/lib/serde/tool.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -19
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -41
- package/dist/logger.d.ts +0 -36
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js +0 -43
- package/dist/mcp/__tests__/fixtures/echo-server.d.ts +0 -3
- package/dist/mcp/__tests__/fixtures/echo-server.d.ts.map +0 -1
- package/dist/mcp/__tests__/fixtures/echo-server.js +0 -92
- package/dist/mcp/__tests__/fixtures/math-server.d.ts +0 -3
- package/dist/mcp/__tests__/fixtures/math-server.d.ts.map +0 -1
- package/dist/mcp/__tests__/fixtures/math-server.js +0 -98
- package/dist/mcp/__tests__/fixtures/test-server.d.ts +0 -3
- package/dist/mcp/__tests__/fixtures/test-server.d.ts.map +0 -1
- package/dist/mcp/__tests__/fixtures/test-server.js +0 -163
- package/dist/mcp/__tests__/test-utils.d.ts +0 -17
- package/dist/mcp/__tests__/test-utils.d.ts.map +0 -1
- package/dist/mcp/__tests__/test-utils.js +0 -42
- package/dist/mcp/node.d.ts +0 -60
- package/dist/mcp/node.d.ts.map +0 -1
- package/dist/mcp/node.js +0 -297
- package/dist/model.d.ts +0 -175
- package/dist/model.d.ts.map +0 -1
- package/dist/providers/ai.d.ts +0 -1
- package/dist/providers/ai.d.ts.map +0 -1
- package/dist/providers/ai.js +0 -1
- package/dist/providers/default.d.ts +0 -16
- package/dist/providers/default.d.ts.map +0 -1
- package/dist/providers/default.js +0 -17
- package/dist/providers/registry.d.ts +0 -1
- package/dist/providers/registry.d.ts.map +0 -1
- package/dist/providers/registry.js +0 -1
- package/dist/sched/scheduler.d.ts +0 -20
- package/dist/sched/scheduler.d.ts.map +0 -1
- package/dist/sched/task.d.ts +0 -92
- package/dist/sched/task.d.ts.map +0 -1
- package/dist/sched/task.js +0 -102
- package/dist/serde/__tests__/codec.test.d.ts +0 -2
- package/dist/serde/__tests__/codec.test.d.ts.map +0 -1
- package/dist/serde/__tests__/codec.test.js +0 -75
- package/dist/serde/codec.d.ts +0 -12
- package/dist/serde/codec.d.ts.map +0 -1
- package/dist/serde/codec.js +0 -54
- package/dist/serde/json.d.ts +0 -8
- package/dist/serde/json.d.ts.map +0 -1
- package/dist/serde/json.js +0 -13
- package/dist/serde/thread.d.ts +0 -687
- package/dist/serde/thread.d.ts.map +0 -1
- package/dist/serde/thread.js +0 -158
- package/dist/serde/tool.d.ts +0 -36
- package/dist/serde/tool.d.ts.map +0 -1
- package/dist/session.d.ts +0 -1
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -1
- package/dist/thread/__tests__/stream.test.d.ts +0 -2
- package/dist/thread/__tests__/stream.test.d.ts.map +0 -1
- package/dist/thread/__tests__/stream.test.js +0 -244
- package/dist/tool/mcp.d.ts +0 -75
- package/dist/tool/mcp.d.ts.map +0 -1
- package/dist/tool/mcp.js +0 -111
- package/dist/tools.d.ts +0 -362
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js +0 -220
- package/dist/types/proto.d.ts +0 -1551
- package/dist/types/proto.d.ts.map +0 -1
- package/dist/types/proto.js +0 -531
- package/dist/usage.d.ts +0 -43
- package/dist/usage.d.ts.map +0 -1
- package/dist/usage.js +0 -61
- package/src/lib/serde/thread.ts +0 -188
- /package/dist/{error.js → agent/index.js} +0 -0
- /package/dist/{lib/serde/tool.js → api/models/index.js} +0 -0
- /package/dist/{model.js → api/models/thread.js} +0 -0
- /package/dist/{sched/scheduler.js → api/resources/threads/types.js} +0 -0
- /package/dist/{serde/tool.js → types/kernl.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { FunctionToolkit } from "../toolkit";
|
|
3
|
-
import { simpleStringTool, zodTool, errorTool, mockHostedTool, anotherHostedTool, } from "./fixtures";
|
|
2
|
+
import { FunctionToolkit } from "../toolkit.js";
|
|
3
|
+
import { simpleStringTool, zodTool, errorTool, mockHostedTool, anotherHostedTool, } from "./fixtures.js";
|
|
4
4
|
describe("FunctionToolkit", () => {
|
|
5
5
|
describe("constructor", () => {
|
|
6
6
|
it("should create empty toolkit with no tools", async () => {
|
|
@@ -83,22 +83,22 @@ describe("FunctionToolkit", () => {
|
|
|
83
83
|
const toolkit = new FunctionToolkit({ id: "test", tools: [simpleStringTool] });
|
|
84
84
|
const serialized = (await toolkit.list()).map((tool) => tool.serialize());
|
|
85
85
|
expect(serialized).toHaveLength(1);
|
|
86
|
-
expect(serialized[0]).
|
|
87
|
-
|
|
88
|
-
name: simpleStringTool.
|
|
86
|
+
expect(serialized[0]).toMatchObject({
|
|
87
|
+
kind: "function",
|
|
88
|
+
name: simpleStringTool.id,
|
|
89
89
|
description: simpleStringTool.description,
|
|
90
|
-
parameters: simpleStringTool.parameters,
|
|
91
90
|
});
|
|
91
|
+
expect(serialized[0].parameters).toBeDefined();
|
|
92
92
|
});
|
|
93
93
|
it("should serialize hosted tools correctly", async () => {
|
|
94
94
|
const toolkit = new FunctionToolkit({ id: "test", tools: [mockHostedTool] });
|
|
95
95
|
const serialized = (await toolkit.list()).map((tool) => tool.serialize());
|
|
96
96
|
expect(serialized).toHaveLength(1);
|
|
97
97
|
expect(serialized[0]).toEqual({
|
|
98
|
-
|
|
98
|
+
kind: "provider-defined",
|
|
99
99
|
id: mockHostedTool.id,
|
|
100
100
|
name: mockHostedTool.name,
|
|
101
|
-
|
|
101
|
+
args: mockHostedTool.providerData,
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
it("should serialize both function and hosted tools", async () => {
|
|
@@ -107,17 +107,20 @@ describe("FunctionToolkit", () => {
|
|
|
107
107
|
expect(serialized).toHaveLength(2);
|
|
108
108
|
// Check both tools are present (order not guaranteed with Map)
|
|
109
109
|
expect(serialized).toContainEqual({
|
|
110
|
-
|
|
110
|
+
kind: "provider-defined",
|
|
111
111
|
id: mockHostedTool.id,
|
|
112
112
|
name: mockHostedTool.name,
|
|
113
|
-
|
|
113
|
+
args: mockHostedTool.providerData,
|
|
114
114
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
// Check that function tool is present with correct structure
|
|
116
|
+
const functionTool = serialized.find((t) => t.kind === "function");
|
|
117
|
+
expect(functionTool).toBeDefined();
|
|
118
|
+
expect(functionTool).toMatchObject({
|
|
119
|
+
kind: "function",
|
|
120
|
+
name: simpleStringTool.id,
|
|
118
121
|
description: simpleStringTool.description,
|
|
119
|
-
parameters: simpleStringTool.parameters,
|
|
120
122
|
});
|
|
123
|
+
expect(functionTool.parameters).toBeDefined();
|
|
121
124
|
});
|
|
122
125
|
it("should handle hosted tools without providerData", async () => {
|
|
123
126
|
const toolkit = new FunctionToolkit({ id: "test", tools: [anotherHostedTool] });
|
package/dist/tool/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BaseTool, FunctionTool, HostedTool, tool } from "./tool";
|
|
2
|
-
export { BaseToolkit, Toolkit, FunctionToolkit, MCPToolkit } from "./toolkit";
|
|
3
|
-
export type { Tool, ToolResult, FunctionToolkitConfig, MCPToolkitConfig, ToolkitFilter, ToolkitFilterContext, } from "./types";
|
|
1
|
+
export { BaseTool, FunctionTool, HostedTool, tool } from "./tool.js";
|
|
2
|
+
export { BaseToolkit, Toolkit, FunctionToolkit, MCPToolkit } from "./toolkit.js";
|
|
3
|
+
export type { Tool, ToolResult, FunctionToolkitConfig, MCPToolkitConfig, ToolkitFilter, ToolkitFilterContext, } from "./types.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/tool/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BaseTool, FunctionTool, HostedTool, tool } from "./tool";
|
|
2
|
-
export { BaseToolkit, Toolkit, FunctionToolkit, MCPToolkit } from "./toolkit";
|
|
1
|
+
export { BaseTool, FunctionTool, HostedTool, tool } from "./tool.js";
|
|
2
|
+
export { BaseToolkit, Toolkit, FunctionToolkit, MCPToolkit } from "./toolkit.js";
|
package/dist/tool/tool.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Context, UnknownContext } from "../context";
|
|
1
|
+
import { Context, UnknownContext } from "../context.js";
|
|
2
2
|
import type { LanguageModelTool } from "@kernl-sdk/protocol";
|
|
3
|
-
import type { ToolConfig, ToolApprovalFunction, ToolEnabledFunction, ToolErrorFunction, ToolInputParameters, ToolResult } from "./types";
|
|
3
|
+
import type { ToolConfig, ToolApprovalFunction, ToolEnabledFunction, ToolErrorFunction, ToolInputParameters, ToolResult } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Exposes a function to the agent as a tool to be called
|
|
6
6
|
*
|
package/dist/tool/tool.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { ModelBehaviorError } from "../lib/error";
|
|
3
|
-
import { logger } from "../lib/logger";
|
|
2
|
+
import { ModelBehaviorError } from "../lib/error.js";
|
|
3
|
+
import { logger } from "../lib/logger.js";
|
|
4
4
|
import { json } from "@kernl-sdk/shared/lib";
|
|
5
5
|
import { FAILED, COMPLETED, INTERRUPTIBLE } from "@kernl-sdk/protocol";
|
|
6
6
|
/**
|
|
@@ -120,9 +120,9 @@ export class FunctionTool extends BaseTool {
|
|
|
120
120
|
kind: "function",
|
|
121
121
|
name: this.id,
|
|
122
122
|
description: this.description,
|
|
123
|
-
parameters: (this.parameters
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
parameters: z.toJSONSchema(this.parameters ?? z.object({}), {
|
|
124
|
+
target: "draft-7",
|
|
125
|
+
}), // Use empty object if no parameters (matches AI SDK)
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
}
|
package/dist/tool/toolkit.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Agent } from "../agent";
|
|
2
|
-
import type { Context, UnknownContext } from "../context";
|
|
3
|
-
import type { Tool } from ".";
|
|
4
|
-
import type { FunctionToolkitConfig, MCPToolkitConfig } from "./types";
|
|
1
|
+
import type { Agent } from "../agent.js";
|
|
2
|
+
import type { Context, UnknownContext } from "../context.js";
|
|
3
|
+
import type { Tool } from "./index.js";
|
|
4
|
+
import type { FunctionToolkitConfig, MCPToolkitConfig } from "./types.js";
|
|
5
5
|
/**
|
|
6
6
|
* A toolkit is a collection of related tools that can be used by an agent.
|
|
7
7
|
*
|
package/dist/tool/toolkit.js
CHANGED
package/dist/tool/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z, type ZodType } from "zod";
|
|
2
|
-
import { Agent } from "../agent";
|
|
3
|
-
import { Context, UnknownContext } from "../context";
|
|
4
|
-
import { MCPServer } from "../mcp/base";
|
|
2
|
+
import { Agent } from "../agent.js";
|
|
3
|
+
import { Context, UnknownContext } from "../context.js";
|
|
4
|
+
import { MCPServer } from "../mcp/base.js";
|
|
5
5
|
import type { ToolCallState } from "@kernl-sdk/protocol";
|
|
6
|
-
import type { FunctionTool, HostedTool } from "./tool";
|
|
6
|
+
import type { FunctionTool, HostedTool } from "./tool.js";
|
|
7
7
|
/**
|
|
8
8
|
* A tool that can be called by the model.
|
|
9
9
|
* @template TContext The context passed to the tool
|
package/dist/trace/traces.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// import { defaultProcessor, TracingProcessor } from "./processor";
|
|
3
|
-
// import { generateTraceId } from "./utils";
|
|
2
|
+
// import { defaultProcessor, TracingProcessor } from "./processor.js";
|
|
3
|
+
// import { generateTraceId } from "./utils.js";
|
|
4
4
|
// export type TraceOptions = {
|
|
5
5
|
// traceId?: string;
|
|
6
6
|
// name?: string;
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ZodType } from "zod";
|
|
2
|
-
import { Context, UnknownContext } from "../context";
|
|
2
|
+
import { Context, UnknownContext } from "../context.js";
|
|
3
3
|
import { LanguageModel, LanguageModelRequestSettings } from "@kernl-sdk/protocol";
|
|
4
|
-
import { InputGuardrail, OutputGuardrail } from "../guardrail";
|
|
5
|
-
import { BaseToolkit } from "../tool";
|
|
6
|
-
import { TextResponse } from "./thread";
|
|
4
|
+
import { InputGuardrail, OutputGuardrail } from "../guardrail.js";
|
|
5
|
+
import { BaseToolkit } from "../tool/index.js";
|
|
6
|
+
import { TextResponse } from "./thread.js";
|
|
7
7
|
/**
|
|
8
8
|
* Configuration for an agent.
|
|
9
9
|
*/
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LanguageModel } from "@kernl-sdk/protocol";
|
|
2
|
+
import { Agent } from "../agent.js";
|
|
3
|
+
import { KernlStorage } from "../storage/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Storage configuration for Kernl.
|
|
6
|
+
*/
|
|
7
|
+
export interface StorageOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Relational database storage (threads, tasks, traces).
|
|
10
|
+
*/
|
|
11
|
+
db?: KernlStorage;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Configuration options for creating a Kernl instance.
|
|
15
|
+
*/
|
|
16
|
+
export interface KernlOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Storage configuration for persisting threads, tasks, and traces.
|
|
19
|
+
*/
|
|
20
|
+
storage?: StorageOptions;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Agent registry interface.
|
|
24
|
+
*
|
|
25
|
+
* Satisfied by Map<string, Agent>.
|
|
26
|
+
*/
|
|
27
|
+
export interface AgentRegistry {
|
|
28
|
+
get(id: string): Agent<any> | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Model registry interface.
|
|
32
|
+
*
|
|
33
|
+
* Satisfied by Map<string, LanguageModel>.
|
|
34
|
+
* Key format: "provider/modelId"
|
|
35
|
+
*
|
|
36
|
+
* TODO: Create an exhaustive model registry in the protocol package
|
|
37
|
+
* with all supported models and their metadata.
|
|
38
|
+
*/
|
|
39
|
+
export interface ModelRegistry {
|
|
40
|
+
get(key: string): LanguageModel | undefined;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=kernl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kernl.d.ts","sourceRoot":"","sources":["../../src/types/kernl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,YAAY,CAAC;CAMnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CACzC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CAC7C"}
|
package/dist/types/thread.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { ToolCall, LanguageModel, LanguageModelItem, LanguageModelStreamEvent, RUNNING, STOPPED, INTERRUPTIBLE, UNINTERRUPTIBLE, ZOMBIE, DEAD } from "@kernl-sdk/protocol";
|
|
2
|
-
import { Task } from "../task";
|
|
3
|
-
import { Context } from "../context";
|
|
2
|
+
import { Task } from "../task.js";
|
|
3
|
+
import { Context } from "../context.js";
|
|
4
|
+
import { Agent } from "../agent.js";
|
|
5
|
+
import type { AgentResponseType } from "./agent.js";
|
|
6
|
+
import type { ThreadStore } from "../storage/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Public/client-facing thread events (excludes internal system events).
|
|
9
|
+
*/
|
|
10
|
+
export type PublicThreadEvent = LanguageModelItem & ThreadEventBase;
|
|
4
11
|
export type TextResponse = "text";
|
|
12
|
+
/**
|
|
13
|
+
* Thread state values as a const array (for zod schemas).
|
|
14
|
+
*/
|
|
15
|
+
export declare const THREAD_STATES: readonly ["running", "stopped", "interruptible", "uninterruptible", "zombie", "dead"];
|
|
5
16
|
/**
|
|
6
17
|
* Thread state discriminated union
|
|
7
18
|
*/
|
|
@@ -12,39 +23,66 @@ export type ThreadState = typeof RUNNING | typeof STOPPED | typeof INTERRUPTIBLE
|
|
|
12
23
|
*/
|
|
13
24
|
export declare const REQUIRES_APPROVAL = "requires_approval";
|
|
14
25
|
/**
|
|
15
|
-
*
|
|
26
|
+
* Thread domain interface.
|
|
16
27
|
*
|
|
17
|
-
*
|
|
18
|
-
* which don't go to the model.
|
|
28
|
+
* Represents the complete state of a Thread that can be stored and restored.
|
|
19
29
|
*/
|
|
20
|
-
export
|
|
30
|
+
export interface IThread<TContext = unknown, TResponse extends AgentResponseType = "text"> {
|
|
31
|
+
tid: string;
|
|
32
|
+
agent: Agent<TContext, TResponse>;
|
|
33
|
+
model: LanguageModel;
|
|
34
|
+
context: Context<TContext>;
|
|
35
|
+
input: LanguageModelItem[];
|
|
36
|
+
history: ThreadEvent[];
|
|
37
|
+
task: Task<TContext> | null;
|
|
38
|
+
tick: number;
|
|
39
|
+
state: ThreadState;
|
|
40
|
+
namespace: string;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
metadata: Record<string, unknown> | null;
|
|
44
|
+
}
|
|
45
|
+
export interface CheckpointDelta {
|
|
46
|
+
state?: ThreadState;
|
|
47
|
+
tick?: number;
|
|
48
|
+
seq?: number;
|
|
49
|
+
events?: ThreadEvent[];
|
|
50
|
+
}
|
|
21
51
|
/**
|
|
22
|
-
*
|
|
52
|
+
* The inner data of a ThreadEvent without the headers
|
|
23
53
|
*/
|
|
24
|
-
export type
|
|
54
|
+
export type ThreadEventInner = LanguageModelItem;
|
|
25
55
|
/**
|
|
26
|
-
*
|
|
56
|
+
* Base fields for all thread events - added to every LanguageModelItem when stored in thread.
|
|
27
57
|
*/
|
|
28
|
-
export interface
|
|
29
|
-
|
|
58
|
+
export interface ThreadEventBase {
|
|
59
|
+
id: string;
|
|
60
|
+
tid: string;
|
|
61
|
+
seq: number;
|
|
62
|
+
timestamp: Date;
|
|
63
|
+
metadata: Record<string, unknown>;
|
|
30
64
|
}
|
|
31
65
|
/**
|
|
32
|
-
*
|
|
66
|
+
* System event - runtime state changes (not sent to model).
|
|
33
67
|
*/
|
|
34
|
-
export interface
|
|
35
|
-
|
|
36
|
-
* Action events generated from executing tools (tool results)
|
|
37
|
-
*/
|
|
38
|
-
actions: ThreadEvent[];
|
|
39
|
-
/**
|
|
40
|
-
* Tool calls that require approval before execution
|
|
41
|
-
*/
|
|
42
|
-
pendingApprovals: ToolCall[];
|
|
68
|
+
export interface ThreadSystemEvent extends ThreadEventBase {
|
|
69
|
+
readonly kind: "system";
|
|
43
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Thread events are append-only log entries ordered by seq.
|
|
73
|
+
*
|
|
74
|
+
* Events extend LanguageModelItem types with thread-specific metadata (tid, seq, timestamp).
|
|
75
|
+
* When sent to the model, we extract the LanguageModelItem by omitting the base fields.
|
|
76
|
+
*/
|
|
77
|
+
export type ThreadEvent = (LanguageModelItem & ThreadEventBase) | ThreadSystemEvent;
|
|
78
|
+
/**
|
|
79
|
+
* Stream events - use protocol definition directly.
|
|
80
|
+
*/
|
|
81
|
+
export type ThreadStreamEvent = LanguageModelStreamEvent;
|
|
44
82
|
/**
|
|
45
83
|
* Result of thread execution
|
|
46
84
|
*/
|
|
47
|
-
export interface ThreadExecuteResult<TResponse =
|
|
85
|
+
export interface ThreadExecuteResult<TResponse = unknown> {
|
|
48
86
|
/**
|
|
49
87
|
* The final parsed response from the agent
|
|
50
88
|
*/
|
|
@@ -54,12 +92,60 @@ export interface ThreadExecuteResult<TResponse = any> {
|
|
|
54
92
|
*/
|
|
55
93
|
state: any;
|
|
56
94
|
}
|
|
57
|
-
|
|
58
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Options for constructing a Thread.
|
|
97
|
+
*/
|
|
98
|
+
export interface ThreadOptions<TContext = unknown, TResponse extends AgentResponseType = "text"> {
|
|
99
|
+
agent: Agent<TContext, TResponse>;
|
|
100
|
+
input?: LanguageModelItem[];
|
|
101
|
+
history?: ThreadEvent[];
|
|
102
|
+
context?: Context<TContext>;
|
|
103
|
+
model?: LanguageModel;
|
|
104
|
+
task?: Task<TContext> | null;
|
|
105
|
+
namespace?: string;
|
|
106
|
+
tid?: string;
|
|
107
|
+
tick?: number;
|
|
108
|
+
state?: ThreadState;
|
|
109
|
+
storage?: ThreadStore;
|
|
110
|
+
createdAt?: Date;
|
|
111
|
+
updatedAt?: Date;
|
|
112
|
+
metadata?: Record<string, unknown> | null;
|
|
113
|
+
/**
|
|
114
|
+
* Internal flag indicating whether this thread already has a persisted
|
|
115
|
+
* row in storage. Storage implementations MUST set this to true when
|
|
116
|
+
* hydrating from a store. Callers creating new threads should omit it.
|
|
117
|
+
*/
|
|
118
|
+
persisted?: boolean;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Options passed to agent.execute() and agent.stream().
|
|
122
|
+
*/
|
|
123
|
+
export interface ThreadExecuteOptions<TContext> {
|
|
124
|
+
context?: Context<TContext>;
|
|
59
125
|
model?: LanguageModel;
|
|
60
126
|
task?: Task<TContext>;
|
|
61
127
|
threadId?: string;
|
|
128
|
+
namespace?: string;
|
|
62
129
|
maxTicks?: number;
|
|
63
130
|
abort?: AbortSignal;
|
|
64
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Set of actionable items extracted from a model response
|
|
134
|
+
*/
|
|
135
|
+
export interface ActionSet {
|
|
136
|
+
toolCalls: ToolCall[];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Result of performing actions, including both executed results and pending approvals
|
|
140
|
+
*/
|
|
141
|
+
export interface PerformActionsResult {
|
|
142
|
+
/**
|
|
143
|
+
* Action events generated from executing tools (tool results)
|
|
144
|
+
*/
|
|
145
|
+
actions: ThreadEventInner[];
|
|
146
|
+
/**
|
|
147
|
+
* Tool calls that require approval before execution
|
|
148
|
+
*/
|
|
149
|
+
pendingApprovals: ToolCall[];
|
|
150
|
+
}
|
|
65
151
|
//# sourceMappingURL=thread.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../src/types/thread.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,OAAO,EACP,OAAO,EACP,aAAa,EACb,eAAe,EACf,MAAM,EACN,IAAI,EACL,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../src/types/thread.ts"],"names":[],"mappings":"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"}
|
package/dist/types/thread.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import { RUNNING, STOPPED, INTERRUPTIBLE, UNINTERRUPTIBLE, ZOMBIE, DEAD, } from "@kernl-sdk/protocol";
|
|
2
|
+
/**
|
|
3
|
+
* Thread state values as a const array (for zod schemas).
|
|
4
|
+
*/
|
|
5
|
+
export const THREAD_STATES = [
|
|
6
|
+
RUNNING,
|
|
7
|
+
STOPPED,
|
|
8
|
+
INTERRUPTIBLE,
|
|
9
|
+
UNINTERRUPTIBLE,
|
|
10
|
+
ZOMBIE,
|
|
11
|
+
DEAD,
|
|
12
|
+
];
|
|
1
13
|
/**
|
|
2
14
|
* Thread-specific tool call state for approval workflow.
|
|
3
15
|
* This extends the protocol states for internal thread use.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kernl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "A modern AI agent framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kernl",
|
|
@@ -13,26 +13,30 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/kernl-sdk/kernl.git",
|
|
17
17
|
"directory": "packages/kernl"
|
|
18
18
|
},
|
|
19
|
-
"homepage": "https://github.com/
|
|
19
|
+
"homepage": "https://github.com/kernl-sdk/kernl#readme",
|
|
20
20
|
"bugs": {
|
|
21
|
-
"url": "https://github.com/
|
|
21
|
+
"url": "https://github.com/kernl-sdk/kernl/issues"
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"import": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./internal": {
|
|
30
|
+
"types": "./dist/internal.d.ts",
|
|
31
|
+
"import": "./dist/internal.js"
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
"dependencies": {
|
|
31
35
|
"@modelcontextprotocol/sdk": "^1.20.2",
|
|
32
36
|
"pino": "^9.6.0",
|
|
33
37
|
"zod": "^4.1.12",
|
|
34
|
-
"@kernl-sdk/protocol": "0.2.
|
|
35
|
-
"@kernl-sdk/shared": "^0.1.
|
|
38
|
+
"@kernl-sdk/protocol": "0.2.5",
|
|
39
|
+
"@kernl-sdk/shared": "^0.1.6"
|
|
36
40
|
},
|
|
37
41
|
"devDependencies": {
|
|
38
42
|
"@ai-sdk/openai": "3.0.0-beta.57",
|
|
@@ -40,10 +44,10 @@
|
|
|
40
44
|
"tsc-alias": "^1.8.10",
|
|
41
45
|
"typescript": "5.9.2",
|
|
42
46
|
"vitest": "^4.0.8",
|
|
43
|
-
"@kernl-sdk/ai": "0.
|
|
47
|
+
"@kernl-sdk/ai": "0.2.6"
|
|
44
48
|
},
|
|
45
49
|
"scripts": {
|
|
46
|
-
"build": "tsc && tsc-alias",
|
|
50
|
+
"build": "tsc && tsc-alias --resolve-full-paths",
|
|
47
51
|
"dev": "tsc --watch",
|
|
48
52
|
"lint": "eslint src/",
|
|
49
53
|
"check-types": "tsc --noEmit",
|