fa-mcp-sdk 0.4.17 → 0.4.19
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/FA-MCP-SDK-DOC/08-agent-tester-and-headless-api.md +21 -10
- package/cli-template/package.json +1 -1
- package/config/_local.yaml +312 -148
- package/config/default.yaml +312 -212
- package/config/local.yaml +5 -1
- package/dist/core/_types_/config.d.ts +1 -0
- 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 +6 -0
- package/dist/core/agent-tester/agent-tester-router.js.map +1 -1
- package/dist/core/agent-tester/services/TesterAgentService.d.ts.map +1 -1
- package/dist/core/agent-tester/services/TesterAgentService.js +14 -8
- package/dist/core/agent-tester/services/TesterAgentService.js.map +1 -1
- package/dist/core/web/static/agent-tester/index.html +69 -49
- package/dist/core/web/static/agent-tester/script.js +254 -82
- package/dist/core/web/static/agent-tester/styles.css +134 -0
- package/package.json +1 -1
package/config/default.yaml
CHANGED
|
@@ -1,212 +1,312 @@
|
|
|
1
|
-
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
#> ========================================================================
|
|
4
|
+
#> Outbound access points — connection settings for remote services this MCP talks to.
|
|
5
|
+
#> Each entry under accessPoints is keyed by a logical alias used in code to look up host/port/token.
|
|
6
|
+
#> By default, hosts/ports are resolved via Consul; the fields below let you override that or
|
|
7
|
+
#> describe a service that is not registered in Consul at all.
|
|
8
|
+
#> ========================================================================
|
|
9
|
+
# accessPoints:
|
|
10
|
+
# myService:
|
|
11
|
+
# #> Human-readable title shown in diagnostics and admin pages
|
|
12
|
+
# title: 'My remote service'
|
|
13
|
+
# #> Remote service host (used when noConsul=true or as a fallback)
|
|
14
|
+
# host: <host>
|
|
15
|
+
# #> Remote service TCP port
|
|
16
|
+
# port: 9999
|
|
17
|
+
# #> Auth token sent to the remote service
|
|
18
|
+
# token: '***'
|
|
19
|
+
# #> Use if the service developers do not provide registration in consul —
|
|
20
|
+
# #> disables Consul lookup and forces use of the host/port above
|
|
21
|
+
# noConsul: true
|
|
22
|
+
# #> Override the Consul service name to look up (defaults to the alias key)
|
|
23
|
+
# consulServiceName: <consulServiceName>
|
|
24
|
+
|
|
25
|
+
#> Active Directory / LDAP settings.
|
|
26
|
+
#> Used for authentication/authorization (e.g., NTLM in admin panel) and checking user membership in AD groups.
|
|
27
|
+
ad:
|
|
28
|
+
#> Map of domains. Key is a domain name
|
|
29
|
+
domains:
|
|
30
|
+
MYDOMAIN:
|
|
31
|
+
#> Marks this domain as default one
|
|
32
|
+
default: true
|
|
33
|
+
#> List of LDAP controllers (can be multiple for failover).
|
|
34
|
+
#> Use ldap:// for plain LDAP or ldaps:// for LDAP over TLS.
|
|
35
|
+
controllers:
|
|
36
|
+
- 'ldap://c1.corp.com'
|
|
37
|
+
- 'ldap://c2.corp.com'
|
|
38
|
+
#> Service account (bind DN or username) used to connect to LDAP.
|
|
39
|
+
username: '***'
|
|
40
|
+
#> Service account password.
|
|
41
|
+
password: '***'
|
|
42
|
+
#> Base DN for LDAP searches. Auto-derived from controller URL if not set.
|
|
43
|
+
# baseDn: 'DC=corp,DC=com'
|
|
44
|
+
#> Cache TTL for group membership checks (default: 600000 = 10 min)
|
|
45
|
+
# groupCacheTtlMs: 600000
|
|
46
|
+
#> Cache TTL for user/group DN lookups (default: 86400000 = 24 hours)
|
|
47
|
+
# dnCacheTtlMs: 86400000
|
|
48
|
+
|
|
49
|
+
#> Built-in chat UI for testing MCP tools with an LLM.
|
|
50
|
+
agentTester:
|
|
51
|
+
#> Enables the Agent Tester UI at /agent-tester
|
|
52
|
+
enabled: true
|
|
53
|
+
#> true (default) — show Agent Tester link in home page footer; false — hide link without disabling tester
|
|
54
|
+
showFooterLink: true
|
|
55
|
+
#> true — protect Agent Tester with full multi-auth (permanentTokens/basic/JWT/custom);
|
|
56
|
+
#> browser users see a login dialog, headless clients pass Authorization header
|
|
57
|
+
useAuth: false
|
|
58
|
+
#> Browser login session lifetime in milliseconds. Default: 28800000 (8 hours).
|
|
59
|
+
#> Applies only when useAuth is true. Sessions are in-memory on the server — lost on restart.
|
|
60
|
+
sessionTtlMs: 28800000
|
|
61
|
+
#> true — emit structured JSON events (tool_call, tool_result, llm_response, response) to stdout during agent execution
|
|
62
|
+
logJson: false
|
|
63
|
+
#> OpenAI-compatible LLM credentials used by Agent Tester to drive tool calls
|
|
64
|
+
openAi:
|
|
65
|
+
#> API key for LLM provider (OpenAI and compatible)
|
|
66
|
+
apiKey: '***'
|
|
67
|
+
#> Key name (for logging and debugging)
|
|
68
|
+
apiKeyName: '***'
|
|
69
|
+
#> Override base URL for OpenAI-compatible providers (Azure, local LLMs, proxies)
|
|
70
|
+
baseURL: ''
|
|
71
|
+
#> -------------------------------------------------------------------------
|
|
72
|
+
#> When true, baseURL and apiKey are sent to the Agent Tester UI as defaults
|
|
73
|
+
#> and auto-saved into the browser's localStorage on first open. The UI shows
|
|
74
|
+
#> them in the LLM Settings dialog. Enable only if the tester is protected by
|
|
75
|
+
#> useAuth=true OR deployed in a trusted network — otherwise anyone who opens
|
|
76
|
+
#> /agent-tester can read the key. Default: false (safe).
|
|
77
|
+
#> -------------------------------------------------------------------------
|
|
78
|
+
exposeToClient: false
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
#> Key-value pairs for HTTP requests that should be auto-populated in agentTester
|
|
82
|
+
#> Example: X-User-Id: 12345
|
|
83
|
+
httpHeaders:
|
|
84
|
+
|
|
85
|
+
#> --------------------------------------------------
|
|
86
|
+
#> CACHING Reduces API calls by caching responses
|
|
87
|
+
#> --------------------------------------------------
|
|
88
|
+
cache:
|
|
89
|
+
#> Time in seconds to check all data and delete expired keys
|
|
90
|
+
checkPeriod: 1200
|
|
91
|
+
#> Default maximum number of cached items
|
|
92
|
+
maxItems: 1000
|
|
93
|
+
#> Default Cache TTL in seconds
|
|
94
|
+
ttlSeconds: 300
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
#> Consul service discovery and registration settings
|
|
98
|
+
consul:
|
|
99
|
+
#> Health check parameters reported to Consul for this service
|
|
100
|
+
check:
|
|
101
|
+
#> How often Consul invokes the health check
|
|
102
|
+
interval: '10s'
|
|
103
|
+
#> Per-attempt timeout for the health check
|
|
104
|
+
timeout: '5s'
|
|
105
|
+
#> Auto-deregister the service after it has been critical for this duration
|
|
106
|
+
deregistercriticalserviceafter: '3m'
|
|
107
|
+
agent:
|
|
108
|
+
#> Credentials for getting information about services in the DEV DC
|
|
109
|
+
dev:
|
|
110
|
+
#> DEV datacenter name
|
|
111
|
+
dc: '{{consul.agent.dev.dc}}'
|
|
112
|
+
#> DEV consul agent host
|
|
113
|
+
host: '{{consul.agent.dev.host}}'
|
|
114
|
+
#> DEV consul agent port
|
|
115
|
+
port: 443
|
|
116
|
+
#> Use HTTPS for the DEV consul agent
|
|
117
|
+
secure: true
|
|
118
|
+
#> Token for getting information about DEV services
|
|
119
|
+
token: '***'
|
|
120
|
+
#> Credentials for getting information about services in the PROD DC
|
|
121
|
+
prd:
|
|
122
|
+
#> PROD datacenter name
|
|
123
|
+
dc: '{{consul.agent.prd.dc}}'
|
|
124
|
+
#> PROD consul agent host
|
|
125
|
+
host: '{{consul.agent.prd.host}}'
|
|
126
|
+
#> PROD consul agent port
|
|
127
|
+
port: 443
|
|
128
|
+
#> Use HTTPS for the PROD consul agent
|
|
129
|
+
secure: true
|
|
130
|
+
#> Token for obtaining information about PROD services
|
|
131
|
+
token: '***'
|
|
132
|
+
#> Credentials for registering the service with Consul
|
|
133
|
+
reg:
|
|
134
|
+
#> The host of the consul agent where the service will be registered.
|
|
135
|
+
#> If not specified, the server on which the service is running is used
|
|
136
|
+
host: null
|
|
137
|
+
#> Consul agent port for registration
|
|
138
|
+
port: 8500
|
|
139
|
+
#> Use HTTPS when calling the registration agent
|
|
140
|
+
secure: false
|
|
141
|
+
#> Token for registering the service in the consul agent
|
|
142
|
+
token: '***'
|
|
143
|
+
service:
|
|
144
|
+
#> true — Allows registration of the service with the consul
|
|
145
|
+
enable: {{consul.service.enable}}
|
|
146
|
+
#> Here you can specify an alternative name for the service.
|
|
147
|
+
#> String "<name>" will be replaced by env SERVICE_NAME | <package.json>.name at initialization
|
|
148
|
+
name: <name>
|
|
149
|
+
#> This value will be specified as a suffix in the id of the service
|
|
150
|
+
instance: '{{SERVICE_INSTANCE}}'
|
|
151
|
+
#> String "<version>" will be replaced by <package.json>.version at initialization
|
|
152
|
+
version: <version>
|
|
153
|
+
#> Here you can specify an alternative name description.
|
|
154
|
+
#> String "<description>" will be replaced by <package.json>.description at initialization
|
|
155
|
+
description: <description>
|
|
156
|
+
#> If null or empty array — Will be pulled up from package.keywords at initialization
|
|
157
|
+
tags: [ ]
|
|
158
|
+
#> Arbitrary metadata published with the service registration
|
|
159
|
+
meta:
|
|
160
|
+
#> "Home" page link template
|
|
161
|
+
who: 'http://{address}:{port}/'
|
|
162
|
+
#> Used to generate the service ID
|
|
163
|
+
envCode:
|
|
164
|
+
#> Production environment code
|
|
165
|
+
prod: '{{consul.envCode.prod}}'
|
|
166
|
+
#> Development environment code
|
|
167
|
+
dev: '{{consul.envCode.dev}}'
|
|
168
|
+
|
|
169
|
+
#> Database connections used by the service
|
|
170
|
+
db:
|
|
171
|
+
#> PostgreSQL connection pool definitions
|
|
172
|
+
postgres:
|
|
173
|
+
#> Map of named PostgreSQL databases (key is a logical alias used in code)
|
|
174
|
+
dbs:
|
|
175
|
+
main:
|
|
176
|
+
#> Human-readable label shown in diagnostics and admin pages
|
|
177
|
+
label: 'My Database'
|
|
178
|
+
#> To exclude the use of the database, you need to set host = ''
|
|
179
|
+
host: ''
|
|
180
|
+
#> PostgreSQL server port
|
|
181
|
+
port: 5432
|
|
182
|
+
#> Database name
|
|
183
|
+
database: <database>
|
|
184
|
+
#> Database user
|
|
185
|
+
user: <user>
|
|
186
|
+
#> Database password
|
|
187
|
+
password: <password>
|
|
188
|
+
#> List of PostgreSQL extensions required by the service (e.g., 'pgvector', 'uuid-ossp')
|
|
189
|
+
usedExtensions: []
|
|
190
|
+
# - pgvector
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
#> Logging configuration (tslog-based)
|
|
194
|
+
logger:
|
|
195
|
+
#> Minimum log level: silly | trace | debug | info | warn | error | fatal
|
|
196
|
+
level: info
|
|
197
|
+
#> To use or not to use logging to a file
|
|
198
|
+
useFileLogger: {{logger.useFileLogger}}
|
|
199
|
+
#> Absolute path to the folder where logs will be written. Default <proj_root>/../logs
|
|
200
|
+
dir: '{{logger.dir}}'
|
|
201
|
+
|
|
202
|
+
#> MCP (Model Context Protocol) server settings
|
|
203
|
+
mcp:
|
|
204
|
+
#> Transport for the MCP server: stdio | http
|
|
205
|
+
transportType: http
|
|
206
|
+
#> Response format configuration.
|
|
207
|
+
#> - structuredContent — default — the response in result.structuredContent returns JSON
|
|
208
|
+
#> - text — in the response, serialized JSON is returned in result.content[0].text
|
|
209
|
+
toolAnswerAs: text
|
|
210
|
+
#> Per-client request rate limiting for the MCP endpoint
|
|
211
|
+
rateLimit:
|
|
212
|
+
#> Maximum number of requests allowed within windowMs
|
|
213
|
+
maxRequests: 100
|
|
214
|
+
#> Rate limit window length in milliseconds (1 minute)
|
|
215
|
+
windowMs: 60000
|
|
216
|
+
|
|
217
|
+
#> Swagger / OpenAPI documentation settings
|
|
218
|
+
swagger:
|
|
219
|
+
#> An array of servers that will be added to swagger docs
|
|
220
|
+
servers:
|
|
221
|
+
# - url: http://localhost:{{port}}
|
|
222
|
+
# description: "Development server (localhost)"
|
|
223
|
+
# - url: http://0.0.0.0:{{port}}
|
|
224
|
+
# description: "Development server (all interfaces)"
|
|
225
|
+
# - url: http://<prod_server_host_or_ip>:{{port}}
|
|
226
|
+
# description: "PROD server"
|
|
227
|
+
- url: https://{{mcp.domain}}
|
|
228
|
+
description: "PROD server"
|
|
229
|
+
|
|
230
|
+
#> Service home page (`/`) customization
|
|
231
|
+
homePage:
|
|
232
|
+
#> Optional help link rendered in the home page footer
|
|
233
|
+
helpLink:
|
|
234
|
+
#> If empty — help link is not shown in footer
|
|
235
|
+
url: ''
|
|
236
|
+
#> Link text (default: "Help")
|
|
237
|
+
label: 'Help'
|
|
238
|
+
|
|
239
|
+
#> UI theme overrides for built-in pages (home, admin, agent-tester)
|
|
240
|
+
uiColor:
|
|
241
|
+
#> Font color of the header and a number of interface elements on the HOME page
|
|
242
|
+
primary: '#0f65dc'
|
|
243
|
+
|
|
244
|
+
#> HTTP server hosting MCP, admin panel, agent tester, swagger and health endpoints
|
|
245
|
+
webServer:
|
|
246
|
+
#> Bind address for the HTTP server
|
|
247
|
+
host: '0.0.0.0'
|
|
248
|
+
#> TCP port for the HTTP server
|
|
249
|
+
port: {{port}}
|
|
250
|
+
#> Array of hosts that CORS skips
|
|
251
|
+
originHosts: [ 'localhost', '0.0.0.0' ]
|
|
252
|
+
#> ========================================================================
|
|
253
|
+
#> Authentication is configured here only when accessing the MCP server.
|
|
254
|
+
#> Authentication in services that enable tools, resources, and prompts
|
|
255
|
+
#> is implemented more deeply. To do this, you need to use the information passed in HTTP headers.
|
|
256
|
+
#> You can also use a custom authorization function.
|
|
257
|
+
#> ========================================================================
|
|
258
|
+
auth:
|
|
259
|
+
#> Enables/disables authorization
|
|
260
|
+
enabled: false
|
|
261
|
+
#> ========================================================================
|
|
262
|
+
#> PERMANENT SERVER TOKENS
|
|
263
|
+
#> Static tokens for server-to-server communication
|
|
264
|
+
#> CPU cost: O(1) — fastest authentication method
|
|
265
|
+
#>
|
|
266
|
+
#> To enable this authentication, you need to set auth.enabled = true
|
|
267
|
+
#> and set one token of at least 20 characters in length
|
|
268
|
+
#> ========================================================================
|
|
269
|
+
#> Add your server tokens here: ['token1', 'token2']
|
|
270
|
+
permanentServerTokens: [ ]
|
|
271
|
+
|
|
272
|
+
#> ========================================================================
|
|
273
|
+
#> JWT TOKEN WITH SYMMETRIC ENCRYPTION
|
|
274
|
+
#> Custom JWT tokens with AES-256 encryption
|
|
275
|
+
#> CPU cost: Medium — decryption + JSON parsing
|
|
276
|
+
#>
|
|
277
|
+
#> To enable this authentication, you need to set auth.enabled = true and set
|
|
278
|
+
#> encryptKey to at least 20 characters
|
|
279
|
+
#> ========================================================================
|
|
280
|
+
jwtToken:
|
|
281
|
+
#> Symmetric encryption key to generate a token for this MCP (minimum 8 chars)
|
|
282
|
+
encryptKey: '***'
|
|
283
|
+
#> If webServer.auth.enabled and the parameter true, the service name and the service specified in the token will be checked
|
|
284
|
+
checkMCPName: true
|
|
285
|
+
#> If true and JWT token contains non-empty 'ip' field,
|
|
286
|
+
#> the client IP will be checked against the allowed list in the token
|
|
287
|
+
isCheckIP: false
|
|
288
|
+
|
|
289
|
+
#> ========================================================================
|
|
290
|
+
#> Basic Authentication — Base64 encoded username:password
|
|
291
|
+
#> CPU cost: Medium — Base64 decoding + string comparison
|
|
292
|
+
#> To enable this authentication, you need to set auth.enabled = true
|
|
293
|
+
#> and set username and password to valid values
|
|
294
|
+
#> ========================================================================
|
|
295
|
+
basic:
|
|
296
|
+
#> Username for HTTP Basic auth
|
|
297
|
+
username: ''
|
|
298
|
+
#> Password for HTTP Basic auth
|
|
299
|
+
password: '***'
|
|
300
|
+
|
|
301
|
+
#> ========================================================================
|
|
302
|
+
#> ADMIN PANEL AUTHENTICATION
|
|
303
|
+
#> Token generation page available at /admin endpoint
|
|
304
|
+
#> Supports 4 authentication methods: permanentServerTokens, basic, jwtToken, ntlm
|
|
305
|
+
#> ========================================================================
|
|
306
|
+
adminAuth:
|
|
307
|
+
#> Enable/disable admin panel
|
|
308
|
+
enabled: true
|
|
309
|
+
#> Authentication type for admin panel: 'permanentServerTokens' | 'basic' | 'jwtToken' | 'ntlm'
|
|
310
|
+
#> For permanentServerTokens, basic, jwtToken — uses credentials from webServer.auth section
|
|
311
|
+
#> For ntlm — uses AD configuration from ad.domains section (no additional credentials needed)
|
|
312
|
+
type: 'basic'
|
package/config/local.yaml
CHANGED
|
@@ -4,9 +4,10 @@ agentTester:
|
|
|
4
4
|
showFooterLink: true # true (default) — show Agent Tester link in home page footer; false — hide link without disabling tester
|
|
5
5
|
useAuth: true
|
|
6
6
|
openAi:
|
|
7
|
-
apiKey: sk-proj-
|
|
7
|
+
apiKey: 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
|
|
8
8
|
apiKeyName: oai-aite-vvmakarov
|
|
9
9
|
baseURL: ''
|
|
10
|
+
exposeToClient: false
|
|
10
11
|
|
|
11
12
|
ad:
|
|
12
13
|
domains:
|
|
@@ -95,6 +96,9 @@ webServer:
|
|
|
95
96
|
encryptKey: '66666666-7777-8888-9999-000000000000'
|
|
96
97
|
# If webServer.auth.enabled and the parameter true, the service name and the service specified in the token will be checked
|
|
97
98
|
checkMCPName: true
|
|
99
|
+
# If true and JWT token contains non-empty 'ip' field,
|
|
100
|
+
# the client IP will be checked against the allowed list in the token
|
|
101
|
+
isCheckIP: false
|
|
98
102
|
basic:
|
|
99
103
|
username: vpupkin
|
|
100
104
|
password: '1'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/_types_/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,UAAU,gBAAgB;IACxB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,I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B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAEpB,YAAY,EAAE,aAAa,CAAC;IAC5B,MAAM,EAAE,eAAe,GAAG;QACxB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC;YACb,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;KACH,CAAC;IACF,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;KACjB,CAAA;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tester-router.d.ts","sourceRoot":"","sources":["../../../src/core/agent-tester/agent-tester-router.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AA4BjC,wBAAgB,uBAAuB,CAAE,OAAO,GAAE;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"agent-tester-router.d.ts","sourceRoot":"","sources":["../../../src/core/agent-tester/agent-tester-router.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AA4BjC,wBAAgB,uBAAuB,CAAE,OAAO,GAAE;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C,GAAG,MAAM,CAwQd"}
|
|
@@ -62,10 +62,16 @@ export function createAgentTesterRouter(options = {}) {
|
|
|
62
62
|
// ===== Config API =====
|
|
63
63
|
// API: Get default config (port, MCP URL)
|
|
64
64
|
router.get('/api/config', (req, res) => {
|
|
65
|
+
const openAi = appConfig.agentTester?.openAi;
|
|
66
|
+
const expose = !!openAi?.exposeToClient;
|
|
65
67
|
res.json({
|
|
66
68
|
defaultMcpUrl: options.defaultMcpUrl || null,
|
|
67
69
|
authEnabled: !!appConfig.webServer?.auth?.enabled,
|
|
68
70
|
httpHeaders: appConfig.agentTester?.httpHeaders || {},
|
|
71
|
+
llmDefaults: {
|
|
72
|
+
baseURL: expose ? (openAi?.baseURL || '') : '',
|
|
73
|
+
apiKey: expose ? (openAi?.apiKey || '') : '',
|
|
74
|
+
},
|
|
69
75
|
});
|
|
70
76
|
});
|
|
71
77
|
// API: Get auth token for auto-fill (MCP server Authorization header)
|