@meistrari/chat-nuxt 3.17.0-rc.0 → 3.17.0-rc.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
3
  "configKey": "chatNuxt",
4
- "version": "3.17.0-rc.0",
4
+ "version": "3.17.0-rc.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -3,10 +3,6 @@ const props = defineProps({
3
3
  citation: { type: Object, required: true }
4
4
  });
5
5
  const faviconFailed = ref(false);
6
- const shouldLoadFavicon = ref(false);
7
- function activatePreviewAssets() {
8
- shouldLoadFavicon.value = true;
9
- }
10
6
  const accessibleLabel = computed(() => `${props.citation.sourceLabel}: ${props.citation.title}`);
11
7
  </script>
12
8
 
@@ -25,13 +21,12 @@ const accessibleLabel = computed(() => `${props.citation.sourceLabel}: ${props.c
25
21
  class="url-citation-pill"
26
22
  body-11-medium
27
23
  :aria-label="accessibleLabel"
28
- @pointerenter="activatePreviewAssets"
29
- @focus="activatePreviewAssets"
30
24
  >
31
25
  <img
32
- v-if="shouldLoadFavicon && !faviconFailed"
26
+ v-if="!faviconFailed"
33
27
  :src="citation.faviconUrl"
34
28
  alt=""
29
+ loading="lazy"
35
30
  class="url-citation-favicon"
36
31
  referrerpolicy="no-referrer"
37
32
  @error="faviconFailed = true"
@@ -44,7 +39,7 @@ const accessibleLabel = computed(() => `${props.citation.sourceLabel}: ${props.c
44
39
  <div class="url-citation-card" bg-white flex="~ col" gap-10px p-12px>
45
40
  <div flex items-center gap-7px min-w-0>
46
41
  <img
47
- v-if="shouldLoadFavicon && !faviconFailed"
42
+ v-if="!faviconFailed"
48
43
  :src="citation.faviconUrl"
49
44
  alt=""
50
45
  class="url-citation-card__favicon"
@@ -1,14 +1,12 @@
1
+ import { getDomainWithoutSuffix } from "tldts";
1
2
  const URL_CITATION_MARKER = "#citation";
2
3
  const FAVICON_PROXY_PATH = "/api/citation-favicon";
3
4
  function titleCase(value) {
4
5
  return value.replace(/[-_]+/g, " ").replace(/\b\p{L}/gu, (letter) => letter.toLocaleUpperCase());
5
6
  }
6
7
  function sourceLabelFor(hostname) {
7
- const parts = hostname.replace(/^www\./i, "").split(".");
8
- const compoundSuffix = parts.slice(-2).join(".");
9
- const suffixParts = (/* @__PURE__ */ new Set(["co.uk", "com.au", "com.br", "com.mx", "com.tr", "co.jp"])).has(compoundSuffix) ? 2 : 1;
10
- const brandIndex = Math.max(0, parts.length - suffixParts - 1);
11
- return titleCase(parts[brandIndex] || hostname);
8
+ const domainLabel = getDomainWithoutSuffix(hostname, { allowPrivateDomains: true });
9
+ return titleCase(domainLabel || hostname);
12
10
  }
13
11
  export function parseUrlCitation(href, label, markdownTitle) {
14
12
  if (!href.endsWith(URL_CITATION_MARKER))
@@ -1,8 +1,11 @@
1
+ import type { ConversationEvent } from '../../types/schemas/chat/conversations.js';
1
2
  import type { ChatFeatureConfig } from '../feature-config.js';
2
3
  import type { ChatActor, ChatSidebarConfig, ChatSuggestion } from '../types.js';
3
4
  type EmbedUser = ChatActor;
4
5
  type __VLS_Props = {
5
6
  conversationId?: string | null;
7
+ conversationEvents?: readonly ConversationEvent[] | null;
8
+ composerDisabled?: boolean;
6
9
  initialConversationId?: string | null;
7
10
  hideSidebar?: boolean;
8
11
  sidebar?: ChatSidebarConfig;
@@ -38,6 +38,8 @@ import { useWorkspaceSettings } from "../../workspace/composables/workspace-sett
38
38
  import { useWorkspaceSwitchModal } from "../../workspace/composables/workspace-switch-modal";
39
39
  const props = defineProps({
40
40
  conversationId: { type: [String, null], required: false },
41
+ conversationEvents: { type: [Array, null], required: false },
42
+ composerDisabled: { type: Boolean, required: false },
41
43
  initialConversationId: { type: [String, null], required: false, default: null },
42
44
  hideSidebar: { type: Boolean, required: false, default: false },
43
45
  sidebar: { type: Object, required: false },
@@ -991,6 +993,7 @@ async function handleDelete() {
991
993
  v-model:selected-model="selectedModel"
992
994
  v-model:selected-reasoning-effort="selectedReasoningEffort"
993
995
  :loading="composerLocked"
996
+ :disabled="composerDisabled"
994
997
  :creator-name="currentUser?.name ?? void 0"
995
998
  :creator-email="
996
999
  currentConversation?.createdBy ?? currentUser?.email ?? void 0
@@ -1014,6 +1017,7 @@ async function handleDelete() {
1014
1017
 
1015
1018
  <ChatMessageList
1016
1019
  :messages="messages"
1020
+ :events="conversationEvents"
1017
1021
  :streaming-active-message-id="streamingActiveMessageId"
1018
1022
  :preparing-steps="preparingSteps"
1019
1023
  :show-ttft="resolvedFeatures.showTtft"
@@ -1025,6 +1029,7 @@ async function handleDelete() {
1025
1029
  v-model:selected-model="selectedModel"
1026
1030
  v-model:selected-reasoning-effort="selectedReasoningEffort"
1027
1031
  :loading="composerLocked"
1032
+ :disabled="composerDisabled"
1028
1033
  :creator-name="currentUser?.name ?? void 0"
1029
1034
  :creator-email="
1030
1035
  currentConversation?.createdBy ?? currentUser?.email ?? void 0
@@ -1191,6 +1196,7 @@ async function handleDelete() {
1191
1196
  v-model:selected-model="selectedModel"
1192
1197
  v-model:selected-reasoning-effort="selectedReasoningEffort"
1193
1198
  :loading="composerLocked"
1199
+ :disabled="composerDisabled"
1194
1200
  :creator-name="currentUser?.name ?? void 0"
1195
1201
  :creator-email="
1196
1202
  currentConversation?.createdBy ?? currentUser?.email ?? void 0
@@ -1217,6 +1223,7 @@ async function handleDelete() {
1217
1223
  >
1218
1224
  <ChatMessageList
1219
1225
  :messages="messages"
1226
+ :events="conversationEvents"
1220
1227
  :streaming-active-message-id="streamingActiveMessageId"
1221
1228
  :preparing-steps="preparingSteps"
1222
1229
  :show-ttft="resolvedFeatures.showTtft"
@@ -1228,6 +1235,7 @@ async function handleDelete() {
1228
1235
  v-model:selected-model="selectedModel"
1229
1236
  v-model:selected-reasoning-effort="selectedReasoningEffort"
1230
1237
  :loading="composerLocked"
1238
+ :disabled="composerDisabled"
1231
1239
  :creator-name="currentUser?.name ?? void 0"
1232
1240
  :creator-email="
1233
1241
  currentConversation?.createdBy ?? currentUser?.email ?? void 0
@@ -1,8 +1,11 @@
1
+ import type { ConversationEvent } from '../../types/schemas/chat/conversations.js';
1
2
  import type { ChatFeatureConfig } from '../feature-config.js';
2
3
  import type { ChatActor, ChatSidebarConfig, ChatSuggestion } from '../types.js';
3
4
  type EmbedUser = ChatActor;
4
5
  type __VLS_Props = {
5
6
  conversationId?: string | null;
7
+ conversationEvents?: readonly ConversationEvent[] | null;
8
+ composerDisabled?: boolean;
6
9
  initialConversationId?: string | null;
7
10
  hideSidebar?: boolean;
8
11
  sidebar?: ChatSidebarConfig;
@@ -10,6 +10,8 @@ import { normalizeConversationScope, normalizeTelaAgentId, resolveConversationSc
10
10
  import ChatEmbedInner from "./chat-embed-inner.vue";
11
11
  const props = defineProps({
12
12
  conversationId: { type: [String, null], required: false },
13
+ conversationEvents: { type: [Array, null], required: false },
14
+ composerDisabled: { type: Boolean, required: false },
13
15
  initialConversationId: { type: [String, null], required: false },
14
16
  conversationScope: { type: [String, null], required: false },
15
17
  defaultConversationCreatorFilter: { type: null, required: false },
@@ -109,6 +111,8 @@ provideChatMessageTerminal((payload) => {
109
111
  v-if="workspaceId"
110
112
  :key="`${workspaceId}:${normalizedTelaAgentId ?? 'default-chat'}:scope:${resolveConversationScopeKeySegment(normalizedConversationScope)}`"
111
113
  :conversation-id="conversationId"
114
+ :conversation-events="conversationEvents"
115
+ :composer-disabled="composerDisabled"
112
116
  :initial-conversation-id="initialConversationId"
113
117
  :hide-sidebar="hideSidebar"
114
118
  :sidebar="sidebar"
@@ -3,6 +3,8 @@ import { computed, ref, watch } from "vue";
3
3
  import { provideConversationCreatorFilterState } from "../../conversations/composables/conversation-creator-filter-state";
4
4
  const { hideSidebar = void 0, ...props } = defineProps({
5
5
  conversationId: { type: [String, null], required: false },
6
+ conversationEvents: { type: [Array, null], required: false },
7
+ composerDisabled: { type: Boolean, required: false },
6
8
  initialConversationId: { type: [String, null], required: false },
7
9
  conversationScope: { type: [String, null], required: false },
8
10
  defaultConversationCreatorFilter: { type: null, required: false },
@@ -60,6 +62,8 @@ function startWidgetConversation() {
60
62
  }
61
63
  const sharedEmbedProps = computed(() => ({
62
64
  conversationId: props.conversationId,
65
+ conversationEvents: props.conversationEvents,
66
+ composerDisabled: props.composerDisabled,
63
67
  initialConversationId: props.initialConversationId,
64
68
  conversationScope: props.conversationScope,
65
69
  defaultConversationCreatorFilter: props.defaultConversationCreatorFilter,
@@ -1,4 +1,5 @@
1
1
  import type { Component, DeepReadonly } from 'vue';
2
+ import type { ConversationEvent } from '../types/schemas/chat/conversations.js';
2
3
  import type { WorkspaceSettingsResponse as WorkspaceSettings } from '../types/schemas/chat/workspace-settings.js';
3
4
  import type { TelaAgentExecutionInput } from '../types/schemas/integrations/tela-agent-api.js';
4
5
  import type { ConversationCreatorFilter } from '../types/schemas/chat/primitives.js';
@@ -42,6 +43,10 @@ export type ChatSidebarConfig = {
42
43
  export type ChatEmbedSharedProps = {
43
44
  /** Controlled conversation id. Use with `v-model:conversation-id` when the host owns active conversation state. */
44
45
  conversationId?: string | null;
46
+ /** Controlled audit events rendered chronologically between conversation messages. */
47
+ conversationEvents?: readonly ConversationEvent[] | null;
48
+ /** Disables the message composer while the host completes an external state transition. */
49
+ composerDisabled?: boolean;
45
50
  /** Conversation id to open once on mount when `conversationId` is uncontrolled. */
46
51
  initialConversationId?: string | null;
47
52
  /**
@@ -0,0 +1,7 @@
1
+ import type { ConversationEvent } from '../../types/schemas/chat/conversations.js';
2
+ type __VLS_Props = {
3
+ event: ConversationEvent;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,31 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ event: { type: null, required: true }
4
+ });
5
+ const eventDate = computed(() => new Date(props.event.createdAt));
6
+ const eventTime = computed(() => new Intl.DateTimeFormat("pt-BR", {
7
+ hour: "2-digit",
8
+ minute: "2-digit"
9
+ }).format(eventDate.value));
10
+ </script>
11
+
12
+ <template>
13
+ <div
14
+ data-chat-conversation-event
15
+ flex
16
+ items-center
17
+ gap-12px
18
+ py-6px
19
+ :aria-label="`${event.actorLabel ? `${event.actorLabel} ` : ''}${event.description}, ${eventTime}`"
20
+ >
21
+ <span h-0 flex-1 border-t-0.5px border />
22
+ <p body-12-regular text-tertiary text-center>
23
+ <span v-if="event.actorLabel" body-12-medium text-secondary>{{ event.actorLabel }}</span>
24
+ {{ event.description }}
25
+ <time :datetime="eventDate.toISOString()" :title="eventDate.toLocaleString('pt-BR')">
26
+ · {{ eventTime }}
27
+ </time>
28
+ </p>
29
+ <span h-0 flex-1 border-t-0.5px border />
30
+ </div>
31
+ </template>
@@ -0,0 +1,7 @@
1
+ import type { ConversationEvent } from '../../types/schemas/chat/conversations.js';
2
+ type __VLS_Props = {
3
+ event: ConversationEvent;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -1,6 +1,7 @@
1
- import type { Message } from '../../types/schemas/chat/conversations.js';
1
+ import type { ConversationEvent, Message } from '../../types/schemas/chat/conversations.js';
2
2
  type __VLS_Props = {
3
3
  messages: readonly Message[];
4
+ events?: readonly ConversationEvent[] | null;
4
5
  loading?: boolean;
5
6
  /**
6
7
  * Where the list renders: `page`/`widget` sit inside a `TelaChatBody` that
@@ -1,7 +1,9 @@
1
1
  <script setup>
2
2
  import { useStickToBottom } from "markstream-vue/utils";
3
+ import { mergeConversationTimeline } from "../conversation-timeline";
3
4
  const props = defineProps({
4
5
  messages: { type: Array, required: true },
6
+ events: { type: [Array, null], required: false },
5
7
  loading: { type: Boolean, required: false },
6
8
  variant: { type: String, required: false },
7
9
  streamingActiveMessageId: { type: [String, null], required: false },
@@ -36,11 +38,20 @@ const skeletonMessages = [
36
38
  { id: "user-2", align: "end", width: "46%", height: "44px" },
37
39
  { id: "assistant-2", align: "start", width: "84%", height: "92px" }
38
40
  ];
41
+ const timelineItems = computed(() => mergeConversationTimeline(props.messages, props.events));
39
42
  const latestOutputSignal = computed(() => {
40
43
  const latestMessage = props.messages.at(-1);
41
- if (!latestMessage)
44
+ const latestEvent = props.events?.at(-1);
45
+ if (!latestMessage && !latestEvent)
42
46
  return "empty";
43
- return `${props.messages.length}:${latestMessage.id}:${latestMessage.status}:${latestMessage.content?.length ?? 0}`;
47
+ return [
48
+ props.messages.length,
49
+ latestMessage?.id ?? "",
50
+ latestMessage?.status ?? "",
51
+ latestMessage?.content?.length ?? 0,
52
+ props.events?.length ?? 0,
53
+ latestEvent?.id ?? ""
54
+ ].join(":");
44
55
  });
45
56
  watch(latestOutputSignal, async () => {
46
57
  await nextTick();
@@ -83,15 +94,20 @@ defineExpose({
83
94
  </template>
84
95
 
85
96
  <template v-else>
86
- <ChatMessageBubble
87
- v-for="message in messages"
88
- :key="message.id"
89
- :message="message"
90
- :stream-active="message.id === streamingActiveMessageId"
91
- :preparing-steps="message.role === 'assistant' && message.status === 'pending' ? preparingSteps : null"
92
- :show-ttft="showTtft"
93
- @retry="emit('retry', $event)"
94
- />
97
+ <template v-for="item in timelineItems" :key="`${item.kind}:${item.id}`">
98
+ <ChatConversationEvent
99
+ v-if="item.kind === 'event'"
100
+ :event="item.value"
101
+ />
102
+ <ChatMessageBubble
103
+ v-else
104
+ :message="item.value"
105
+ :stream-active="item.id === streamingActiveMessageId"
106
+ :preparing-steps="item.value.role === 'assistant' && item.value.status === 'pending' ? preparingSteps : null"
107
+ :show-ttft="showTtft"
108
+ @retry="emit('retry', $event)"
109
+ />
110
+ </template>
95
111
  <p
96
112
  v-if="messages.length > 0"
97
113
  mt-auto mb--6px
@@ -1,6 +1,7 @@
1
- import type { Message } from '../../types/schemas/chat/conversations.js';
1
+ import type { ConversationEvent, Message } from '../../types/schemas/chat/conversations.js';
2
2
  type __VLS_Props = {
3
3
  messages: readonly Message[];
4
+ events?: readonly ConversationEvent[] | null;
4
5
  loading?: boolean;
5
6
  /**
6
7
  * Where the list renders: `page`/`widget` sit inside a `TelaChatBody` that
@@ -0,0 +1,13 @@
1
+ import type { ConversationEvent, Message } from '../types/schemas/chat/conversations.js';
2
+ export type ConversationTimelineItem = {
3
+ kind: 'event';
4
+ id: string;
5
+ createdAt: Date;
6
+ value: ConversationEvent;
7
+ } | {
8
+ kind: 'message';
9
+ id: string;
10
+ createdAt: Date;
11
+ value: Message;
12
+ };
13
+ export declare function mergeConversationTimeline(messages: readonly Message[], events?: readonly ConversationEvent[] | null): ConversationTimelineItem[];
@@ -0,0 +1,13 @@
1
+ export function mergeConversationTimeline(messages, events = []) {
2
+ return [
3
+ ...(events ?? []).map((event) => ({ kind: "event", id: event.id, createdAt: event.createdAt, value: event })),
4
+ ...messages.map((message) => ({ kind: "message", id: message.id, createdAt: message.createdAt, value: message }))
5
+ ].sort((left, right) => {
6
+ const difference = new Date(left.createdAt).getTime() - new Date(right.createdAt).getTime();
7
+ if (difference !== 0)
8
+ return difference;
9
+ if (left.kind !== right.kind)
10
+ return left.kind === "event" ? -1 : 1;
11
+ return left.id.localeCompare(right.id);
12
+ });
13
+ }
@@ -5,6 +5,7 @@ export type { ChatActionPayload } from '../messages/composables/chat-action.js';
5
5
  export type { MessageFeedbackConfig, MessageFeedbackPayload, MessageFeedbackRating, MessageFeedbackSubmitHandler, MessageFeedbackSubmitResult, } from '../messages/composables/chat-feedback.js';
6
6
  export { ChatMessageStatus } from '../messages/composables/chat-message-terminal.js';
7
7
  export type { ChatMessageTerminalPayload } from '../messages/composables/chat-message-terminal.js';
8
+ export type { ConversationEvent } from './schemas/chat/conversations.js';
8
9
  export type { MessageOverviewResponse } from './schemas/chat/messages.js';
9
10
  export type { ConversationCreatorFilter } from './schemas/chat/primitives.js';
10
11
  export type { TelaAgentExecutionInput } from './schemas/integrations/tela-agent-api.js';
@@ -253,6 +253,61 @@ export declare const createConversationRequestSchema: z.ZodObject<{
253
253
  }, z.core.$strip>], "type">>>;
254
254
  }, z.core.$strict>;
255
255
  export type CreateConversationRequest = z.infer<typeof createConversationRequestSchema>;
256
+ export declare const conversationEventSchema: z.ZodObject<{
257
+ id: z.ZodString;
258
+ conversationId: z.ZodString;
259
+ type: z.ZodString;
260
+ actorLabel: z.ZodNullable<z.ZodString>;
261
+ description: z.ZodString;
262
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
263
+ createdAt: z.ZodDate;
264
+ }, z.core.$strip>;
265
+ export type ConversationEvent = z.infer<typeof conversationEventSchema>;
266
+ export declare const agentInputsChangedConversationEventSchema: z.ZodObject<{
267
+ id: z.ZodString;
268
+ conversationId: z.ZodString;
269
+ description: z.ZodString;
270
+ createdAt: z.ZodDate;
271
+ type: z.ZodLiteral<"agent_inputs_changed">;
272
+ actorLabel: z.ZodString;
273
+ payload: z.ZodObject<{
274
+ previousAgentInputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
275
+ type: z.ZodLiteral<"file">;
276
+ name: z.ZodString;
277
+ vaultRef: z.ZodString;
278
+ filename: z.ZodString;
279
+ metadata: z.ZodOptional<z.ZodString>;
280
+ }, z.core.$strip>, z.ZodObject<{
281
+ type: z.ZodLiteral<"text">;
282
+ name: z.ZodString;
283
+ content: z.ZodString;
284
+ }, z.core.$strip>], "type">>;
285
+ agentInputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
286
+ type: z.ZodLiteral<"file">;
287
+ name: z.ZodString;
288
+ vaultRef: z.ZodString;
289
+ filename: z.ZodString;
290
+ metadata: z.ZodOptional<z.ZodString>;
291
+ }, z.core.$strip>, z.ZodObject<{
292
+ type: z.ZodLiteral<"text">;
293
+ name: z.ZodString;
294
+ content: z.ZodString;
295
+ }, z.core.$strip>], "type">>;
296
+ }, z.core.$strict>;
297
+ }, z.core.$strip>;
298
+ export type AgentInputsChangedConversationEvent = z.infer<typeof agentInputsChangedConversationEventSchema>;
299
+ export declare const conversationEventsResponseSchema: z.ZodObject<{
300
+ events: z.ZodArray<z.ZodObject<{
301
+ id: z.ZodString;
302
+ conversationId: z.ZodString;
303
+ type: z.ZodString;
304
+ actorLabel: z.ZodNullable<z.ZodString>;
305
+ description: z.ZodString;
306
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
307
+ createdAt: z.ZodDate;
308
+ }, z.core.$strip>>;
309
+ }, z.core.$strip>;
310
+ export type ConversationEventsResponse = z.infer<typeof conversationEventsResponseSchema>;
256
311
  export declare const conversationAgentInputsResponseSchema: z.ZodObject<{
257
312
  agentInputs: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
258
313
  type: z.ZodLiteral<"file">;
@@ -269,6 +324,81 @@ export declare const conversationAgentInputsResponseSchema: z.ZodObject<{
269
324
  appliedAt: z.ZodNullable<z.ZodDate>;
270
325
  }, z.core.$strip>;
271
326
  export type ConversationAgentInputsResponse = z.infer<typeof conversationAgentInputsResponseSchema>;
327
+ export declare const updateConversationAgentInputsRequestSchema: z.ZodObject<{
328
+ mutationId: z.ZodString;
329
+ description: z.ZodString;
330
+ expectedAgentInputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
331
+ type: z.ZodLiteral<"file">;
332
+ name: z.ZodString;
333
+ vaultRef: z.ZodString;
334
+ filename: z.ZodString;
335
+ metadata: z.ZodOptional<z.ZodString>;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ type: z.ZodLiteral<"text">;
338
+ name: z.ZodString;
339
+ content: z.ZodString;
340
+ }, z.core.$strip>], "type">>;
341
+ agentInputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
342
+ type: z.ZodLiteral<"file">;
343
+ name: z.ZodString;
344
+ vaultRef: z.ZodString;
345
+ filename: z.ZodString;
346
+ metadata: z.ZodOptional<z.ZodString>;
347
+ }, z.core.$strip>, z.ZodObject<{
348
+ type: z.ZodLiteral<"text">;
349
+ name: z.ZodString;
350
+ content: z.ZodString;
351
+ }, z.core.$strip>], "type">>;
352
+ }, z.core.$strict>;
353
+ export type UpdateConversationAgentInputsRequest = z.infer<typeof updateConversationAgentInputsRequestSchema>;
354
+ export declare const updateConversationAgentInputsResponseSchema: z.ZodObject<{
355
+ appliedAt: z.ZodNullable<z.ZodDate>;
356
+ agentInputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
357
+ type: z.ZodLiteral<"file">;
358
+ name: z.ZodString;
359
+ vaultRef: z.ZodString;
360
+ filename: z.ZodString;
361
+ metadata: z.ZodOptional<z.ZodString>;
362
+ }, z.core.$strip>, z.ZodObject<{
363
+ type: z.ZodLiteral<"text">;
364
+ name: z.ZodString;
365
+ content: z.ZodString;
366
+ }, z.core.$strip>], "type">>;
367
+ configuredAt: z.ZodDate;
368
+ event: z.ZodObject<{
369
+ id: z.ZodString;
370
+ conversationId: z.ZodString;
371
+ description: z.ZodString;
372
+ createdAt: z.ZodDate;
373
+ type: z.ZodLiteral<"agent_inputs_changed">;
374
+ actorLabel: z.ZodString;
375
+ payload: z.ZodObject<{
376
+ previousAgentInputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
377
+ type: z.ZodLiteral<"file">;
378
+ name: z.ZodString;
379
+ vaultRef: z.ZodString;
380
+ filename: z.ZodString;
381
+ metadata: z.ZodOptional<z.ZodString>;
382
+ }, z.core.$strip>, z.ZodObject<{
383
+ type: z.ZodLiteral<"text">;
384
+ name: z.ZodString;
385
+ content: z.ZodString;
386
+ }, z.core.$strip>], "type">>;
387
+ agentInputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
388
+ type: z.ZodLiteral<"file">;
389
+ name: z.ZodString;
390
+ vaultRef: z.ZodString;
391
+ filename: z.ZodString;
392
+ metadata: z.ZodOptional<z.ZodString>;
393
+ }, z.core.$strip>, z.ZodObject<{
394
+ type: z.ZodLiteral<"text">;
395
+ name: z.ZodString;
396
+ content: z.ZodString;
397
+ }, z.core.$strip>], "type">>;
398
+ }, z.core.$strict>;
399
+ }, z.core.$strip>;
400
+ }, z.core.$strip>;
401
+ export type UpdateConversationAgentInputsResponse = z.infer<typeof updateConversationAgentInputsResponseSchema>;
272
402
  export declare const updateConversationRequestSchema: z.ZodObject<{
273
403
  title: z.ZodOptional<z.ZodString>;
274
404
  model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -62,11 +62,42 @@ export const createConversationRequestSchema = z.strictObject({
62
62
  reasoningEffort: chatReasoningEffortSchema.nullable().optional(),
63
63
  agentInputs: z.array(telaAgentExecutionInputSchema).optional(),
64
64
  });
65
+ export const conversationEventSchema = z.object({
66
+ id: z.string(),
67
+ conversationId: z.string(),
68
+ type: z.string().trim().min(1),
69
+ actorLabel: z.string().nullable(),
70
+ description: z.string(),
71
+ payload: z.record(z.string(), z.unknown()),
72
+ createdAt: z.date(),
73
+ });
74
+ export const agentInputsChangedConversationEventSchema = conversationEventSchema.extend({
75
+ type: z.literal('agent_inputs_changed'),
76
+ actorLabel: z.string(),
77
+ payload: z.strictObject({
78
+ previousAgentInputs: z.array(telaAgentExecutionInputSchema),
79
+ agentInputs: z.array(telaAgentExecutionInputSchema),
80
+ }),
81
+ });
82
+ export const conversationEventsResponseSchema = z.object({
83
+ events: z.array(conversationEventSchema),
84
+ });
65
85
  export const conversationAgentInputsResponseSchema = z.object({
66
86
  agentInputs: z.array(telaAgentExecutionInputSchema).nullable(),
67
87
  configuredAt: z.date().nullable(),
68
88
  appliedAt: z.date().nullable(),
69
89
  });
90
+ export const updateConversationAgentInputsRequestSchema = z.strictObject({
91
+ mutationId: z.string().trim().min(1).max(128),
92
+ description: z.string().trim().min(1).max(500),
93
+ expectedAgentInputs: z.array(telaAgentExecutionInputSchema),
94
+ agentInputs: z.array(telaAgentExecutionInputSchema),
95
+ });
96
+ export const updateConversationAgentInputsResponseSchema = conversationAgentInputsResponseSchema.extend({
97
+ agentInputs: z.array(telaAgentExecutionInputSchema),
98
+ configuredAt: z.date(),
99
+ event: agentInputsChangedConversationEventSchema,
100
+ });
70
101
  export const updateConversationRequestSchema = z.strictObject({
71
102
  title: z.string().optional(),
72
103
  model: chatModelSchema.nullable().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/chat-nuxt",
3
- "version": "3.17.0-rc.0",
3
+ "version": "3.17.0-rc.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -58,6 +58,7 @@
58
58
  "pdfjs-dist": "^5.4.530",
59
59
  "posthog-js": "^1.364.2",
60
60
  "stream-diffs": "0.0.2",
61
+ "tldts": "^7.4.10",
61
62
  "virtua": "^0.42.0",
62
63
  "vue-i18n": "^11.0.0",
63
64
  "xlsx": "^0.18.5",