opera-devtools-mcp 0.5.1 → 0.6.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.
|
@@ -1038,6 +1038,12 @@ export const commands = {
|
|
|
1038
1038
|
description: 'Description of what to create or generate.',
|
|
1039
1039
|
required: true,
|
|
1040
1040
|
},
|
|
1041
|
+
conversationId: {
|
|
1042
|
+
name: 'conversationId',
|
|
1043
|
+
type: 'string',
|
|
1044
|
+
description: 'Conversation ID to continue an existing conversation. Omit to start a new conversation.',
|
|
1045
|
+
required: false,
|
|
1046
|
+
},
|
|
1041
1047
|
},
|
|
1042
1048
|
},
|
|
1043
1049
|
opera_register_mcp_server: {
|
|
@@ -75,6 +75,10 @@ export const operaChat = definePageTool({
|
|
|
75
75
|
.string()
|
|
76
76
|
.optional()
|
|
77
77
|
.describe('Conversation ID to continue an existing conversation. Omit to start a new conversation.'),
|
|
78
|
+
openFullTabView: zod
|
|
79
|
+
.boolean()
|
|
80
|
+
.optional()
|
|
81
|
+
.describe('When true, activate the created chat tab so the user sees it immediately. Default false (tab created in the background). Only meaningful for headed sessions.'),
|
|
78
82
|
},
|
|
79
83
|
handler: async (request, response) => {
|
|
80
84
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
@@ -90,6 +94,9 @@ export const operaChat = definePageTool({
|
|
|
90
94
|
if (request.params.conversationId !== undefined) {
|
|
91
95
|
payload['conversationId'] = request.params.conversationId;
|
|
92
96
|
}
|
|
97
|
+
if (request.params.openFullTabView === true) {
|
|
98
|
+
payload['openFullTabView'] = true;
|
|
99
|
+
}
|
|
93
100
|
const result = await dispatchAction(session, payload);
|
|
94
101
|
response.appendResponseLine(result);
|
|
95
102
|
}
|
|
@@ -111,15 +118,23 @@ export const operaDo = definePageTool({
|
|
|
111
118
|
prompt: zod
|
|
112
119
|
.string()
|
|
113
120
|
.describe('The action to perform, described in natural language.'),
|
|
121
|
+
openFullTabView: zod
|
|
122
|
+
.boolean()
|
|
123
|
+
.optional()
|
|
124
|
+
.describe('When true, activate the created do tab so the user sees it immediately. Default false (tab created in the background). Only meaningful for headed sessions.'),
|
|
114
125
|
},
|
|
115
126
|
handler: async (request, response) => {
|
|
116
127
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
117
128
|
const session = getCDPSession(request.page.pptrPage);
|
|
118
129
|
try {
|
|
119
|
-
const
|
|
130
|
+
const payload = {
|
|
120
131
|
action: 'do',
|
|
121
132
|
prompt: request.params.prompt,
|
|
122
|
-
}
|
|
133
|
+
};
|
|
134
|
+
if (request.params.openFullTabView === true) {
|
|
135
|
+
payload['openFullTabView'] = true;
|
|
136
|
+
}
|
|
137
|
+
const result = await dispatchWithStreamedResponse(session, payload, chunk => response.sendLog(chunk), request.signal);
|
|
123
138
|
response.appendResponseLine(result);
|
|
124
139
|
}
|
|
125
140
|
catch (e) {
|
|
@@ -141,15 +156,30 @@ export const operaMake = definePageTool({
|
|
|
141
156
|
},
|
|
142
157
|
schema: {
|
|
143
158
|
prompt: zod.string().describe('Description of what to create or generate.'),
|
|
159
|
+
conversationId: zod
|
|
160
|
+
.string()
|
|
161
|
+
.optional()
|
|
162
|
+
.describe('Conversation ID to continue an existing conversation. Omit to start a new conversation.'),
|
|
163
|
+
openFullTabView: zod
|
|
164
|
+
.boolean()
|
|
165
|
+
.optional()
|
|
166
|
+
.describe('When true, activate the created make tab so the user sees it immediately. Default false (tab created in the background). Only meaningful for headed sessions.'),
|
|
144
167
|
},
|
|
145
168
|
handler: async (request, response) => {
|
|
146
169
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
147
170
|
const session = getCDPSession(request.page.pptrPage);
|
|
148
171
|
try {
|
|
149
|
-
const
|
|
172
|
+
const payload = {
|
|
150
173
|
action: 'make',
|
|
151
174
|
prompt: request.params.prompt,
|
|
152
|
-
}
|
|
175
|
+
};
|
|
176
|
+
if (request.params.conversationId !== undefined) {
|
|
177
|
+
payload['conversationId'] = request.params.conversationId;
|
|
178
|
+
}
|
|
179
|
+
if (request.params.openFullTabView === true) {
|
|
180
|
+
payload['openFullTabView'] = true;
|
|
181
|
+
}
|
|
182
|
+
const result = await dispatchAction(session, payload);
|
|
153
183
|
response.appendResponseLine(result);
|
|
154
184
|
}
|
|
155
185
|
catch (e) {
|
|
@@ -172,6 +202,10 @@ export const operaResearch = definePageTool({
|
|
|
172
202
|
.enum(['local', 'one-minute', 'deep'])
|
|
173
203
|
.optional()
|
|
174
204
|
.describe('Depth of research. "local" uses only on-page context, "one-minute" performs a quick web search, "deep" performs a thorough multi-source search.'),
|
|
205
|
+
openFullTabView: zod
|
|
206
|
+
.boolean()
|
|
207
|
+
.optional()
|
|
208
|
+
.describe('When true, activate the created research tab so the user sees it immediately. Default false (tab created in the background). Only meaningful for headed sessions.'),
|
|
175
209
|
},
|
|
176
210
|
handler: async (request, response) => {
|
|
177
211
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
@@ -183,6 +217,9 @@ export const operaResearch = definePageTool({
|
|
|
183
217
|
if (request.params.researchType !== undefined) {
|
|
184
218
|
payload['researchType'] = request.params.researchType;
|
|
185
219
|
}
|
|
220
|
+
if (request.params.openFullTabView === true) {
|
|
221
|
+
payload['openFullTabView'] = true;
|
|
222
|
+
}
|
|
186
223
|
try {
|
|
187
224
|
const result = await dispatchWithStreamedResponse(session, payload, chunk => response.sendLog(chunk), request.signal);
|
|
188
225
|
response.appendResponseLine(result);
|
package/build/src/version.js
CHANGED