fa-mcp-sdk 0.4.76 → 0.4.77
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 +319 -314
- package/bin/fa-mcp.js +85 -68
- package/cli-template/.claude/agents/javascript-pro.md +276 -276
- package/cli-template/.claude/settings.json +50 -50
- package/cli-template/.claude/skills/upgrade-guide/SKILL.md +2 -1
- package/cli-template/.oxfmtrc.json +41 -0
- package/cli-template/.oxlintrc.json +120 -0
- package/cli-template/CLAUDE.md +358 -355
- package/cli-template/FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md +132 -132
- package/cli-template/FA-MCP-SDK-DOC/01-getting-started.md +146 -146
- package/cli-template/FA-MCP-SDK-DOC/02-1-tools-and-api.md +431 -431
- package/cli-template/FA-MCP-SDK-DOC/02-2-prompts-and-resources.md +201 -201
- package/cli-template/FA-MCP-SDK-DOC/03-configuration.md +384 -384
- package/cli-template/FA-MCP-SDK-DOC/04-authentication.md +412 -412
- package/cli-template/FA-MCP-SDK-DOC/05-ad-authorization.md +196 -196
- package/cli-template/FA-MCP-SDK-DOC/06-utilities.md +163 -163
- package/cli-template/FA-MCP-SDK-DOC/07-testing-and-operations.md +127 -127
- package/cli-template/jest.config.js +27 -30
- package/cli-template/package.json +10 -5
- package/cli-template/prompt-example-new-MCP.md +101 -101
- package/cli-template/readme-docs/SKILLS.md +1 -1
- package/cli-template/tsconfig.json +58 -58
- package/cli-template/update.cjs +41 -38
- package/config/custom-environment-variables.yaml +63 -63
- package/config/development.yaml +4 -4
- package/config/production.yaml +4 -4
- package/config/test.yaml +26 -26
- package/dist/core/_types_/TNtlm.d.ts.map +1 -1
- package/dist/core/_types_/active-directory-config.d.ts.map +1 -1
- package/dist/core/_types_/config.d.ts.map +1 -1
- package/dist/core/_types_/types.d.ts.map +1 -1
- package/dist/core/ad/group-checker.d.ts.map +1 -1
- package/dist/core/ad/group-checker.js.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 +6 -6
- package/dist/core/agent-tester/agent-tester-router.js.map +1 -1
- package/dist/core/agent-tester/check-llm.d.ts.map +1 -1
- package/dist/core/agent-tester/check-llm.js.map +1 -1
- package/dist/core/agent-tester/services/SummaryMemory.d.ts.map +1 -1
- package/dist/core/agent-tester/services/SummaryMemory.js +3 -9
- package/dist/core/agent-tester/services/SummaryMemory.js.map +1 -1
- package/dist/core/agent-tester/services/TesterAgentService.d.ts.map +1 -1
- package/dist/core/agent-tester/services/TesterAgentService.js +25 -27
- package/dist/core/agent-tester/services/TesterAgentService.js.map +1 -1
- package/dist/core/agent-tester/services/TesterMcpClientService.d.ts.map +1 -1
- package/dist/core/agent-tester/services/TesterMcpClientService.js +26 -25
- package/dist/core/agent-tester/services/TesterMcpClientService.js.map +1 -1
- package/dist/core/auth/admin-auth.d.ts.map +1 -1
- package/dist/core/auth/admin-auth.js +5 -5
- package/dist/core/auth/admin-auth.js.map +1 -1
- package/dist/core/auth/agent-tester-auth.d.ts.map +1 -1
- package/dist/core/auth/agent-tester-auth.js +1 -6
- package/dist/core/auth/agent-tester-auth.js.map +1 -1
- package/dist/core/auth/basic.d.ts.map +1 -1
- package/dist/core/auth/basic.js.map +1 -1
- package/dist/core/auth/ip-check.d.ts.map +1 -1
- package/dist/core/auth/ip-check.js +1 -1
- package/dist/core/auth/ip-check.js.map +1 -1
- package/dist/core/auth/jwt.d.ts.map +1 -1
- package/dist/core/auth/jwt.js +1 -1
- package/dist/core/auth/jwt.js.map +1 -1
- package/dist/core/auth/middleware.d.ts.map +1 -1
- package/dist/core/auth/middleware.js +9 -6
- package/dist/core/auth/middleware.js.map +1 -1
- package/dist/core/auth/multi-auth.d.ts.map +1 -1
- package/dist/core/auth/multi-auth.js +6 -6
- package/dist/core/auth/multi-auth.js.map +1 -1
- package/dist/core/auth/revocation.d.ts.map +1 -1
- package/dist/core/auth/revocation.js +2 -6
- package/dist/core/auth/revocation.js.map +1 -1
- package/dist/core/auth/token-generator/ntlm/ntlm-auth-options.d.ts.map +1 -1
- package/dist/core/auth/token-generator/ntlm/ntlm-auth-options.js +2 -2
- package/dist/core/auth/token-generator/ntlm/ntlm-auth-options.js.map +1 -1
- package/dist/core/auth/token-generator/ntlm/ntlm-domain-config.js +1 -1
- package/dist/core/auth/token-generator/ntlm/ntlm-domain-config.js.map +1 -1
- package/dist/core/auth/token-generator/ntlm/ntlm-integration.d.ts.map +1 -1
- package/dist/core/auth/token-generator/ntlm/ntlm-integration.js +4 -2
- package/dist/core/auth/token-generator/ntlm/ntlm-integration.js.map +1 -1
- package/dist/core/auth/token-generator/server.d.ts.map +1 -1
- package/dist/core/auth/token-generator/server.js.map +1 -1
- package/dist/core/bootstrap/init-config.d.ts.map +1 -1
- package/dist/core/bootstrap/init-config.js +2 -2
- package/dist/core/bootstrap/init-config.js.map +1 -1
- package/dist/core/bootstrap/startup-info.d.ts.map +1 -1
- package/dist/core/bootstrap/startup-info.js +3 -7
- package/dist/core/bootstrap/startup-info.js.map +1 -1
- package/dist/core/cache/cache.d.ts.map +1 -1
- package/dist/core/cache/cache.js +2 -2
- package/dist/core/cache/cache.js.map +1 -1
- package/dist/core/consul/deregister.d.ts.map +1 -1
- package/dist/core/consul/deregister.js.map +1 -1
- package/dist/core/consul/get-consul-api.d.ts.map +1 -1
- package/dist/core/consul/get-consul-api.js +1 -2
- package/dist/core/consul/get-consul-api.js.map +1 -1
- package/dist/core/db/pg-db.d.ts.map +1 -1
- package/dist/core/db/pg-db.js +3 -3
- package/dist/core/db/pg-db.js.map +1 -1
- package/dist/core/debug.d.ts.map +1 -1
- package/dist/core/debug.js.map +1 -1
- package/dist/core/errors/BaseMcpError.d.ts.map +1 -1
- package/dist/core/errors/BaseMcpError.js.map +1 -1
- package/dist/core/errors/ValidationError.d.ts.map +1 -1
- package/dist/core/errors/ValidationError.js.map +1 -1
- package/dist/core/errors/errors.d.ts.map +1 -1
- package/dist/core/errors/errors.js +1 -1
- package/dist/core/errors/errors.js.map +1 -1
- package/dist/core/index.d.ts +6 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +5 -5
- package/dist/core/index.js.map +1 -1
- package/dist/core/init-mcp-server.d.ts.map +1 -1
- package/dist/core/init-mcp-server.js.map +1 -1
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +1 -1
- package/dist/core/logger.js.map +1 -1
- package/dist/core/mcp/create-mcp-server.d.ts.map +1 -1
- package/dist/core/mcp/create-mcp-server.js +1 -1
- package/dist/core/mcp/create-mcp-server.js.map +1 -1
- package/dist/core/mcp/prompts.d.ts.map +1 -1
- package/dist/core/mcp/prompts.js.map +1 -1
- package/dist/core/mcp/readme-assembler.d.ts.map +1 -1
- package/dist/core/mcp/readme-assembler.js +3 -1
- package/dist/core/mcp/readme-assembler.js.map +1 -1
- package/dist/core/mcp/resources.d.ts.map +1 -1
- package/dist/core/mcp/resources.js.map +1 -1
- package/dist/core/mcp/server-stdio.d.ts.map +1 -1
- package/dist/core/utils/formatToolResult.d.ts.map +1 -1
- package/dist/core/utils/formatToolResult.js.map +1 -1
- package/dist/core/utils/port-checker.d.ts.map +1 -1
- package/dist/core/utils/port-checker.js.map +1 -1
- package/dist/core/utils/rate-limit.d.ts.map +1 -1
- package/dist/core/utils/rate-limit.js +2 -8
- package/dist/core/utils/rate-limit.js.map +1 -1
- package/dist/core/utils/testing/BaseMcpClient.d.ts.map +1 -1
- package/dist/core/utils/testing/BaseMcpClient.js.map +1 -1
- package/dist/core/utils/testing/McpHttpClient.d.ts.map +1 -1
- package/dist/core/utils/testing/McpHttpClient.js +2 -2
- package/dist/core/utils/testing/McpHttpClient.js.map +1 -1
- package/dist/core/utils/testing/McpSseClient.d.ts.map +1 -1
- package/dist/core/utils/testing/McpSseClient.js +3 -8
- package/dist/core/utils/testing/McpSseClient.js.map +1 -1
- package/dist/core/utils/testing/McpStdioClient.d.ts.map +1 -1
- package/dist/core/utils/testing/McpStdioClient.js.map +1 -1
- package/dist/core/utils/testing/McpStreamableHttpClient.d.ts.map +1 -1
- package/dist/core/utils/testing/McpStreamableHttpClient.js +7 -8
- package/dist/core/utils/testing/McpStreamableHttpClient.js.map +1 -1
- package/dist/core/utils/utils.d.ts.map +1 -1
- package/dist/core/utils/utils.js +3 -5
- package/dist/core/utils/utils.js.map +1 -1
- package/dist/core/web/admin-router.d.ts.map +1 -1
- package/dist/core/web/admin-router.js +3 -3
- package/dist/core/web/admin-router.js.map +1 -1
- package/dist/core/web/cors.d.ts.map +1 -1
- package/dist/core/web/cors.js.map +1 -1
- package/dist/core/web/favicon-svg.d.ts.map +1 -1
- package/dist/core/web/favicon-svg.js +1 -5
- package/dist/core/web/favicon-svg.js.map +1 -1
- package/dist/core/web/home-api.d.ts.map +1 -1
- package/dist/core/web/home-api.js +7 -8
- package/dist/core/web/home-api.js.map +1 -1
- package/dist/core/web/openapi.d.ts.map +1 -1
- package/dist/core/web/openapi.js +1 -3
- package/dist/core/web/openapi.js.map +1 -1
- package/dist/core/web/server-http.d.ts.map +1 -1
- package/dist/core/web/server-http.js +4 -4
- package/dist/core/web/server-http.js.map +1 -1
- package/dist/core/web/static/agent-tester/index.html +323 -323
- package/dist/core/web/static/agent-tester/script.js +311 -200
- package/dist/core/web/static/agent-tester/styles.css +1840 -1840
- package/dist/core/web/static/home/index.html +220 -220
- package/dist/core/web/static/home/script.js +72 -43
- package/dist/core/web/static/styles.css +927 -927
- package/dist/core/web/static/token-gen/index.html +136 -136
- package/dist/core/web/static/token-gen/script.js +58 -56
- package/dist/core/web/svg-icons.d.ts.map +1 -1
- package/dist/core/web/svg-icons.js +1 -5
- package/dist/core/web/svg-icons.js.map +1 -1
- package/package.json +10 -5
- package/{cli-template/.claude/hooks/eslint-fix.cjs → scripts/cc-hook-oxlint-oxfmt-fix.cjs} +109 -100
- package/scripts/generate-jwt.js +5 -9
- package/scripts/kill-port.js +5 -2
- package/scripts/npm/run.js +1 -2
- package/scripts/remove-nul.js +1 -1
- package/scripts/update-sdk.js +36 -14
- package/src/template/api/router.ts +3 -3
- package/src/template/prompts/agent-brief.ts +0 -1
- package/src/template/start.ts +3 -8
- package/src/template/tools/handle-tool-call.ts +3 -3
- package/src/template/tools/tools.ts +3 -7
- package/src/tests/jest-simple-reporter.js +1 -1
- package/src/tests/mcp/sse/mcp-sse-client-handling.md +111 -111
- package/src/tests/mcp/sse/test-sse-npm-package.js +2 -3
- package/src/tests/mcp/test-cases.js +6 -7
- package/src/tests/mcp/test-http.js +2 -2
- package/src/tests/mcp/test-sse.js +9 -7
- package/src/tests/mcp/test-stdio.js +12 -8
- package/src/tests/utils.ts +4 -3
- package/cli-template/eslint.config.js +0 -27
|
@@ -1,323 +1,323 @@
|
|
|
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>MCP Agent Tester</title>
|
|
7
|
-
<link rel="stylesheet" href="/agent-tester/static/styles.css">
|
|
8
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap" rel="stylesheet">
|
|
11
|
-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
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">
|
|
59
|
-
<!-- Sidebar -->
|
|
60
|
-
<aside class="sidebar" id="sidebar" data-testid="at-sidebar">
|
|
61
|
-
<div class="sidebar-content">
|
|
62
|
-
<!-- Server Connection -->
|
|
63
|
-
<section class="config-section">
|
|
64
|
-
<form id="mcpConnectionForm" class="connection-form" data-testid="at-connection-form">
|
|
65
|
-
<div class="url-transport-row">
|
|
66
|
-
<div class="form-group url-group">
|
|
67
|
-
<label for="serverUrl">MCP Server URL</label>
|
|
68
|
-
<div class="custom-select-container">
|
|
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">
|
|
71
|
-
<span class="material-icons-round">expand_more</span>
|
|
72
|
-
</button>
|
|
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">
|
|
75
|
-
<span>Add new URL</span>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="dropdown-separator"></div>
|
|
78
|
-
<div id="savedUrlsList" data-testid="at-saved-urls-list"></div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="form-group transport-group">
|
|
83
|
-
<label for="transport">Transport</label>
|
|
84
|
-
<select id="transport" name="transport" required data-testid="at-transport">
|
|
85
|
-
<option value="http">HTTP</option>
|
|
86
|
-
<option value="sse">SSE</option>
|
|
87
|
-
</select>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<button type="submit" class="btn btn-connect" data-testid="at-connect-btn">
|
|
92
|
-
<span class="material-icons-round">power</span>
|
|
93
|
-
Connect
|
|
94
|
-
</button>
|
|
95
|
-
<div id="connectedServers" class="server-status-bar" data-testid="at-connected-servers"></div>
|
|
96
|
-
</form>
|
|
97
|
-
</section>
|
|
98
|
-
|
|
99
|
-
<!-- Dynamic Headers -->
|
|
100
|
-
<section id="headersSection" class="config-section" style="display: none;" data-testid="at-headers-section">
|
|
101
|
-
<h3>HTTP Headers</h3>
|
|
102
|
-
<div id="dynamicHeaders" class="dynamic-headers" data-testid="at-dynamic-headers"></div>
|
|
103
|
-
</section>
|
|
104
|
-
|
|
105
|
-
<section class="config-section" data-testid="at-model-section">
|
|
106
|
-
<div class="form-group model-display-group">
|
|
107
|
-
<label>Model</label>
|
|
108
|
-
<div class="model-display-row">
|
|
109
|
-
<span id="modelDisplay" class="model-display" data-testid="at-model-display">—</span>
|
|
110
|
-
<button type="button" id="llmSettingsBtn" class="btn-icon" title="LLM Settings" data-testid="at-llm-settings-btn">
|
|
111
|
-
<span class="material-icons-round">settings</span>
|
|
112
|
-
</button>
|
|
113
|
-
</div>
|
|
114
|
-
<div id="apiKeyWarning" class="api-key-warning" style="display: none;" data-testid="at-api-key-warning">API Key is not set</div>
|
|
115
|
-
</div>
|
|
116
|
-
</section>
|
|
117
|
-
|
|
118
|
-
<!-- Agent (System) Prompt -->
|
|
119
|
-
<section class="config-section">
|
|
120
|
-
<div class="form-group">
|
|
121
|
-
<div class="prompt-label-row">
|
|
122
|
-
<label for="systemPrompt">Agent Prompt<span class="prompt-modified-badge" id="promptModifiedBadge" style="display:none">(modified)</span></label>
|
|
123
|
-
<div class="prompt-actions">
|
|
124
|
-
<button type="button" class="btn-view-original" id="btnViewOriginalPrompt" title="View original agent prompt" data-testid="at-system-prompt-view-original" style="display:none">
|
|
125
|
-
<span class="material-icons-round">visibility</span>
|
|
126
|
-
</button>
|
|
127
|
-
<button type="button" class="btn-reset-prompt" id="btnResetAgentPrompt" title="Reset to original agent prompt" data-testid="at-system-prompt-reset" style="display:none">
|
|
128
|
-
<span class="material-icons-round">restart_alt</span>
|
|
129
|
-
</button>
|
|
130
|
-
<button type="button" class="btn-enlarge" data-target="systemPrompt" title="Enlarge" data-testid="at-system-prompt-enlarge">
|
|
131
|
-
<span class="material-icons-round">open_in_full</span>
|
|
132
|
-
</button>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
<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>
|
|
136
|
-
</div>
|
|
137
|
-
</section>
|
|
138
|
-
|
|
139
|
-
<!-- Custom Prompt -->
|
|
140
|
-
<section class="config-section">
|
|
141
|
-
<div class="form-group">
|
|
142
|
-
<div class="prompt-label-row">
|
|
143
|
-
<label for="customPrompt">Custom Prompt</label>
|
|
144
|
-
<button type="button" class="btn-enlarge" data-target="customPrompt" title="Enlarge" data-testid="at-custom-prompt-enlarge">
|
|
145
|
-
<span class="material-icons-round">open_in_full</span>
|
|
146
|
-
</button>
|
|
147
|
-
</div>
|
|
148
|
-
<textarea id="customPrompt" placeholder="Enter additional custom prompt..." rows="2" data-testid="at-custom-prompt"></textarea>
|
|
149
|
-
</div>
|
|
150
|
-
</section>
|
|
151
|
-
|
|
152
|
-
</div>
|
|
153
|
-
</aside>
|
|
154
|
-
|
|
155
|
-
<!-- Main Chat Area -->
|
|
156
|
-
<main class="main-content" data-testid="at-main">
|
|
157
|
-
<header class="chat-header" data-testid="at-chat-header">
|
|
158
|
-
<button class="sidebar-toggle mobile-only" id="sidebarToggleMobile" data-testid="at-sidebar-toggle-mobile">
|
|
159
|
-
<span class="material-icons-round">menu</span>
|
|
160
|
-
</button>
|
|
161
|
-
<div class="chat-info">
|
|
162
|
-
<div class="chat-title">
|
|
163
|
-
<span class="material-icons-round header-icon">smart_toy</span>
|
|
164
|
-
<h1>MCP Agent Tester</h1>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
<div class="chat-actions">
|
|
168
|
-
<select id="defaultDisplayFormat" class="header-format-select" title="Default display format" data-testid="at-default-format">
|
|
169
|
-
<option value="HTML">HTML</option>
|
|
170
|
-
<option value="MD">MD</option>
|
|
171
|
-
</select>
|
|
172
|
-
<button id="themeToggle" class="btn-icon" title="Toggle theme" data-testid="at-theme-toggle">
|
|
173
|
-
<span class="material-icons-round">dark_mode</span>
|
|
174
|
-
</button>
|
|
175
|
-
<button id="clearChat" class="btn-icon" title="Clear Chat" data-testid="at-clear-chat">
|
|
176
|
-
<span class="material-icons-round">delete_outline</span>
|
|
177
|
-
</button>
|
|
178
|
-
<button id="logoutBtn" class="btn-icon" title="Logout" style="display: none;" data-testid="at-logout-btn">
|
|
179
|
-
<span class="material-icons-round">logout</span>
|
|
180
|
-
</button>
|
|
181
|
-
</div>
|
|
182
|
-
</header>
|
|
183
|
-
|
|
184
|
-
<!-- Chat Messages -->
|
|
185
|
-
<div class="chat-container">
|
|
186
|
-
<div id="chatMessages" class="chat-messages" data-testid="at-chat-messages">
|
|
187
|
-
<div class="message assistant welcome" data-testid="at-welcome-message">
|
|
188
|
-
<div class="message-avatar">
|
|
189
|
-
<span class="material-icons-round">smart_toy</span>
|
|
190
|
-
</div>
|
|
191
|
-
<div class="message-content">
|
|
192
|
-
<div class="welcome-card">
|
|
193
|
-
<p>This application allows you to test and interact with MCP servers through an AI agent.</p>
|
|
194
|
-
<div class="getting-started">
|
|
195
|
-
<h4>Getting Started</h4>
|
|
196
|
-
<ol>
|
|
197
|
-
<li>Configure an MCP server connection in the sidebar</li>
|
|
198
|
-
<li>Specify HTTP header values, if required</li>
|
|
199
|
-
<li>Select the model and specify the parameters</li>
|
|
200
|
-
<li>Correct or set an agent (system) prompt if needed</li>
|
|
201
|
-
<li>Set custom prompt if needed</li>
|
|
202
|
-
<li>Start chatting with the AI agent</li>
|
|
203
|
-
</ol>
|
|
204
|
-
</div>
|
|
205
|
-
<p class="welcome-hint">The agent will use the connected MCP server's tools!</p>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
|
-
|
|
212
|
-
<!-- Chat Input -->
|
|
213
|
-
<div class="chat-input-container">
|
|
214
|
-
<div class="typing-indicator" id="typingIndicator" data-testid="at-typing-indicator">
|
|
215
|
-
<span></span>
|
|
216
|
-
<span></span>
|
|
217
|
-
<span></span>
|
|
218
|
-
</div>
|
|
219
|
-
<div class="chat-input-wrapper">
|
|
220
|
-
<textarea id="messageInput" placeholder="Type your message..." rows="1" maxlength="40000" data-testid="at-message-input"></textarea>
|
|
221
|
-
<div class="input-actions">
|
|
222
|
-
<span id="charCount" class="char-count" data-testid="at-char-count">0/40000</span>
|
|
223
|
-
<button id="sendButton" class="btn-send" disabled data-testid="at-send-btn">
|
|
224
|
-
<span class="material-icons-round">send</span>
|
|
225
|
-
</button>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
</main>
|
|
230
|
-
</div>
|
|
231
|
-
|
|
232
|
-
<!-- Prompt Enlarge Modal -->
|
|
233
|
-
<div class="prompt-modal-overlay" id="promptModal" style="display: none;" data-testid="at-prompt-modal">
|
|
234
|
-
<div class="prompt-modal">
|
|
235
|
-
<div class="prompt-modal-header">
|
|
236
|
-
<h3 id="promptModalTitle" data-testid="at-prompt-modal-title">Agent Prompt</h3>
|
|
237
|
-
<button type="button" class="btn-icon" id="promptModalClose" title="Close" data-testid="at-prompt-modal-close">
|
|
238
|
-
<span class="material-icons-round">close</span>
|
|
239
|
-
</button>
|
|
240
|
-
</div>
|
|
241
|
-
<textarea id="promptModalTextarea" rows="20" data-testid="at-prompt-modal-textarea"></textarea>
|
|
242
|
-
<div class="prompt-modal-footer">
|
|
243
|
-
<button type="button" class="btn btn-primary" id="promptModalSave" data-testid="at-prompt-modal-save">Apply</button>
|
|
244
|
-
</div>
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
|
-
<!-- LLM Settings Modal -->
|
|
249
|
-
<div class="llm-modal-overlay" id="llmModal" style="display: none;" data-testid="at-llm-modal">
|
|
250
|
-
<div class="llm-modal">
|
|
251
|
-
<div class="llm-modal-header">
|
|
252
|
-
<h3>LLM Settings</h3>
|
|
253
|
-
<button type="button" class="btn-icon" id="llmModalClose" title="Close" data-testid="at-llm-modal-close">
|
|
254
|
-
<span class="material-icons-round">close</span>
|
|
255
|
-
</button>
|
|
256
|
-
</div>
|
|
257
|
-
<form id="llmSettingsForm" class="llm-modal-body" autocomplete="off">
|
|
258
|
-
<div class="form-group">
|
|
259
|
-
<label for="llmBaseUrl">Base URL</label>
|
|
260
|
-
<input type="url" id="llmBaseUrl" placeholder="https://api.openai.com/v1" data-testid="at-llm-base-url">
|
|
261
|
-
</div>
|
|
262
|
-
<div class="form-group">
|
|
263
|
-
<label for="llmApiKey">API Key</label>
|
|
264
|
-
<div class="input-with-toggle">
|
|
265
|
-
<input type="password" id="llmApiKey" placeholder="sk-..." autocomplete="off" data-testid="at-llm-api-key">
|
|
266
|
-
<button type="button" class="btn-icon" id="llmApiKeyToggle" title="Show/hide" data-testid="at-llm-api-key-toggle">
|
|
267
|
-
<span class="material-icons-round">visibility</span>
|
|
268
|
-
</button>
|
|
269
|
-
</div>
|
|
270
|
-
</div>
|
|
271
|
-
<div class="form-group">
|
|
272
|
-
<label for="llmModelName">Model Name</label>
|
|
273
|
-
<div class="custom-select-container">
|
|
274
|
-
<input type="text" id="llmModelName" placeholder="gpt-5.4-nano" autocomplete="off" data-testid="at-llm-model-name">
|
|
275
|
-
<button type="button" id="llmModelDropdownToggle" class="dropdown-toggle" title="Choose model" data-testid="at-llm-model-dropdown-toggle">
|
|
276
|
-
<span class="material-icons-round">expand_more</span>
|
|
277
|
-
</button>
|
|
278
|
-
<div id="llmModelDropdownList" class="dropdown-list" style="display: none;" data-testid="at-llm-model-dropdown-list"></div>
|
|
279
|
-
</div>
|
|
280
|
-
</div>
|
|
281
|
-
<div class="form-row">
|
|
282
|
-
<div class="form-group">
|
|
283
|
-
<label for="llmTemperature">Temperature</label>
|
|
284
|
-
<input type="number" id="llmTemperature" min="0" max="2" step="0.1" value="0.2" data-testid="at-llm-temperature">
|
|
285
|
-
</div>
|
|
286
|
-
<div class="form-group">
|
|
287
|
-
<label for="llmMaxTokens">Max Tokens</label>
|
|
288
|
-
<input type="number" id="llmMaxTokens" min="1" max="128000" step="1" value="2048" data-testid="at-llm-max-tokens">
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
291
|
-
<div class="form-row">
|
|
292
|
-
<div class="form-group">
|
|
293
|
-
<label for="llmMaxTurns">Max Turns</label>
|
|
294
|
-
<input type="number" id="llmMaxTurns" min="1" max="20" step="1" value="10" data-testid="at-llm-max-turns">
|
|
295
|
-
</div>
|
|
296
|
-
<div class="form-group">
|
|
297
|
-
<label for="llmLimitChars">Limit (chars)</label>
|
|
298
|
-
<input type="number" id="llmLimitChars" min="100" max="100000" step="100" value="20000" data-testid="at-llm-limit-chars">
|
|
299
|
-
</div>
|
|
300
|
-
</div>
|
|
301
|
-
</form>
|
|
302
|
-
<div class="llm-modal-footer">
|
|
303
|
-
<button type="button" class="btn" id="llmModalCancel" data-testid="at-llm-modal-cancel">Cancel</button>
|
|
304
|
-
<button type="button" class="btn btn-primary" id="llmModalSave" data-testid="at-llm-modal-save">Save</button>
|
|
305
|
-
</div>
|
|
306
|
-
</div>
|
|
307
|
-
</div>
|
|
308
|
-
|
|
309
|
-
<!-- Loading Overlay -->
|
|
310
|
-
<div class="loading-overlay" id="loadingOverlay" style="display: none;" data-testid="at-loading-overlay">
|
|
311
|
-
<div class="spinner"></div>
|
|
312
|
-
<span>Connecting...</span>
|
|
313
|
-
</div>
|
|
314
|
-
|
|
315
|
-
<!-- Header Tooltip -->
|
|
316
|
-
<div id="headerTooltip" class="header-tooltip" data-testid="at-header-tooltip"></div>
|
|
317
|
-
|
|
318
|
-
<!-- Toast Notifications -->
|
|
319
|
-
<div id="toastContainer" class="toast-container" data-testid="at-toast-container"></div>
|
|
320
|
-
|
|
321
|
-
<script src="/agent-tester/static/script.js"></script>
|
|
322
|
-
</body>
|
|
323
|
-
</html>
|
|
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>MCP Agent Tester</title>
|
|
7
|
+
<link rel="stylesheet" href="/agent-tester/static/styles.css">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap" rel="stylesheet">
|
|
11
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
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">
|
|
59
|
+
<!-- Sidebar -->
|
|
60
|
+
<aside class="sidebar" id="sidebar" data-testid="at-sidebar">
|
|
61
|
+
<div class="sidebar-content">
|
|
62
|
+
<!-- Server Connection -->
|
|
63
|
+
<section class="config-section">
|
|
64
|
+
<form id="mcpConnectionForm" class="connection-form" data-testid="at-connection-form">
|
|
65
|
+
<div class="url-transport-row">
|
|
66
|
+
<div class="form-group url-group">
|
|
67
|
+
<label for="serverUrl">MCP Server URL</label>
|
|
68
|
+
<div class="custom-select-container">
|
|
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">
|
|
71
|
+
<span class="material-icons-round">expand_more</span>
|
|
72
|
+
</button>
|
|
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">
|
|
75
|
+
<span>Add new URL</span>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="dropdown-separator"></div>
|
|
78
|
+
<div id="savedUrlsList" data-testid="at-saved-urls-list"></div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="form-group transport-group">
|
|
83
|
+
<label for="transport">Transport</label>
|
|
84
|
+
<select id="transport" name="transport" required data-testid="at-transport">
|
|
85
|
+
<option value="http">HTTP</option>
|
|
86
|
+
<option value="sse">SSE</option>
|
|
87
|
+
</select>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<button type="submit" class="btn btn-connect" data-testid="at-connect-btn">
|
|
92
|
+
<span class="material-icons-round">power</span>
|
|
93
|
+
Connect
|
|
94
|
+
</button>
|
|
95
|
+
<div id="connectedServers" class="server-status-bar" data-testid="at-connected-servers"></div>
|
|
96
|
+
</form>
|
|
97
|
+
</section>
|
|
98
|
+
|
|
99
|
+
<!-- Dynamic Headers -->
|
|
100
|
+
<section id="headersSection" class="config-section" style="display: none;" data-testid="at-headers-section">
|
|
101
|
+
<h3>HTTP Headers</h3>
|
|
102
|
+
<div id="dynamicHeaders" class="dynamic-headers" data-testid="at-dynamic-headers"></div>
|
|
103
|
+
</section>
|
|
104
|
+
|
|
105
|
+
<section class="config-section" data-testid="at-model-section">
|
|
106
|
+
<div class="form-group model-display-group">
|
|
107
|
+
<label>Model</label>
|
|
108
|
+
<div class="model-display-row">
|
|
109
|
+
<span id="modelDisplay" class="model-display" data-testid="at-model-display">—</span>
|
|
110
|
+
<button type="button" id="llmSettingsBtn" class="btn-icon" title="LLM Settings" data-testid="at-llm-settings-btn">
|
|
111
|
+
<span class="material-icons-round">settings</span>
|
|
112
|
+
</button>
|
|
113
|
+
</div>
|
|
114
|
+
<div id="apiKeyWarning" class="api-key-warning" style="display: none;" data-testid="at-api-key-warning">API Key is not set</div>
|
|
115
|
+
</div>
|
|
116
|
+
</section>
|
|
117
|
+
|
|
118
|
+
<!-- Agent (System) Prompt -->
|
|
119
|
+
<section class="config-section">
|
|
120
|
+
<div class="form-group">
|
|
121
|
+
<div class="prompt-label-row">
|
|
122
|
+
<label for="systemPrompt">Agent Prompt<span class="prompt-modified-badge" id="promptModifiedBadge" style="display:none">(modified)</span></label>
|
|
123
|
+
<div class="prompt-actions">
|
|
124
|
+
<button type="button" class="btn-view-original" id="btnViewOriginalPrompt" title="View original agent prompt" data-testid="at-system-prompt-view-original" style="display:none">
|
|
125
|
+
<span class="material-icons-round">visibility</span>
|
|
126
|
+
</button>
|
|
127
|
+
<button type="button" class="btn-reset-prompt" id="btnResetAgentPrompt" title="Reset to original agent prompt" data-testid="at-system-prompt-reset" style="display:none">
|
|
128
|
+
<span class="material-icons-round">restart_alt</span>
|
|
129
|
+
</button>
|
|
130
|
+
<button type="button" class="btn-enlarge" data-target="systemPrompt" title="Enlarge" data-testid="at-system-prompt-enlarge">
|
|
131
|
+
<span class="material-icons-round">open_in_full</span>
|
|
132
|
+
</button>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
<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>
|
|
136
|
+
</div>
|
|
137
|
+
</section>
|
|
138
|
+
|
|
139
|
+
<!-- Custom Prompt -->
|
|
140
|
+
<section class="config-section">
|
|
141
|
+
<div class="form-group">
|
|
142
|
+
<div class="prompt-label-row">
|
|
143
|
+
<label for="customPrompt">Custom Prompt</label>
|
|
144
|
+
<button type="button" class="btn-enlarge" data-target="customPrompt" title="Enlarge" data-testid="at-custom-prompt-enlarge">
|
|
145
|
+
<span class="material-icons-round">open_in_full</span>
|
|
146
|
+
</button>
|
|
147
|
+
</div>
|
|
148
|
+
<textarea id="customPrompt" placeholder="Enter additional custom prompt..." rows="2" data-testid="at-custom-prompt"></textarea>
|
|
149
|
+
</div>
|
|
150
|
+
</section>
|
|
151
|
+
|
|
152
|
+
</div>
|
|
153
|
+
</aside>
|
|
154
|
+
|
|
155
|
+
<!-- Main Chat Area -->
|
|
156
|
+
<main class="main-content" data-testid="at-main">
|
|
157
|
+
<header class="chat-header" data-testid="at-chat-header">
|
|
158
|
+
<button class="sidebar-toggle mobile-only" id="sidebarToggleMobile" data-testid="at-sidebar-toggle-mobile">
|
|
159
|
+
<span class="material-icons-round">menu</span>
|
|
160
|
+
</button>
|
|
161
|
+
<div class="chat-info">
|
|
162
|
+
<div class="chat-title">
|
|
163
|
+
<span class="material-icons-round header-icon">smart_toy</span>
|
|
164
|
+
<h1>MCP Agent Tester</h1>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="chat-actions">
|
|
168
|
+
<select id="defaultDisplayFormat" class="header-format-select" title="Default display format" data-testid="at-default-format">
|
|
169
|
+
<option value="HTML">HTML</option>
|
|
170
|
+
<option value="MD">MD</option>
|
|
171
|
+
</select>
|
|
172
|
+
<button id="themeToggle" class="btn-icon" title="Toggle theme" data-testid="at-theme-toggle">
|
|
173
|
+
<span class="material-icons-round">dark_mode</span>
|
|
174
|
+
</button>
|
|
175
|
+
<button id="clearChat" class="btn-icon" title="Clear Chat" data-testid="at-clear-chat">
|
|
176
|
+
<span class="material-icons-round">delete_outline</span>
|
|
177
|
+
</button>
|
|
178
|
+
<button id="logoutBtn" class="btn-icon" title="Logout" style="display: none;" data-testid="at-logout-btn">
|
|
179
|
+
<span class="material-icons-round">logout</span>
|
|
180
|
+
</button>
|
|
181
|
+
</div>
|
|
182
|
+
</header>
|
|
183
|
+
|
|
184
|
+
<!-- Chat Messages -->
|
|
185
|
+
<div class="chat-container">
|
|
186
|
+
<div id="chatMessages" class="chat-messages" data-testid="at-chat-messages">
|
|
187
|
+
<div class="message assistant welcome" data-testid="at-welcome-message">
|
|
188
|
+
<div class="message-avatar">
|
|
189
|
+
<span class="material-icons-round">smart_toy</span>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="message-content">
|
|
192
|
+
<div class="welcome-card">
|
|
193
|
+
<p>This application allows you to test and interact with MCP servers through an AI agent.</p>
|
|
194
|
+
<div class="getting-started">
|
|
195
|
+
<h4>Getting Started</h4>
|
|
196
|
+
<ol>
|
|
197
|
+
<li>Configure an MCP server connection in the sidebar</li>
|
|
198
|
+
<li>Specify HTTP header values, if required</li>
|
|
199
|
+
<li>Select the model and specify the parameters</li>
|
|
200
|
+
<li>Correct or set an agent (system) prompt if needed</li>
|
|
201
|
+
<li>Set custom prompt if needed</li>
|
|
202
|
+
<li>Start chatting with the AI agent</li>
|
|
203
|
+
</ol>
|
|
204
|
+
</div>
|
|
205
|
+
<p class="welcome-hint">The agent will use the connected MCP server's tools!</p>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<!-- Chat Input -->
|
|
213
|
+
<div class="chat-input-container">
|
|
214
|
+
<div class="typing-indicator" id="typingIndicator" data-testid="at-typing-indicator">
|
|
215
|
+
<span></span>
|
|
216
|
+
<span></span>
|
|
217
|
+
<span></span>
|
|
218
|
+
</div>
|
|
219
|
+
<div class="chat-input-wrapper">
|
|
220
|
+
<textarea id="messageInput" placeholder="Type your message..." rows="1" maxlength="40000" data-testid="at-message-input"></textarea>
|
|
221
|
+
<div class="input-actions">
|
|
222
|
+
<span id="charCount" class="char-count" data-testid="at-char-count">0/40000</span>
|
|
223
|
+
<button id="sendButton" class="btn-send" disabled data-testid="at-send-btn">
|
|
224
|
+
<span class="material-icons-round">send</span>
|
|
225
|
+
</button>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
</main>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<!-- Prompt Enlarge Modal -->
|
|
233
|
+
<div class="prompt-modal-overlay" id="promptModal" style="display: none;" data-testid="at-prompt-modal">
|
|
234
|
+
<div class="prompt-modal">
|
|
235
|
+
<div class="prompt-modal-header">
|
|
236
|
+
<h3 id="promptModalTitle" data-testid="at-prompt-modal-title">Agent Prompt</h3>
|
|
237
|
+
<button type="button" class="btn-icon" id="promptModalClose" title="Close" data-testid="at-prompt-modal-close">
|
|
238
|
+
<span class="material-icons-round">close</span>
|
|
239
|
+
</button>
|
|
240
|
+
</div>
|
|
241
|
+
<textarea id="promptModalTextarea" rows="20" data-testid="at-prompt-modal-textarea"></textarea>
|
|
242
|
+
<div class="prompt-modal-footer">
|
|
243
|
+
<button type="button" class="btn btn-primary" id="promptModalSave" data-testid="at-prompt-modal-save">Apply</button>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<!-- LLM Settings Modal -->
|
|
249
|
+
<div class="llm-modal-overlay" id="llmModal" style="display: none;" data-testid="at-llm-modal">
|
|
250
|
+
<div class="llm-modal">
|
|
251
|
+
<div class="llm-modal-header">
|
|
252
|
+
<h3>LLM Settings</h3>
|
|
253
|
+
<button type="button" class="btn-icon" id="llmModalClose" title="Close" data-testid="at-llm-modal-close">
|
|
254
|
+
<span class="material-icons-round">close</span>
|
|
255
|
+
</button>
|
|
256
|
+
</div>
|
|
257
|
+
<form id="llmSettingsForm" class="llm-modal-body" autocomplete="off">
|
|
258
|
+
<div class="form-group">
|
|
259
|
+
<label for="llmBaseUrl">Base URL</label>
|
|
260
|
+
<input type="url" id="llmBaseUrl" placeholder="https://api.openai.com/v1" data-testid="at-llm-base-url">
|
|
261
|
+
</div>
|
|
262
|
+
<div class="form-group">
|
|
263
|
+
<label for="llmApiKey">API Key</label>
|
|
264
|
+
<div class="input-with-toggle">
|
|
265
|
+
<input type="password" id="llmApiKey" placeholder="sk-..." autocomplete="off" data-testid="at-llm-api-key">
|
|
266
|
+
<button type="button" class="btn-icon" id="llmApiKeyToggle" title="Show/hide" data-testid="at-llm-api-key-toggle">
|
|
267
|
+
<span class="material-icons-round">visibility</span>
|
|
268
|
+
</button>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
<div class="form-group">
|
|
272
|
+
<label for="llmModelName">Model Name</label>
|
|
273
|
+
<div class="custom-select-container">
|
|
274
|
+
<input type="text" id="llmModelName" placeholder="gpt-5.4-nano" autocomplete="off" data-testid="at-llm-model-name">
|
|
275
|
+
<button type="button" id="llmModelDropdownToggle" class="dropdown-toggle" title="Choose model" data-testid="at-llm-model-dropdown-toggle">
|
|
276
|
+
<span class="material-icons-round">expand_more</span>
|
|
277
|
+
</button>
|
|
278
|
+
<div id="llmModelDropdownList" class="dropdown-list" style="display: none;" data-testid="at-llm-model-dropdown-list"></div>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
<div class="form-row">
|
|
282
|
+
<div class="form-group">
|
|
283
|
+
<label for="llmTemperature">Temperature</label>
|
|
284
|
+
<input type="number" id="llmTemperature" min="0" max="2" step="0.1" value="0.2" data-testid="at-llm-temperature">
|
|
285
|
+
</div>
|
|
286
|
+
<div class="form-group">
|
|
287
|
+
<label for="llmMaxTokens">Max Tokens</label>
|
|
288
|
+
<input type="number" id="llmMaxTokens" min="1" max="128000" step="1" value="2048" data-testid="at-llm-max-tokens">
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
<div class="form-row">
|
|
292
|
+
<div class="form-group">
|
|
293
|
+
<label for="llmMaxTurns">Max Turns</label>
|
|
294
|
+
<input type="number" id="llmMaxTurns" min="1" max="20" step="1" value="10" data-testid="at-llm-max-turns">
|
|
295
|
+
</div>
|
|
296
|
+
<div class="form-group">
|
|
297
|
+
<label for="llmLimitChars">Limit (chars)</label>
|
|
298
|
+
<input type="number" id="llmLimitChars" min="100" max="100000" step="100" value="20000" data-testid="at-llm-limit-chars">
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</form>
|
|
302
|
+
<div class="llm-modal-footer">
|
|
303
|
+
<button type="button" class="btn" id="llmModalCancel" data-testid="at-llm-modal-cancel">Cancel</button>
|
|
304
|
+
<button type="button" class="btn btn-primary" id="llmModalSave" data-testid="at-llm-modal-save">Save</button>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
<!-- Loading Overlay -->
|
|
310
|
+
<div class="loading-overlay" id="loadingOverlay" style="display: none;" data-testid="at-loading-overlay">
|
|
311
|
+
<div class="spinner"></div>
|
|
312
|
+
<span>Connecting...</span>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<!-- Header Tooltip -->
|
|
316
|
+
<div id="headerTooltip" class="header-tooltip" data-testid="at-header-tooltip"></div>
|
|
317
|
+
|
|
318
|
+
<!-- Toast Notifications -->
|
|
319
|
+
<div id="toastContainer" class="toast-container" data-testid="at-toast-container"></div>
|
|
320
|
+
|
|
321
|
+
<script src="/agent-tester/static/script.js"></script>
|
|
322
|
+
</body>
|
|
323
|
+
</html>
|