aui-agent-builder 0.3.126 → 0.3.128
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 +0 -3
- package/dist/api-client/index.d.ts +28 -0
- package/dist/api-client/index.d.ts.map +1 -1
- package/dist/api-client/index.js +16 -0
- package/dist/api-client/index.js.map +1 -1
- package/dist/commands/apollo.d.ts.map +1 -1
- package/dist/commands/apollo.js +72 -30
- package/dist/commands/apollo.js.map +1 -1
- package/dist/commands/index.d.ts +0 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +0 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/util/apollo-agent.d.ts +47 -9
- package/dist/commands/util/apollo-agent.d.ts.map +1 -1
- package/dist/commands/util/apollo-agent.js +81 -15
- package/dist/commands/util/apollo-agent.js.map +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/services/auth.service.d.ts +31 -0
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +83 -0
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/status.service.d.ts +8 -0
- package/dist/services/status.service.d.ts.map +1 -1
- package/dist/services/status.service.js +16 -1
- package/dist/services/status.service.js.map +1 -1
- package/dist/ui/views/StatusView.js +1 -1
- package/dist/ui/views/StatusView.js.map +1 -1
- package/package.json +1 -1
- package/dist/commands/chat.d.ts +0 -20
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -545
- package/dist/commands/chat.js.map +0 -1
- package/dist/ui/views/ChatView.d.ts +0 -26
- package/dist/ui/views/ChatView.d.ts.map +0 -1
- package/dist/ui/views/ChatView.js +0 -96
- package/dist/ui/views/ChatView.js.map +0 -1
package/dist/commands/chat.js
DELETED
|
@@ -1,545 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import inquirer from "inquirer";
|
|
4
|
-
import * as readline from "readline";
|
|
5
|
-
import { render } from "ink";
|
|
6
|
-
import { Box, Text } from "ink";
|
|
7
|
-
import { getConfig, findProjectRoot, loadProjectConfig, saveProjectConfig, loadSession, } from "../config/index.js";
|
|
8
|
-
import { AUIClient } from "../api-client/index.js";
|
|
9
|
-
import { AuthenticationError, ExitCode, debugLog } from "../errors/index.js";
|
|
10
|
-
import { StatusLine, Spinner, Header, ErrorDisplay, Hint, Divider, } from "../ui/components/index.js";
|
|
11
|
-
import { colors, icons } from "../ui/theme.js";
|
|
12
|
-
import { ChatSessionInfo, ChatWelcome, ChatHelpBox, ChatAgentResponse, ChatCard, ChatSuggestions, ChatHistoryMessage, } from "../ui/views/ChatView.js";
|
|
13
|
-
// ─── Ink Rendering Helpers ───
|
|
14
|
-
function log(node) {
|
|
15
|
-
const { unmount } = render(node);
|
|
16
|
-
unmount();
|
|
17
|
-
}
|
|
18
|
-
function startSpinner(label) {
|
|
19
|
-
const inst = render(_jsx(Spinner, { label: label }));
|
|
20
|
-
return {
|
|
21
|
-
succeed(msg) {
|
|
22
|
-
inst.unmount();
|
|
23
|
-
log(_jsx(StatusLine, { kind: "success", label: msg }));
|
|
24
|
-
},
|
|
25
|
-
fail(msg) {
|
|
26
|
-
inst.unmount();
|
|
27
|
-
log(_jsx(StatusLine, { kind: "error", label: msg }));
|
|
28
|
-
},
|
|
29
|
-
stop() {
|
|
30
|
-
inst.unmount();
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
// ─── UI Constants (for streaming output) ───
|
|
35
|
-
const INDENT = " ";
|
|
36
|
-
// ─── Environment Helpers ───
|
|
37
|
-
function buildSdkEnvironment(apiUrl) {
|
|
38
|
-
const parsed = new URL(apiUrl);
|
|
39
|
-
const origin = parsed.origin;
|
|
40
|
-
return {
|
|
41
|
-
base: `${origin}/api/ia-controller`,
|
|
42
|
-
wsUrl: origin.replace(/^https?:\/\//, "wss://"),
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
// ═══════════════════════════════════════════════════════════════
|
|
46
|
-
// Main Chat Command
|
|
47
|
-
// ═══════════════════════════════════════════════════════════════
|
|
48
|
-
export async function chat(options = {}) {
|
|
49
|
-
// ─── Load SDK ───
|
|
50
|
-
let ApolloClient;
|
|
51
|
-
try {
|
|
52
|
-
const sdk = await import("@aui.io/aui-client");
|
|
53
|
-
ApolloClient = sdk.ApolloClient;
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
log(_jsx(ErrorDisplay, { error: error, message: "Missing dependency: @aui.io/aui-client", suggestion: "Run: npm install @aui.io/aui-client" }));
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
// ─── Banner ───
|
|
60
|
-
log(_jsx(Header, { title: "Agent Chat" }));
|
|
61
|
-
// ─── Derive SDK environment from session URL ───
|
|
62
|
-
const config = getConfig();
|
|
63
|
-
const sdkEnvironment = buildSdkEnvironment(config.apiUrl);
|
|
64
|
-
// ─── Acquire Network API Key ───
|
|
65
|
-
const projectRoot = findProjectRoot() || undefined;
|
|
66
|
-
const projectConfig = projectRoot ? loadProjectConfig(projectRoot) : null;
|
|
67
|
-
let networkApiKey = options.apiKey || "";
|
|
68
|
-
let agentDisplayName;
|
|
69
|
-
if (!networkApiKey) {
|
|
70
|
-
const result = await acquireApiKey(projectRoot, projectConfig);
|
|
71
|
-
if (!result) {
|
|
72
|
-
log(_jsx(Text, { color: colors.muted, children: "Chat cancelled." }));
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
networkApiKey = result.apiKey;
|
|
76
|
-
agentDisplayName = result.agentName;
|
|
77
|
-
}
|
|
78
|
-
// ─── User ID ───
|
|
79
|
-
const session = loadSession();
|
|
80
|
-
const userId = options.userId || session?.user_id || `cli-user-${Date.now()}`;
|
|
81
|
-
// ─── Create SDK Client ───
|
|
82
|
-
const client = new ApolloClient({ environment: sdkEnvironment, networkApiKey });
|
|
83
|
-
// ─── Create Task ───
|
|
84
|
-
const spinner = startSpinner("");
|
|
85
|
-
let taskId;
|
|
86
|
-
let welcomeMessage;
|
|
87
|
-
try {
|
|
88
|
-
const taskResponse = await client.controllerApi.createTask({
|
|
89
|
-
user_id: userId,
|
|
90
|
-
task_origin_type: "web-widget",
|
|
91
|
-
});
|
|
92
|
-
taskId = taskResponse.id;
|
|
93
|
-
welcomeMessage =
|
|
94
|
-
taskResponse.welcomeMessage ?? taskResponse.welcome_message;
|
|
95
|
-
spinner.stop();
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
spinner.stop();
|
|
99
|
-
const msg = error instanceof Error
|
|
100
|
-
? error.message
|
|
101
|
-
: error?.body?.message ?? String(error);
|
|
102
|
-
log(_jsx(ErrorDisplay, { error: error, message: `Connection failed: ${msg}`, suggestion: "Check your API key and try again." }));
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
// ─── Connect WebSocket ───
|
|
106
|
-
let socket = null;
|
|
107
|
-
let useWebSocket = !options.rest;
|
|
108
|
-
let streamingMode = false;
|
|
109
|
-
if (useWebSocket) {
|
|
110
|
-
try {
|
|
111
|
-
socket = await client.apolloWsSession.connect({
|
|
112
|
-
debug: false,
|
|
113
|
-
reconnectAttempts: 3,
|
|
114
|
-
headers: { "x-network-api-key": networkApiKey },
|
|
115
|
-
});
|
|
116
|
-
await socket.waitForOpen();
|
|
117
|
-
streamingMode = true;
|
|
118
|
-
}
|
|
119
|
-
catch (e) {
|
|
120
|
-
debugLog("WebSocket connection failed, falling back to REST", e);
|
|
121
|
-
if (socket)
|
|
122
|
-
try {
|
|
123
|
-
socket.close();
|
|
124
|
-
}
|
|
125
|
-
catch (closeErr) {
|
|
126
|
-
debugLog("WebSocket close", closeErr);
|
|
127
|
-
}
|
|
128
|
-
socket = null;
|
|
129
|
-
useWebSocket = false;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
// ─── Session Status Bar ───
|
|
133
|
-
const agentTag = agentDisplayName || "Agent";
|
|
134
|
-
const envTag = config.environment;
|
|
135
|
-
const modeTag = streamingMode ? "Streaming" : "Standard";
|
|
136
|
-
log(_jsx(ChatSessionInfo, { agent: agentTag, env: envTag, mode: modeTag }));
|
|
137
|
-
// ─── Welcome Message ───
|
|
138
|
-
if (welcomeMessage) {
|
|
139
|
-
log(_jsx(ChatWelcome, { message: welcomeMessage }));
|
|
140
|
-
}
|
|
141
|
-
// ─── Instructions ───
|
|
142
|
-
log(_jsx(Box, { marginY: 1, children: _jsx(Hint, { message: "Type a message and press Enter. /exit to quit, /help for commands." }) }));
|
|
143
|
-
// ─── Prompt Helper ───
|
|
144
|
-
const SIGINT_ERR = "SIGINT";
|
|
145
|
-
const promptUser = () => new Promise((resolve, reject) => {
|
|
146
|
-
let answered = false;
|
|
147
|
-
const rl = readline.createInterface({
|
|
148
|
-
input: process.stdin,
|
|
149
|
-
output: process.stdout,
|
|
150
|
-
});
|
|
151
|
-
rl.on("SIGINT", () => {
|
|
152
|
-
rl.close();
|
|
153
|
-
});
|
|
154
|
-
rl.on("close", () => {
|
|
155
|
-
if (!answered)
|
|
156
|
-
reject(new Error(SIGINT_ERR));
|
|
157
|
-
});
|
|
158
|
-
rl.question(` ${chalk.bold.white("You")}${chalk.dim(" >")} `, (answer) => {
|
|
159
|
-
answered = true;
|
|
160
|
-
rl.close();
|
|
161
|
-
resolve(answer);
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
// ─── WebSocket Message Router ───
|
|
165
|
-
let onAgentMessage = null;
|
|
166
|
-
if (socket) {
|
|
167
|
-
socket.on("message", (msg) => {
|
|
168
|
-
if (onAgentMessage)
|
|
169
|
-
onAgentMessage(msg);
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
// ─── Send with WebSocket (streaming) ───
|
|
173
|
-
const sendWithStreaming = (text) => new Promise((resolve, reject) => {
|
|
174
|
-
let displayedLength = 0;
|
|
175
|
-
let headerShown = false;
|
|
176
|
-
const thinkingSpinner = startSpinner("");
|
|
177
|
-
const timeout = setTimeout(() => {
|
|
178
|
-
thinkingSpinner.stop();
|
|
179
|
-
onAgentMessage = null;
|
|
180
|
-
reject(new Error("Response timeout (60s)"));
|
|
181
|
-
}, 60000);
|
|
182
|
-
onAgentMessage = (message) => {
|
|
183
|
-
if (message.channel?.eventName ===
|
|
184
|
-
"thread-message-text-content-updated") {
|
|
185
|
-
if (!headerShown) {
|
|
186
|
-
thinkingSpinner.stop();
|
|
187
|
-
process.stdout.write(`\n ${chalk.cyan("Agent")} `);
|
|
188
|
-
headerShown = true;
|
|
189
|
-
}
|
|
190
|
-
const fullText = message.data?.text || "";
|
|
191
|
-
const delta = fullText.substring(displayedLength);
|
|
192
|
-
if (delta) {
|
|
193
|
-
process.stdout.write(delta.replace(/\n/g, "\n" + INDENT));
|
|
194
|
-
displayedLength = fullText.length;
|
|
195
|
-
}
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
if (message.id && message.text && message.sender) {
|
|
199
|
-
clearTimeout(timeout);
|
|
200
|
-
onAgentMessage = null;
|
|
201
|
-
if (!headerShown) {
|
|
202
|
-
thinkingSpinner.stop();
|
|
203
|
-
process.stdout.write(`\n ${chalk.cyan("Agent")} ${message.text.replace(/\n/g, "\n" + INDENT)}`);
|
|
204
|
-
}
|
|
205
|
-
process.stdout.write("\n");
|
|
206
|
-
resolve(message);
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
if (message.statusCode && !message.id) {
|
|
210
|
-
clearTimeout(timeout);
|
|
211
|
-
thinkingSpinner.stop();
|
|
212
|
-
onAgentMessage = null;
|
|
213
|
-
reject(new Error(message.description || `Agent error (${message.statusCode})`));
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
socket.sendUserMessage({ task_id: taskId, text });
|
|
217
|
-
});
|
|
218
|
-
// ─── Send with REST ───
|
|
219
|
-
const sendWithRest = async (text) => {
|
|
220
|
-
const thinkingSpinner = startSpinner("");
|
|
221
|
-
try {
|
|
222
|
-
const response = await client.controllerApi.sendMessage({
|
|
223
|
-
task_id: taskId,
|
|
224
|
-
text,
|
|
225
|
-
is_external_api: true,
|
|
226
|
-
});
|
|
227
|
-
thinkingSpinner.stop();
|
|
228
|
-
const body = response.text || "(no response)";
|
|
229
|
-
log(_jsx(ChatAgentResponse, { text: body }));
|
|
230
|
-
return response;
|
|
231
|
-
}
|
|
232
|
-
catch (error) {
|
|
233
|
-
thinkingSpinner.stop();
|
|
234
|
-
throw error;
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
// ─── Graceful Ctrl+C ───
|
|
238
|
-
const cleanup = () => {
|
|
239
|
-
if (socket)
|
|
240
|
-
try {
|
|
241
|
-
socket.close();
|
|
242
|
-
}
|
|
243
|
-
catch (e) {
|
|
244
|
-
debugLog("WebSocket close on exit", e);
|
|
245
|
-
}
|
|
246
|
-
log(_jsx(Box, { marginY: 1, children: _jsx(Text, { color: colors.muted, children: "Session ended." }) }));
|
|
247
|
-
process.exit(ExitCode.SUCCESS);
|
|
248
|
-
};
|
|
249
|
-
process.on("SIGINT", cleanup);
|
|
250
|
-
// ─── Main Chat Loop ───
|
|
251
|
-
let running = true;
|
|
252
|
-
while (running) {
|
|
253
|
-
let input;
|
|
254
|
-
try {
|
|
255
|
-
input = await promptUser();
|
|
256
|
-
}
|
|
257
|
-
catch (e) {
|
|
258
|
-
if (e?.message === SIGINT_ERR) {
|
|
259
|
-
running = false;
|
|
260
|
-
break;
|
|
261
|
-
}
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
const trimmed = input.trim();
|
|
265
|
-
if (!trimmed)
|
|
266
|
-
continue;
|
|
267
|
-
// ─── Slash Commands ───
|
|
268
|
-
if (trimmed.startsWith("/")) {
|
|
269
|
-
const cmd = trimmed.toLowerCase().split(/\s+/)[0];
|
|
270
|
-
if (cmd === "/exit" || cmd === "/quit" || cmd === "/q") {
|
|
271
|
-
running = false;
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
if (cmd === "/clear" || cmd === "/cls") {
|
|
275
|
-
console.clear();
|
|
276
|
-
continue;
|
|
277
|
-
}
|
|
278
|
-
if (cmd === "/help" || cmd === "/h") {
|
|
279
|
-
log(_jsx(ChatHelpBox, {}));
|
|
280
|
-
continue;
|
|
281
|
-
}
|
|
282
|
-
if (cmd === "/history") {
|
|
283
|
-
await printHistory(client, taskId);
|
|
284
|
-
continue;
|
|
285
|
-
}
|
|
286
|
-
if (cmd === "/suggest" || cmd === "/suggestions") {
|
|
287
|
-
await printSuggestions(client, taskId);
|
|
288
|
-
continue;
|
|
289
|
-
}
|
|
290
|
-
if (cmd === "/task") {
|
|
291
|
-
log(_jsxs(Text, { color: colors.muted, children: ["Task: ", taskId] }));
|
|
292
|
-
continue;
|
|
293
|
-
}
|
|
294
|
-
log(_jsxs(Text, { color: colors.warning, children: ["Unknown command: ", cmd, ". Type /help for commands."] }));
|
|
295
|
-
continue;
|
|
296
|
-
}
|
|
297
|
-
// ─── Send Message ───
|
|
298
|
-
try {
|
|
299
|
-
let response;
|
|
300
|
-
if (useWebSocket && socket) {
|
|
301
|
-
response = await sendWithStreaming(trimmed);
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
response = await sendWithRest(trimmed);
|
|
305
|
-
}
|
|
306
|
-
if (response?.cards && response.cards.length > 0) {
|
|
307
|
-
printCards(response.cards);
|
|
308
|
-
}
|
|
309
|
-
const suggestions = response?.followupSuggestions || response?.followup_suggestions;
|
|
310
|
-
if (suggestions && suggestions.length > 0) {
|
|
311
|
-
log(_jsx(ChatSuggestions, { suggestions: suggestions }));
|
|
312
|
-
}
|
|
313
|
-
console.log("");
|
|
314
|
-
}
|
|
315
|
-
catch (error) {
|
|
316
|
-
const msg = error?.message || String(error);
|
|
317
|
-
log(_jsx(Box, { marginY: 1, children: _jsx(StatusLine, { kind: "error", label: `Error: ${msg}` }) }));
|
|
318
|
-
if (useWebSocket && socket) {
|
|
319
|
-
log(_jsx(StatusLine, { kind: "warning", label: "Switching to standard mode..." }));
|
|
320
|
-
useWebSocket = false;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
// ─── Cleanup ───
|
|
325
|
-
process.removeListener("SIGINT", cleanup);
|
|
326
|
-
if (socket)
|
|
327
|
-
try {
|
|
328
|
-
socket.close();
|
|
329
|
-
}
|
|
330
|
-
catch (e) {
|
|
331
|
-
debugLog("WebSocket close on cleanup", e);
|
|
332
|
-
}
|
|
333
|
-
log(_jsx(Box, { marginY: 1, children: _jsx(Text, { color: colors.muted, children: "Session ended." }) }));
|
|
334
|
-
}
|
|
335
|
-
async function acquireApiKey(projectRoot, projectConfig) {
|
|
336
|
-
const savedKey = projectConfig?.network_api_key;
|
|
337
|
-
const choices = [];
|
|
338
|
-
if (savedKey) {
|
|
339
|
-
const masked = savedKey.substring(0, 12) +
|
|
340
|
-
"•".repeat(Math.max(0, savedKey.length - 12));
|
|
341
|
-
const agentLabel = projectConfig?.agent_code
|
|
342
|
-
? ` — ${projectConfig.agent_code}`
|
|
343
|
-
: "";
|
|
344
|
-
choices.push({
|
|
345
|
-
name: `Use saved key (${masked}${agentLabel})`,
|
|
346
|
-
value: "saved",
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
choices.push({ name: "Connect to an agent (auto-fetch key)", value: "auto" }, { name: "Enter API key manually", value: "manual" });
|
|
350
|
-
const { method } = await inquirer.prompt([
|
|
351
|
-
{
|
|
352
|
-
type: "list",
|
|
353
|
-
name: "method",
|
|
354
|
-
message: "API Key:",
|
|
355
|
-
choices,
|
|
356
|
-
},
|
|
357
|
-
]);
|
|
358
|
-
if (method === "saved")
|
|
359
|
-
return {
|
|
360
|
-
apiKey: savedKey,
|
|
361
|
-
agentName: projectConfig?.agent_code || undefined,
|
|
362
|
-
};
|
|
363
|
-
if (method === "manual")
|
|
364
|
-
return promptManualApiKey(projectRoot, projectConfig);
|
|
365
|
-
return autoFetchApiKey(projectRoot, projectConfig);
|
|
366
|
-
}
|
|
367
|
-
async function promptManualApiKey(projectRoot, projectConfig) {
|
|
368
|
-
const { apiKey } = await inquirer.prompt([
|
|
369
|
-
{
|
|
370
|
-
type: "password",
|
|
371
|
-
name: "apiKey",
|
|
372
|
-
message: "Network API Key:",
|
|
373
|
-
mask: "•",
|
|
374
|
-
validate: (input) => input.trim().length > 0 || "API key is required",
|
|
375
|
-
},
|
|
376
|
-
]);
|
|
377
|
-
const key = apiKey.trim();
|
|
378
|
-
if (projectRoot) {
|
|
379
|
-
const { save } = await inquirer.prompt([
|
|
380
|
-
{
|
|
381
|
-
type: "confirm",
|
|
382
|
-
name: "save",
|
|
383
|
-
message: "Save API key to .auirc for future use?",
|
|
384
|
-
default: true,
|
|
385
|
-
},
|
|
386
|
-
]);
|
|
387
|
-
if (save) {
|
|
388
|
-
saveProjectConfig({ ...projectConfig, network_api_key: key }, projectRoot);
|
|
389
|
-
log(_jsx(Text, { color: colors.muted, children: "Saved to .auirc" }));
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return { apiKey: key };
|
|
393
|
-
}
|
|
394
|
-
async function autoFetchApiKey(projectRoot, projectConfig) {
|
|
395
|
-
const config = getConfig();
|
|
396
|
-
if (!config.isAuthenticated) {
|
|
397
|
-
throw new AuthenticationError("Not logged in.");
|
|
398
|
-
}
|
|
399
|
-
const session = loadSession();
|
|
400
|
-
log(_jsxs(Text, { color: colors.muted, children: [session.email, " ", icons.bullet, " ", session.account_name || session.account_id] }));
|
|
401
|
-
const apiClient = new AUIClient({
|
|
402
|
-
baseUrl: config.apiUrl,
|
|
403
|
-
authToken: config.authToken,
|
|
404
|
-
accountId: config.accountId,
|
|
405
|
-
organizationId: config.organizationId,
|
|
406
|
-
environment: config.environment,
|
|
407
|
-
});
|
|
408
|
-
const agentSpinner = startSpinner("");
|
|
409
|
-
let agents;
|
|
410
|
-
try {
|
|
411
|
-
const response = await apiClient.networks.list();
|
|
412
|
-
agents = (response.data || []).filter((a) => a.status === "ACTIVE");
|
|
413
|
-
agentSpinner.succeed(`${agents.length} agent(s) found`);
|
|
414
|
-
}
|
|
415
|
-
catch (error) {
|
|
416
|
-
agentSpinner.fail("Failed to fetch agents");
|
|
417
|
-
log(_jsx(ErrorDisplay, { error: error }));
|
|
418
|
-
return null;
|
|
419
|
-
}
|
|
420
|
-
if (agents.length === 0) {
|
|
421
|
-
log(_jsx(Box, { marginY: 1, children: _jsx(StatusLine, { kind: "warning", label: "No agents found in this account." }) }));
|
|
422
|
-
return null;
|
|
423
|
-
}
|
|
424
|
-
const { selectedAgent } = await inquirer.prompt([
|
|
425
|
-
{
|
|
426
|
-
type: "list",
|
|
427
|
-
name: "selectedAgent",
|
|
428
|
-
message: "Select agent to chat with:",
|
|
429
|
-
choices: agents.map((a) => ({
|
|
430
|
-
name: a.niceName
|
|
431
|
-
? `${a.name} ${chalk.dim(`(${a.niceName})`)}`
|
|
432
|
-
: a.name,
|
|
433
|
-
value: a,
|
|
434
|
-
})),
|
|
435
|
-
pageSize: 15,
|
|
436
|
-
},
|
|
437
|
-
]);
|
|
438
|
-
const networkId = selectedAgent._id || selectedAgent.id;
|
|
439
|
-
let keySpinner = startSpinner("");
|
|
440
|
-
try {
|
|
441
|
-
const keysResponse = await apiClient.networkApiKeys.list(networkId);
|
|
442
|
-
const apiKeys = keysResponse.data;
|
|
443
|
-
if (!apiKeys || apiKeys.length === 0) {
|
|
444
|
-
keySpinner.fail("No API keys found for this agent");
|
|
445
|
-
log(_jsx(Hint, { message: "Create an API key in the AUI dashboard first." }));
|
|
446
|
-
return null;
|
|
447
|
-
}
|
|
448
|
-
let selectedKeyId;
|
|
449
|
-
if (apiKeys.length === 1) {
|
|
450
|
-
selectedKeyId = apiKeys[0]._id || apiKeys[0].id;
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
keySpinner.stop();
|
|
454
|
-
const { keyChoice } = await inquirer.prompt([
|
|
455
|
-
{
|
|
456
|
-
type: "list",
|
|
457
|
-
name: "keyChoice",
|
|
458
|
-
message: "Select API key:",
|
|
459
|
-
choices: apiKeys.map((k) => ({
|
|
460
|
-
name: `${k.name} ${chalk.dim(`(${k.status})`)}`,
|
|
461
|
-
value: k._id || k.id,
|
|
462
|
-
})),
|
|
463
|
-
},
|
|
464
|
-
]);
|
|
465
|
-
selectedKeyId = keyChoice;
|
|
466
|
-
keySpinner = startSpinner("");
|
|
467
|
-
}
|
|
468
|
-
const revealResponse = await apiClient.networkApiKeys.reveal(networkId, selectedKeyId);
|
|
469
|
-
const apiKeyValue = revealResponse.data.value;
|
|
470
|
-
keySpinner.succeed(`Connected to ${selectedAgent.name}`);
|
|
471
|
-
if (projectRoot) {
|
|
472
|
-
const { save } = await inquirer.prompt([
|
|
473
|
-
{
|
|
474
|
-
type: "confirm",
|
|
475
|
-
name: "save",
|
|
476
|
-
message: "Save API key to .auirc for future use?",
|
|
477
|
-
default: true,
|
|
478
|
-
},
|
|
479
|
-
]);
|
|
480
|
-
if (save) {
|
|
481
|
-
saveProjectConfig({
|
|
482
|
-
...projectConfig,
|
|
483
|
-
network_api_key: apiKeyValue,
|
|
484
|
-
agent_code: selectedAgent.niceName,
|
|
485
|
-
agent_id: networkId,
|
|
486
|
-
}, projectRoot);
|
|
487
|
-
log(_jsx(Text, { color: colors.muted, children: "Saved to .auirc" }));
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
return { apiKey: apiKeyValue, agentName: selectedAgent.name };
|
|
491
|
-
}
|
|
492
|
-
catch (error) {
|
|
493
|
-
keySpinner.fail("Failed to retrieve API key");
|
|
494
|
-
log(_jsx(ErrorDisplay, { error: error }));
|
|
495
|
-
return null;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
// ═══════════════════════════════════════════════════════════════
|
|
499
|
-
// Display Helpers
|
|
500
|
-
// ═══════════════════════════════════════════════════════════════
|
|
501
|
-
async function printHistory(client, taskId) {
|
|
502
|
-
const histSpinner = startSpinner("");
|
|
503
|
-
try {
|
|
504
|
-
const messages = await client.controllerApi.getTaskMessages(taskId);
|
|
505
|
-
histSpinner.stop();
|
|
506
|
-
if (!messages || messages.length === 0) {
|
|
507
|
-
log(_jsx(Text, { color: colors.muted, children: "No messages yet." }));
|
|
508
|
-
return;
|
|
509
|
-
}
|
|
510
|
-
log(_jsx(Divider, { width: 46 }));
|
|
511
|
-
for (const msg of messages) {
|
|
512
|
-
const senderType = msg.sender?.type?.toLowerCase() || "";
|
|
513
|
-
const isUser = senderType === "user" || senderType === "external";
|
|
514
|
-
const text = msg.text || "(no text)";
|
|
515
|
-
log(_jsx(ChatHistoryMessage, { isUser: isUser, text: text }));
|
|
516
|
-
}
|
|
517
|
-
log(_jsx(Divider, { width: 46 }));
|
|
518
|
-
}
|
|
519
|
-
catch (error) {
|
|
520
|
-
histSpinner.stop();
|
|
521
|
-
log(_jsx(ErrorDisplay, { error: error }));
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
async function printSuggestions(client, taskId) {
|
|
525
|
-
const sugSpinner = startSpinner("");
|
|
526
|
-
try {
|
|
527
|
-
const suggestions = await client.controllerApi.getDirectFollowupSuggestions(taskId);
|
|
528
|
-
sugSpinner.stop();
|
|
529
|
-
if (!suggestions || suggestions.length === 0) {
|
|
530
|
-
log(_jsx(Text, { color: colors.muted, children: "No suggestions available." }));
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
log(_jsx(ChatSuggestions, { suggestions: suggestions }));
|
|
534
|
-
}
|
|
535
|
-
catch {
|
|
536
|
-
sugSpinner.stop();
|
|
537
|
-
log(_jsx(Text, { color: colors.muted, children: "Suggestions not available." }));
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
function printCards(cards) {
|
|
541
|
-
for (let i = 0; i < cards.length; i++) {
|
|
542
|
-
log(_jsx(ChatCard, { card: cards[i], index: i }));
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
//# sourceMappingURL=chat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../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AAC;IAEpC,IAAI,CAAC;QACH,MAAM,WAAW,GACf,MAAM,MAAM,CAAC,aAAa,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC;QAClE,UAAU,CAAC,IAAI,EAAE,CAAC;QAElB,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,GAAG,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,0CAAkC,CAAC,CAAC;YACjE,OAAO;QACT,CAAC;QAED,GAAG,CAAC,KAAC,eAAe,IAAC,WAAW,EAAE,WAAW,GAAI,CAAC,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,UAAU,CAAC,IAAI,EAAE,CAAC;QAClB,GAAG,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,2CAAmC,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,KAAY;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,GAAG,CAAC,KAAC,QAAQ,IAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAI,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
interface ChatSessionInfoProps {
|
|
2
|
-
agent: string;
|
|
3
|
-
env: string;
|
|
4
|
-
mode: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function ChatSessionInfo({ agent, env, mode }: ChatSessionInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function ChatWelcome({ message }: {
|
|
8
|
-
message: string;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare function ChatHelpBox(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare function ChatAgentResponse({ text }: {
|
|
12
|
-
text: string;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare function ChatHistoryMessage({ isUser, text, }: {
|
|
15
|
-
isUser: boolean;
|
|
16
|
-
text: string;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare function ChatCard({ card, index }: {
|
|
19
|
-
card: any;
|
|
20
|
-
index: number;
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare function ChatSuggestions({ suggestions, }: {
|
|
23
|
-
suggestions: string[];
|
|
24
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=ChatView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatView.d.ts","sourceRoot":"","sources":["../../../src/ui/views/ChatView.tsx"],"names":[],"mappings":"AAMA,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,oBAAoB,2CAkBzE;AAID,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,2CAO3D;AAaD,wBAAgB,WAAW,4CAoB1B;AAID,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,2CAO3D;AAID,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,GACL,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,2CASA;AAWD,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,2CAoIrE;AAID,wBAAgB,eAAe,CAAC,EAC9B,WAAW,GACZ,EAAE;IACD,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,2CAaA"}
|