@meistrari/chat-nuxt 3.9.2 → 3.11.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/README.md +50 -440
- package/dist/module.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/assets/css/markstream.css +1 -1
- package/dist/runtime/conversations/components/chat-conversation-creator-filter.vue +11 -67
- package/dist/runtime/conversations/components/chat-conversation-item.d.vue.ts +2 -1
- package/dist/runtime/conversations/components/chat-conversation-item.vue +29 -33
- package/dist/runtime/conversations/components/chat-conversation-item.vue.d.ts +2 -1
- package/dist/runtime/conversations/components/chat-conversation-list.d.vue.ts +0 -1
- package/dist/runtime/conversations/components/chat-conversation-list.vue +117 -158
- package/dist/runtime/conversations/components/chat-conversation-list.vue.d.ts +0 -1
- package/dist/runtime/conversations/components/chat-conversation-new-group-button.vue +34 -73
- package/dist/runtime/conversations/components/chat-conversation-search.vue +1 -21
- package/dist/runtime/conversations/components/chat-widget-history-list.d.vue.ts +12 -0
- package/dist/runtime/conversations/components/chat-widget-history-list.vue +27 -0
- package/dist/runtime/conversations/components/chat-widget-history-list.vue.d.ts +12 -0
- package/dist/runtime/conversations/composables/conversation-groups.d.ts +1 -0
- package/dist/runtime/conversations/composables/conversation-groups.js +2 -0
- package/dist/runtime/conversations/composables/conversation-item.js +4 -4
- package/dist/runtime/conversations/composables/conversation-list.js +14 -5
- package/dist/runtime/embed/components/chat-configuration-modal.d.vue.ts +3 -3
- package/dist/runtime/embed/components/chat-configuration-modal.vue.d.ts +3 -3
- package/dist/runtime/embed/components/chat-embed-inner.d.vue.ts +6 -3
- package/dist/runtime/embed/components/chat-embed-inner.vue +442 -174
- package/dist/runtime/embed/components/chat-embed-inner.vue.d.ts +6 -3
- package/dist/runtime/embed/components/chat-embed.d.vue.ts +31 -4
- package/dist/runtime/embed/components/chat-embed.vue +10 -4
- package/dist/runtime/embed/components/chat-embed.vue.d.ts +31 -4
- package/dist/runtime/embed/components/chat-topbar.vue +83 -85
- package/dist/runtime/embed/components/meistrari-chat-embed.d.vue.ts +5 -3
- package/dist/runtime/embed/components/meistrari-chat-embed.vue +118 -57
- package/dist/runtime/embed/components/meistrari-chat-embed.vue.d.ts +5 -3
- package/dist/runtime/embed/components/mobile/chat-mobile-drawer.d.vue.ts +0 -1
- package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue +2 -45
- package/dist/runtime/embed/components/mobile/chat-mobile-drawer.vue.d.ts +0 -1
- package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.d.vue.ts +9 -5
- package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue +14 -25
- package/dist/runtime/embed/components/mobile/chat-mobile-home-suggestions.vue.d.ts +9 -5
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.d.vue.ts +4 -4
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue +2 -4
- package/dist/runtime/embed/components/mobile/chat-mobile-shell.vue.d.ts +4 -4
- package/dist/runtime/embed/composables/use-agent-wake.d.ts +23 -0
- package/dist/runtime/embed/composables/use-agent-wake.js +182 -0
- package/dist/runtime/embed/feature-config.d.ts +7 -0
- package/dist/runtime/embed/feature-config.js +2 -1
- package/dist/runtime/embed/loading-messages.d.ts +16 -0
- package/dist/runtime/embed/loading-messages.js +10 -0
- package/dist/runtime/embed/types.d.ts +47 -8
- package/dist/runtime/files/icons.d.ts +1 -1
- package/dist/runtime/files/icons.js +1 -1
- package/dist/runtime/messages/components/chat-mention-dropdown.d.vue.ts +6 -1
- package/dist/runtime/messages/components/chat-mention-dropdown.vue +46 -22
- package/dist/runtime/messages/components/chat-mention-dropdown.vue.d.ts +6 -1
- package/dist/runtime/messages/components/chat-message-bubble.d.vue.ts +10 -1
- package/dist/runtime/messages/components/chat-message-bubble.vue +69 -76
- package/dist/runtime/messages/components/chat-message-bubble.vue.d.ts +10 -1
- package/dist/runtime/messages/components/chat-message-feedback.vue +25 -229
- package/dist/runtime/messages/components/chat-message-input.vue +176 -134
- package/dist/runtime/messages/components/chat-message-list.d.vue.ts +12 -1
- package/dist/runtime/messages/components/chat-message-list.vue +37 -24
- package/dist/runtime/messages/components/chat-message-list.vue.d.ts +12 -1
- package/dist/runtime/messages/components/chat-model-selector.vue +10 -22
- package/dist/runtime/messages/components/reasoning/chat-reasoning-message.vue +2 -3
- package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.d.vue.ts +2 -1
- package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue +69 -77
- package/dist/runtime/messages/components/reasoning/chat-reasoning-thought.vue.d.ts +2 -1
- package/dist/runtime/messages/components/reasoning/chat-thinking-indicator.vue +3 -9
- package/dist/runtime/messages/components/widgets/chat-bash-widget.vue +3 -12
- package/dist/runtime/messages/components/widgets/chat-doc-sdk-widget.vue +3 -12
- package/dist/runtime/messages/components/widgets/chat-generic-tool-widget.vue +3 -12
- package/dist/runtime/messages/components/widgets/chat-grep-widget.vue +7 -17
- package/dist/runtime/messages/components/widgets/chat-read-widget.vue +7 -17
- package/dist/runtime/messages/components/widgets/chat-tela-skill-widget.vue +4 -13
- package/dist/runtime/messages/components/widgets/chat-thinking-widget.vue +11 -22
- package/dist/runtime/messages/components/widgets/chat-web-search-widget.vue +13 -40
- package/dist/runtime/messages/components/widgets/chat-workstation-query-widget.vue +52 -65
- package/dist/runtime/messages/components/widgets/chat-write-widget.vue +8 -18
- package/dist/runtime/messages/composables/chat.d.ts +8 -2
- package/dist/runtime/messages/composables/chat.js +180 -25
- package/dist/runtime/messages/composables/mention-autocomplete.js +4 -0
- package/dist/runtime/messages/composables/use-direct-stream.d.ts +41 -0
- package/dist/runtime/messages/composables/use-direct-stream.js +263 -0
- package/dist/runtime/messages/message-state.js +1 -0
- package/dist/runtime/messages/reasoning.d.ts +7 -0
- package/dist/runtime/messages/reasoning.js +5 -0
- package/dist/runtime/public/files/generic.svg +2 -5
- package/dist/runtime/public/files/image.svg +2 -1
- package/dist/runtime/types/embed.d.ts +1 -1
- package/dist/runtime/types/schemas/chat/conversations.d.ts +4 -0
- package/dist/runtime/types/schemas/chat/conversations.js +3 -0
- package/dist/runtime/types/schemas/chat/messages.d.ts +43 -0
- package/dist/runtime/types/schemas/chat/messages.js +31 -0
- package/dist/runtime/types/schemas/chat/models.d.ts +3 -2
- package/dist/runtime/types/schemas/chat/models.js +2 -1
- package/dist/runtime/types/schemas/chat/ui.d.ts +10 -0
- package/dist/runtime/types/schemas/chat/ui.js +1 -0
- package/dist/runtime/types/schemas/integrations/tela-agent-api.d.ts +35 -0
- package/dist/runtime/types/schemas/integrations/tela-agent-api.js +17 -0
- package/dist/types.d.mts +1 -1
- package/package.json +5 -4
- package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.d.vue.ts +0 -23
- package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue +0 -75
- package/dist/runtime/conversations/components/chat-conversation-new-group-popover-content.vue.d.ts +0 -23
- package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.d.vue.ts +0 -37
- package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue +0 -125
- package/dist/runtime/messages/components/reasoning/chat-reasoning-step-item.vue.d.ts +0 -37
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
function isRecord(value) {
|
|
2
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
export function parseSseFrames(source) {
|
|
5
|
+
const frames = [];
|
|
6
|
+
let rest = source;
|
|
7
|
+
while (true) {
|
|
8
|
+
const boundary = /\r?\n\r?\n/.exec(rest);
|
|
9
|
+
if (!boundary || boundary.index === void 0)
|
|
10
|
+
break;
|
|
11
|
+
const rawFrame = rest.slice(0, boundary.index);
|
|
12
|
+
rest = rest.slice(boundary.index + boundary[0].length);
|
|
13
|
+
let event;
|
|
14
|
+
const data = [];
|
|
15
|
+
for (const line of rawFrame.split(/\r?\n/)) {
|
|
16
|
+
if (line.startsWith(":"))
|
|
17
|
+
continue;
|
|
18
|
+
const separator = line.indexOf(":");
|
|
19
|
+
const field = separator === -1 ? line : line.slice(0, separator);
|
|
20
|
+
const rawValue = separator === -1 ? "" : line.slice(separator + 1);
|
|
21
|
+
const value = rawValue.startsWith(" ") ? rawValue.slice(1) : rawValue;
|
|
22
|
+
if (field === "event")
|
|
23
|
+
event = value;
|
|
24
|
+
else if (field === "data")
|
|
25
|
+
data.push(value);
|
|
26
|
+
}
|
|
27
|
+
if (data.length > 0)
|
|
28
|
+
frames.push({ ...event ? { event } : {}, data: data.join("\n") });
|
|
29
|
+
}
|
|
30
|
+
return { frames, rest };
|
|
31
|
+
}
|
|
32
|
+
export function createMessagePartsAccumulator(runId = null) {
|
|
33
|
+
return {
|
|
34
|
+
runId,
|
|
35
|
+
lastDeltaSeq: -1,
|
|
36
|
+
textByIndex: {},
|
|
37
|
+
thinkingByIndex: {}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function joinedBlocks(blocks) {
|
|
41
|
+
return Object.entries(blocks).sort(([left], [right]) => Number(left) - Number(right)).map(([, value]) => value).join("");
|
|
42
|
+
}
|
|
43
|
+
export function applyMessagePartsEvent(accumulator, input) {
|
|
44
|
+
if (accumulator.runId !== input.runId) {
|
|
45
|
+
accumulator.runId = input.runId;
|
|
46
|
+
accumulator.lastDeltaSeq = -1;
|
|
47
|
+
accumulator.textByIndex = {};
|
|
48
|
+
accumulator.thinkingByIndex = {};
|
|
49
|
+
}
|
|
50
|
+
if (input.deltaSeq <= accumulator.lastDeltaSeq) {
|
|
51
|
+
return {
|
|
52
|
+
text: joinedBlocks(accumulator.textByIndex),
|
|
53
|
+
thinking: joinedBlocks(accumulator.thinkingByIndex),
|
|
54
|
+
changed: false
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
accumulator.lastDeltaSeq = input.deltaSeq;
|
|
58
|
+
if (input.parentToolUseId) {
|
|
59
|
+
return {
|
|
60
|
+
text: joinedBlocks(accumulator.textByIndex),
|
|
61
|
+
thinking: joinedBlocks(accumulator.thinkingByIndex),
|
|
62
|
+
changed: false
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const providerEvent = input.event;
|
|
66
|
+
if (providerEvent.type === "message_start") {
|
|
67
|
+
accumulator.textByIndex = {};
|
|
68
|
+
accumulator.thinkingByIndex = {};
|
|
69
|
+
return { text: "", thinking: "", changed: true };
|
|
70
|
+
}
|
|
71
|
+
const index = providerEvent.index;
|
|
72
|
+
if (typeof index !== "number" || !Number.isInteger(index)) {
|
|
73
|
+
return {
|
|
74
|
+
text: joinedBlocks(accumulator.textByIndex),
|
|
75
|
+
thinking: joinedBlocks(accumulator.thinkingByIndex),
|
|
76
|
+
changed: false
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const contentBlock = isRecord(providerEvent.content_block) ? providerEvent.content_block : null;
|
|
80
|
+
const delta = isRecord(providerEvent.delta) ? providerEvent.delta : null;
|
|
81
|
+
let changed = false;
|
|
82
|
+
if (providerEvent.type === "content_block_start" && contentBlock?.type === "text" && typeof contentBlock.text === "string") {
|
|
83
|
+
accumulator.textByIndex[index] = contentBlock.text;
|
|
84
|
+
changed = true;
|
|
85
|
+
} else if (providerEvent.type === "content_block_start" && contentBlock?.type === "thinking" && typeof contentBlock.thinking === "string") {
|
|
86
|
+
accumulator.thinkingByIndex[index] = contentBlock.thinking;
|
|
87
|
+
changed = true;
|
|
88
|
+
} else if (providerEvent.type === "content_block_delta" && delta?.type === "text_delta" && typeof delta.text === "string") {
|
|
89
|
+
accumulator.textByIndex[index] = `${accumulator.textByIndex[index] ?? ""}${delta.text}`;
|
|
90
|
+
changed = true;
|
|
91
|
+
} else if (providerEvent.type === "content_block_delta" && delta?.type === "thinking_delta" && typeof delta.thinking === "string") {
|
|
92
|
+
accumulator.thinkingByIndex[index] = `${accumulator.thinkingByIndex[index] ?? ""}${delta.thinking}`;
|
|
93
|
+
changed = true;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
text: joinedBlocks(accumulator.textByIndex),
|
|
97
|
+
thinking: joinedBlocks(accumulator.thinkingByIndex),
|
|
98
|
+
changed
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function reviveMessagePair(input) {
|
|
102
|
+
return {
|
|
103
|
+
userMessage: {
|
|
104
|
+
...input.userMessage,
|
|
105
|
+
createdAt: new Date(input.userMessage.createdAt),
|
|
106
|
+
updatedAt: input.userMessage.updatedAt ? new Date(input.userMessage.updatedAt) : null
|
|
107
|
+
},
|
|
108
|
+
assistantMessage: {
|
|
109
|
+
...input.assistantMessage,
|
|
110
|
+
createdAt: new Date(input.assistantMessage.createdAt),
|
|
111
|
+
updatedAt: input.assistantMessage.updatedAt ? new Date(input.assistantMessage.updatedAt) : null
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export function useDirectStream(options = {}) {
|
|
116
|
+
const activity = ref("idle");
|
|
117
|
+
const streamingText = ref("");
|
|
118
|
+
const streamingThinking = ref("");
|
|
119
|
+
const activeRunId = ref(null);
|
|
120
|
+
let accumulator = createMessagePartsAccumulator();
|
|
121
|
+
let abortController = null;
|
|
122
|
+
function resetAccumulator(runId = null) {
|
|
123
|
+
accumulator = createMessagePartsAccumulator(runId);
|
|
124
|
+
activeRunId.value = runId;
|
|
125
|
+
streamingText.value = "";
|
|
126
|
+
streamingThinking.value = "";
|
|
127
|
+
}
|
|
128
|
+
function beginMessage() {
|
|
129
|
+
resetAccumulator(activeRunId.value);
|
|
130
|
+
activity.value = "idle";
|
|
131
|
+
}
|
|
132
|
+
function disconnect(reset = true) {
|
|
133
|
+
abortController?.abort();
|
|
134
|
+
abortController = null;
|
|
135
|
+
activity.value = "idle";
|
|
136
|
+
if (reset)
|
|
137
|
+
resetAccumulator();
|
|
138
|
+
}
|
|
139
|
+
async function connectMessage(url, init, onAccepted) {
|
|
140
|
+
if (import.meta.server)
|
|
141
|
+
throw new Error("Message streaming is unavailable during server rendering");
|
|
142
|
+
abortController?.abort();
|
|
143
|
+
const controller = new AbortController();
|
|
144
|
+
abortController = controller;
|
|
145
|
+
let response;
|
|
146
|
+
try {
|
|
147
|
+
response = await fetch(url, { ...init, signal: controller.signal });
|
|
148
|
+
} catch (error) {
|
|
149
|
+
if (abortController === controller)
|
|
150
|
+
abortController = null;
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
153
|
+
if (!response.ok) {
|
|
154
|
+
if (abortController === controller)
|
|
155
|
+
abortController = null;
|
|
156
|
+
throw new Error(`Message stream request failed with status ${response.status}`);
|
|
157
|
+
}
|
|
158
|
+
if (!response.body) {
|
|
159
|
+
if (abortController === controller)
|
|
160
|
+
abortController = null;
|
|
161
|
+
throw new Error("Message stream response has no body");
|
|
162
|
+
}
|
|
163
|
+
activity.value = "connected";
|
|
164
|
+
let resolveAccepted;
|
|
165
|
+
let rejectAccepted;
|
|
166
|
+
const acceptedPromise = new Promise((resolve, reject) => {
|
|
167
|
+
resolveAccepted = resolve;
|
|
168
|
+
rejectAccepted = reject;
|
|
169
|
+
});
|
|
170
|
+
let accepted = false;
|
|
171
|
+
let terminal = false;
|
|
172
|
+
void (async () => {
|
|
173
|
+
try {
|
|
174
|
+
const reader = response.body.getReader();
|
|
175
|
+
const decoder = new TextDecoder();
|
|
176
|
+
let buffered = "";
|
|
177
|
+
while (!controller.signal.aborted) {
|
|
178
|
+
const { value, done } = await reader.read();
|
|
179
|
+
if (done)
|
|
180
|
+
break;
|
|
181
|
+
if (controller.signal.aborted)
|
|
182
|
+
break;
|
|
183
|
+
buffered += decoder.decode(value, { stream: true });
|
|
184
|
+
const parsed = parseSseFrames(buffered);
|
|
185
|
+
buffered = parsed.rest;
|
|
186
|
+
for (const frame of parsed.frames) {
|
|
187
|
+
if (controller.signal.aborted)
|
|
188
|
+
break;
|
|
189
|
+
if (frame.data === "[DONE]")
|
|
190
|
+
continue;
|
|
191
|
+
if (frame.event === "message-accepted") {
|
|
192
|
+
try {
|
|
193
|
+
const messagePair = reviveMessagePair(JSON.parse(frame.data));
|
|
194
|
+
accepted = true;
|
|
195
|
+
onAccepted(messagePair);
|
|
196
|
+
resolveAccepted(messagePair);
|
|
197
|
+
} catch (error) {
|
|
198
|
+
rejectAccepted(error);
|
|
199
|
+
}
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
let event;
|
|
203
|
+
try {
|
|
204
|
+
event = JSON.parse(frame.data);
|
|
205
|
+
} catch {
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if (!isRecord(event) || typeof event.kind !== "string")
|
|
209
|
+
continue;
|
|
210
|
+
activity.value = "active";
|
|
211
|
+
if (event.kind === "result") {
|
|
212
|
+
terminal = true;
|
|
213
|
+
options.onResult?.();
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
if (event.kind === "error") {
|
|
217
|
+
if (event.recoverable !== true) {
|
|
218
|
+
terminal = true;
|
|
219
|
+
options.onResult?.();
|
|
220
|
+
}
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (event.kind === "status" && (event.status === "failed" || event.status === "cancelled")) {
|
|
224
|
+
terminal = true;
|
|
225
|
+
options.onResult?.();
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if (event.kind !== "message-parts" || typeof event.runId !== "string" || typeof event.deltaSeq !== "number" || !Number.isInteger(event.deltaSeq) || event.deltaSeq < 0 || !isRecord(event.event)) {
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
const accumulated = applyMessagePartsEvent(accumulator, event);
|
|
232
|
+
activeRunId.value = accumulator.runId;
|
|
233
|
+
if (accumulated.changed) {
|
|
234
|
+
streamingText.value = accumulated.text;
|
|
235
|
+
streamingThinking.value = accumulated.thinking;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (!accepted)
|
|
240
|
+
rejectAccepted(new Error("Message stream ended before acknowledgement"));
|
|
241
|
+
} catch (error) {
|
|
242
|
+
if (!accepted)
|
|
243
|
+
rejectAccepted(error);
|
|
244
|
+
} finally {
|
|
245
|
+
if (abortController === controller)
|
|
246
|
+
abortController = null;
|
|
247
|
+
if (accepted && !terminal && !controller.signal.aborted)
|
|
248
|
+
options.onDisconnect?.();
|
|
249
|
+
}
|
|
250
|
+
})();
|
|
251
|
+
return acceptedPromise;
|
|
252
|
+
}
|
|
253
|
+
onUnmounted(() => disconnect());
|
|
254
|
+
return {
|
|
255
|
+
activity: readonly(activity),
|
|
256
|
+
streamingText: readonly(streamingText),
|
|
257
|
+
streamingThinking: readonly(streamingThinking),
|
|
258
|
+
activeRunId: readonly(activeRunId),
|
|
259
|
+
connectMessage,
|
|
260
|
+
beginMessage,
|
|
261
|
+
disconnect
|
|
262
|
+
};
|
|
263
|
+
}
|
|
@@ -15,3 +15,10 @@ export type ToolGroup = {
|
|
|
15
15
|
toolResult?: ToolResult;
|
|
16
16
|
};
|
|
17
17
|
export type ReasoningStep = string | ToolGroup;
|
|
18
|
+
/**
|
|
19
|
+
* A turn that is still working towards its first output has no reasoning of its
|
|
20
|
+
* own yet, so the preparing steps stand in. That makes the wait read as an agent
|
|
21
|
+
* which has started working rather than as a loading placeholder. Any real
|
|
22
|
+
* reasoning wins immediately — the stand-ins never compete with it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveDisplayedReasoning(reasoningData: ReasoningStep[] | null | undefined, preparingSteps?: readonly string[] | null): ReasoningStep[];
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M0 8C0 5.19974 0 3.79961 0.544967 2.73005C1.02433 1.78924 1.78924 1.02433 2.73005 0.544967C3.79961 0 5.19974 0 8 0C10.8003 0 12.2004 0 13.27 0.544967C14.2108 1.02433 14.9757 1.78924 15.455 2.73005C16 3.79961 16 5.19974 16 8C16 10.8003 16 12.2004 15.455 13.27C14.9757 14.2108 14.2108 14.9757 13.27 15.455C12.2004 16 10.8003 16 8 16C5.19974 16 3.79961 16 2.73005 15.455C1.78924 14.9757 1.02433 14.2108 0.544967 13.27C0 12.2004 0 10.8003 0 8Z" fill="#
|
|
3
|
-
<
|
|
4
|
-
<rect x="3" y="6.4" width="7" height="1.2" rx="0.6" fill="#8B9399" fill-opacity="0.7"/>
|
|
5
|
-
<rect x="3" y="8.8" width="9" height="1.2" rx="0.6" fill="#8B9399" fill-opacity="0.5"/>
|
|
6
|
-
<rect x="3" y="11.2" width="5" height="1.2" rx="0.6" fill="#8B9399" fill-opacity="0.3"/>
|
|
2
|
+
<path d="M0 8C0 5.19974 0 3.79961 0.544967 2.73005C1.02433 1.78924 1.78924 1.02433 2.73005 0.544967C3.79961 0 5.19974 0 8 0C10.8003 0 12.2004 0 13.27 0.544967C14.2108 1.02433 14.9757 1.78924 15.455 2.73005C16 3.79961 16 5.19974 16 8C16 10.8003 16 12.2004 15.455 13.27C14.9757 14.2108 14.2108 14.9757 13.27 15.455C12.2004 16 10.8003 16 8 16C5.19974 16 3.79961 16 2.73005 15.455C1.78924 14.9757 1.02433 14.2108 0.544967 13.27C0 12.2004 0 10.8003 0 8Z" fill="#A3A3A3"/>
|
|
3
|
+
<path d="M8.9375 3.8877L9.00781 3.89453C9.03116 3.89913 9.05407 3.90591 9.07617 3.91504C9.12018 3.93323 9.16065 3.95951 9.19434 3.99316L11.3818 6.18066C11.4155 6.21435 11.4418 6.25482 11.46 6.29883C11.4781 6.34281 11.4873 6.38991 11.4873 6.4375V11.4375C11.4873 11.6165 11.4166 11.7885 11.29 11.915C11.1635 12.0416 10.9915 12.1123 10.8125 12.1123H5.1875C5.00848 12.1123 4.83655 12.0416 4.70996 11.915C4.58337 11.7885 4.5127 11.6165 4.5127 11.4375V4.5625C4.5127 4.38348 4.58337 4.21155 4.70996 4.08496C4.83655 3.95837 5.00848 3.8877 5.1875 3.8877H8.9375ZM5.2373 11.3877H10.7627V6.7998H8.9375C8.84136 6.7998 8.74962 6.76134 8.68164 6.69336C8.61366 6.62538 8.5752 6.53364 8.5752 6.4375V4.6123H5.2373V11.3877ZM9.2998 6.0752H10.25L9.2998 5.125V6.0752Z" fill="white" stroke="white" stroke-width="0.1"/>
|
|
7
4
|
</svg>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="
|
|
2
|
+
<path d="M0 8C0 5.19974 0 3.79961 0.544967 2.73005C1.02433 1.78924 1.78924 1.02433 2.73005 0.544967C3.79961 0 5.19974 0 8 0C10.8003 0 12.2004 0 13.27 0.544967C14.2108 1.02433 14.9757 1.78924 15.455 2.73005C16 3.79961 16 5.19974 16 8C16 10.8003 16 12.2004 15.455 13.27C14.9757 14.2108 14.2108 14.9757 13.27 15.455C12.2004 16 10.8003 16 8 16C5.19974 16 3.79961 16 2.73005 15.455C1.78924 14.9757 1.02433 14.2108 0.544967 13.27C0 12.2004 0 10.8003 0 8Z" fill="#46A1E3"/>
|
|
3
|
+
<path d="M11.4375 3.875H4.5625C4.38016 3.875 4.2053 3.94743 4.07636 4.07636C3.94743 4.2053 3.875 4.38016 3.875 4.5625V11.4375C3.875 11.6198 3.94743 11.7947 4.07636 11.9236C4.2053 12.0526 4.38016 12.125 4.5625 12.125H11.4375C11.6198 12.125 11.7947 12.0526 11.9236 11.9236C12.0526 11.7947 12.125 11.6198 12.125 11.4375V4.5625C12.125 4.38016 12.0526 4.2053 11.9236 4.07636C11.7947 3.94743 11.6198 3.875 11.4375 3.875ZM4.5625 4.5625H11.4375V7.88742L10.3766 6.82609C10.2477 6.69726 10.0729 6.62489 9.89062 6.62489C9.70837 6.62489 9.53357 6.69726 9.40465 6.82609L4.79324 11.4375H4.5625V4.5625ZM11.4375 11.4375H5.76562L9.89062 7.3125L11.4375 8.85938V11.4375ZM6.625 7.65625C6.82896 7.65625 7.02834 7.59577 7.19793 7.48245C7.36752 7.36914 7.4997 7.20808 7.57775 7.01964C7.6558 6.83121 7.67623 6.62386 7.63643 6.42381C7.59664 6.22377 7.49843 6.04002 7.3542 5.8958C7.20998 5.75157 7.02623 5.65336 6.82619 5.61357C6.62614 5.57377 6.41879 5.5942 6.23036 5.67225C6.04192 5.7503 5.88086 5.88248 5.76755 6.05207C5.65423 6.22166 5.59375 6.42104 5.59375 6.625C5.59375 6.8985 5.7024 7.16081 5.8958 7.3542C6.08919 7.5476 6.3515 7.65625 6.625 7.65625ZM6.625 6.28125C6.69299 6.28125 6.75945 6.30141 6.81598 6.33918C6.87251 6.37695 6.91657 6.43064 6.94258 6.49345C6.9686 6.55626 6.97541 6.62538 6.96214 6.69206C6.94888 6.75874 6.91614 6.81999 6.86807 6.86807C6.81999 6.91614 6.75874 6.94888 6.69206 6.96214C6.62538 6.97541 6.55626 6.9686 6.49345 6.94258C6.43064 6.91657 6.37695 6.87251 6.33918 6.81598C6.30141 6.75945 6.28125 6.69299 6.28125 6.625C6.28125 6.53383 6.31747 6.4464 6.38193 6.38193C6.4464 6.31747 6.53383 6.28125 6.625 6.28125Z" fill="white"/>
|
|
3
4
|
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { ChatCitationsConfig, CitationMeta, CitationRef, } from '../citations/types.js';
|
|
2
2
|
export type { ChatFeatureConfig } from '../embed/feature-config.js';
|
|
3
|
-
export type { ChatActor, ChatEmbedSharedProps, ChatSidebarConfig, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps, } from '../embed/types.js';
|
|
3
|
+
export type { ChatActor, ChatEmbedSharedProps, ChatEmbedVariant, ChatEmbedVariantProps, ChatSidebarConfig, ChatSuggestion, DefaultChatEmbedProps, MeistrariChatEmbedProps, TelaAgentChatEmbedProps, } from '../embed/types.js';
|
|
4
4
|
export type { ChatActionPayload } from '../messages/composables/chat-action.js';
|
|
5
5
|
export type { MessageFeedbackConfig, MessageFeedbackPayload, MessageFeedbackRating, } from '../messages/composables/chat-feedback.js';
|
|
6
6
|
export { ChatMessageStatus } from '../messages/composables/chat-message-terminal.js';
|
|
@@ -85,6 +85,7 @@ export declare const messageSchema: z.ZodObject<{
|
|
|
85
85
|
completed: "completed";
|
|
86
86
|
failed: "failed";
|
|
87
87
|
}>>;
|
|
88
|
+
failReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
89
|
reasoningData: z.ZodUnknown;
|
|
89
90
|
files: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
90
91
|
url: z.ZodString;
|
|
@@ -189,6 +190,7 @@ export declare const conversationWithMessagesSchema: z.ZodObject<{
|
|
|
189
190
|
completed: "completed";
|
|
190
191
|
failed: "failed";
|
|
191
192
|
}>>;
|
|
193
|
+
failReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
194
|
reasoningData: z.ZodUnknown;
|
|
193
195
|
files: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
194
196
|
url: z.ZodString;
|
|
@@ -211,6 +213,7 @@ export declare const conversationWithMessagesSchema: z.ZodObject<{
|
|
|
211
213
|
export type ConversationWithMessages = z.infer<typeof conversationWithMessagesSchema>;
|
|
212
214
|
export declare const createConversationRequestSchema: z.ZodObject<{
|
|
213
215
|
model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
216
|
+
"claude-opus-5": "claude-opus-5";
|
|
214
217
|
"claude-opus-4-8": "claude-opus-4-8";
|
|
215
218
|
"claude-sonnet-5": "claude-sonnet-5";
|
|
216
219
|
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
@@ -247,6 +250,7 @@ export type ConversationAgentInputsResponse = z.infer<typeof conversationAgentIn
|
|
|
247
250
|
export declare const updateConversationRequestSchema: z.ZodObject<{
|
|
248
251
|
title: z.ZodOptional<z.ZodString>;
|
|
249
252
|
model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
253
|
+
"claude-opus-5": "claude-opus-5";
|
|
250
254
|
"claude-opus-4-8": "claude-opus-4-8";
|
|
251
255
|
"claude-sonnet-5": "claude-sonnet-5";
|
|
252
256
|
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
@@ -36,6 +36,9 @@ export const messageSchema = z.object({
|
|
|
36
36
|
role: messageRoleSchema,
|
|
37
37
|
content: z.string(),
|
|
38
38
|
status: messageStatusSchema.nullable(),
|
|
39
|
+
// Optional so a newer chat-nuxt keeps working against a chat-api that
|
|
40
|
+
// predates the column.
|
|
41
|
+
failReason: z.string().nullable().optional(),
|
|
39
42
|
reasoningData: z.unknown(),
|
|
40
43
|
files: z.array(messageFileSchema).nullable(),
|
|
41
44
|
externalUuid: z.string().nullable(),
|
|
@@ -30,6 +30,26 @@ export declare const messageOverviewResponseSchema: z.ZodObject<{
|
|
|
30
30
|
}, z.core.$strict>>;
|
|
31
31
|
}, z.core.$strict>;
|
|
32
32
|
export type MessageOverviewResponse = z.infer<typeof messageOverviewResponseSchema>;
|
|
33
|
+
/**
|
|
34
|
+
* What the send looked like from the client's side, so first-token latency can
|
|
35
|
+
* be reported against what the user actually saw. Durations only, never
|
|
36
|
+
* timestamps — the browser's clock never has to agree with the server's.
|
|
37
|
+
*/
|
|
38
|
+
export declare const sendMessageClientTimingSchema: z.ZodObject<{
|
|
39
|
+
/**
|
|
40
|
+
* Elapsed from the user's send to this request. Non-zero whenever the client
|
|
41
|
+
* gate held the send behind conversation creation, a model change or a
|
|
42
|
+
* sandbox wake.
|
|
43
|
+
*/
|
|
44
|
+
sinceSendMs: z.ZodNumber;
|
|
45
|
+
/**
|
|
46
|
+
* When the client's stand-in step lands, measured from the same send. A run
|
|
47
|
+
* that produces nothing before then has already shown the user an answer
|
|
48
|
+
* starting, whatever the run's own latency turns out to be.
|
|
49
|
+
*/
|
|
50
|
+
standInOutputAtMs: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export type SendMessageClientTiming = z.infer<typeof sendMessageClientTimingSchema>;
|
|
33
53
|
export declare const sendMessageBodySchema: z.ZodObject<{
|
|
34
54
|
content: z.ZodString;
|
|
35
55
|
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -50,6 +70,21 @@ export declare const sendMessageBodySchema: z.ZodObject<{
|
|
|
50
70
|
name: z.ZodString;
|
|
51
71
|
content: z.ZodString;
|
|
52
72
|
}, z.core.$strip>], "type">>>;
|
|
73
|
+
wakeSessionId: z.ZodOptional<z.ZodString>;
|
|
74
|
+
clientTiming: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
/**
|
|
76
|
+
* Elapsed from the user's send to this request. Non-zero whenever the client
|
|
77
|
+
* gate held the send behind conversation creation, a model change or a
|
|
78
|
+
* sandbox wake.
|
|
79
|
+
*/
|
|
80
|
+
sinceSendMs: z.ZodNumber;
|
|
81
|
+
/**
|
|
82
|
+
* When the client's stand-in step lands, measured from the same send. A run
|
|
83
|
+
* that produces nothing before then has already shown the user an answer
|
|
84
|
+
* starting, whatever the run's own latency turns out to be.
|
|
85
|
+
*/
|
|
86
|
+
standInOutputAtMs: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strict>>;
|
|
53
88
|
}, z.core.$strict>;
|
|
54
89
|
export type SendMessageBody = z.infer<typeof sendMessageBodySchema>;
|
|
55
90
|
export declare const sendMessageResponseSchema: z.ZodObject<{
|
|
@@ -66,6 +101,7 @@ export declare const sendMessageResponseSchema: z.ZodObject<{
|
|
|
66
101
|
completed: "completed";
|
|
67
102
|
failed: "failed";
|
|
68
103
|
}>>;
|
|
104
|
+
failReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
105
|
reasoningData: z.ZodUnknown;
|
|
70
106
|
files: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
71
107
|
url: z.ZodString;
|
|
@@ -97,6 +133,7 @@ export declare const sendMessageResponseSchema: z.ZodObject<{
|
|
|
97
133
|
completed: "completed";
|
|
98
134
|
failed: "failed";
|
|
99
135
|
}>>;
|
|
136
|
+
failReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
100
137
|
reasoningData: z.ZodUnknown;
|
|
101
138
|
files: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
102
139
|
url: z.ZodString;
|
|
@@ -131,6 +168,7 @@ export declare const messagePollResponseSchema: z.ZodObject<{
|
|
|
131
168
|
completed: "completed";
|
|
132
169
|
failed: "failed";
|
|
133
170
|
}>>;
|
|
171
|
+
failReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
172
|
reasoningData: z.ZodUnknown;
|
|
135
173
|
files: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
136
174
|
url: z.ZodString;
|
|
@@ -162,8 +200,13 @@ export declare const messagePollResponseSchema: z.ZodObject<{
|
|
|
162
200
|
}, z.core.$strip>>>;
|
|
163
201
|
}, z.core.$strip>;
|
|
164
202
|
export type MessagePollResponse = z.infer<typeof messagePollResponseSchema>;
|
|
203
|
+
export declare const retryMessageBodySchema: z.ZodObject<{
|
|
204
|
+
wakeSessionId: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$strict>;
|
|
206
|
+
export type RetryMessageBody = z.infer<typeof retryMessageBodySchema>;
|
|
165
207
|
export declare const cancelConversationResponseSchema: z.ZodObject<{
|
|
166
208
|
success: z.ZodLiteral<true>;
|
|
167
209
|
cancelled: z.ZodBoolean;
|
|
168
210
|
}, z.core.$strip>;
|
|
169
211
|
export type CancelConversationResponse = z.infer<typeof cancelConversationResponseSchema>;
|
|
212
|
+
export declare function isPromptTooLongFailure(failReason: string | null | undefined): boolean;
|
|
@@ -26,10 +26,31 @@ export const messageOverviewResponseSchema = z.strictObject({
|
|
|
26
26
|
createdAt: z.date(),
|
|
27
27
|
}).nullable(),
|
|
28
28
|
});
|
|
29
|
+
/**
|
|
30
|
+
* What the send looked like from the client's side, so first-token latency can
|
|
31
|
+
* be reported against what the user actually saw. Durations only, never
|
|
32
|
+
* timestamps — the browser's clock never has to agree with the server's.
|
|
33
|
+
*/
|
|
34
|
+
export const sendMessageClientTimingSchema = z.strictObject({
|
|
35
|
+
/**
|
|
36
|
+
* Elapsed from the user's send to this request. Non-zero whenever the client
|
|
37
|
+
* gate held the send behind conversation creation, a model change or a
|
|
38
|
+
* sandbox wake.
|
|
39
|
+
*/
|
|
40
|
+
sinceSendMs: z.number().int().min(0).max(600_000),
|
|
41
|
+
/**
|
|
42
|
+
* When the client's stand-in step lands, measured from the same send. A run
|
|
43
|
+
* that produces nothing before then has already shown the user an answer
|
|
44
|
+
* starting, whatever the run's own latency turns out to be.
|
|
45
|
+
*/
|
|
46
|
+
standInOutputAtMs: z.number().int().min(0).max(600_000).optional(),
|
|
47
|
+
});
|
|
29
48
|
export const sendMessageBodySchema = z.strictObject({
|
|
30
49
|
content: z.string(),
|
|
31
50
|
files: z.array(fileUploadInputSchema).optional(),
|
|
32
51
|
agentInputs: z.array(telaAgentExecutionInputSchema).optional(),
|
|
52
|
+
wakeSessionId: z.string().uuid().optional(),
|
|
53
|
+
clientTiming: sendMessageClientTimingSchema.optional(),
|
|
33
54
|
});
|
|
34
55
|
export const sendMessageResponseSchema = z.object({
|
|
35
56
|
userMessage: messageSchema,
|
|
@@ -39,7 +60,17 @@ export const messagePollResponseSchema = z.object({
|
|
|
39
60
|
messages: z.array(messageSchema),
|
|
40
61
|
newFiles: z.array(messageFileSchema).optional(),
|
|
41
62
|
});
|
|
63
|
+
export const retryMessageBodySchema = z.strictObject({
|
|
64
|
+
wakeSessionId: z.string().uuid().optional(),
|
|
65
|
+
});
|
|
42
66
|
export const cancelConversationResponseSchema = z.object({
|
|
43
67
|
success: z.literal(true),
|
|
44
68
|
cancelled: z.boolean(),
|
|
45
69
|
});
|
|
70
|
+
// agent-api reports this failure as free text (e.g. "Prompt is too long"), so
|
|
71
|
+
// the match lives here — next to the wire contract — instead of being
|
|
72
|
+
// re-derived by each consumer.
|
|
73
|
+
const PROMPT_TOO_LONG_PATTERN = /prompt is too long/i;
|
|
74
|
+
export function isPromptTooLongFailure(failReason) {
|
|
75
|
+
return failReason != null && PROMPT_TOO_LONG_PATTERN.test(failReason);
|
|
76
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const chatModelIds: readonly ["claude-opus-4-8", "claude-sonnet-5", "claude-haiku-4-5"];
|
|
2
|
+
export declare const chatModelIds: readonly ["claude-opus-5", "claude-opus-4-8", "claude-sonnet-5", "claude-haiku-4-5"];
|
|
3
3
|
export declare const chatModelSchema: z.ZodEnum<{
|
|
4
|
+
"claude-opus-5": "claude-opus-5";
|
|
4
5
|
"claude-opus-4-8": "claude-opus-4-8";
|
|
5
6
|
"claude-sonnet-5": "claude-sonnet-5";
|
|
6
7
|
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
7
8
|
}>;
|
|
8
9
|
export type ChatModel = z.infer<typeof chatModelSchema>;
|
|
9
|
-
export declare const defaultChatModel = "claude-opus-
|
|
10
|
+
export declare const defaultChatModel = "claude-opus-5";
|
|
10
11
|
export declare function isValidChatModel(value: unknown): value is ChatModel;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const chatModelIds = [
|
|
3
|
+
'claude-opus-5',
|
|
3
4
|
'claude-opus-4-8',
|
|
4
5
|
'claude-sonnet-5',
|
|
5
6
|
'claude-haiku-4-5',
|
|
6
7
|
];
|
|
7
8
|
export const chatModelSchema = z.enum(chatModelIds);
|
|
8
|
-
export const defaultChatModel = 'claude-opus-
|
|
9
|
+
export const defaultChatModel = 'claude-opus-5';
|
|
9
10
|
export function isValidChatModel(value) {
|
|
10
11
|
return typeof value === 'string' && chatModelIds.includes(value);
|
|
11
12
|
}
|
|
@@ -20,6 +20,16 @@ export type ChatModelOption = {
|
|
|
20
20
|
tabs: readonly string[];
|
|
21
21
|
};
|
|
22
22
|
export declare const chatModelOptions: readonly [{
|
|
23
|
+
readonly value: "claude-opus-5";
|
|
24
|
+
readonly label: "Claude Opus 5";
|
|
25
|
+
readonly description: "Agente de ponta para trabalho complexo";
|
|
26
|
+
readonly provider: "Anthropic";
|
|
27
|
+
readonly cost: 5;
|
|
28
|
+
readonly maxInputTokens: 1000000;
|
|
29
|
+
readonly maxOutputTokens: 128000;
|
|
30
|
+
readonly isMultiModal: true;
|
|
31
|
+
readonly tabs: readonly ["all", "advanced", "multimodal"];
|
|
32
|
+
}, {
|
|
23
33
|
readonly value: "claude-opus-4-8";
|
|
24
34
|
readonly label: "Claude 4.8 Opus";
|
|
25
35
|
readonly description: "Agente de ponta para tarefas complexas";
|
|
@@ -6,6 +6,7 @@ export const conversationCreatorFilterOptions = [
|
|
|
6
6
|
// Metadata follows the agent model catalog on the Tela platform
|
|
7
7
|
// (packages/application/composables/model.ts), curated to the models this app offers.
|
|
8
8
|
export const chatModelOptions = [
|
|
9
|
+
{ value: 'claude-opus-5', label: 'Claude Opus 5', description: 'Agente de ponta para trabalho complexo', provider: 'Anthropic', cost: 5, maxInputTokens: 1_000_000, maxOutputTokens: 128_000, isMultiModal: true, tabs: ['all', 'advanced', 'multimodal'] },
|
|
9
10
|
{ value: 'claude-opus-4-8', label: 'Claude 4.8 Opus', description: 'Agente de ponta para tarefas complexas', provider: 'Anthropic', cost: 4, maxInputTokens: 1_000_000, maxOutputTokens: 128_000, isMultiModal: true, tabs: ['all', 'advanced', 'multimodal'] },
|
|
10
11
|
{ value: 'claude-sonnet-5', label: 'Claude Sonnet 5', description: 'Agente rápido e inteligente de nova geração', provider: 'Anthropic', cost: 4, maxInputTokens: 1_000_000, maxOutputTokens: 64_000, isMultiModal: true, tabs: ['all', 'advanced', 'multimodal'] },
|
|
11
12
|
{ value: 'claude-haiku-4-5', label: 'Claude 4.5 Haiku', description: 'Agente rápido e eficiente para tarefas simples', provider: 'Anthropic', cost: 3, maxInputTokens: 200_000, maxOutputTokens: 64_000, isMultiModal: true, tabs: ['all', 'cheap', 'multimodal'] },
|
|
@@ -71,6 +71,7 @@ export declare const telaAgentContextFileSchema: z.ZodObject<{
|
|
|
71
71
|
export type TelaAgentContextFile = z.infer<typeof telaAgentContextFileSchema>;
|
|
72
72
|
export declare const telaAgentSchema: z.ZodObject<{
|
|
73
73
|
id: z.ZodString;
|
|
74
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
74
75
|
organizationName: z.ZodOptional<z.ZodString>;
|
|
75
76
|
repository: z.ZodOptional<z.ZodString>;
|
|
76
77
|
publishedId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -185,6 +186,13 @@ export declare const telaAgentSessionResultSchema: z.ZodObject<{
|
|
|
185
186
|
structuredContent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
186
187
|
childEventIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
187
188
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
189
|
+
export declare const telaAgentDirectStreamSchema: z.ZodObject<{
|
|
190
|
+
url: z.ZodString;
|
|
191
|
+
token: z.ZodString;
|
|
192
|
+
expiresAt: z.ZodNumber;
|
|
193
|
+
runId: z.ZodString;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
export type TelaAgentDirectStream = z.infer<typeof telaAgentDirectStreamSchema>;
|
|
188
196
|
export declare const telaAgentSessionSchema: z.ZodObject<{
|
|
189
197
|
sessionId: z.ZodString;
|
|
190
198
|
status: z.ZodEnum<{
|
|
@@ -205,6 +213,12 @@ export declare const telaAgentSessionSchema: z.ZodObject<{
|
|
|
205
213
|
calculatedCostUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
206
214
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
207
215
|
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
216
|
+
directStream: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
url: z.ZodString;
|
|
218
|
+
token: z.ZodString;
|
|
219
|
+
expiresAt: z.ZodNumber;
|
|
220
|
+
runId: z.ZodString;
|
|
221
|
+
}, z.core.$strip>>;
|
|
208
222
|
result: z.ZodOptional<z.ZodObject<{
|
|
209
223
|
usage: z.ZodOptional<z.ZodObject<{
|
|
210
224
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -226,6 +240,25 @@ export declare const telaAgentSessionSchema: z.ZodObject<{
|
|
|
226
240
|
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
227
241
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
228
242
|
export type TelaAgentSession = z.infer<typeof telaAgentSessionSchema>;
|
|
243
|
+
export declare const telaAgentWakeRequestSchema: z.ZodObject<{
|
|
244
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
245
|
+
model: z.ZodOptional<z.ZodEnum<{
|
|
246
|
+
"claude-opus-5": "claude-opus-5";
|
|
247
|
+
"claude-opus-4-8": "claude-opus-4-8";
|
|
248
|
+
"claude-sonnet-5": "claude-sonnet-5";
|
|
249
|
+
"claude-haiku-4-5": "claude-haiku-4-5";
|
|
250
|
+
}>>;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
export type TelaAgentWakeRequest = z.infer<typeof telaAgentWakeRequestSchema>;
|
|
253
|
+
export declare const telaAgentWakeResponseSchema: z.ZodObject<{
|
|
254
|
+
status: z.ZodEnum<{
|
|
255
|
+
waking: "waking";
|
|
256
|
+
ready: "ready";
|
|
257
|
+
unavailable: "unavailable";
|
|
258
|
+
}>;
|
|
259
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
export type TelaAgentWakeResponse = z.infer<typeof telaAgentWakeResponseSchema>;
|
|
229
262
|
export declare const telaAgentV4SessionStatusEventSchema: z.ZodObject<{
|
|
230
263
|
kind: z.ZodLiteral<"status">;
|
|
231
264
|
sessionId: z.ZodString;
|
|
@@ -370,6 +403,7 @@ export declare const telaAgentRunApiResponseSchema: z.ZodObject<{
|
|
|
370
403
|
export declare const telaAgentApiResponseSchema: z.ZodObject<{
|
|
371
404
|
data: z.ZodObject<{
|
|
372
405
|
id: z.ZodString;
|
|
406
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
373
407
|
organizationName: z.ZodOptional<z.ZodString>;
|
|
374
408
|
repository: z.ZodOptional<z.ZodString>;
|
|
375
409
|
publishedId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -413,6 +447,7 @@ export declare const telaAgentApiResponseSchema: z.ZodObject<{
|
|
|
413
447
|
export declare const telaAgentResolveApiResponseSchema: z.ZodObject<{
|
|
414
448
|
agent: z.ZodObject<{
|
|
415
449
|
id: z.ZodString;
|
|
450
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
416
451
|
organizationName: z.ZodOptional<z.ZodString>;
|
|
417
452
|
repository: z.ZodOptional<z.ZodString>;
|
|
418
453
|
publishedId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|