@runflow-ai/cli 0.2.11 → 0.2.13
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/CLI-DOCS.md +89 -0
- package/QUICK-TEST-GUIDE.md +273 -0
- package/dist/commands/test/test.command.d.ts +19 -12
- package/dist/commands/test/test.command.js +703 -212
- package/dist/commands/test/test.command.js.map +1 -1
- package/package.json +3 -2
- package/static/dist-test/assets/favico.avif +0 -0
- package/static/dist-test/assets/logo_runflow_positive.png +0 -0
- package/static/dist-test/assets/main-ClrC9fUE.css +1 -0
- package/static/dist-test/assets/main-rM2NnEnW.js +53 -0
- package/static/dist-test/assets/runflow-logo.png +0 -0
- package/static/dist-test/index-test.html +16 -0
- package/static/dist-test/widget/runflow-widget.js +221 -0
- package/static/app.js +0 -1381
- package/static/frontend-server-template.js +0 -24
- package/static/index.html +0 -340
- package/static/style.css +0 -1354
- package/static/test-server-template.js +0 -641
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const express = require('express');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const app = express();
|
|
5
|
-
|
|
6
|
-
// Configuração será injetada pela CLI
|
|
7
|
-
const CONFIG = {
|
|
8
|
-
port: process.env.RUNFLOW_FRONTEND_PORT || 9547,
|
|
9
|
-
staticDir: process.env.RUNFLOW_STATIC_DIR || './static'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
app.use(express.static(CONFIG.staticDir));
|
|
13
|
-
|
|
14
|
-
app.get('*', (req, res) => {
|
|
15
|
-
res.sendFile(path.join(CONFIG.staticDir, 'index.html'));
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
app.listen(CONFIG.port, () => {
|
|
19
|
-
console.log('🎨 Frontend server running on port', CONFIG.port);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
process.on('SIGINT', () => {
|
|
23
|
-
process.exit(0);
|
|
24
|
-
});
|
package/static/index.html
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="light">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Runflow Test Interface | Developer Tools</title>
|
|
7
|
-
<link rel="stylesheet" href="style.css">
|
|
8
|
-
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect width=%22100%22 height=%22100%22 rx=%2220%22 fill=%22%234f46e5%22/><text x=%2250%22 y=%2270%22 font-size=%2260%22 font-weight=%22600%22 text-anchor=%22middle%22 fill=%22white%22>R</text></svg>">
|
|
9
|
-
<meta name="description" content="Professional testing interface for Runflow AI agents - Built for developers">
|
|
10
|
-
<meta name="theme-color" content="#4f46e5">
|
|
11
|
-
<meta name="author" content="Runflow">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<!-- Main Application Container -->
|
|
15
|
-
<div class="container" role="application" aria-label="Runflow Test Interface">
|
|
16
|
-
<!-- Application Header -->
|
|
17
|
-
<header class="app-header" role="banner">
|
|
18
|
-
<div class="header-content">
|
|
19
|
-
<div class="header-left">
|
|
20
|
-
<div class="logo-section">
|
|
21
|
-
<img src="runflow-logo.png" alt="Runflow Logo" class="logo-image"
|
|
22
|
-
onerror="this.style.display='none'; this.nextElementSibling.style.display='flex';" />
|
|
23
|
-
<div class="logo-icon" style="display: none;" aria-hidden="true">R</div>
|
|
24
|
-
<div class="brand-text">
|
|
25
|
-
<h1 class="brand-title">Runflow Test</h1>
|
|
26
|
-
<span class="brand-subtitle">Developer Interface</span>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="project-info">
|
|
30
|
-
<span class="project-label">Project:</span>
|
|
31
|
-
<span class="project-name" id="projectName">Loading...</span>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="header-right">
|
|
35
|
-
<div class="connection-status" id="status" role="status" aria-live="polite">
|
|
36
|
-
<span class="status-indicator"></span>
|
|
37
|
-
<span class="status-text">Connecting...</span>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</header>
|
|
42
|
-
|
|
43
|
-
<!-- Main Content Area -->
|
|
44
|
-
<main class="main-content" role="main">
|
|
45
|
-
<!-- Chat Section -->
|
|
46
|
-
<section class="chat-container" aria-label="Chat Interface">
|
|
47
|
-
<!-- Message Display Area -->
|
|
48
|
-
<div class="messages" id="messages" role="log" aria-label="Chat messages" aria-live="polite">
|
|
49
|
-
<!-- Initial System Message -->
|
|
50
|
-
<div class="message system" role="status">
|
|
51
|
-
<div class="message-bubble">
|
|
52
|
-
<div class="message-header">
|
|
53
|
-
<span class="message-type">System</span>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="content">
|
|
56
|
-
<strong>Welcome to Runflow Test Interface</strong><br>
|
|
57
|
-
Your testing environment is ready. Send a message to test your agent.
|
|
58
|
-
</div>
|
|
59
|
-
<div class="timestamp" id="systemTimestamp"></div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<!-- Message Input Form -->
|
|
65
|
-
<form class="input-form" id="messageForm" role="form" aria-label="Message input">
|
|
66
|
-
<div class="input-wrapper">
|
|
67
|
-
<input
|
|
68
|
-
type="text"
|
|
69
|
-
id="messageInput"
|
|
70
|
-
class="message-input"
|
|
71
|
-
placeholder="Type your message..."
|
|
72
|
-
autocomplete="off"
|
|
73
|
-
required
|
|
74
|
-
aria-label="Message input"
|
|
75
|
-
aria-describedby="input-help"
|
|
76
|
-
>
|
|
77
|
-
<button type="button" class="clear-btn" id="clearBtn"
|
|
78
|
-
title="Clear input" aria-label="Clear input">
|
|
79
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
80
|
-
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
|
|
81
|
-
</svg>
|
|
82
|
-
</button>
|
|
83
|
-
</div>
|
|
84
|
-
<button type="submit" id="sendButton" class="send-button" aria-label="Send message">
|
|
85
|
-
<span class="button-text">Send</span>
|
|
86
|
-
<div class="spinner" style="display: none;" aria-hidden="true"></div>
|
|
87
|
-
</button>
|
|
88
|
-
</form>
|
|
89
|
-
<div id="input-help" class="sr-only">Press Enter to send, Escape to clear</div>
|
|
90
|
-
</section>
|
|
91
|
-
|
|
92
|
-
<!-- Sidebar Controls -->
|
|
93
|
-
<aside class="sidebar" role="complementary" aria-label="Test controls and information">
|
|
94
|
-
<!-- Tabs Navigation -->
|
|
95
|
-
<div class="sidebar-tabs">
|
|
96
|
-
<button class="sidebar-tab active" data-tab="test">
|
|
97
|
-
<span class="tab-icon">▶</span>
|
|
98
|
-
<span class="tab-label">Test</span>
|
|
99
|
-
</button>
|
|
100
|
-
<button class="sidebar-tab" data-tab="traces">
|
|
101
|
-
<span class="tab-icon">📊</span>
|
|
102
|
-
<span class="tab-label">Traces</span>
|
|
103
|
-
</button>
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
<!-- Test Tab Content -->
|
|
107
|
-
<div class="tab-content active" data-tab-content="test">
|
|
108
|
-
<!-- Test Mode Panel -->
|
|
109
|
-
<section class="panel test-mode-panel" aria-labelledby="test-mode-heading">
|
|
110
|
-
<h3 id="test-mode-heading" class="panel-title">
|
|
111
|
-
<span class="panel-icon">▶</span>
|
|
112
|
-
Test Mode
|
|
113
|
-
</h3>
|
|
114
|
-
<div style="margin-bottom: 12px;">
|
|
115
|
-
<label style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;">
|
|
116
|
-
<input type="radio" name="testMode" value="simple" checked>
|
|
117
|
-
<span style="font-size: 13px;">Simple (message only)</span>
|
|
118
|
-
</label>
|
|
119
|
-
<label style="display: flex; align-items: center; gap: 8px;">
|
|
120
|
-
<input type="radio" name="testMode" value="custom">
|
|
121
|
-
<span style="font-size: 13px;">Custom JSON payload</span>
|
|
122
|
-
</label>
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
<div id="customPayloadSection" style="display: none; margin-top: 12px;">
|
|
126
|
-
<div style="margin-bottom: 12px;">
|
|
127
|
-
<label style="display: block; font-size: 12px; color: var(--gray-700); margin-bottom: 4px;">
|
|
128
|
-
Load Scenario:
|
|
129
|
-
</label>
|
|
130
|
-
<select
|
|
131
|
-
id="scenarioSelect"
|
|
132
|
-
style="width: 100%; padding: 6px 8px; border: 1px solid var(--gray-300); border-radius: 4px; font-size: 12px;"
|
|
133
|
-
>
|
|
134
|
-
<option value="">-- Select scenario --</option>
|
|
135
|
-
</select>
|
|
136
|
-
</div>
|
|
137
|
-
|
|
138
|
-
<div id="variablesSection" style="display: none; margin-bottom: 12px; padding: 8px; background: var(--gray-100); border-radius: 4px;">
|
|
139
|
-
<div style="font-size: 12px; font-weight: 600; margin-bottom: 8px; color: var(--gray-700);">
|
|
140
|
-
Variables:
|
|
141
|
-
</div>
|
|
142
|
-
<div id="variablesContainer"></div>
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
<div style="margin-bottom: 8px; padding: 8px; background: var(--gray-100); border-radius: 4px; font-size: 11px; color: var(--gray-700);">
|
|
146
|
-
<strong>Payload Preview:</strong> Your main.ts receives this exact JSON
|
|
147
|
-
</div>
|
|
148
|
-
<textarea
|
|
149
|
-
id="payloadInput"
|
|
150
|
-
placeholder='{"data": "webhook payload", "event": "order.created"}'
|
|
151
|
-
rows="10"
|
|
152
|
-
style="width: 100%; padding: 8px; font-family: monospace; font-size: 11px; border: 1px solid var(--gray-300); border-radius: 4px; resize: vertical;"
|
|
153
|
-
></textarea>
|
|
154
|
-
</div>
|
|
155
|
-
</section>
|
|
156
|
-
|
|
157
|
-
<!-- Quick Actions Panel -->
|
|
158
|
-
<section class="panel quick-tests-panel" aria-labelledby="quick-tests-heading">
|
|
159
|
-
<h3 id="quick-tests-heading" class="panel-title">
|
|
160
|
-
<span class="panel-icon">⚡</span>
|
|
161
|
-
Quick Tests
|
|
162
|
-
</h3>
|
|
163
|
-
<div class="example-buttons">
|
|
164
|
-
<button class="example-btn" data-message="Hello! Can you help me?">
|
|
165
|
-
Hello
|
|
166
|
-
</button>
|
|
167
|
-
<button class="example-btn" data-message="What can you do?">
|
|
168
|
-
Capabilities
|
|
169
|
-
</button>
|
|
170
|
-
<button class="example-btn" data-message="Tell me about Runflow">
|
|
171
|
-
About
|
|
172
|
-
</button>
|
|
173
|
-
<button class="example-btn" data-message="How does this work?">
|
|
174
|
-
How it works
|
|
175
|
-
</button>
|
|
176
|
-
</div>
|
|
177
|
-
</section>
|
|
178
|
-
|
|
179
|
-
<!-- Display Settings Panel -->
|
|
180
|
-
<section class="panel display-settings-panel" aria-labelledby="display-settings-heading">
|
|
181
|
-
<h3 id="display-settings-heading" class="panel-title">
|
|
182
|
-
<span class="panel-icon">⚙</span>
|
|
183
|
-
Display Settings
|
|
184
|
-
</h3>
|
|
185
|
-
<div class="settings-group">
|
|
186
|
-
<label class="setting-item">
|
|
187
|
-
<input type="checkbox" id="showJsonToggle" checked>
|
|
188
|
-
<span>Show JSON toggle button</span>
|
|
189
|
-
</label>
|
|
190
|
-
<label class="setting-item">
|
|
191
|
-
<input type="checkbox" id="autoExpandJson">
|
|
192
|
-
<span>Auto-expand JSON responses</span>
|
|
193
|
-
</label>
|
|
194
|
-
<label class="setting-item">
|
|
195
|
-
<input type="checkbox" id="showMetadata" checked>
|
|
196
|
-
<span>Show response metadata</span>
|
|
197
|
-
</label>
|
|
198
|
-
<div class="setting-item-input">
|
|
199
|
-
<label for="responsePath">Response Message Path:</label>
|
|
200
|
-
<input type="text" id="responsePath"
|
|
201
|
-
placeholder="e.g., data.message or data.content"
|
|
202
|
-
value="data.message"
|
|
203
|
-
style="width: 100%; padding: 4px 8px; margin-top: 4px; border: 1px solid var(--gray-300); border-radius: 4px; font-size: 12px;">
|
|
204
|
-
<small style="display: block; margin-top: 4px; color: var(--gray-500); font-size: 11px;">
|
|
205
|
-
Path to message in JSON response (e.g., data.message, content, reply)
|
|
206
|
-
</small>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
</section>
|
|
210
|
-
|
|
211
|
-
<!-- Session Info Panel -->
|
|
212
|
-
<section class="panel session-info-panel" aria-labelledby="session-info-heading">
|
|
213
|
-
<h3 id="session-info-heading" class="panel-title">
|
|
214
|
-
<span class="panel-icon">ℹ</span>
|
|
215
|
-
Session Info
|
|
216
|
-
</h3>
|
|
217
|
-
<div class="info-item">
|
|
218
|
-
<strong>Backend</strong>
|
|
219
|
-
<span id="backendUrl">Loading...</span>
|
|
220
|
-
</div>
|
|
221
|
-
<div class="info-item">
|
|
222
|
-
<strong>Status</strong>
|
|
223
|
-
<span id="agentStatus">Loading...</span>
|
|
224
|
-
</div>
|
|
225
|
-
<div class="info-item">
|
|
226
|
-
<strong>Messages</strong>
|
|
227
|
-
<span id="messageCount">0</span>
|
|
228
|
-
</div>
|
|
229
|
-
<div class="info-item">
|
|
230
|
-
<strong>Session ID</strong>
|
|
231
|
-
<span id="sessionId">Loading...</span>
|
|
232
|
-
</div>
|
|
233
|
-
<div class="info-item">
|
|
234
|
-
<strong>Last Response</strong>
|
|
235
|
-
<span id="lastResponse">-</span>
|
|
236
|
-
</div>
|
|
237
|
-
</section>
|
|
238
|
-
|
|
239
|
-
<!-- Controls Panel -->
|
|
240
|
-
<section class="panel controls-panel" aria-labelledby="controls-heading">
|
|
241
|
-
<h3 id="controls-heading" class="panel-title">
|
|
242
|
-
<span class="panel-icon">•••</span>
|
|
243
|
-
Controls
|
|
244
|
-
</h3>
|
|
245
|
-
<div class="controls-grid">
|
|
246
|
-
<button class="control-btn refresh-btn" id="refreshBtn"
|
|
247
|
-
title="Refresh connection" aria-label="Refresh connection">
|
|
248
|
-
<span class="btn-text">Refresh Connection</span>
|
|
249
|
-
</button>
|
|
250
|
-
<button class="control-btn export-btn" id="exportBtn"
|
|
251
|
-
title="Export chat history" aria-label="Export chat history">
|
|
252
|
-
<span class="btn-text">Export Chat</span>
|
|
253
|
-
</button>
|
|
254
|
-
<button class="control-btn danger clear-all-btn" id="clearAllBtn"
|
|
255
|
-
title="Clear all messages" aria-label="Clear all messages">
|
|
256
|
-
<span class="btn-text">Clear Messages</span>
|
|
257
|
-
</button>
|
|
258
|
-
</div>
|
|
259
|
-
</section>
|
|
260
|
-
</div>
|
|
261
|
-
|
|
262
|
-
<!-- Traces Tab Content -->
|
|
263
|
-
<div class="tab-content" data-tab-content="traces">
|
|
264
|
-
<!-- Traces Panel -->
|
|
265
|
-
<section class="panel traces-panel" aria-labelledby="traces-heading">
|
|
266
|
-
<h3 id="traces-heading" class="panel-title">
|
|
267
|
-
<span class="panel-icon">📊</span>
|
|
268
|
-
Execution Traces
|
|
269
|
-
</h3>
|
|
270
|
-
<div class="traces-controls" style="margin-bottom: 12px; display: flex; gap: 8px;">
|
|
271
|
-
<button class="control-btn" id="refreshTracesBtn" style="flex: 1; font-size: 12px; padding: 6px 12px;">
|
|
272
|
-
🔄 Refresh
|
|
273
|
-
</button>
|
|
274
|
-
<button class="control-btn danger" id="clearTracesBtn" style="flex: 1; font-size: 12px; padding: 6px 12px;">
|
|
275
|
-
🗑️ Clear
|
|
276
|
-
</button>
|
|
277
|
-
</div>
|
|
278
|
-
<div id="tracesContainer" style="max-height: 500px; overflow-y: auto;">
|
|
279
|
-
<div style="text-align: center; padding: 20px; color: var(--gray-500); font-size: 13px;">
|
|
280
|
-
Loading traces...
|
|
281
|
-
</div>
|
|
282
|
-
</div>
|
|
283
|
-
</section>
|
|
284
|
-
|
|
285
|
-
<!-- Trace Details Panel (hidden by default) -->
|
|
286
|
-
<section class="panel trace-details-panel" id="traceDetailsPanel" style="display: none;" aria-labelledby="trace-details-heading">
|
|
287
|
-
<h3 id="trace-details-heading" class="panel-title">
|
|
288
|
-
<span class="panel-icon">🔍</span>
|
|
289
|
-
<span>Trace Details</span>
|
|
290
|
-
<button class="close-details-btn" id="closeDetailsBtn" style="margin-left: auto; background: none; border: none; cursor: pointer; font-size: 16px; color: var(--gray-600); padding: 4px 8px;">✕</button>
|
|
291
|
-
</h3>
|
|
292
|
-
<div id="traceDetailsContainer" style="font-size: 12px; max-height: 500px; overflow-y: auto;">
|
|
293
|
-
<!-- Trace details will be rendered here -->
|
|
294
|
-
</div>
|
|
295
|
-
</section>
|
|
296
|
-
</div>
|
|
297
|
-
</aside>
|
|
298
|
-
</main>
|
|
299
|
-
|
|
300
|
-
<!-- Application Footer -->
|
|
301
|
-
<footer class="app-footer" role="contentinfo">
|
|
302
|
-
<div class="footer-content">
|
|
303
|
-
<div class="footer-left">
|
|
304
|
-
<span class="powered-by">Powered by <strong>Runflow SDK</strong></span>
|
|
305
|
-
<span class="version">v2.0.0</span>
|
|
306
|
-
</div>
|
|
307
|
-
<div class="footer-right">
|
|
308
|
-
<div class="shortcuts" aria-label="Keyboard shortcuts">
|
|
309
|
-
<span class="shortcut"><kbd>Enter</kbd> Send</span>
|
|
310
|
-
<span class="shortcut-separator">•</span>
|
|
311
|
-
<span class="shortcut"><kbd>Ctrl+L</kbd> Clear Chat</span>
|
|
312
|
-
<span class="shortcut-separator">•</span>
|
|
313
|
-
<span class="shortcut"><kbd>Esc</kbd> Clear Input</span>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
</div>
|
|
317
|
-
</footer>
|
|
318
|
-
</div>
|
|
319
|
-
|
|
320
|
-
<!-- Loading Overlay -->
|
|
321
|
-
<div class="loading-overlay" id="loadingOverlay" role="status" aria-live="assertive">
|
|
322
|
-
<div class="loading-content">
|
|
323
|
-
<div class="loading-spinner" aria-hidden="true"></div>
|
|
324
|
-
<h2 class="loading-title">Starting Runflow Test Server</h2>
|
|
325
|
-
<p class="loading-message">Initializing your AI agent testing environment</p>
|
|
326
|
-
<div class="loading-steps">
|
|
327
|
-
<div class="loading-step" data-step="1">Checking dependencies...</div>
|
|
328
|
-
<div class="loading-step" data-step="2">Starting backend server...</div>
|
|
329
|
-
<div class="loading-step" data-step="3">Establishing connection...</div>
|
|
330
|
-
</div>
|
|
331
|
-
</div>
|
|
332
|
-
</div>
|
|
333
|
-
|
|
334
|
-
<!-- Screen Reader Announcements -->
|
|
335
|
-
<div class="sr-only" role="status" aria-live="polite" aria-atomic="true" id="sr-announcements"></div>
|
|
336
|
-
|
|
337
|
-
<!-- Application Scripts -->
|
|
338
|
-
<script src="app.js"></script>
|
|
339
|
-
</body>
|
|
340
|
-
</html>
|