@meistrari/chat-nuxt 4.8.0-rc.2 → 4.8.0-rc.3
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/dist/module.json +1 -1
- package/dist/runtime/types/schemas/chat/conversation-runtime.d.ts +2 -0
- package/dist/runtime/types/schemas/chat/conversations.d.ts +2 -0
- package/dist/runtime/types/schemas/chat/conversations.js +1 -0
- package/dist/runtime/types/schemas/chat/message-audit.d.ts +92 -0
- package/dist/runtime/types/schemas/chat/message-audit.js +55 -0
- package/dist/runtime/types/schemas/chat/messages.d.ts +4 -0
- package/dist/runtime/types/schemas/chat/messages.js +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -96,6 +96,7 @@ export declare const sendMessageV2BodySchema: z.ZodObject<{
|
|
|
96
96
|
export type SendMessageV2Body = z.infer<typeof sendMessageV2BodySchema>;
|
|
97
97
|
export declare const sendMessageV2ResponseSchema: z.ZodObject<{
|
|
98
98
|
userMessage: z.ZodObject<{
|
|
99
|
+
auditEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
100
|
id: z.ZodString;
|
|
100
101
|
conversationId: z.ZodString;
|
|
101
102
|
role: z.ZodEnum<{
|
|
@@ -130,6 +131,7 @@ export declare const sendMessageV2ResponseSchema: z.ZodObject<{
|
|
|
130
131
|
generationEndedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
131
132
|
}, z.core.$strip>;
|
|
132
133
|
assistantMessage: z.ZodObject<{
|
|
134
|
+
auditEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
135
|
id: z.ZodString;
|
|
134
136
|
conversationId: z.ZodString;
|
|
135
137
|
role: z.ZodEnum<{
|
|
@@ -80,6 +80,7 @@ export declare const conversationGroupSchema: z.ZodObject<{
|
|
|
80
80
|
}, z.core.$strip>;
|
|
81
81
|
export type ConversationGroup = z.infer<typeof conversationGroupSchema>;
|
|
82
82
|
export declare const messageSchema: z.ZodObject<{
|
|
83
|
+
auditEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
84
|
id: z.ZodString;
|
|
84
85
|
conversationId: z.ZodString;
|
|
85
86
|
role: z.ZodEnum<{
|
|
@@ -194,6 +195,7 @@ export declare const conversationWithMessagesSchema: z.ZodObject<{
|
|
|
194
195
|
createdAt: z.ZodDate;
|
|
195
196
|
updatedAt: z.ZodDate;
|
|
196
197
|
messages: z.ZodArray<z.ZodObject<{
|
|
198
|
+
auditEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
199
|
id: z.ZodString;
|
|
198
200
|
conversationId: z.ZodString;
|
|
199
201
|
role: z.ZodEnum<{
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const messageAuditTraceSchema: z.ZodObject<{
|
|
3
|
+
metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
4
|
+
durationMs: z.ZodNumber;
|
|
5
|
+
toolCalls: z.ZodNumber;
|
|
6
|
+
apiCalls: z.ZodNumber;
|
|
7
|
+
tokensIn: z.ZodNumber;
|
|
8
|
+
tokensOut: z.ZodNumber;
|
|
9
|
+
cachedTokens: z.ZodNumber;
|
|
10
|
+
totalCostUsd: z.ZodNumber;
|
|
11
|
+
cacheSavingsUsd: z.ZodNumber;
|
|
12
|
+
}, z.core.$strip>>>;
|
|
13
|
+
prompt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
14
|
+
model: z.ZodNullable<z.ZodString>;
|
|
15
|
+
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>>>;
|
|
17
|
+
spans: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
18
|
+
type: z.ZodString;
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
parentId: z.ZodNullable<z.ZodString>;
|
|
21
|
+
startMs: z.ZodNumber;
|
|
22
|
+
endMs: z.ZodNumber;
|
|
23
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
tokensIn: z.ZodNumber;
|
|
25
|
+
tokensOut: z.ZodNumber;
|
|
26
|
+
cachedTokens: z.ZodNumber;
|
|
27
|
+
costUsd: z.ZodNumber;
|
|
28
|
+
toolCallCount: z.ZodNumber;
|
|
29
|
+
apiCallCount: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
}, z.core.$strip>>>>;
|
|
32
|
+
events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
33
|
+
type: z.ZodString;
|
|
34
|
+
relativeTimeMs: z.ZodNumber;
|
|
35
|
+
timestamp: z.ZodNumber;
|
|
36
|
+
sequenceIndex: z.ZodNumber;
|
|
37
|
+
runTurnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
40
|
+
category: z.ZodOptional<z.ZodString>;
|
|
41
|
+
status: z.ZodOptional<z.ZodString>;
|
|
42
|
+
text: z.ZodOptional<z.ZodString>;
|
|
43
|
+
tokensIn: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
tokensOut: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
isError: z.ZodBoolean;
|
|
49
|
+
durationMs: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
}, z.core.$strip>>>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type MessageAuditTrace = z.infer<typeof messageAuditTraceSchema>;
|
|
54
|
+
export declare const messageAuditEventSchema: z.ZodObject<{
|
|
55
|
+
id: z.ZodUUID;
|
|
56
|
+
sequence: z.ZodString;
|
|
57
|
+
attemptId: z.ZodUUID;
|
|
58
|
+
messageId: z.ZodUUID;
|
|
59
|
+
conversationId: z.ZodUUID;
|
|
60
|
+
workspaceId: z.ZodString;
|
|
61
|
+
userId: z.ZodString;
|
|
62
|
+
telaAgentId: z.ZodNullable<z.ZodString>;
|
|
63
|
+
conversationScope: z.ZodNullable<z.ZodString>;
|
|
64
|
+
status: z.ZodEnum<{
|
|
65
|
+
pending: "pending";
|
|
66
|
+
completed: "completed";
|
|
67
|
+
failed: "failed";
|
|
68
|
+
}>;
|
|
69
|
+
occurredAt: z.ZodISODateTime;
|
|
70
|
+
snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export declare const messageAuditPageSchema: z.ZodObject<{
|
|
73
|
+
events: z.ZodArray<z.ZodObject<{
|
|
74
|
+
id: z.ZodUUID;
|
|
75
|
+
sequence: z.ZodString;
|
|
76
|
+
attemptId: z.ZodUUID;
|
|
77
|
+
messageId: z.ZodUUID;
|
|
78
|
+
conversationId: z.ZodUUID;
|
|
79
|
+
workspaceId: z.ZodString;
|
|
80
|
+
userId: z.ZodString;
|
|
81
|
+
telaAgentId: z.ZodNullable<z.ZodString>;
|
|
82
|
+
conversationScope: z.ZodNullable<z.ZodString>;
|
|
83
|
+
status: z.ZodEnum<{
|
|
84
|
+
pending: "pending";
|
|
85
|
+
completed: "completed";
|
|
86
|
+
failed: "failed";
|
|
87
|
+
}>;
|
|
88
|
+
occurredAt: z.ZodISODateTime;
|
|
89
|
+
snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const metricsSchema = z.object({
|
|
3
|
+
durationMs: z.number(),
|
|
4
|
+
toolCalls: z.number(),
|
|
5
|
+
apiCalls: z.number(),
|
|
6
|
+
tokensIn: z.number(),
|
|
7
|
+
tokensOut: z.number(),
|
|
8
|
+
cachedTokens: z.number(),
|
|
9
|
+
totalCostUsd: z.number(),
|
|
10
|
+
cacheSavingsUsd: z.number(),
|
|
11
|
+
});
|
|
12
|
+
export const messageAuditTraceSchema = z.object({
|
|
13
|
+
metrics: metricsSchema.nullable().optional(),
|
|
14
|
+
prompt: z.object({ model: z.string().nullable(), timestamp: z.number().nullable() }).nullable().optional(),
|
|
15
|
+
spans: z.array(z.object({
|
|
16
|
+
type: z.string(),
|
|
17
|
+
id: z.string(),
|
|
18
|
+
parentId: z.string().nullable(),
|
|
19
|
+
startMs: z.number(),
|
|
20
|
+
endMs: z.number(),
|
|
21
|
+
metrics: z.object({ tokensIn: z.number(), tokensOut: z.number(), cachedTokens: z.number(), costUsd: z.number(), toolCallCount: z.number(), apiCallCount: z.number() }).optional(),
|
|
22
|
+
})).nullable().optional(),
|
|
23
|
+
events: z.array(z.object({
|
|
24
|
+
type: z.string(),
|
|
25
|
+
relativeTimeMs: z.number(),
|
|
26
|
+
timestamp: z.number(),
|
|
27
|
+
sequenceIndex: z.number(),
|
|
28
|
+
runTurnId: z.string().nullable().optional(),
|
|
29
|
+
callId: z.string().optional(),
|
|
30
|
+
toolName: z.string().optional(),
|
|
31
|
+
category: z.string().optional(),
|
|
32
|
+
status: z.string().optional(),
|
|
33
|
+
text: z.string().optional(),
|
|
34
|
+
tokensIn: z.number().optional(),
|
|
35
|
+
tokensOut: z.number().optional(),
|
|
36
|
+
cachedTokens: z.number().optional(),
|
|
37
|
+
costUsd: z.number().optional(),
|
|
38
|
+
result: z.object({ isError: z.boolean(), durationMs: z.number() }).optional(),
|
|
39
|
+
})).nullable().optional(),
|
|
40
|
+
});
|
|
41
|
+
export const messageAuditEventSchema = z.object({
|
|
42
|
+
id: z.uuid(),
|
|
43
|
+
sequence: z.string(),
|
|
44
|
+
attemptId: z.uuid(),
|
|
45
|
+
messageId: z.uuid(),
|
|
46
|
+
conversationId: z.uuid(),
|
|
47
|
+
workspaceId: z.string(),
|
|
48
|
+
userId: z.string(),
|
|
49
|
+
telaAgentId: z.string().nullable(),
|
|
50
|
+
conversationScope: z.string().nullable(),
|
|
51
|
+
status: z.enum(['pending', 'completed', 'failed']),
|
|
52
|
+
occurredAt: z.iso.datetime(),
|
|
53
|
+
snapshot: z.record(z.string(), z.unknown()),
|
|
54
|
+
});
|
|
55
|
+
export const messageAuditPageSchema = z.object({ events: z.array(messageAuditEventSchema), nextCursor: z.string().nullable() });
|
|
@@ -19,6 +19,7 @@ export declare const messageOverviewResponseSchema: z.ZodObject<{
|
|
|
19
19
|
}>>;
|
|
20
20
|
content: z.ZodString;
|
|
21
21
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
22
|
+
auditEventId: z.ZodNullable<z.ZodString>;
|
|
22
23
|
agentSessionCursor: z.ZodNullable<z.ZodNumber>;
|
|
23
24
|
createdAt: z.ZodDate;
|
|
24
25
|
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
@@ -122,6 +123,7 @@ export declare const sendMessageBodySchema: z.ZodObject<{
|
|
|
122
123
|
export type SendMessageBody = z.infer<typeof sendMessageBodySchema>;
|
|
123
124
|
export declare const sendMessageResponseSchema: z.ZodObject<{
|
|
124
125
|
userMessage: z.ZodObject<{
|
|
126
|
+
auditEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
127
|
id: z.ZodString;
|
|
126
128
|
conversationId: z.ZodString;
|
|
127
129
|
role: z.ZodEnum<{
|
|
@@ -156,6 +158,7 @@ export declare const sendMessageResponseSchema: z.ZodObject<{
|
|
|
156
158
|
generationEndedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
157
159
|
}, z.core.$strip>;
|
|
158
160
|
assistantMessage: z.ZodObject<{
|
|
161
|
+
auditEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
162
|
id: z.ZodString;
|
|
160
163
|
conversationId: z.ZodString;
|
|
161
164
|
role: z.ZodEnum<{
|
|
@@ -193,6 +196,7 @@ export declare const sendMessageResponseSchema: z.ZodObject<{
|
|
|
193
196
|
export type SendMessageResponse = z.infer<typeof sendMessageResponseSchema>;
|
|
194
197
|
export declare const messagePollResponseSchema: z.ZodObject<{
|
|
195
198
|
messages: z.ZodArray<z.ZodObject<{
|
|
199
|
+
auditEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
200
|
id: z.ZodString;
|
|
197
201
|
conversationId: z.ZodString;
|
|
198
202
|
role: z.ZodEnum<{
|
|
@@ -17,6 +17,7 @@ export const messageOverviewResponseSchema = z.strictObject({
|
|
|
17
17
|
status: messageStatusSchema.nullable(),
|
|
18
18
|
content: z.string(),
|
|
19
19
|
agentSessionId: z.string().nullable(),
|
|
20
|
+
auditEventId: z.string().uuid().nullable(),
|
|
20
21
|
agentSessionCursor: z.number().int().nullable(),
|
|
21
22
|
createdAt: z.date(),
|
|
22
23
|
updatedAt: z.date().nullable(),
|