@lota-sdk/shared 0.1.46 → 0.1.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lota-sdk/shared",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -31,9 +31,24 @@ export function parseRowMetadata(raw: unknown): MessageMetadata {
31
31
  return result.success ? result.data : undefined
32
32
  }
33
33
 
34
- export const dataPartsSchemas = {}
34
+ export const multiAgentEventPhaseSchema = z.enum([
35
+ 'routing',
36
+ 'waiting-for-agent',
37
+ 'agent-message-persisted',
38
+ 'complete',
39
+ ])
35
40
 
36
- export type CustomDataParts = {}
41
+ export const multiAgentEventDataSchema = z.object({
42
+ phase: multiAgentEventPhaseSchema,
43
+ agentId: z.string().optional(),
44
+ agentName: z.string().optional(),
45
+ messageId: z.string().optional(),
46
+ note: z.string().optional(),
47
+ })
48
+
49
+ export const dataPartsSchemas = { 'multi-agent-event': multiAgentEventDataSchema } as const
50
+
51
+ export type CustomDataParts = { 'multi-agent-event': z.infer<typeof multiAgentEventDataSchema> }
37
52
 
38
53
  export type AnyChatTools = Record<string, { input: unknown; output: unknown }>
39
54
  export type HostExtensionChatTools = AnyChatTools
@@ -24,7 +24,6 @@ export const sdkWorkstreamRecordSchema = z.object({
24
24
  lastCompactedMessageId: z.string().nullish(),
25
25
  nameGenerated: z.boolean(), // Ideally `isNameGenerated`, but maps directly to SurrealDB column `nameGenerated`
26
26
  isCompacting: z.boolean().optional(),
27
- state: z.unknown().optional(),
28
27
  turnCount: z.number().int(),
29
28
  createdAt: z.coerce.date(),
30
29
  updatedAt: z.coerce.date(),