@timetotest/cli 0.2.3 → 0.2.4
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/package.json +8 -5
- package/dist/src/commands/chat/ChatApp.js +30 -42
- package/dist/src/commands/chat/ChatApp.js.map +1 -1
- package/dist/src/commands/chat/components/Banner.js +1 -1
- package/dist/src/commands/chat/components/ChatInput.js +39 -17
- package/dist/src/commands/chat/components/ChatInput.js.map +1 -1
- package/dist/src/commands/chat/components/MessageBubble.js +2 -1
- package/dist/src/commands/chat/components/MessageBubble.js.map +1 -1
- package/dist/src/commands/chat-ink.js +118 -9
- package/dist/src/commands/chat-ink.js.map +1 -1
- package/dist/src/commands/start-test.js +61 -0
- package/dist/src/commands/start-test.js.map +1 -1
- package/dist/src/commands/stream/StreamApp.js +127 -0
- package/dist/src/commands/stream/StreamApp.js.map +1 -0
- package/dist/src/commands/stream.js +43 -8
- package/dist/src/commands/stream.js.map +1 -1
- package/dist/src/commands/test/TestRunApp.js +183 -0
- package/dist/src/commands/test/TestRunApp.js.map +1 -0
- package/dist/src/commands/test.js +97 -0
- package/dist/src/commands/test.js.map +1 -1
- package/dist/src/lib/agent-orchestrator.js +5 -0
- package/dist/src/lib/agent-orchestrator.js.map +1 -1
- package/dist/src/lib/local-tools/ui/playwright-mcp.js +1 -1
- package/dist/src/lib/tui/ink/theme.js +21 -0
- package/dist/src/lib/tui/ink/theme.js.map +1 -0
- package/package.json +8 -5
- package/dist/src/commands/ask/AskApp.js +0 -121
- package/dist/src/commands/ask/AskApp.js.map +0 -1
- package/dist/src/commands/ask/components/AssistantResponse.js +0 -31
- package/dist/src/commands/ask/components/AssistantResponse.js.map +0 -1
- package/dist/src/commands/ask/components/Banner.js +0 -15
- package/dist/src/commands/ask/components/Banner.js.map +0 -1
- package/dist/src/commands/ask/components/ChatInput.js +0 -93
- package/dist/src/commands/ask/components/ChatInput.js.map +0 -1
- package/dist/src/commands/ask/components/Divider.js +0 -17
- package/dist/src/commands/ask/components/Divider.js.map +0 -1
- package/dist/src/commands/ask/components/IntroTips.js +0 -19
- package/dist/src/commands/ask/components/IntroTips.js.map +0 -1
- package/dist/src/commands/ask/components/MessageBubble.js +0 -47
- package/dist/src/commands/ask/components/MessageBubble.js.map +0 -1
- package/dist/src/commands/ask/components/SessionInfo.js +0 -20
- package/dist/src/commands/ask/components/SessionInfo.js.map +0 -1
- package/dist/src/commands/ask/components/StatusIndicator.js +0 -67
- package/dist/src/commands/ask/components/StatusIndicator.js.map +0 -1
- package/dist/src/commands/ask-ink.js +0 -380
- package/dist/src/commands/ask-ink.js.map +0 -1
- package/dist/src/commands/ask.js +0 -991
- package/dist/src/commands/ask.js.map +0 -1
- package/dist/src/commands/chat/components/Divider.js +0 -7
- package/dist/src/commands/chat/components/Divider.js.map +0 -1
- package/dist/src/commands/chat/components/SessionInfo.js +0 -11
- package/dist/src/commands/chat/components/SessionInfo.js.map +0 -1
- package/dist/src/commands/chat.js +0 -82
- package/dist/src/commands/chat.js.map +0 -1
- package/dist/src/lib/legacy-chat-runner.js +0 -37
- package/dist/src/lib/legacy-chat-runner.js.map +0 -1
- package/dist/src/lib/local-tools/ui/click-element.js +0 -105
- package/dist/src/lib/local-tools/ui/click-element.js.map +0 -1
- package/dist/src/lib/local-tools/ui/dom-rag.js +0 -201
- package/dist/src/lib/local-tools/ui/dom-rag.js.map +0 -1
- package/dist/src/lib/local-tools/ui/find-element.js +0 -31
- package/dist/src/lib/local-tools/ui/find-element.js.map +0 -1
- package/dist/src/lib/local-tools/ui/hover-element.js +0 -94
- package/dist/src/lib/local-tools/ui/hover-element.js.map +0 -1
- package/dist/src/lib/local-tools/ui/manage-tab.js +0 -65
- package/dist/src/lib/local-tools/ui/manage-tab.js.map +0 -1
- package/dist/src/lib/local-tools/ui/navigate.js +0 -35
- package/dist/src/lib/local-tools/ui/navigate.js.map +0 -1
- package/dist/src/lib/local-tools/ui/page-discovery.js +0 -32
- package/dist/src/lib/local-tools/ui/page-discovery.js.map +0 -1
- package/dist/src/lib/local-tools/ui/screenshot.js +0 -19
- package/dist/src/lib/local-tools/ui/screenshot.js.map +0 -1
- package/dist/src/lib/local-tools/ui/search-interactive-elements.js +0 -18
- package/dist/src/lib/local-tools/ui/search-interactive-elements.js.map +0 -1
- package/dist/src/lib/local-tools/ui/selector-resolver.js +0 -153
- package/dist/src/lib/local-tools/ui/selector-resolver.js.map +0 -1
- package/dist/src/lib/local-tools/ui/type-text.js +0 -40
- package/dist/src/lib/local-tools/ui/type-text.js.map +0 -1
- package/dist/src/lib/tui/components/AskIntro.js +0 -6
- package/dist/src/lib/tui/components/AskIntro.js.map +0 -1
- package/dist/src/lib/tui/components/Banner.js +0 -15
- package/dist/src/lib/tui/components/Banner.js.map +0 -1
- package/dist/src/lib/tui/components/Divider.js +0 -17
- package/dist/src/lib/tui/components/Divider.js.map +0 -1
- package/dist/src/lib/tui/components/EventLine.js +0 -110
- package/dist/src/lib/tui/components/EventLine.js.map +0 -1
- package/dist/src/lib/tui/components/Header.js +0 -15
- package/dist/src/lib/tui/components/Header.js.map +0 -1
- package/dist/src/lib/tui/components/InputBox.js +0 -9
- package/dist/src/lib/tui/components/InputBox.js.map +0 -1
- package/dist/src/lib/tui/components/Mapping.js +0 -8
- package/dist/src/lib/tui/components/Mapping.js.map +0 -1
- package/dist/src/lib/tui/components/ProjectList.js +0 -6
- package/dist/src/lib/tui/components/ProjectList.js.map +0 -1
- package/dist/src/lib/tui/components/Spinner.js +0 -20
- package/dist/src/lib/tui/components/Spinner.js.map +0 -1
- package/dist/src/lib/tui/components/StatusBanner.js +0 -12
- package/dist/src/lib/tui/components/StatusBanner.js.map +0 -1
- package/dist/src/lib/tui/components/StatusBar.js +0 -11
- package/dist/src/lib/tui/components/StatusBar.js.map +0 -1
- package/dist/src/lib/tui/components/UserBubble.js +0 -6
- package/dist/src/lib/tui/components/UserBubble.js.map +0 -1
- package/dist/src/lib/tui/components/index.js +0 -16
- package/dist/src/lib/tui/components/index.js.map +0 -1
- package/dist/src/lib/tui/ink-print.js +0 -41
- package/dist/src/lib/tui/ink-print.js.map +0 -1
- package/dist/src/test-agent-flow.js +0 -148
- package/dist/src/test-agent-flow.js.map +0 -1
- package/dist/src/test-browser-session.js +0 -152
- package/dist/src/test-browser-session.js.map +0 -1
- package/dist/src/test-browser-snapshot.js +0 -187
- package/dist/src/test-browser-snapshot.js.map +0 -1
- package/dist/src/test-snapshot-detailed.js +0 -219
- package/dist/src/test-snapshot-detailed.js.map +0 -1
- package/dist/src/test-snapshot-simple.js +0 -85
- package/dist/src/test-snapshot-simple.js.map +0 -1
- package/dist/src/test-snapshot-tabs.js +0 -110
- package/dist/src/test-snapshot-tabs.js.map +0 -1
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import chalk from "chalk";
|
|
4
|
-
import { icons } from "../icons.js";
|
|
5
|
-
import { formatTimestamp, sanitizeText, isPlainObject } from "../utils.js";
|
|
6
|
-
// Event metadata mapping
|
|
7
|
-
const EVENT_META = {
|
|
8
|
-
session_started: { icon: icons.start, label: "session_started", color: "white" },
|
|
9
|
-
session_progress: { icon: icons.progress, label: "progress", color: "cyan" },
|
|
10
|
-
session_completed: { icon: icons.done, label: "completed", color: "green" },
|
|
11
|
-
session_error: { icon: icons.fail, label: "error", color: "red" },
|
|
12
|
-
browser_initialized: { icon: icons.browser, label: "browser", color: "cyan" },
|
|
13
|
-
page_discovered: { icon: icons.page, label: "pages", color: "cyan" },
|
|
14
|
-
page_processing: { icon: icons.page, label: "page", color: "cyan" },
|
|
15
|
-
screenshot_captured: { icon: icons.camera, label: "screenshot", color: "cyan" },
|
|
16
|
-
screenshot_with_analysis: { icon: icons.camera, label: "screenshot", color: "cyan" },
|
|
17
|
-
ai_analysis_started: { icon: icons.brain, label: "analysis", color: "magenta" },
|
|
18
|
-
ai_analysis_completed: { icon: icons.brain, label: "analysis", color: "magenta" },
|
|
19
|
-
page_analyzed: { icon: icons.brain, label: "analysis", color: "magenta" },
|
|
20
|
-
test_cases_generated: { icon: icons.cases, label: "test_cases", color: "magenta" },
|
|
21
|
-
agent_thinking_started: { icon: icons.exec, label: "agent_think", color: "magenta" },
|
|
22
|
-
session_stopped: { icon: icons.warn, label: "stopped", color: "yellow" },
|
|
23
|
-
test_case_execution_started: { icon: icons.exec, label: "test_case", color: "cyan" },
|
|
24
|
-
test_case_execution_completed: { icon: icons.exec, label: "test_case", color: "cyan" },
|
|
25
|
-
test_step_execution: { icon: icons.exec, label: "test_step", color: "cyan" },
|
|
26
|
-
test_step_screenshot: { icon: icons.camera, label: "step_shot", color: "cyan" },
|
|
27
|
-
user_input_required: { icon: icons.user, label: "user_input", color: "yellow" },
|
|
28
|
-
user_input_provided: { icon: icons.user, label: "user_input", color: "green" },
|
|
29
|
-
user_input_acknowledged: { icon: icons.user, label: "user_input", color: "green" },
|
|
30
|
-
user_input_timeout: { icon: icons.warn, label: "user_input", color: "red" },
|
|
31
|
-
user_input_cancelled: { icon: icons.warn, label: "user_input", color: "red" },
|
|
32
|
-
agent_thinking_stopped: { icon: icons.think, label: "agent", color: "magenta" },
|
|
33
|
-
agent_thought: { icon: icons.think, label: "agent", color: "magenta" },
|
|
34
|
-
agent_plan_generated: { icon: icons.plan, label: "agent_plan", color: "magenta" },
|
|
35
|
-
agent_tool_start: { icon: icons.tool, label: "agent_tool", color: "magenta" },
|
|
36
|
-
agent_tool_result: { icon: icons.tool, label: "agent_tool", color: "magenta" },
|
|
37
|
-
agent_step_completed: { icon: icons.plan, label: "agent_step", color: "magenta" },
|
|
38
|
-
agent_recovery_attempt: { icon: icons.warn, label: "agent_recovery", color: "yellow" },
|
|
39
|
-
agent_error: { icon: icons.fail, label: "agent_error", color: "red" },
|
|
40
|
-
browser_stream_started: { icon: icons.browser, label: "browser_stream", color: "cyan" },
|
|
41
|
-
browser_stream_stopped: { icon: icons.browser, label: "browser_stream", color: "cyan" },
|
|
42
|
-
subscription_confirmed: { icon: icons.info, label: "subscription", color: "white" },
|
|
43
|
-
subscription_removed: { icon: icons.info, label: "subscription", color: "white" },
|
|
44
|
-
error: { icon: icons.fail, label: "error", color: "red" },
|
|
45
|
-
stats_response: { icon: icons.info, label: "stats", color: "gray" },
|
|
46
|
-
pong: { icon: icons.info, label: "pong", color: "white" },
|
|
47
|
-
thinking_started: { icon: icons.think, label: "ask", color: "magenta" },
|
|
48
|
-
thinking_stopped: { icon: icons.think, label: "ask", color: "magenta" },
|
|
49
|
-
tool_start: { icon: icons.tool, label: "ask_tool", color: "magenta" },
|
|
50
|
-
tool_result: { icon: icons.tool, label: "ask_tool", color: "magenta" },
|
|
51
|
-
agent_answer: { icon: icons.plan, label: "ask_answer", color: "magenta" },
|
|
52
|
-
user_message: { icon: icons.info, label: "ask_user", color: "white" },
|
|
53
|
-
};
|
|
54
|
-
export function EventLine({ type, payload }) {
|
|
55
|
-
const base = isPlainObject(payload) ? payload : {};
|
|
56
|
-
const candidateData = isPlainObject(base.data)
|
|
57
|
-
? base.data
|
|
58
|
-
: isPlainObject(payload) && !("data" in payload)
|
|
59
|
-
? payload
|
|
60
|
-
: {};
|
|
61
|
-
const eventData = isPlainObject(candidateData) ? candidateData : {};
|
|
62
|
-
const derivedType = typeof type === "string" && type.trim().length > 0
|
|
63
|
-
? type
|
|
64
|
-
: typeof base.type === "string"
|
|
65
|
-
? base.type
|
|
66
|
-
: typeof eventData.type === "string"
|
|
67
|
-
? eventData.type
|
|
68
|
-
: "";
|
|
69
|
-
const normalizedType = derivedType.toLowerCase();
|
|
70
|
-
const descriptor = EVENT_META[normalizedType] ||
|
|
71
|
-
{ icon: icons.info, label: normalizedType || "event", color: "white" };
|
|
72
|
-
const timestamp = formatTimestamp(base.timestamp);
|
|
73
|
-
const sessionIds = isPlainObject(base.ids)
|
|
74
|
-
? base.ids
|
|
75
|
-
: {};
|
|
76
|
-
const sanitizeId = (value) => sanitizeText(value, { maxLength: 48 }) || "";
|
|
77
|
-
// Build badge parts
|
|
78
|
-
const badgeParts = [];
|
|
79
|
-
const testId = sanitizeId(sessionIds.test_id ?? base.test_id ?? eventData.test_id);
|
|
80
|
-
if (testId)
|
|
81
|
-
badgeParts.push(`#${testId}`);
|
|
82
|
-
const conversationId = sanitizeId(sessionIds.conversation_id ?? base.conversation_id);
|
|
83
|
-
if (conversationId)
|
|
84
|
-
badgeParts.push(`ask:${conversationId}`);
|
|
85
|
-
const subagentId = sanitizeId(sessionIds.subagent_id ?? base.subagent_id);
|
|
86
|
-
if (subagentId)
|
|
87
|
-
badgeParts.push(`sub:${subagentId}`);
|
|
88
|
-
// Render the event line
|
|
89
|
-
return (_jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: timestamp }), _jsxs(Text, { children: [" ", descriptor.icon, " "] }), _jsx(Text, { color: descriptor.color, children: descriptor.label }), badgeParts.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsxs(Text, { dimColor: true, children: ["[", badgeParts.join(" "), "]"] })] })), eventData.message && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { children: sanitizeText(eventData.message, { maxLength: 120 }) })] }))] }));
|
|
90
|
-
}
|
|
91
|
-
// Export function for backward compatibility with existing console.log patterns
|
|
92
|
-
export function formatEventLines(type, payload) {
|
|
93
|
-
// This is a simplified version that returns formatted strings
|
|
94
|
-
// For full functionality, the original events.ts logic should be used
|
|
95
|
-
const base = isPlainObject(payload) ? payload : {};
|
|
96
|
-
const eventData = isPlainObject(base.data) ? base.data : {};
|
|
97
|
-
const normalizedType = type.toLowerCase();
|
|
98
|
-
const descriptor = EVENT_META[normalizedType] || {
|
|
99
|
-
icon: icons.info,
|
|
100
|
-
label: normalizedType || "event",
|
|
101
|
-
color: "white",
|
|
102
|
-
};
|
|
103
|
-
const timestamp = formatTimestamp(base.timestamp);
|
|
104
|
-
const message = eventData.message || "";
|
|
105
|
-
const colorFn = chalk[descriptor.color] || chalk.white;
|
|
106
|
-
return [
|
|
107
|
-
`${chalk.dim(timestamp)} ${descriptor.icon} ${colorFn(descriptor.label)} ${message}`,
|
|
108
|
-
];
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=EventLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventLine.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/EventLine.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,eAAe,EAAE,YAAY,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAEzE,yBAAyB;AACzB,MAAM,UAAU,GAGZ;IACF,eAAe,EAAE,EAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAC;IAC9E,gBAAgB,EAAE,EAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAC;IAC1E,iBAAiB,EAAE,EAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAC;IACzE,aAAa,EAAE,EAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC;IAC/D,mBAAmB,EAAE,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAC;IAC3E,eAAe,EAAE,EAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAC;IAClE,eAAe,EAAE,EAAC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AChC,KAAK,EAAE,OAAO;KACf,CAAC;IAEF,MAAM,SAAS,GAAG,eAAe,CAAE,IAAY,CAAC,SAAS,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,IAAI,EAAE,CAAC;IAExC,MAAM,OAAO,GAAI,KAAa,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC;IAChE,OAAO;QACL,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE;KACrF,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { stripAnsi } from "../utils.js";
|
|
4
|
-
export function Header({ title, subtitles = [] }) {
|
|
5
|
-
const lines = [title, ...subtitles];
|
|
6
|
-
const maxLen = Math.max(...lines.map((l) => stripAnsi(l).length));
|
|
7
|
-
const width = Math.min(Math.max(maxLen + 4, 28), 80);
|
|
8
|
-
const borderLine = "─".repeat(width - 2);
|
|
9
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "gray", children: ["\u250C", borderLine, "\u2510"] }), lines.map((line, i) => {
|
|
10
|
-
const pad = width - 2 - stripAnsi(line).length;
|
|
11
|
-
const padding = " ".repeat(Math.max(0, pad - 1));
|
|
12
|
-
return (_jsxs(Text, { children: [_jsx(Text, { color: "gray", children: "\u2502" }), " ", line, padding, _jsx(Text, { color: "gray", children: "\u2502" })] }, i));
|
|
13
|
-
}), _jsxs(Text, { color: "gray", children: ["\u2514", borderLine, "\u2518"] })] }));
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["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,CAML,CACR,CAAC;YACJ,CAAC,CAAC,EACF,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,uBAAG,UAAU,cAAS,IACpC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { stripAnsi } from "../utils.js";
|
|
4
|
-
export function InputBox({ placeholder }) {
|
|
5
|
-
const width = Math.min(Math.max(stripAnsi(placeholder).length + 8, 32), 80);
|
|
6
|
-
const borderLine = "─".repeat(width - 2);
|
|
7
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "gray", children: ["\u250C", borderLine, "\u2510"] }), _jsxs(Text, { children: [" ", _jsx(Text, { color: "cyan", children: ">" }), " ", _jsx(Text, { dimColor: true, children: placeholder })] }), _jsxs(Text, { color: "gray", children: ["\u2514", borderLine, "\u2518"] })] }));
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=InputBox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputBox.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/InputBox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAMtC,MAAM,UAAU,QAAQ,CAAC,EAAC,WAAW,EAAgB;IACnD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5E,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAEzC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,uBAAG,UAAU,cAAS,EACxC,MAAC,IAAI,eACF,IAAI,EACL,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,GAAG,GAAQ,OAAC,KAAC,IAAI,IAAC,QAAQ,kBAAE,WAAW,GAAQ,IAC9D,EACP,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,uBAAG,UAAU,cAAS,IACpC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from "ink";
|
|
3
|
-
import { icons } from "../icons.js";
|
|
4
|
-
export function Mapping({ title, from, to }) {
|
|
5
|
-
const timestamp = new Date().toISOString().slice(11, 19);
|
|
6
|
-
return (_jsxs(Text, { children: [_jsxs(Text, { dimColor: true, children: ["[", timestamp, "]"] }), " ", icons.tunnel, " ", _jsx(Text, { color: "gray", children: title }), " ", from, " ", _jsx(Text, { color: "gray", children: "\u2192" }), " ", _jsx(Text, { color: "cyan", children: to })] }));
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=Mapping.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mapping.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/Mapping.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAQlC,MAAM,UAAU,OAAO,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAe;IACrD,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEzD,OAAO,CACL,MAAC,IAAI,eACH,MAAC,IAAI,IAAC,QAAQ,wBAAG,SAAS,SAAS,OAAE,KAAK,CAAC,MAAM,OAAE,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,KAAK,GAAQ,EAAC,GAAG,EACvF,IAAI,OAAE,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,uBAAS,OAAC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,EAAE,GAAQ,IAC5D,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
export function ProjectList({ projects }) {
|
|
4
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Available Projects:" }), projects.map((project, idx) => (_jsxs(Text, { children: [idx + 1, ". ", project.name, " ", _jsxs(Text, { dimColor: true, children: ["(ID: ", project.id, ")"] })] }, project.id)))] }));
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=ProjectList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectList.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/ProjectList.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAY9B,MAAM,UAAU,WAAW,CAAC,EAAC,QAAQ,EAAmB;IACtD,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,KAAC,IAAI,IAAC,IAAI,0CAA2B,EACpC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,CAC9B,MAAC,IAAI,eACF,GAAG,GAAG,CAAC,QAAI,OAAO,CAAC,IAAI,OAAE,MAAC,IAAI,IAAC,QAAQ,4BAAO,OAAO,CAAC,EAAE,SAAS,KADzD,OAAO,CAAC,EAAE,CAEd,CACR,CAAC,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
|
-
import { Box, Text } from "ink";
|
|
4
|
-
const spinnerFrames = {
|
|
5
|
-
dots: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
|
|
6
|
-
line: ["-", "\\", "|", "/"],
|
|
7
|
-
dots2: ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"],
|
|
8
|
-
};
|
|
9
|
-
export function Spinner({ text, type = "dots" }) {
|
|
10
|
-
const [frame, setFrame] = useState(0);
|
|
11
|
-
const frames = spinnerFrames[type];
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
const timer = setInterval(() => {
|
|
14
|
-
setFrame((prev) => (prev + 1) % frames.length);
|
|
15
|
-
}, 80);
|
|
16
|
-
return () => clearInterval(timer);
|
|
17
|
-
}, [frames.length]);
|
|
18
|
-
return (_jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: frames[frame] }), text && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { children: text })] }))] }));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=Spinner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/Spinner.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAO9B,MAAM,aAAa,GAAG;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACxD,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC;IAC3B,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;CAChD,CAAC;AAEF,MAAM,UAAU,OAAO,CAAC,EAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAe;IACzD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;YAC7B,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACjD,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAEpB,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,MAAM,CAAC,KAAK,CAAC,GAAQ,EACxC,IAAI,IAAI,CACP,8BACE,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,cAAE,IAAI,GAAQ,IAClB,CACJ,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
export function StatusBanner({ message, tone = "info" }) {
|
|
4
|
-
const palette = {
|
|
5
|
-
info: "cyan",
|
|
6
|
-
success: "green",
|
|
7
|
-
warn: "yellow",
|
|
8
|
-
};
|
|
9
|
-
const color = palette[tone];
|
|
10
|
-
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: _jsxs(Text, { children: [_jsx(Text, { color: color, children: "\u25CF" }), " ", message] }) }));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=StatusBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBanner.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/StatusBanner.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAO9B,MAAM,UAAU,YAAY,CAAC,EAAC,OAAO,EAAE,IAAI,GAAG,MAAM,EAAoB;IACtE,MAAM,OAAO,GAAG;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,QAAQ;KACN,CAAC;IAEX,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,YACzC,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,uBAAU,OAAE,OAAO,IAChC,GACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Box, Text } from "ink";
|
|
4
|
-
import { accentText } from "../style.js";
|
|
5
|
-
export function StatusBar({ segments }) {
|
|
6
|
-
return (_jsx(Box, { children: segments.map((seg, i) => (_jsxs(React.Fragment, { children: [i > 0 && _jsx(Text, { color: "gray", children: " \u00B7 " }), _jsx(Text, { color: "gray", children: seg.label }), _jsx(Text, { children: " " }), seg.accent ? (_jsx(Text, { children: accentText(seg.value) })) : (_jsx(Text, { children: seg.value }))] }, i))) }));
|
|
7
|
-
}
|
|
8
|
-
export function StatusSegments({ segments }) {
|
|
9
|
-
return _jsx(StatusBar, { segments: segments });
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=StatusBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/StatusBar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAYvC,MAAM,UAAU,SAAS,CAAC,EAAC,QAAQ,EAAiB;IAClD,OAAO,CACL,KAAC,GAAG,cACD,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACxB,MAAC,KAAK,CAAC,QAAQ,eACZ,CAAC,GAAG,CAAC,IAAI,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,yBAAW,EACvC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,GAAG,CAAC,KAAK,GAAQ,EACrC,KAAC,IAAI,oBAAS,EACb,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CACZ,KAAC,IAAI,cAAE,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,GAAQ,CACrC,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,cAAE,GAAG,CAAC,KAAK,GAAQ,CACzB,KARkB,CAAC,CASL,CAClB,CAAC,GACE,CACP,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,cAAc,CAAC,EAAC,QAAQ,EAAsB;IAC5D,OAAO,KAAC,SAAS,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAAC;AAC3C,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
export function UserBubble({ message }) {
|
|
4
|
-
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: _jsxs(Text, { children: [_jsx(Text, { color: "yellow", children: ">" }), " ", _jsx(Text, { color: "gray", children: message })] }) }));
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=UserBubble.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserBubble.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/UserBubble.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAM9B,MAAM,UAAU,UAAU,CAAC,EAAC,OAAO,EAAkB;IACnD,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,YACzC,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,YAAE,GAAG,GAAQ,OAAC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,OAAO,GAAQ,IAChE,GACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Core display components
|
|
2
|
-
export { Header } from "./Header.js";
|
|
3
|
-
export { Banner } from "./Banner.js";
|
|
4
|
-
export { Divider } from "./Divider.js";
|
|
5
|
-
export { StatusBanner } from "./StatusBanner.js";
|
|
6
|
-
export { UserBubble } from "./UserBubble.js";
|
|
7
|
-
export { InputBox } from "./InputBox.js";
|
|
8
|
-
export { Mapping } from "./Mapping.js";
|
|
9
|
-
export { AskIntro } from "./AskIntro.js";
|
|
10
|
-
// Interactive components
|
|
11
|
-
export { ProjectList } from "./ProjectList.js";
|
|
12
|
-
export { StatusBar, StatusSegments } from "./StatusBar.js";
|
|
13
|
-
export { Spinner } from "./Spinner.js";
|
|
14
|
-
// Event components
|
|
15
|
-
export { EventLine, formatEventLines } from "./EventLine.js";
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/tui/components/index.tsx"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,yBAAyB;AACzB,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAErC,mBAAmB;AACnB,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { render } from "ink";
|
|
3
|
-
import { Header, Banner, Divider, StatusBanner, UserBubble, InputBox, Mapping, AskIntro, } from "./components/index.js";
|
|
4
|
-
/**
|
|
5
|
-
* Render utilities for Ink components
|
|
6
|
-
* These functions provide a simple API similar to the old console.log-based print functions
|
|
7
|
-
*/
|
|
8
|
-
export function printHeader(title, subtitleLines = []) {
|
|
9
|
-
const { unmount, waitUntilExit } = render(_jsx(Header, { title: title, subtitles: subtitleLines }));
|
|
10
|
-
// Give Ink a moment to render before unmounting
|
|
11
|
-
setTimeout(() => unmount(), 10);
|
|
12
|
-
}
|
|
13
|
-
export function printBanner() {
|
|
14
|
-
const { unmount } = render(_jsx(Banner, {}));
|
|
15
|
-
setTimeout(() => unmount(), 10);
|
|
16
|
-
}
|
|
17
|
-
export function printDivider(label, width = 64) {
|
|
18
|
-
const { unmount } = render(_jsx(Divider, { label: label, width: width }));
|
|
19
|
-
setTimeout(() => unmount(), 10);
|
|
20
|
-
}
|
|
21
|
-
export function printStatusBanner(message, tone = "info") {
|
|
22
|
-
const { unmount } = render(_jsx(StatusBanner, { message: message, tone: tone }));
|
|
23
|
-
setTimeout(() => unmount(), 10);
|
|
24
|
-
}
|
|
25
|
-
export function printUserBubble(message) {
|
|
26
|
-
const { unmount } = render(_jsx(UserBubble, { message: message }));
|
|
27
|
-
setTimeout(() => unmount(), 10);
|
|
28
|
-
}
|
|
29
|
-
export function printInputBox(placeholder) {
|
|
30
|
-
const { unmount } = render(_jsx(InputBox, { placeholder: placeholder }));
|
|
31
|
-
setTimeout(() => unmount(), 10);
|
|
32
|
-
}
|
|
33
|
-
export function printMapping(title, from, to) {
|
|
34
|
-
const { unmount } = render(_jsx(Mapping, { title: title, from: from, to: to }));
|
|
35
|
-
setTimeout(() => unmount(), 10);
|
|
36
|
-
}
|
|
37
|
-
export function printAskIntro(lines = []) {
|
|
38
|
-
const { unmount } = render(_jsx(AskIntro, { lines: lines }));
|
|
39
|
-
setTimeout(() => unmount(), 10);
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=ink-print.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ink-print.js","sourceRoot":"","sources":["../../../../src/lib/tui/ink-print.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,MAAM,EAAC,MAAM,KAAK,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AAEH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,gBAA0B,EAAE;IACrE,MAAM,EAAC,OAAO,EAAE,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CAAC,KAAC,QAAQ,IAAC,WAAW,EAAE,WAAW,GAAI,CAAC,CAAC;IACjE,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,IAAY,EAAE,EAAU;IAClE,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,CAAC,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,GAAI,CAAC,CAAC;IACxE,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAkB,EAAE;IAChD,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC;IACrD,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test script for full agent flow with browser session
|
|
3
|
-
* Tests the complete workflow: browser session -> navigation -> UI interactions
|
|
4
|
-
*/
|
|
5
|
-
import { ToolExecutor } from "./lib/tool-executor.js";
|
|
6
|
-
import chalk from "chalk";
|
|
7
|
-
async function testAgentFlow() {
|
|
8
|
-
console.log(chalk.blue("🤖 Testing Full Agent Flow: 'open localhost 3000'\n"));
|
|
9
|
-
const executor = new ToolExecutor({
|
|
10
|
-
testingMode: "ui",
|
|
11
|
-
});
|
|
12
|
-
const testResults = [];
|
|
13
|
-
try {
|
|
14
|
-
// Step 1: Start browser session
|
|
15
|
-
console.log(chalk.yellow("Step 1: Starting browser session..."));
|
|
16
|
-
const startResult = await executor.execute({
|
|
17
|
-
name: "browser_session",
|
|
18
|
-
arguments: {
|
|
19
|
-
action: "start",
|
|
20
|
-
viewport: { width: 1280, height: 800 },
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
testResults.push({ step: "Start Browser", ...startResult });
|
|
24
|
-
console.log("Result:", JSON.stringify(startResult, null, 2));
|
|
25
|
-
if (startResult.success) {
|
|
26
|
-
console.log(chalk.green("✅ Browser session started successfully"));
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
console.log(chalk.red("❌ Failed to start browser session:"), startResult.error);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
// Wait for browser to initialize
|
|
33
|
-
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
34
|
-
// Step 2: Navigate to localhost:3000
|
|
35
|
-
console.log(chalk.yellow("\nStep 2: Navigating to localhost:3000..."));
|
|
36
|
-
const navigateResult = await executor.execute({
|
|
37
|
-
name: "browser_navigate",
|
|
38
|
-
arguments: {
|
|
39
|
-
url: "http://localhost:3000",
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
testResults.push({ step: "Navigate to localhost:3000", ...navigateResult });
|
|
43
|
-
console.log("Result:", JSON.stringify(navigateResult, null, 2));
|
|
44
|
-
if (navigateResult.success) {
|
|
45
|
-
console.log(chalk.green("✅ Successfully navigated to localhost:3000"));
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
console.log(chalk.red("❌ Failed to navigate to localhost:3000:"), navigateResult.error);
|
|
49
|
-
}
|
|
50
|
-
// Wait for page to load
|
|
51
|
-
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
52
|
-
// Step 3: Take a screenshot to see what's on the page
|
|
53
|
-
console.log(chalk.yellow("\nStep 3: Taking screenshot to see the page..."));
|
|
54
|
-
const screenshotResult = await executor.execute({
|
|
55
|
-
name: "browser_take_screenshot",
|
|
56
|
-
arguments: {},
|
|
57
|
-
});
|
|
58
|
-
testResults.push({ step: "Take Screenshot", ...screenshotResult });
|
|
59
|
-
console.log("Result:", JSON.stringify(screenshotResult, null, 2));
|
|
60
|
-
if (screenshotResult.success) {
|
|
61
|
-
console.log(chalk.green("✅ Screenshot taken successfully"));
|
|
62
|
-
if (screenshotResult.screenshot) {
|
|
63
|
-
console.log(chalk.blue("📸 Screenshot data available"));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
console.log(chalk.red("❌ Failed to take screenshot:"), screenshotResult.error);
|
|
68
|
-
}
|
|
69
|
-
// Step 4: Get page snapshot to understand the structure
|
|
70
|
-
console.log(chalk.yellow("\nStep 4: Getting page snapshot..."));
|
|
71
|
-
const snapshotResult = await executor.execute({
|
|
72
|
-
name: "browser_snapshot",
|
|
73
|
-
arguments: {},
|
|
74
|
-
});
|
|
75
|
-
testResults.push({ step: "Get Page Snapshot", ...snapshotResult });
|
|
76
|
-
console.log("Result:", JSON.stringify(snapshotResult, null, 2));
|
|
77
|
-
if (snapshotResult.success) {
|
|
78
|
-
console.log(chalk.green("✅ Page snapshot retrieved successfully"));
|
|
79
|
-
if (snapshotResult.sections?.pageState) {
|
|
80
|
-
console.log(chalk.blue("📋 Page state available for analysis"));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
console.log(chalk.red("❌ Failed to get page snapshot:"), snapshotResult.error);
|
|
85
|
-
}
|
|
86
|
-
// Step 5: Try to interact with the page (look for common elements)
|
|
87
|
-
console.log(chalk.yellow("\nStep 5: Looking for interactive elements..."));
|
|
88
|
-
// Try to find and click a button if available
|
|
89
|
-
const clickResult = await executor.execute({
|
|
90
|
-
name: "browser_click",
|
|
91
|
-
arguments: {
|
|
92
|
-
element: "any button",
|
|
93
|
-
ref: "1", // Try first element
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
testResults.push({ step: "Try to Click Element", ...clickResult });
|
|
97
|
-
console.log("Result:", JSON.stringify(clickResult, null, 2));
|
|
98
|
-
if (clickResult.success) {
|
|
99
|
-
console.log(chalk.green("✅ Successfully clicked an element"));
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
console.log(chalk.yellow("⚠️ No clickable elements found or click failed (this is normal for some pages)"));
|
|
103
|
-
}
|
|
104
|
-
// Step 6: Stop browser session
|
|
105
|
-
console.log(chalk.yellow("\nStep 6: Stopping browser session..."));
|
|
106
|
-
const stopResult = await executor.execute({
|
|
107
|
-
name: "browser_session",
|
|
108
|
-
arguments: {
|
|
109
|
-
action: "stop",
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
testResults.push({ step: "Stop Browser", ...stopResult });
|
|
113
|
-
console.log("Result:", JSON.stringify(stopResult, null, 2));
|
|
114
|
-
if (stopResult.success) {
|
|
115
|
-
console.log(chalk.green("✅ Browser session stopped successfully"));
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
console.log(chalk.red("❌ Failed to stop browser session:"), stopResult.error);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
catch (error) {
|
|
122
|
-
console.error(chalk.red("❌ Test failed with error:"), error);
|
|
123
|
-
testResults.push({ step: "Error", success: false, error: String(error) });
|
|
124
|
-
}
|
|
125
|
-
// Summary
|
|
126
|
-
console.log(chalk.blue("\n📊 Test Summary:"));
|
|
127
|
-
console.log("==================");
|
|
128
|
-
testResults.forEach((result, index) => {
|
|
129
|
-
const status = result.success ? "✅ PASS" : "❌ FAIL";
|
|
130
|
-
const color = result.success ? chalk.green : chalk.red;
|
|
131
|
-
console.log(color(`${status} - Step ${index + 1}: ${result.step}`));
|
|
132
|
-
if (!result.success && result.error) {
|
|
133
|
-
console.log(chalk.gray(` Error: ${result.error}`));
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
const successCount = testResults.filter(r => r.success).length;
|
|
137
|
-
const totalCount = testResults.length;
|
|
138
|
-
console.log(chalk.blue(`\n🎯 Overall: ${successCount}/${totalCount} steps completed successfully`));
|
|
139
|
-
if (successCount === totalCount) {
|
|
140
|
-
console.log(chalk.green("🎉 All tests passed! Agent flow is working correctly."));
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
console.log(chalk.yellow("⚠️ Some tests failed. Check the errors above."));
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
// Run the test
|
|
147
|
-
testAgentFlow().catch(console.error);
|
|
148
|
-
//# sourceMappingURL=test-agent-flow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-agent-flow.js","sourceRoot":"","sources":["../../src/test-agent-flow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,KAAK,UAAU,aAAa;IAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC,CAAC;IAE/E,MAAM,QAAQ,GAAG,IAAI,YAAY,CAAC;QAChC,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IAEH,MAAM,WAAW,GAAiB,EAAE,CAAC;IAErC,IAAI,CAAC;QACH,gCAAgC;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,qCAAqC,CAAC,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC;YACzC,IAAI,EAAE,iBAAiB;YACvB,SAAS,EAAE;gBACT,MAAM,EAAE,OAAO;gBACf,QAAQ,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAC;aACrC;SACF,CAAe,CAAC;QAEjB,WAAW,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,eAAe,EAAE,GAAG,WAAW,EAAC,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAE7D,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,KAAK,C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