@timetotest/cli 0.1.10 → 0.2.0
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 +201 -190
- package/dist/bin/ttt.js +4 -2
- package/dist/bin/ttt.js.map +1 -1
- package/dist/package.json +20 -3
- package/dist/src/commands/ask/AskApp.js +121 -0
- package/dist/src/commands/ask/AskApp.js.map +1 -0
- package/dist/src/commands/ask/components/AssistantResponse.js +31 -0
- package/dist/src/commands/ask/components/AssistantResponse.js.map +1 -0
- package/dist/src/commands/ask/components/Banner.js +15 -0
- package/dist/src/commands/ask/components/Banner.js.map +1 -0
- package/dist/src/commands/ask/components/ChatInput.js +93 -0
- package/dist/src/commands/ask/components/ChatInput.js.map +1 -0
- package/dist/src/commands/ask/components/Divider.js +17 -0
- package/dist/src/commands/ask/components/Divider.js.map +1 -0
- package/dist/src/commands/ask/components/IntroTips.js +19 -0
- package/dist/src/commands/ask/components/IntroTips.js.map +1 -0
- package/dist/src/commands/ask/components/MessageBubble.js +47 -0
- package/dist/src/commands/ask/components/MessageBubble.js.map +1 -0
- package/dist/src/commands/ask/components/SessionInfo.js +20 -0
- package/dist/src/commands/ask/components/SessionInfo.js.map +1 -0
- package/dist/src/commands/ask/components/StatusIndicator.js +67 -0
- package/dist/src/commands/ask/components/StatusIndicator.js.map +1 -0
- package/dist/src/commands/ask-ink.js +380 -0
- package/dist/src/commands/ask-ink.js.map +1 -0
- package/dist/src/commands/ask.js +138 -50
- package/dist/src/commands/ask.js.map +1 -1
- package/dist/src/commands/chat/ChatApp.js +125 -0
- package/dist/src/commands/chat/ChatApp.js.map +1 -0
- package/dist/src/commands/chat-ink.js +436 -0
- package/dist/src/commands/chat-ink.js.map +1 -0
- package/dist/src/commands/chat.js +82 -0
- package/dist/src/commands/chat.js.map +1 -0
- package/dist/src/commands/login.js +6 -4
- package/dist/src/commands/login.js.map +1 -1
- package/dist/src/commands/start-test.js +62 -88
- package/dist/src/commands/start-test.js.map +1 -1
- package/dist/src/commands/stream.js +9 -9
- package/dist/src/commands/stream.js.map +1 -1
- package/dist/src/commands/test.js +58 -125
- package/dist/src/commands/test.js.map +1 -1
- package/dist/src/lib/agent-orchestrator.js +546 -0
- package/dist/src/lib/agent-orchestrator.js.map +1 -0
- package/dist/src/lib/cloudinary-service.js +65 -0
- package/dist/src/lib/cloudinary-service.js.map +1 -0
- package/dist/src/lib/config.js +3 -2
- package/dist/src/lib/config.js.map +1 -1
- package/dist/src/lib/events.js +73 -60
- package/dist/src/lib/events.js.map +1 -1
- package/dist/src/lib/http.js +34 -1
- package/dist/src/lib/http.js.map +1 -1
- package/dist/src/lib/legacy-chat-runner.js +37 -0
- package/dist/src/lib/legacy-chat-runner.js.map +1 -0
- package/dist/src/lib/local-tools/api/api-discovery.js +17 -0
- package/dist/src/lib/local-tools/api/api-discovery.js.map +1 -0
- package/dist/src/lib/local-tools/api/build-request.js +20 -0
- package/dist/src/lib/local-tools/api/build-request.js.map +1 -0
- package/dist/src/lib/local-tools/api/extract-response-fields.js +26 -0
- package/dist/src/lib/local-tools/api/extract-response-fields.js.map +1 -0
- package/dist/src/lib/local-tools/api/generate-api-test.js +20 -0
- package/dist/src/lib/local-tools/api/generate-api-test.js.map +1 -0
- package/dist/src/lib/local-tools/api/generate-curl.js +8 -0
- package/dist/src/lib/local-tools/api/generate-curl.js.map +1 -0
- package/dist/src/lib/local-tools/api/get-api-parameters.js +17 -0
- package/dist/src/lib/local-tools/api/get-api-parameters.js.map +1 -0
- package/dist/src/lib/local-tools/api/index.js +10 -0
- package/dist/src/lib/local-tools/api/index.js.map +1 -0
- package/dist/src/lib/local-tools/api/request.js +43 -0
- package/dist/src/lib/local-tools/api/request.js.map +1 -0
- package/dist/src/lib/local-tools/api/set-auth-header.js +8 -0
- package/dist/src/lib/local-tools/api/set-auth-header.js.map +1 -0
- package/dist/src/lib/local-tools/api/types.js +2 -0
- package/dist/src/lib/local-tools/api/types.js.map +1 -0
- package/dist/src/lib/local-tools/api/utils.js +33 -0
- package/dist/src/lib/local-tools/api/utils.js.map +1 -0
- package/dist/src/lib/local-tools/api/validate-response.js +41 -0
- package/dist/src/lib/local-tools/api/validate-response.js.map +1 -0
- package/dist/src/lib/local-tools/file-tools.js +45 -0
- package/dist/src/lib/local-tools/file-tools.js.map +1 -0
- package/dist/src/lib/local-tools/general/discover-local-services.js +95 -0
- package/dist/src/lib/local-tools/general/discover-local-services.js.map +1 -0
- package/dist/src/lib/local-tools/general/index.js +2 -0
- package/dist/src/lib/local-tools/general/index.js.map +1 -0
- package/dist/src/lib/local-tools/ui/click-element.js +105 -0
- package/dist/src/lib/local-tools/ui/click-element.js.map +1 -0
- package/dist/src/lib/local-tools/ui/dom-rag.js +201 -0
- package/dist/src/lib/local-tools/ui/dom-rag.js.map +1 -0
- package/dist/src/lib/local-tools/ui/find-element.js +31 -0
- package/dist/src/lib/local-tools/ui/find-element.js.map +1 -0
- package/dist/src/lib/local-tools/ui/hover-element.js +94 -0
- package/dist/src/lib/local-tools/ui/hover-element.js.map +1 -0
- package/dist/src/lib/local-tools/ui/index.js +3 -0
- package/dist/src/lib/local-tools/ui/index.js.map +1 -0
- package/dist/src/lib/local-tools/ui/manage-tab.js +65 -0
- package/dist/src/lib/local-tools/ui/manage-tab.js.map +1 -0
- package/dist/src/lib/local-tools/ui/navigate.js +35 -0
- package/dist/src/lib/local-tools/ui/navigate.js.map +1 -0
- package/dist/src/lib/local-tools/ui/page-discovery.js +32 -0
- package/dist/src/lib/local-tools/ui/page-discovery.js.map +1 -0
- package/dist/src/lib/local-tools/ui/playwright-mcp.js +217 -0
- package/dist/src/lib/local-tools/ui/playwright-mcp.js.map +1 -0
- package/dist/src/lib/local-tools/ui/screenshot.js +19 -0
- package/dist/src/lib/local-tools/ui/screenshot.js.map +1 -0
- package/dist/src/lib/local-tools/ui/search-interactive-elements.js +18 -0
- package/dist/src/lib/local-tools/ui/search-interactive-elements.js.map +1 -0
- package/dist/src/lib/local-tools/ui/selector-resolver.js +153 -0
- package/dist/src/lib/local-tools/ui/selector-resolver.js.map +1 -0
- package/dist/src/lib/local-tools/ui/snapshot-query.js +129 -0
- package/dist/src/lib/local-tools/ui/snapshot-query.js.map +1 -0
- package/dist/src/lib/local-tools/ui/type-text.js +40 -0
- package/dist/src/lib/local-tools/ui/type-text.js.map +1 -0
- package/dist/src/lib/local-tools/ui/types.js +2 -0
- package/dist/src/lib/local-tools/ui/types.js.map +1 -0
- package/dist/src/lib/local-tools/utility/finish-overall-test.js +12 -0
- package/dist/src/lib/local-tools/utility/finish-overall-test.js.map +1 -0
- package/dist/src/lib/local-tools/utility/index.js +2 -0
- package/dist/src/lib/local-tools/utility/index.js.map +1 -0
- package/dist/src/lib/prompts/builder.js +38 -0
- package/dist/src/lib/prompts/builder.js.map +1 -0
- package/dist/src/lib/prompts/index.js +7 -0
- package/dist/src/lib/prompts/index.js.map +1 -0
- package/dist/src/lib/prompts/templates.js +166 -0
- package/dist/src/lib/prompts/templates.js.map +1 -0
- package/dist/src/lib/session-manager.js +201 -0
- package/dist/src/lib/session-manager.js.map +1 -0
- package/dist/src/lib/socket.js +78 -6
- package/dist/src/lib/socket.js.map +1 -1
- package/dist/src/lib/testing-mode.js +33 -0
- package/dist/src/lib/testing-mode.js.map +1 -0
- package/dist/src/lib/tool-descriptions.js +59 -0
- package/dist/src/lib/tool-descriptions.js.map +1 -0
- package/dist/src/lib/tool-executor.js +537 -0
- package/dist/src/lib/tool-executor.js.map +1 -0
- package/dist/src/lib/tool-registry.js +803 -0
- package/dist/src/lib/tool-registry.js.map +1 -0
- package/dist/src/lib/tool-result-pruner.js +384 -0
- package/dist/src/lib/tool-result-pruner.js.map +1 -0
- package/dist/src/lib/tui/components/AskIntro.js +6 -0
- package/dist/src/lib/tui/components/AskIntro.js.map +1 -0
- package/dist/src/lib/tui/components/Banner.js +15 -0
- package/dist/src/lib/tui/components/Banner.js.map +1 -0
- package/dist/src/lib/tui/components/Divider.js +17 -0
- package/dist/src/lib/tui/components/Divider.js.map +1 -0
- package/dist/src/lib/tui/components/EventLine.js +110 -0
- package/dist/src/lib/tui/components/EventLine.js.map +1 -0
- package/dist/src/lib/tui/components/Header.js +15 -0
- package/dist/src/lib/tui/components/Header.js.map +1 -0
- package/dist/src/lib/tui/components/InputBox.js +9 -0
- package/dist/src/lib/tui/components/InputBox.js.map +1 -0
- package/dist/src/lib/tui/components/Mapping.js +8 -0
- package/dist/src/lib/tui/components/Mapping.js.map +1 -0
- package/dist/src/lib/tui/components/ProjectList.js +6 -0
- package/dist/src/lib/tui/components/ProjectList.js.map +1 -0
- package/dist/src/lib/tui/components/Spinner.js +20 -0
- package/dist/src/lib/tui/components/Spinner.js.map +1 -0
- package/dist/src/lib/tui/components/StatusBanner.js +12 -0
- package/dist/src/lib/tui/components/StatusBanner.js.map +1 -0
- package/dist/src/lib/tui/components/StatusBar.js +11 -0
- package/dist/src/lib/tui/components/StatusBar.js.map +1 -0
- package/dist/src/lib/tui/components/UserBubble.js +6 -0
- package/dist/src/lib/tui/components/UserBubble.js.map +1 -0
- package/dist/src/lib/tui/components/index.js +16 -0
- package/dist/src/lib/tui/components/index.js.map +1 -0
- package/dist/src/lib/tui/events.js +716 -76
- package/dist/src/lib/tui/events.js.map +1 -1
- package/dist/src/lib/tui/icons.js +14 -0
- package/dist/src/lib/tui/icons.js.map +1 -1
- package/dist/src/lib/tui/ink-print.js +41 -0
- package/dist/src/lib/tui/ink-print.js.map +1 -0
- package/dist/src/lib/tui/interactive-chat.js +345 -0
- package/dist/src/lib/tui/interactive-chat.js.map +1 -0
- package/dist/src/lib/tui/print.js +31 -26
- package/dist/src/lib/tui/print.js.map +1 -1
- package/dist/src/lib/tui/prompt.js +21 -18
- package/dist/src/lib/tui/prompt.js.map +1 -1
- package/dist/src/test-agent-flow.js +148 -0
- package/dist/src/test-agent-flow.js.map +1 -0
- package/dist/src/test-browser-session.js +152 -0
- package/dist/src/test-browser-session.js.map +1 -0
- package/dist/src/test-browser-snapshot.js +187 -0
- package/dist/src/test-browser-snapshot.js.map +1 -0
- package/dist/src/test-snapshot-detailed.js +219 -0
- package/dist/src/test-snapshot-detailed.js.map +1 -0
- package/dist/src/test-snapshot-simple.js +85 -0
- package/dist/src/test-snapshot-simple.js.map +1 -0
- package/dist/src/test-snapshot-tabs.js +110 -0
- package/dist/src/test-snapshot-tabs.js.map +1 -0
- package/package.json +20 -3
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Registry - Mirror of backend schemas for CLI agent tools
|
|
3
|
+
* Ensures exact parity between local and remote tool execution
|
|
4
|
+
*/
|
|
5
|
+
// UI TOOLS (Playwright MCP)
|
|
6
|
+
export const BROWSER_NAVIGATE_SCHEMA = {
|
|
7
|
+
name: "browser_navigate",
|
|
8
|
+
description: "Navigate the browser to a specific URL.",
|
|
9
|
+
parameters: {
|
|
10
|
+
type: "object",
|
|
11
|
+
properties: {
|
|
12
|
+
url: {
|
|
13
|
+
type: "string",
|
|
14
|
+
description: "Absolute URL (e.g., https://example.com/path)",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: ["url"],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export const BROWSER_CLICK_SCHEMA = {
|
|
21
|
+
name: "browser_click",
|
|
22
|
+
description: "Click an element using the Playwright MCP ref and accompanying description.",
|
|
23
|
+
parameters: {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
element: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Human-readable element description (used for permission / audit trail).",
|
|
29
|
+
},
|
|
30
|
+
ref: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Exact ref from the cached snapshot output.",
|
|
33
|
+
},
|
|
34
|
+
doubleClick: {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
description: "Whether to perform a double click instead of single tap.",
|
|
37
|
+
},
|
|
38
|
+
button: {
|
|
39
|
+
type: "string",
|
|
40
|
+
enum: ["left", "right", "middle"],
|
|
41
|
+
description: "Mouse button to use when clicking.",
|
|
42
|
+
},
|
|
43
|
+
modifiers: {
|
|
44
|
+
type: "array",
|
|
45
|
+
items: {
|
|
46
|
+
type: "string",
|
|
47
|
+
enum: ["Alt", "Control", "ControlOrMeta", "Meta", "Shift"],
|
|
48
|
+
},
|
|
49
|
+
description: "Optional modifier keys to press during the click.",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ["element", "ref"],
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export const BROWSER_HOVER_SCHEMA = {
|
|
56
|
+
name: "browser_hover",
|
|
57
|
+
description: "Hover over an element using its Playwright MCP ref.",
|
|
58
|
+
parameters: {
|
|
59
|
+
type: "object",
|
|
60
|
+
properties: {
|
|
61
|
+
element: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Human-readable element description.",
|
|
64
|
+
},
|
|
65
|
+
ref: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Exact ref from the cached snapshot output.",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ["element", "ref"],
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
export const BROWSER_TYPE_SCHEMA = {
|
|
74
|
+
name: "browser_type",
|
|
75
|
+
description: "Type text into an element resolved via the cached snapshot.",
|
|
76
|
+
parameters: {
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
element: {
|
|
80
|
+
type: "string",
|
|
81
|
+
description: "Human-readable element description.",
|
|
82
|
+
},
|
|
83
|
+
ref: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "Exact ref from the cached snapshot output.",
|
|
86
|
+
},
|
|
87
|
+
text: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Text to type into the element.",
|
|
90
|
+
},
|
|
91
|
+
submit: {
|
|
92
|
+
type: "boolean",
|
|
93
|
+
description: "Whether to press Enter after typing.",
|
|
94
|
+
},
|
|
95
|
+
slowly: {
|
|
96
|
+
type: "boolean",
|
|
97
|
+
description: "Type characters one-by-one instead of filling the entire value at once.",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ["element", "ref", "text"],
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
export const BROWSER_PRESS_KEY_SCHEMA = {
|
|
104
|
+
name: "browser_press_key",
|
|
105
|
+
description: "Press a keyboard key on the active page.",
|
|
106
|
+
parameters: {
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: {
|
|
109
|
+
key: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "Key name to press (e.g., ArrowLeft, Enter, Shift+Key).",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ["key"],
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
export const BROWSER_WAIT_FOR_SCHEMA = {
|
|
118
|
+
name: "browser_wait_for",
|
|
119
|
+
description: "Wait for text to appear or disappear, or simply wait for a number of seconds.",
|
|
120
|
+
parameters: {
|
|
121
|
+
type: "object",
|
|
122
|
+
properties: {
|
|
123
|
+
time: {
|
|
124
|
+
type: "number",
|
|
125
|
+
description: "Time to wait in seconds.",
|
|
126
|
+
},
|
|
127
|
+
text: {
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "Text that must appear before the wait finishes.",
|
|
130
|
+
},
|
|
131
|
+
textGone: {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "Text that must disappear before the wait finishes.",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
export const BROWSER_TAKE_SCREENSHOT_SCHEMA = {
|
|
139
|
+
name: "browser_take_screenshot",
|
|
140
|
+
description: "Capture a screenshot of the current page or a specific element.",
|
|
141
|
+
parameters: {
|
|
142
|
+
type: "object",
|
|
143
|
+
properties: {
|
|
144
|
+
type: {
|
|
145
|
+
type: "string",
|
|
146
|
+
enum: ["png", "jpeg"],
|
|
147
|
+
description: "Image format for the screenshot.",
|
|
148
|
+
},
|
|
149
|
+
filename: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: "Optional filename hint; defaults to page-{timestamp}.{png|jpeg}.",
|
|
152
|
+
},
|
|
153
|
+
element: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "Human-readable element description to permission the screenshot.",
|
|
156
|
+
},
|
|
157
|
+
ref: {
|
|
158
|
+
type: "string",
|
|
159
|
+
description: "Element ref from browser_snapshot. Required if element is provided.",
|
|
160
|
+
},
|
|
161
|
+
fullPage: {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description: "Capture the entire scrollable page (cannot be combined with element screenshots).",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
export const BROWSER_SELECT_OPTION_SCHEMA = {
|
|
169
|
+
name: "browser_select_option",
|
|
170
|
+
description: "Select option(s) in a dropdown element.",
|
|
171
|
+
parameters: {
|
|
172
|
+
type: "object",
|
|
173
|
+
properties: {
|
|
174
|
+
element: {
|
|
175
|
+
type: "string",
|
|
176
|
+
description: "Human-readable element description.",
|
|
177
|
+
},
|
|
178
|
+
ref: {
|
|
179
|
+
type: "string",
|
|
180
|
+
description: "Exact ref from the cached snapshot output.",
|
|
181
|
+
},
|
|
182
|
+
values: {
|
|
183
|
+
type: "array",
|
|
184
|
+
items: { type: "string" },
|
|
185
|
+
description: "Array of option values/labels to select (one or many).",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
required: ["element", "ref", "values"],
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
export const BROWSER_FILL_FORM_SCHEMA = {
|
|
192
|
+
name: "browser_fill_form",
|
|
193
|
+
description: "Fill multiple form fields in a single action.",
|
|
194
|
+
parameters: {
|
|
195
|
+
type: "object",
|
|
196
|
+
properties: {
|
|
197
|
+
fields: {
|
|
198
|
+
type: "array",
|
|
199
|
+
description: "Fields to fill in.",
|
|
200
|
+
items: {
|
|
201
|
+
type: "object",
|
|
202
|
+
properties: {
|
|
203
|
+
name: {
|
|
204
|
+
type: "string",
|
|
205
|
+
description: "Human-readable field name.",
|
|
206
|
+
},
|
|
207
|
+
type: {
|
|
208
|
+
type: "string",
|
|
209
|
+
enum: ["textbox", "checkbox", "radio", "combobox", "slider"],
|
|
210
|
+
description: "Type of the field.",
|
|
211
|
+
},
|
|
212
|
+
ref: {
|
|
213
|
+
type: "string",
|
|
214
|
+
description: "Exact ref from the cached snapshot output.",
|
|
215
|
+
},
|
|
216
|
+
value: {
|
|
217
|
+
type: "string",
|
|
218
|
+
description: "Value to set (checkbox expects 'true'/'false', combobox expects option label).",
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
required: ["name", "type", "ref", "value"],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
required: ["fields"],
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
export const BROWSER_TABS_SCHEMA = {
|
|
229
|
+
name: "browser_tabs",
|
|
230
|
+
description: "List, create, close, or select browser tabs.",
|
|
231
|
+
parameters: {
|
|
232
|
+
type: "object",
|
|
233
|
+
properties: {
|
|
234
|
+
action: {
|
|
235
|
+
type: "string",
|
|
236
|
+
enum: ["list", "new", "close", "select"],
|
|
237
|
+
description: "Operation to perform.",
|
|
238
|
+
},
|
|
239
|
+
index: {
|
|
240
|
+
type: "number",
|
|
241
|
+
description: "Tab index used for close/select. When omitted for close, current tab is closed.",
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
required: ["action"],
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
export const BROWSER_HANDLE_DIALOG_SCHEMA = {
|
|
248
|
+
name: "browser_handle_dialog",
|
|
249
|
+
description: "Accept or dismiss the currently visible dialog.",
|
|
250
|
+
parameters: {
|
|
251
|
+
type: "object",
|
|
252
|
+
properties: {
|
|
253
|
+
accept: {
|
|
254
|
+
type: "boolean",
|
|
255
|
+
description: "Whether to accept the dialog (dismiss if false).",
|
|
256
|
+
},
|
|
257
|
+
promptText: {
|
|
258
|
+
type: "string",
|
|
259
|
+
description: "Optional text to send when accepting a prompt dialog.",
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
required: ["accept"],
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
export const BROWSER_NETWORK_REQUESTS_SCHEMA = {
|
|
266
|
+
name: "browser_network_requests",
|
|
267
|
+
description: "Return network requests since the current page load.",
|
|
268
|
+
parameters: {
|
|
269
|
+
type: "object",
|
|
270
|
+
properties: {},
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
export const BROWSER_CONSOLE_MESSAGES_SCHEMA = {
|
|
274
|
+
name: "browser_console_messages",
|
|
275
|
+
description: "Retrieve recent console messages from the page.",
|
|
276
|
+
parameters: {
|
|
277
|
+
type: "object",
|
|
278
|
+
properties: {},
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
export const BROWSER_RESIZE_SCHEMA = {
|
|
282
|
+
name: "browser_resize",
|
|
283
|
+
description: "Resize the browser viewport.",
|
|
284
|
+
parameters: {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: {
|
|
287
|
+
width: {
|
|
288
|
+
type: "number",
|
|
289
|
+
description: "Viewport width in pixels.",
|
|
290
|
+
},
|
|
291
|
+
height: {
|
|
292
|
+
type: "number",
|
|
293
|
+
description: "Viewport height in pixels.",
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
required: ["width", "height"],
|
|
297
|
+
},
|
|
298
|
+
};
|
|
299
|
+
export const BROWSER_DRAG_SCHEMA = {
|
|
300
|
+
name: "browser_drag",
|
|
301
|
+
description: "Drag between two elements identified by their Playwright MCP refs.",
|
|
302
|
+
parameters: {
|
|
303
|
+
type: "object",
|
|
304
|
+
properties: {
|
|
305
|
+
startElement: {
|
|
306
|
+
type: "string",
|
|
307
|
+
description: "Human-readable description of the source element.",
|
|
308
|
+
},
|
|
309
|
+
startRef: {
|
|
310
|
+
type: "string",
|
|
311
|
+
description: "Source element ref from browser_snapshot.",
|
|
312
|
+
},
|
|
313
|
+
endElement: {
|
|
314
|
+
type: "string",
|
|
315
|
+
description: "Human-readable description of the target element.",
|
|
316
|
+
},
|
|
317
|
+
endRef: {
|
|
318
|
+
type: "string",
|
|
319
|
+
description: "Target element ref from browser_snapshot.",
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
required: ["startElement", "startRef", "endElement", "endRef"],
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
export const BROWSER_SNAPSHOT_QUERY_SCHEMA = {
|
|
326
|
+
name: "browser_snapshot_query",
|
|
327
|
+
description: "Search accessibility snapshot for elements by text. Text must be at least 5 words.",
|
|
328
|
+
parameters: {
|
|
329
|
+
type: "object",
|
|
330
|
+
properties: {
|
|
331
|
+
text: {
|
|
332
|
+
type: "string",
|
|
333
|
+
description: "Element description (min 5 words). Uses fuzzy search.",
|
|
334
|
+
minLength: 1,
|
|
335
|
+
},
|
|
336
|
+
limit: {
|
|
337
|
+
type: "integer",
|
|
338
|
+
default: 10,
|
|
339
|
+
description: "Maximum number of matches to return (default 10).",
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
required: ["text"],
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
// API TOOLS
|
|
346
|
+
export const API_REQUEST_SCHEMA = {
|
|
347
|
+
name: "api_request",
|
|
348
|
+
description: "HTTP request (GET, POST, PUT, PATCH, DELETE). No payload for GET/DELETE.",
|
|
349
|
+
parameters: {
|
|
350
|
+
type: "object",
|
|
351
|
+
properties: {
|
|
352
|
+
method: {
|
|
353
|
+
type: "string",
|
|
354
|
+
enum: ["GET", "POST", "PUT", "PATCH", "DELETE"],
|
|
355
|
+
},
|
|
356
|
+
url: {
|
|
357
|
+
type: "string",
|
|
358
|
+
},
|
|
359
|
+
headers: {
|
|
360
|
+
type: "object",
|
|
361
|
+
},
|
|
362
|
+
payload: {
|
|
363
|
+
type: "object",
|
|
364
|
+
},
|
|
365
|
+
query_params: {
|
|
366
|
+
type: "object",
|
|
367
|
+
},
|
|
368
|
+
timeout: {
|
|
369
|
+
type: "number",
|
|
370
|
+
},
|
|
371
|
+
use_secret_keys: {
|
|
372
|
+
type: "boolean",
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
required: ["method", "url"],
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
export const BUILD_API_REQUEST_SCHEMA = {
|
|
379
|
+
name: "build_api_request",
|
|
380
|
+
description: "Compose method, URL, headers, and payload based on get_api_parameters output or inputs; returns cURL too.",
|
|
381
|
+
parameters: {
|
|
382
|
+
type: "object",
|
|
383
|
+
properties: {
|
|
384
|
+
method: {
|
|
385
|
+
type: "string",
|
|
386
|
+
},
|
|
387
|
+
url: {
|
|
388
|
+
type: "string",
|
|
389
|
+
},
|
|
390
|
+
headers: {
|
|
391
|
+
type: "object",
|
|
392
|
+
},
|
|
393
|
+
payload: {
|
|
394
|
+
type: "object",
|
|
395
|
+
},
|
|
396
|
+
parameters: {
|
|
397
|
+
type: "object",
|
|
398
|
+
description: "Grouped params {path,query,header,cookie}",
|
|
399
|
+
},
|
|
400
|
+
request_body: {
|
|
401
|
+
type: "object",
|
|
402
|
+
description: "From get_api_parameters",
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
required: ["method", "url"],
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
export const GENERATE_CURL_SCHEMA = {
|
|
409
|
+
name: "generate_curl",
|
|
410
|
+
description: "Generate a cURL command from method/url/headers/payload.",
|
|
411
|
+
parameters: {
|
|
412
|
+
type: "object",
|
|
413
|
+
properties: {
|
|
414
|
+
method: {
|
|
415
|
+
type: "string",
|
|
416
|
+
},
|
|
417
|
+
url: {
|
|
418
|
+
type: "string",
|
|
419
|
+
},
|
|
420
|
+
headers: {
|
|
421
|
+
type: "object",
|
|
422
|
+
},
|
|
423
|
+
payload: {
|
|
424
|
+
type: "object",
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
required: ["method", "url"],
|
|
428
|
+
},
|
|
429
|
+
};
|
|
430
|
+
export const GENERATE_API_TEST_SCHEMA = {
|
|
431
|
+
name: "generate_api_test",
|
|
432
|
+
description: "Generate basic or comprehensive API test cases for a list of endpoints.",
|
|
433
|
+
parameters: {
|
|
434
|
+
type: "object",
|
|
435
|
+
properties: {
|
|
436
|
+
base_url: {
|
|
437
|
+
type: "string",
|
|
438
|
+
description: "Base URL of the API (e.g., https://api.example.com)",
|
|
439
|
+
},
|
|
440
|
+
endpoints: {
|
|
441
|
+
type: "array",
|
|
442
|
+
items: { type: "string" },
|
|
443
|
+
description: "List of endpoint paths or full URLs to test",
|
|
444
|
+
},
|
|
445
|
+
test_type: {
|
|
446
|
+
type: "string",
|
|
447
|
+
enum: ["basic", "comprehensive", "performance"],
|
|
448
|
+
description: "Test strategy: 'basic' single checks, 'comprehensive' multi-method, or 'performance' oriented",
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
required: ["base_url", "endpoints"],
|
|
452
|
+
},
|
|
453
|
+
};
|
|
454
|
+
export const GET_API_PARAMETERS_SCHEMA = {
|
|
455
|
+
name: "get_api_parameters",
|
|
456
|
+
description: "Get structured parameters and request body details for discovered endpoint.",
|
|
457
|
+
parameters: {
|
|
458
|
+
type: "object",
|
|
459
|
+
properties: {
|
|
460
|
+
method: {
|
|
461
|
+
type: "string",
|
|
462
|
+
description: "HTTP method (GET, POST, etc.)",
|
|
463
|
+
},
|
|
464
|
+
path: {
|
|
465
|
+
type: "string",
|
|
466
|
+
description: "Endpoint path (e.g., /api/v1/auth/login)",
|
|
467
|
+
},
|
|
468
|
+
url: {
|
|
469
|
+
type: "string",
|
|
470
|
+
description: "Full URL",
|
|
471
|
+
},
|
|
472
|
+
spec_url: {
|
|
473
|
+
type: "string",
|
|
474
|
+
description: "OpenAPI/Swagger JSON URL",
|
|
475
|
+
},
|
|
476
|
+
documentation_url: {
|
|
477
|
+
type: "string",
|
|
478
|
+
description: "Documentation page URL",
|
|
479
|
+
},
|
|
480
|
+
base_url: {
|
|
481
|
+
type: "string",
|
|
482
|
+
description: "API base URL",
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
required: [],
|
|
486
|
+
},
|
|
487
|
+
};
|
|
488
|
+
export const VALIDATE_API_RESPONSE_SCHEMA = {
|
|
489
|
+
name: "validate_api_response",
|
|
490
|
+
description: "Validate response with flexible expected_status (single, list, or class: '2xx').",
|
|
491
|
+
parameters: {
|
|
492
|
+
type: "object",
|
|
493
|
+
properties: {
|
|
494
|
+
response: {
|
|
495
|
+
type: "object",
|
|
496
|
+
},
|
|
497
|
+
expected_status: {
|
|
498
|
+
oneOf: [
|
|
499
|
+
{ type: "integer" },
|
|
500
|
+
{ type: "array", items: { type: "integer" } },
|
|
501
|
+
{ type: "string" },
|
|
502
|
+
],
|
|
503
|
+
},
|
|
504
|
+
expected_content_type: {
|
|
505
|
+
type: "string",
|
|
506
|
+
},
|
|
507
|
+
max_response_time: {
|
|
508
|
+
type: "number",
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
required: ["response"],
|
|
512
|
+
},
|
|
513
|
+
};
|
|
514
|
+
export const ASSERT_RESPONSE_SCHEMA = {
|
|
515
|
+
name: "assert_response_schema",
|
|
516
|
+
description: "Assert the response matches the OpenAPI schema for the endpoint.",
|
|
517
|
+
parameters: {
|
|
518
|
+
type: "object",
|
|
519
|
+
properties: {
|
|
520
|
+
method: {
|
|
521
|
+
type: "string",
|
|
522
|
+
},
|
|
523
|
+
path: {
|
|
524
|
+
type: "string",
|
|
525
|
+
},
|
|
526
|
+
url: {
|
|
527
|
+
type: "string",
|
|
528
|
+
},
|
|
529
|
+
spec_url: {
|
|
530
|
+
type: "string",
|
|
531
|
+
},
|
|
532
|
+
documentation_url: {
|
|
533
|
+
type: "string",
|
|
534
|
+
},
|
|
535
|
+
base_url: {
|
|
536
|
+
type: "string",
|
|
537
|
+
},
|
|
538
|
+
response: {
|
|
539
|
+
type: "object",
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
required: ["response"],
|
|
543
|
+
},
|
|
544
|
+
};
|
|
545
|
+
export const EXTRACT_RESPONSE_FIELDS_SCHEMA = {
|
|
546
|
+
name: "extract_response_fields",
|
|
547
|
+
description: "Extract fields from JSON response using simple dot paths (e.g., user.token).",
|
|
548
|
+
parameters: {
|
|
549
|
+
type: "object",
|
|
550
|
+
properties: {
|
|
551
|
+
response: {
|
|
552
|
+
type: "object",
|
|
553
|
+
},
|
|
554
|
+
paths: {
|
|
555
|
+
type: "array",
|
|
556
|
+
items: { type: "string" },
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
required: ["response", "paths"],
|
|
560
|
+
},
|
|
561
|
+
};
|
|
562
|
+
export const SET_AUTH_HEADER_SCHEMA = {
|
|
563
|
+
name: "set_auth_header",
|
|
564
|
+
description: "Set or update Authorization header (Bearer ...) in the agent context for future requests.",
|
|
565
|
+
parameters: {
|
|
566
|
+
type: "object",
|
|
567
|
+
properties: {
|
|
568
|
+
token: {
|
|
569
|
+
type: "string",
|
|
570
|
+
description: "Bearer token (raw)",
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
required: ["token"],
|
|
574
|
+
},
|
|
575
|
+
};
|
|
576
|
+
export const API_DISCOVERY_SCHEMA = {
|
|
577
|
+
name: "api_discovery",
|
|
578
|
+
description: "Unified API discovery: action=discover|search. Discover performs an upsert of endpoints per test to avoid duplicates while updating changes.",
|
|
579
|
+
parameters: {
|
|
580
|
+
type: "object",
|
|
581
|
+
properties: {
|
|
582
|
+
action: {
|
|
583
|
+
type: "string",
|
|
584
|
+
enum: ["discover", "search"],
|
|
585
|
+
},
|
|
586
|
+
documentation_url: {
|
|
587
|
+
type: "string",
|
|
588
|
+
},
|
|
589
|
+
spec_url: {
|
|
590
|
+
type: "string",
|
|
591
|
+
},
|
|
592
|
+
base_url: {
|
|
593
|
+
type: "string",
|
|
594
|
+
},
|
|
595
|
+
timeout_ms: {
|
|
596
|
+
type: "integer",
|
|
597
|
+
},
|
|
598
|
+
force: {
|
|
599
|
+
type: "boolean",
|
|
600
|
+
description: "Force rediscovery even if endpoints already exist",
|
|
601
|
+
},
|
|
602
|
+
test_id: {
|
|
603
|
+
type: "integer",
|
|
604
|
+
},
|
|
605
|
+
q: {
|
|
606
|
+
type: "string",
|
|
607
|
+
},
|
|
608
|
+
method: {
|
|
609
|
+
type: "string",
|
|
610
|
+
},
|
|
611
|
+
tag: {
|
|
612
|
+
type: "string",
|
|
613
|
+
},
|
|
614
|
+
path_contains: {
|
|
615
|
+
type: "string",
|
|
616
|
+
},
|
|
617
|
+
parameter_name: {
|
|
618
|
+
type: "string",
|
|
619
|
+
},
|
|
620
|
+
response_code: {
|
|
621
|
+
type: "string",
|
|
622
|
+
},
|
|
623
|
+
has_request_body: {
|
|
624
|
+
type: "boolean",
|
|
625
|
+
},
|
|
626
|
+
limit: {
|
|
627
|
+
type: "integer",
|
|
628
|
+
default: 20,
|
|
629
|
+
},
|
|
630
|
+
cursor: {
|
|
631
|
+
type: "string",
|
|
632
|
+
},
|
|
633
|
+
},
|
|
634
|
+
required: ["action"],
|
|
635
|
+
},
|
|
636
|
+
};
|
|
637
|
+
// BROWSER SESSION MANAGEMENT TOOLS
|
|
638
|
+
export const BROWSER_SESSION_SCHEMA = {
|
|
639
|
+
name: "browser_session",
|
|
640
|
+
description: "Start or stop a browser session for UI testing. Always launches a visible browser and navigates to Google.com. Must start a session before using any UI tools.",
|
|
641
|
+
parameters: {
|
|
642
|
+
type: "object",
|
|
643
|
+
properties: {
|
|
644
|
+
action: {
|
|
645
|
+
type: "string",
|
|
646
|
+
enum: ["start", "stop"],
|
|
647
|
+
description: "Whether to start or stop the browser session",
|
|
648
|
+
},
|
|
649
|
+
viewport: {
|
|
650
|
+
type: "object",
|
|
651
|
+
properties: {
|
|
652
|
+
width: { type: "integer", default: 1280 },
|
|
653
|
+
height: { type: "integer", default: 800 },
|
|
654
|
+
},
|
|
655
|
+
description: "Browser viewport size (only used when action=start)",
|
|
656
|
+
},
|
|
657
|
+
},
|
|
658
|
+
required: ["action"],
|
|
659
|
+
},
|
|
660
|
+
};
|
|
661
|
+
export const FINISH_SCHEMA = {
|
|
662
|
+
name: "finish",
|
|
663
|
+
description: "Finish the current task and stop the agent loop. Use this when the task is complete or when you need to stop.",
|
|
664
|
+
parameters: {
|
|
665
|
+
type: "object",
|
|
666
|
+
properties: {
|
|
667
|
+
summary: {
|
|
668
|
+
type: "string",
|
|
669
|
+
description: "Brief summary of what was accomplished",
|
|
670
|
+
},
|
|
671
|
+
reason: {
|
|
672
|
+
type: "string",
|
|
673
|
+
description: "Reason for finishing (optional)",
|
|
674
|
+
},
|
|
675
|
+
},
|
|
676
|
+
required: [],
|
|
677
|
+
},
|
|
678
|
+
};
|
|
679
|
+
// GENERAL TOOLS
|
|
680
|
+
export const SET_TESTING_MODE_SCHEMA = {
|
|
681
|
+
name: "set_testing_mode",
|
|
682
|
+
description: "Switch the active testing mode to control which tools are available (ui or api).",
|
|
683
|
+
parameters: {
|
|
684
|
+
type: "object",
|
|
685
|
+
properties: {
|
|
686
|
+
mode: {
|
|
687
|
+
type: "string",
|
|
688
|
+
enum: ["ui", "api"],
|
|
689
|
+
},
|
|
690
|
+
base_url: {
|
|
691
|
+
type: "string",
|
|
692
|
+
description: "Optional base URL for the chosen mode",
|
|
693
|
+
},
|
|
694
|
+
api_base_url: {
|
|
695
|
+
type: "string",
|
|
696
|
+
description: "Optional API base URL for api mode",
|
|
697
|
+
},
|
|
698
|
+
viewport: {
|
|
699
|
+
type: "object",
|
|
700
|
+
properties: {
|
|
701
|
+
width: { type: "integer" },
|
|
702
|
+
height: { type: "integer" },
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
required: ["mode"],
|
|
707
|
+
},
|
|
708
|
+
};
|
|
709
|
+
export const FINISH_OVERALL_TEST_SCHEMA = {
|
|
710
|
+
name: "finish_overall_test",
|
|
711
|
+
description: "End the test session with a summary and report of what was accomplished.",
|
|
712
|
+
parameters: {
|
|
713
|
+
type: "object",
|
|
714
|
+
properties: {
|
|
715
|
+
summary: {
|
|
716
|
+
type: "string",
|
|
717
|
+
description: "A summary of what was accomplished during the entire test execution",
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
required: ["summary"],
|
|
721
|
+
},
|
|
722
|
+
};
|
|
723
|
+
// Build registry by domain and testing mode
|
|
724
|
+
export function getToolSchemasByDomain(domain) {
|
|
725
|
+
const all = {
|
|
726
|
+
browser_navigate: { schema: BROWSER_NAVIGATE_SCHEMA, domain: "ui" },
|
|
727
|
+
browser_click: { schema: BROWSER_CLICK_SCHEMA, domain: "ui" },
|
|
728
|
+
browser_hover: { schema: BROWSER_HOVER_SCHEMA, domain: "ui" },
|
|
729
|
+
browser_type: { schema: BROWSER_TYPE_SCHEMA, domain: "ui" },
|
|
730
|
+
browser_press_key: { schema: BROWSER_PRESS_KEY_SCHEMA, domain: "ui" },
|
|
731
|
+
browser_wait_for: { schema: BROWSER_WAIT_FOR_SCHEMA, domain: "ui" },
|
|
732
|
+
browser_take_screenshot: {
|
|
733
|
+
schema: BROWSER_TAKE_SCREENSHOT_SCHEMA,
|
|
734
|
+
domain: "ui",
|
|
735
|
+
},
|
|
736
|
+
browser_select_option: {
|
|
737
|
+
schema: BROWSER_SELECT_OPTION_SCHEMA,
|
|
738
|
+
domain: "ui",
|
|
739
|
+
},
|
|
740
|
+
browser_fill_form: { schema: BROWSER_FILL_FORM_SCHEMA, domain: "ui" },
|
|
741
|
+
browser_tabs: { schema: BROWSER_TABS_SCHEMA, domain: "ui" },
|
|
742
|
+
browser_handle_dialog: {
|
|
743
|
+
schema: BROWSER_HANDLE_DIALOG_SCHEMA,
|
|
744
|
+
domain: "ui",
|
|
745
|
+
},
|
|
746
|
+
browser_network_requests: {
|
|
747
|
+
schema: BROWSER_NETWORK_REQUESTS_SCHEMA,
|
|
748
|
+
domain: "ui",
|
|
749
|
+
},
|
|
750
|
+
browser_console_messages: {
|
|
751
|
+
schema: BROWSER_CONSOLE_MESSAGES_SCHEMA,
|
|
752
|
+
domain: "ui",
|
|
753
|
+
},
|
|
754
|
+
browser_resize: { schema: BROWSER_RESIZE_SCHEMA, domain: "ui" },
|
|
755
|
+
browser_drag: { schema: BROWSER_DRAG_SCHEMA, domain: "ui" },
|
|
756
|
+
browser_snapshot_query: {
|
|
757
|
+
schema: BROWSER_SNAPSHOT_QUERY_SCHEMA,
|
|
758
|
+
domain: "ui",
|
|
759
|
+
},
|
|
760
|
+
api_request: { schema: API_REQUEST_SCHEMA, domain: "api" },
|
|
761
|
+
build_api_request: { schema: BUILD_API_REQUEST_SCHEMA, domain: "api" },
|
|
762
|
+
generate_curl: { schema: GENERATE_CURL_SCHEMA, domain: "api" },
|
|
763
|
+
generate_api_test: { schema: GENERATE_API_TEST_SCHEMA, domain: "api" },
|
|
764
|
+
get_api_parameters: { schema: GET_API_PARAMETERS_SCHEMA, domain: "api" },
|
|
765
|
+
validate_api_response: {
|
|
766
|
+
schema: VALIDATE_API_RESPONSE_SCHEMA,
|
|
767
|
+
domain: "api",
|
|
768
|
+
},
|
|
769
|
+
assert_response_schema: { schema: ASSERT_RESPONSE_SCHEMA, domain: "api" },
|
|
770
|
+
extract_response_fields: {
|
|
771
|
+
schema: EXTRACT_RESPONSE_FIELDS_SCHEMA,
|
|
772
|
+
domain: "api",
|
|
773
|
+
},
|
|
774
|
+
set_auth_header: { schema: SET_AUTH_HEADER_SCHEMA, domain: "api" },
|
|
775
|
+
api_discovery: { schema: API_DISCOVERY_SCHEMA, domain: "api" },
|
|
776
|
+
set_testing_mode: { schema: SET_TESTING_MODE_SCHEMA, domain: "general" },
|
|
777
|
+
browser_session: { schema: BROWSER_SESSION_SCHEMA, domain: "general" },
|
|
778
|
+
finish: { schema: FINISH_SCHEMA, domain: "general" },
|
|
779
|
+
finish_overall_test: {
|
|
780
|
+
schema: FINISH_OVERALL_TEST_SCHEMA,
|
|
781
|
+
domain: "general",
|
|
782
|
+
},
|
|
783
|
+
};
|
|
784
|
+
const filtered = Object.entries(all).filter(([, { domain: d }]) => d === domain);
|
|
785
|
+
if (domain !== "general") {
|
|
786
|
+
const generalEntries = Object.entries(all).filter(([, { domain: d }]) => d === "general");
|
|
787
|
+
filtered.push(...generalEntries);
|
|
788
|
+
}
|
|
789
|
+
return Object.fromEntries(filtered.map(([name, { schema }]) => [name, schema]));
|
|
790
|
+
}
|
|
791
|
+
export function getAllToolSchemas() {
|
|
792
|
+
const unique = new Map();
|
|
793
|
+
const domains = ["ui", "api", "general"];
|
|
794
|
+
for (const domain of domains) {
|
|
795
|
+
for (const [name, schema] of Object.entries(getToolSchemasByDomain(domain))) {
|
|
796
|
+
if (!unique.has(name)) {
|
|
797
|
+
unique.set(name, schema);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
return Array.from(unique.values());
|
|
802
|
+
}
|
|
803
|
+
//# sourceMappingURL=tool-registry.js.map
|