@kernl-sdk/storage 0.1.31 → 0.2.0
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 +1 -1
- package/CHANGELOG.md +44 -0
- package/dist/serde/thread.d.ts +2 -2
- package/dist/thread/schema.d.ts +4 -4
- package/dist/thread/schema.js +4 -4
- package/package.json +3 -3
- package/src/thread/schema.ts +4 -4
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @kernl/storage
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8815744: **BREAKING:** Refactor event kind naming from kebab-case to dot notation
|
|
8
|
+
|
|
9
|
+
This aligns the language model stream/item kinds with the existing realtime events naming convention.
|
|
10
|
+
|
|
11
|
+
### Kind value changes
|
|
12
|
+
|
|
13
|
+
| Old | New |
|
|
14
|
+
| ------------------ | ------------------ |
|
|
15
|
+
| `tool-call` | `tool.call` |
|
|
16
|
+
| `tool-result` | `tool.result` |
|
|
17
|
+
| `text-start` | `text.start` |
|
|
18
|
+
| `text-delta` | `text.delta` |
|
|
19
|
+
| `text-end` | `text.end` |
|
|
20
|
+
| `reasoning-start` | `reasoning.start` |
|
|
21
|
+
| `reasoning-delta` | `reasoning.delta` |
|
|
22
|
+
| `reasoning-end` | `reasoning.end` |
|
|
23
|
+
| `tool-input-start` | `tool.input.start` |
|
|
24
|
+
| `tool-input-delta` | `tool.input.delta` |
|
|
25
|
+
| `tool-input-end` | `tool.input.end` |
|
|
26
|
+
| `stream-start` | `stream.start` |
|
|
27
|
+
|
|
28
|
+
### ToolInputStartEvent: `toolName` → `toolId`
|
|
29
|
+
|
|
30
|
+
The `ToolInputStartEvent` now uses `toolId` to match `ToolCall` and `ToolResult`.
|
|
31
|
+
|
|
32
|
+
### Migration
|
|
33
|
+
|
|
34
|
+
If you have persisted thread events, run:
|
|
35
|
+
|
|
36
|
+
```sql
|
|
37
|
+
UPDATE thread_events SET kind = 'tool.call' WHERE kind = 'tool-call';
|
|
38
|
+
UPDATE thread_events SET kind = 'tool.result' WHERE kind = 'tool-result';
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [8815744]
|
|
44
|
+
- @kernl-sdk/protocol@0.5.0
|
|
45
|
+
- kernl@0.12.0
|
|
46
|
+
|
|
3
47
|
## 0.1.31
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
package/dist/serde/thread.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare const ThreadEventRecordCodec: Codec<ThreadEvent, {
|
|
|
54
54
|
seq: number;
|
|
55
55
|
timestamp: number;
|
|
56
56
|
metadata: Record<string, unknown> | null;
|
|
57
|
-
kind: "tool
|
|
57
|
+
kind: "tool.call";
|
|
58
58
|
data: Record<string, unknown>;
|
|
59
59
|
} | {
|
|
60
60
|
id: string;
|
|
@@ -62,7 +62,7 @@ export declare const ThreadEventRecordCodec: Codec<ThreadEvent, {
|
|
|
62
62
|
seq: number;
|
|
63
63
|
timestamp: number;
|
|
64
64
|
metadata: Record<string, unknown> | null;
|
|
65
|
-
kind: "tool
|
|
65
|
+
kind: "tool.result";
|
|
66
66
|
data: Record<string, unknown>;
|
|
67
67
|
} | {
|
|
68
68
|
id: string;
|
package/dist/thread/schema.d.ts
CHANGED
|
@@ -67,8 +67,8 @@ export type ThreadRecord = z.infer<typeof ThreadRecordSchema>;
|
|
|
67
67
|
* Always an object (record) for non-system events. Inner data is validated by protocol layer
|
|
68
68
|
* and is already JSON-serializable. The actual structure depends on the event kind:
|
|
69
69
|
* - message: {role, content, ...}
|
|
70
|
-
* - tool
|
|
71
|
-
* - tool
|
|
70
|
+
* - tool.call: {callId, toolId, state, arguments}
|
|
71
|
+
* - tool.result: {callId, toolId, state, result, error}
|
|
72
72
|
* - reasoning: {text}
|
|
73
73
|
* - system: null (handled separately)
|
|
74
74
|
*/
|
|
@@ -99,7 +99,7 @@ export declare const ThreadEventRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
99
99
|
seq: z.ZodNumber;
|
|
100
100
|
timestamp: z.ZodNumber;
|
|
101
101
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
102
|
-
kind: z.ZodLiteral<"tool
|
|
102
|
+
kind: z.ZodLiteral<"tool.call">;
|
|
103
103
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
104
104
|
}, z.core.$strip>, z.ZodObject<{
|
|
105
105
|
id: z.ZodString;
|
|
@@ -107,7 +107,7 @@ export declare const ThreadEventRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
107
107
|
seq: z.ZodNumber;
|
|
108
108
|
timestamp: z.ZodNumber;
|
|
109
109
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
110
|
-
kind: z.ZodLiteral<"tool
|
|
110
|
+
kind: z.ZodLiteral<"tool.result">;
|
|
111
111
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
112
112
|
}, z.core.$strip>, z.ZodObject<{
|
|
113
113
|
id: z.ZodString;
|
package/dist/thread/schema.js
CHANGED
|
@@ -78,8 +78,8 @@ export const ThreadRecordSchema = z.object({
|
|
|
78
78
|
* Always an object (record) for non-system events. Inner data is validated by protocol layer
|
|
79
79
|
* and is already JSON-serializable. The actual structure depends on the event kind:
|
|
80
80
|
* - message: {role, content, ...}
|
|
81
|
-
* - tool
|
|
82
|
-
* - tool
|
|
81
|
+
* - tool.call: {callId, toolId, state, arguments}
|
|
82
|
+
* - tool.result: {callId, toolId, state, result, error}
|
|
83
83
|
* - reasoning: {text}
|
|
84
84
|
* - system: null (handled separately)
|
|
85
85
|
*/
|
|
@@ -112,14 +112,14 @@ const ThreadReasoningEventRecordSchema = ThreadEventRecordBaseSchema.extend({
|
|
|
112
112
|
* Tool call event record.
|
|
113
113
|
*/
|
|
114
114
|
const ThreadToolCallEventRecordSchema = ThreadEventRecordBaseSchema.extend({
|
|
115
|
-
kind: z.literal("tool
|
|
115
|
+
kind: z.literal("tool.call"),
|
|
116
116
|
data: ThreadEventInnerSchema, // ToolCall data: {callId, toolId, state, arguments}
|
|
117
117
|
});
|
|
118
118
|
/**
|
|
119
119
|
* Tool result event record.
|
|
120
120
|
*/
|
|
121
121
|
const ThreadToolResultEventRecordSchema = ThreadEventRecordBaseSchema.extend({
|
|
122
|
-
kind: z.literal("tool
|
|
122
|
+
kind: z.literal("tool.result"),
|
|
123
123
|
data: ThreadEventInnerSchema, // ToolResult data: {callId, toolId, state, result, error}
|
|
124
124
|
});
|
|
125
125
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kernl-sdk/storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Core storage abstractions for kernl",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kernl",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"zod": "^4.1.8"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"kernl": "0.
|
|
40
|
-
"@kernl-sdk/protocol": "0.
|
|
39
|
+
"kernl": "0.12.0",
|
|
40
|
+
"@kernl-sdk/protocol": "0.5.0",
|
|
41
41
|
"@kernl-sdk/shared": "0.4.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/src/thread/schema.ts
CHANGED
|
@@ -96,8 +96,8 @@ export type ThreadRecord = z.infer<typeof ThreadRecordSchema>;
|
|
|
96
96
|
* Always an object (record) for non-system events. Inner data is validated by protocol layer
|
|
97
97
|
* and is already JSON-serializable. The actual structure depends on the event kind:
|
|
98
98
|
* - message: {role, content, ...}
|
|
99
|
-
* - tool
|
|
100
|
-
* - tool
|
|
99
|
+
* - tool.call: {callId, toolId, state, arguments}
|
|
100
|
+
* - tool.result: {callId, toolId, state, result, error}
|
|
101
101
|
* - reasoning: {text}
|
|
102
102
|
* - system: null (handled separately)
|
|
103
103
|
*/
|
|
@@ -136,7 +136,7 @@ const ThreadReasoningEventRecordSchema = ThreadEventRecordBaseSchema.extend({
|
|
|
136
136
|
* Tool call event record.
|
|
137
137
|
*/
|
|
138
138
|
const ThreadToolCallEventRecordSchema = ThreadEventRecordBaseSchema.extend({
|
|
139
|
-
kind: z.literal("tool
|
|
139
|
+
kind: z.literal("tool.call"),
|
|
140
140
|
data: ThreadEventInnerSchema, // ToolCall data: {callId, toolId, state, arguments}
|
|
141
141
|
});
|
|
142
142
|
|
|
@@ -144,7 +144,7 @@ const ThreadToolCallEventRecordSchema = ThreadEventRecordBaseSchema.extend({
|
|
|
144
144
|
* Tool result event record.
|
|
145
145
|
*/
|
|
146
146
|
const ThreadToolResultEventRecordSchema = ThreadEventRecordBaseSchema.extend({
|
|
147
|
-
kind: z.literal("tool
|
|
147
|
+
kind: z.literal("tool.result"),
|
|
148
148
|
data: ThreadEventInnerSchema, // ToolResult data: {callId, toolId, state, result, error}
|
|
149
149
|
});
|
|
150
150
|
|