fa-mcp-sdk 0.4.13 → 0.4.14
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-template/CLAUDE.md +1 -1
- package/cli-template/FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md +1 -1
- package/cli-template/FA-MCP-SDK-DOC/01-getting-started.md +1 -0
- package/cli-template/FA-MCP-SDK-DOC/03-configuration.md +5 -0
- package/cli-template/FA-MCP-SDK-DOC/04-authentication.md +19 -0
- package/cli-template/FA-MCP-SDK-DOC/08-agent-tester-and-headless-api.md +311 -8
- package/cli-template/package.json +1 -1
- package/config/_local.yaml +15 -3
- package/config/custom-environment-variables.yaml +3 -0
- package/config/default.yaml +10 -1
- package/config/local_.yaml +112 -0
- package/dist/core/_types_/config.d.ts +12 -2
- package/dist/core/_types_/config.d.ts.map +1 -1
- package/dist/core/agent-tester/agent-tester-router.d.ts.map +1 -1
- package/dist/core/agent-tester/agent-tester-router.js +39 -1
- package/dist/core/agent-tester/agent-tester-router.js.map +1 -1
- package/dist/core/auth/agent-tester-auth.d.ts +42 -0
- package/dist/core/auth/agent-tester-auth.d.ts.map +1 -0
- package/dist/core/auth/agent-tester-auth.js +166 -0
- package/dist/core/auth/agent-tester-auth.js.map +1 -0
- package/dist/core/auth/middleware.d.ts.map +1 -1
- package/dist/core/auth/middleware.js +4 -0
- package/dist/core/auth/middleware.js.map +1 -1
- package/dist/core/bootstrap/init-config.d.ts.map +1 -1
- package/dist/core/bootstrap/init-config.js +3 -0
- package/dist/core/bootstrap/init-config.js.map +1 -1
- package/dist/core/web/home-api.d.ts.map +1 -1
- package/dist/core/web/home-api.js +7 -1
- package/dist/core/web/home-api.js.map +1 -1
- package/dist/core/web/server-http.d.ts.map +1 -1
- package/dist/core/web/server-http.js +6 -6
- package/dist/core/web/server-http.js.map +1 -1
- package/dist/core/web/static/agent-tester/index.html +94 -47
- package/dist/core/web/static/agent-tester/script.js +192 -21
- package/dist/core/web/static/agent-tester/styles.css +156 -0
- package/package.json +1 -1
|
@@ -11,57 +11,101 @@
|
|
|
11
11
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
|
-
|
|
14
|
+
<!-- Auth Overlay — shown when useAuth is enabled and user is not authenticated -->
|
|
15
|
+
<div id="authOverlay" class="auth-overlay" style="display: none;" data-testid="at-auth-overlay">
|
|
16
|
+
<div class="auth-card">
|
|
17
|
+
<div class="auth-header">
|
|
18
|
+
<span class="material-icons-round auth-lock-icon">lock</span>
|
|
19
|
+
<h2>Agent Tester</h2>
|
|
20
|
+
<p class="auth-subtitle">Authentication required</p>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div id="authTabs" class="auth-tabs" style="display: none;" data-testid="at-auth-tabs">
|
|
24
|
+
<button class="auth-tab active" data-tab="token" data-testid="at-auth-tab-token">Token</button>
|
|
25
|
+
<button class="auth-tab" data-tab="basic" data-testid="at-auth-tab-basic">Login</button>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<form id="authTokenForm" class="auth-form" data-testid="at-auth-token-form">
|
|
29
|
+
<div class="form-group">
|
|
30
|
+
<label for="authToken">Token</label>
|
|
31
|
+
<input type="password" id="authToken" placeholder="Enter access token" autocomplete="off" data-testid="at-auth-token-input">
|
|
32
|
+
</div>
|
|
33
|
+
<button type="submit" class="btn btn-primary auth-submit" data-testid="at-auth-token-submit">
|
|
34
|
+
<span class="material-icons-round">login</span>
|
|
35
|
+
Sign In
|
|
36
|
+
</button>
|
|
37
|
+
</form>
|
|
38
|
+
|
|
39
|
+
<form id="authBasicForm" class="auth-form" style="display: none;" data-testid="at-auth-basic-form">
|
|
40
|
+
<div class="form-group">
|
|
41
|
+
<label for="authUsername">Username</label>
|
|
42
|
+
<input type="text" id="authUsername" placeholder="Username" autocomplete="username" data-testid="at-auth-username">
|
|
43
|
+
</div>
|
|
44
|
+
<div class="form-group">
|
|
45
|
+
<label for="authPassword">Password</label>
|
|
46
|
+
<input type="password" id="authPassword" placeholder="Password" autocomplete="current-password" data-testid="at-auth-password">
|
|
47
|
+
</div>
|
|
48
|
+
<button type="submit" class="btn btn-primary auth-submit" data-testid="at-auth-basic-submit">
|
|
49
|
+
<span class="material-icons-round">login</span>
|
|
50
|
+
Sign In
|
|
51
|
+
</button>
|
|
52
|
+
</form>
|
|
53
|
+
|
|
54
|
+
<div id="authError" class="auth-error" style="display: none;" data-testid="at-auth-error"></div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="app" data-testid="at-app">
|
|
15
59
|
<!-- Sidebar -->
|
|
16
|
-
<aside class="sidebar" id="sidebar">
|
|
60
|
+
<aside class="sidebar" id="sidebar" data-testid="at-sidebar">
|
|
17
61
|
<div class="sidebar-content">
|
|
18
62
|
<!-- Server Connection -->
|
|
19
63
|
<section class="config-section">
|
|
20
|
-
<form id="mcpConnectionForm" class="connection-form">
|
|
64
|
+
<form id="mcpConnectionForm" class="connection-form" data-testid="at-connection-form">
|
|
21
65
|
<div class="url-transport-row">
|
|
22
66
|
<div class="form-group url-group">
|
|
23
67
|
<label for="serverUrl">MCP Server URL</label>
|
|
24
68
|
<div class="custom-select-container">
|
|
25
|
-
<input type="url" id="serverUrl" name="serverUrl" placeholder="http://localhost:3000/mcp" required>
|
|
26
|
-
<button type="button" id="serverUrlDropdown" class="dropdown-toggle" title="Select from saved URLs">
|
|
69
|
+
<input type="url" id="serverUrl" name="serverUrl" placeholder="http://localhost:3000/mcp" required data-testid="at-server-url">
|
|
70
|
+
<button type="button" id="serverUrlDropdown" class="dropdown-toggle" title="Select from saved URLs" data-testid="at-server-url-dropdown">
|
|
27
71
|
<span class="material-icons-round">expand_more</span>
|
|
28
72
|
</button>
|
|
29
|
-
<div id="serverUrlDropdownList" class="dropdown-list" style="display: none;">
|
|
30
|
-
<div class="dropdown-item add-new">
|
|
73
|
+
<div id="serverUrlDropdownList" class="dropdown-list" style="display: none;" data-testid="at-server-url-dropdown-list">
|
|
74
|
+
<div class="dropdown-item add-new" data-testid="at-server-url-add-new">
|
|
31
75
|
<span>Add new URL</span>
|
|
32
76
|
</div>
|
|
33
77
|
<div class="dropdown-separator"></div>
|
|
34
|
-
<div id="savedUrlsList"></div>
|
|
78
|
+
<div id="savedUrlsList" data-testid="at-saved-urls-list"></div>
|
|
35
79
|
</div>
|
|
36
80
|
</div>
|
|
37
81
|
</div>
|
|
38
82
|
<div class="form-group transport-group">
|
|
39
83
|
<label for="transport">Transport</label>
|
|
40
|
-
<select id="transport" name="transport" required>
|
|
84
|
+
<select id="transport" name="transport" required data-testid="at-transport">
|
|
41
85
|
<option value="http">HTTP</option>
|
|
42
86
|
<option value="sse">SSE</option>
|
|
43
87
|
</select>
|
|
44
88
|
</div>
|
|
45
89
|
</div>
|
|
46
90
|
|
|
47
|
-
<button type="submit" class="btn btn-connect">
|
|
91
|
+
<button type="submit" class="btn btn-connect" data-testid="at-connect-btn">
|
|
48
92
|
<span class="material-icons-round">power</span>
|
|
49
93
|
Connect
|
|
50
94
|
</button>
|
|
51
|
-
<div id="connectedServers" class="server-status-bar"></div>
|
|
95
|
+
<div id="connectedServers" class="server-status-bar" data-testid="at-connected-servers"></div>
|
|
52
96
|
</form>
|
|
53
97
|
</section>
|
|
54
98
|
|
|
55
99
|
<!-- Dynamic Headers -->
|
|
56
|
-
<section id="headersSection" class="config-section" style="display: none;">
|
|
100
|
+
<section id="headersSection" class="config-section" style="display: none;" data-testid="at-headers-section">
|
|
57
101
|
<h3>HTTP Headers</h3>
|
|
58
|
-
<div id="dynamicHeaders" class="dynamic-headers"></div>
|
|
102
|
+
<div id="dynamicHeaders" class="dynamic-headers" data-testid="at-dynamic-headers"></div>
|
|
59
103
|
</section>
|
|
60
104
|
|
|
61
|
-
<section class="config-section">
|
|
105
|
+
<section class="config-section" data-testid="at-model-section">
|
|
62
106
|
<div class="form-group model-select-group">
|
|
63
107
|
<label for="modelSelect">Model</label>
|
|
64
|
-
<select id="modelSelect" name="modelSelect" required>
|
|
108
|
+
<select id="modelSelect" name="modelSelect" required data-testid="at-model-select">
|
|
65
109
|
<option value="gpt-5.4">gpt-5.4</option>
|
|
66
110
|
<option value="gpt-5.3-codex">gpt-5.3-codex</option>
|
|
67
111
|
<option value="gpt-5.2">gpt-5.2</option>
|
|
@@ -77,37 +121,37 @@
|
|
|
77
121
|
</select>
|
|
78
122
|
</div>
|
|
79
123
|
|
|
80
|
-
<div id="customModelSettings" class="custom-model-settings" style="display: none;">
|
|
124
|
+
<div id="customModelSettings" class="custom-model-settings" style="display: none;" data-testid="at-custom-model-settings">
|
|
81
125
|
<div class="form-group">
|
|
82
126
|
<label for="customBaseUrl">Base URL</label>
|
|
83
|
-
<input type="url" id="customBaseUrl" placeholder="https://api.example.com/v1/chat/completions">
|
|
127
|
+
<input type="url" id="customBaseUrl" placeholder="https://api.example.com/v1/chat/completions" data-testid="at-custom-base-url">
|
|
84
128
|
</div>
|
|
85
129
|
<div class="form-group">
|
|
86
130
|
<label for="customApiKey">API Key</label>
|
|
87
|
-
<input type="password" id="customApiKey" placeholder="sk-...">
|
|
131
|
+
<input type="password" id="customApiKey" placeholder="sk-..." data-testid="at-custom-api-key">
|
|
88
132
|
</div>
|
|
89
133
|
<div class="form-group">
|
|
90
134
|
<label for="customModelName">Model Name</label>
|
|
91
|
-
<input type="text" id="customModelName" placeholder="model-name">
|
|
135
|
+
<input type="text" id="customModelName" placeholder="model-name" data-testid="at-custom-model-name">
|
|
92
136
|
</div>
|
|
93
137
|
</div>
|
|
94
138
|
|
|
95
139
|
<div id="modelParameters" class="model-parameters">
|
|
96
140
|
<div class="form-group">
|
|
97
141
|
<label for="modelTemperature" style="width: 87px">Temperature</label>
|
|
98
|
-
<input type="number" id="modelTemperature" min="0" max="2" step="0.1" value="0.2" style="width: 55px">
|
|
142
|
+
<input type="number" id="modelTemperature" min="0" max="2" step="0.1" value="0.2" style="width: 55px" data-testid="at-model-temperature">
|
|
99
143
|
</div>
|
|
100
144
|
<div class="form-group">
|
|
101
145
|
<label for="modelMaxTokens" style="width: 84px">Max Tokens</label>
|
|
102
|
-
<input type="number" id="modelMaxTokens" min="1" max="128000" step="1" value="2048" style="width: 75px">
|
|
146
|
+
<input type="number" id="modelMaxTokens" min="1" max="128000" step="1" value="2048" style="width: 75px" data-testid="at-model-max-tokens">
|
|
103
147
|
</div>
|
|
104
148
|
<div class="form-group">
|
|
105
149
|
<label for="modelMaxTurns" style="width: 87px">Max Turns</label>
|
|
106
|
-
<input type="number" id="modelMaxTurns" min="1" max="20" step="1" value="10" style="width: 55px">
|
|
150
|
+
<input type="number" id="modelMaxTurns" min="1" max="20" step="1" value="10" style="width: 55px" data-testid="at-model-max-turns">
|
|
107
151
|
</div>
|
|
108
152
|
<div class="form-group">
|
|
109
153
|
<label for="toolResultLimitChars" style="width: 84px">Limit (chars)</label>
|
|
110
|
-
<input type="number" id="toolResultLimitChars" min="100" max="100000" step="100" value="20000" style="width: 75px">
|
|
154
|
+
<input type="number" id="toolResultLimitChars" min="100" max="100000" step="100" value="20000" style="width: 75px" data-testid="at-tool-result-limit">
|
|
111
155
|
</div>
|
|
112
156
|
</div>
|
|
113
157
|
</section>
|
|
@@ -117,11 +161,11 @@
|
|
|
117
161
|
<div class="form-group">
|
|
118
162
|
<div class="prompt-label-row">
|
|
119
163
|
<label for="systemPrompt">Agent Prompt</label>
|
|
120
|
-
<button type="button" class="btn-enlarge" data-target="systemPrompt" title="Enlarge">
|
|
164
|
+
<button type="button" class="btn-enlarge" data-target="systemPrompt" title="Enlarge" data-testid="at-system-prompt-enlarge">
|
|
121
165
|
<span class="material-icons-round">open_in_full</span>
|
|
122
166
|
</button>
|
|
123
167
|
</div>
|
|
124
|
-
<textarea id="systemPrompt" placeholder="Enter system prompt..." rows="3">You are a helpful AI assistant that can use MCP tools to help users. Be concise and accurate in your responses.</textarea>
|
|
168
|
+
<textarea id="systemPrompt" placeholder="Enter system prompt..." rows="3" data-testid="at-system-prompt">You are a helpful AI assistant that can use MCP tools to help users. Be concise and accurate in your responses.</textarea>
|
|
125
169
|
</div>
|
|
126
170
|
</section>
|
|
127
171
|
|
|
@@ -130,11 +174,11 @@
|
|
|
130
174
|
<div class="form-group">
|
|
131
175
|
<div class="prompt-label-row">
|
|
132
176
|
<label for="customPrompt">Custom Prompt</label>
|
|
133
|
-
<button type="button" class="btn-enlarge" data-target="customPrompt" title="Enlarge">
|
|
177
|
+
<button type="button" class="btn-enlarge" data-target="customPrompt" title="Enlarge" data-testid="at-custom-prompt-enlarge">
|
|
134
178
|
<span class="material-icons-round">open_in_full</span>
|
|
135
179
|
</button>
|
|
136
180
|
</div>
|
|
137
|
-
<textarea id="customPrompt" placeholder="Enter additional custom prompt..." rows="2"></textarea>
|
|
181
|
+
<textarea id="customPrompt" placeholder="Enter additional custom prompt..." rows="2" data-testid="at-custom-prompt"></textarea>
|
|
138
182
|
</div>
|
|
139
183
|
</section>
|
|
140
184
|
|
|
@@ -142,9 +186,9 @@
|
|
|
142
186
|
</aside>
|
|
143
187
|
|
|
144
188
|
<!-- Main Chat Area -->
|
|
145
|
-
<main class="main-content">
|
|
146
|
-
<header class="chat-header">
|
|
147
|
-
<button class="sidebar-toggle mobile-only" id="sidebarToggleMobile">
|
|
189
|
+
<main class="main-content" data-testid="at-main">
|
|
190
|
+
<header class="chat-header" data-testid="at-chat-header">
|
|
191
|
+
<button class="sidebar-toggle mobile-only" id="sidebarToggleMobile" data-testid="at-sidebar-toggle-mobile">
|
|
148
192
|
<span class="material-icons-round">menu</span>
|
|
149
193
|
</button>
|
|
150
194
|
<div class="chat-info">
|
|
@@ -154,23 +198,26 @@
|
|
|
154
198
|
</div>
|
|
155
199
|
</div>
|
|
156
200
|
<div class="chat-actions">
|
|
157
|
-
<select id="defaultDisplayFormat" class="header-format-select" title="Default display format">
|
|
201
|
+
<select id="defaultDisplayFormat" class="header-format-select" title="Default display format" data-testid="at-default-format">
|
|
158
202
|
<option value="HTML">HTML</option>
|
|
159
203
|
<option value="MD">MD</option>
|
|
160
204
|
</select>
|
|
161
|
-
<button id="themeToggle" class="btn-icon" title="Toggle theme">
|
|
205
|
+
<button id="themeToggle" class="btn-icon" title="Toggle theme" data-testid="at-theme-toggle">
|
|
162
206
|
<span class="material-icons-round">dark_mode</span>
|
|
163
207
|
</button>
|
|
164
|
-
<button id="clearChat" class="btn-icon" title="Clear Chat">
|
|
208
|
+
<button id="clearChat" class="btn-icon" title="Clear Chat" data-testid="at-clear-chat">
|
|
165
209
|
<span class="material-icons-round">delete_outline</span>
|
|
166
210
|
</button>
|
|
211
|
+
<button id="logoutBtn" class="btn-icon" title="Logout" style="display: none;" data-testid="at-logout-btn">
|
|
212
|
+
<span class="material-icons-round">logout</span>
|
|
213
|
+
</button>
|
|
167
214
|
</div>
|
|
168
215
|
</header>
|
|
169
216
|
|
|
170
217
|
<!-- Chat Messages -->
|
|
171
218
|
<div class="chat-container">
|
|
172
|
-
<div id="chatMessages" class="chat-messages">
|
|
173
|
-
<div class="message assistant welcome">
|
|
219
|
+
<div id="chatMessages" class="chat-messages" data-testid="at-chat-messages">
|
|
220
|
+
<div class="message assistant welcome" data-testid="at-welcome-message">
|
|
174
221
|
<div class="message-avatar">
|
|
175
222
|
<span class="material-icons-round">smart_toy</span>
|
|
176
223
|
</div>
|
|
@@ -197,16 +244,16 @@
|
|
|
197
244
|
|
|
198
245
|
<!-- Chat Input -->
|
|
199
246
|
<div class="chat-input-container">
|
|
200
|
-
<div class="typing-indicator" id="typingIndicator">
|
|
247
|
+
<div class="typing-indicator" id="typingIndicator" data-testid="at-typing-indicator">
|
|
201
248
|
<span></span>
|
|
202
249
|
<span></span>
|
|
203
250
|
<span></span>
|
|
204
251
|
</div>
|
|
205
252
|
<div class="chat-input-wrapper">
|
|
206
|
-
<textarea id="messageInput" placeholder="Type your message..." rows="1" maxlength="40000"></textarea>
|
|
253
|
+
<textarea id="messageInput" placeholder="Type your message..." rows="1" maxlength="40000" data-testid="at-message-input"></textarea>
|
|
207
254
|
<div class="input-actions">
|
|
208
|
-
<span id="charCount" class="char-count">0/40000</span>
|
|
209
|
-
<button id="sendButton" class="btn-send" disabled>
|
|
255
|
+
<span id="charCount" class="char-count" data-testid="at-char-count">0/40000</span>
|
|
256
|
+
<button id="sendButton" class="btn-send" disabled data-testid="at-send-btn">
|
|
210
257
|
<span class="material-icons-round">send</span>
|
|
211
258
|
</button>
|
|
212
259
|
</div>
|
|
@@ -216,32 +263,32 @@
|
|
|
216
263
|
</div>
|
|
217
264
|
|
|
218
265
|
<!-- Prompt Enlarge Modal -->
|
|
219
|
-
<div class="prompt-modal-overlay" id="promptModal" style="display: none;">
|
|
266
|
+
<div class="prompt-modal-overlay" id="promptModal" style="display: none;" data-testid="at-prompt-modal">
|
|
220
267
|
<div class="prompt-modal">
|
|
221
268
|
<div class="prompt-modal-header">
|
|
222
|
-
<h3 id="promptModalTitle">Agent Prompt</h3>
|
|
223
|
-
<button type="button" class="btn-icon" id="promptModalClose" title="Close">
|
|
269
|
+
<h3 id="promptModalTitle" data-testid="at-prompt-modal-title">Agent Prompt</h3>
|
|
270
|
+
<button type="button" class="btn-icon" id="promptModalClose" title="Close" data-testid="at-prompt-modal-close">
|
|
224
271
|
<span class="material-icons-round">close</span>
|
|
225
272
|
</button>
|
|
226
273
|
</div>
|
|
227
|
-
<textarea id="promptModalTextarea" rows="20"></textarea>
|
|
274
|
+
<textarea id="promptModalTextarea" rows="20" data-testid="at-prompt-modal-textarea"></textarea>
|
|
228
275
|
<div class="prompt-modal-footer">
|
|
229
|
-
<button type="button" class="btn btn-primary" id="promptModalSave">Apply</button>
|
|
276
|
+
<button type="button" class="btn btn-primary" id="promptModalSave" data-testid="at-prompt-modal-save">Apply</button>
|
|
230
277
|
</div>
|
|
231
278
|
</div>
|
|
232
279
|
</div>
|
|
233
280
|
|
|
234
281
|
<!-- Loading Overlay -->
|
|
235
|
-
<div class="loading-overlay" id="loadingOverlay" style="display: none;">
|
|
282
|
+
<div class="loading-overlay" id="loadingOverlay" style="display: none;" data-testid="at-loading-overlay">
|
|
236
283
|
<div class="spinner"></div>
|
|
237
284
|
<span>Connecting...</span>
|
|
238
285
|
</div>
|
|
239
286
|
|
|
240
287
|
<!-- Header Tooltip -->
|
|
241
|
-
<div id="headerTooltip" class="header-tooltip"></div>
|
|
288
|
+
<div id="headerTooltip" class="header-tooltip" data-testid="at-header-tooltip"></div>
|
|
242
289
|
|
|
243
290
|
<!-- Toast Notifications -->
|
|
244
|
-
<div id="toastContainer" class="toast-container"></div>
|
|
291
|
+
<div id="toastContainer" class="toast-container" data-testid="at-toast-container"></div>
|
|
245
292
|
|
|
246
293
|
<script src="/agent-tester/static/script.js"></script>
|
|
247
294
|
</body>
|