opera-devtools-mcp 0.5.0 → 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.
|
@@ -950,6 +950,12 @@ export const commands = {
|
|
|
950
950
|
description: 'Model ID to use for the chat. Omit to use the browser default. Use opera_list_models to discover available IDs.',
|
|
951
951
|
required: false,
|
|
952
952
|
},
|
|
953
|
+
conversationId: {
|
|
954
|
+
name: 'conversationId',
|
|
955
|
+
type: 'string',
|
|
956
|
+
description: 'Conversation ID to continue an existing conversation. Omit to start a new conversation.',
|
|
957
|
+
required: false,
|
|
958
|
+
},
|
|
953
959
|
},
|
|
954
960
|
},
|
|
955
961
|
opera_connect_mcp_server: {
|
|
@@ -1032,6 +1038,12 @@ export const commands = {
|
|
|
1032
1038
|
description: 'Description of what to create or generate.',
|
|
1033
1039
|
required: true,
|
|
1034
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
|
+
},
|
|
1035
1047
|
},
|
|
1036
1048
|
},
|
|
1037
1049
|
opera_register_mcp_server: {
|
|
@@ -71,6 +71,14 @@ export const operaChat = definePageTool({
|
|
|
71
71
|
.string()
|
|
72
72
|
.optional()
|
|
73
73
|
.describe('Model ID to use for the chat. Omit to use the browser default. Use opera_list_models to discover available IDs.'),
|
|
74
|
+
conversationId: zod
|
|
75
|
+
.string()
|
|
76
|
+
.optional()
|
|
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.'),
|
|
74
82
|
},
|
|
75
83
|
handler: async (request, response) => {
|
|
76
84
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
@@ -83,6 +91,12 @@ export const operaChat = definePageTool({
|
|
|
83
91
|
if (request.params.model !== undefined) {
|
|
84
92
|
payload['model'] = request.params.model;
|
|
85
93
|
}
|
|
94
|
+
if (request.params.conversationId !== undefined) {
|
|
95
|
+
payload['conversationId'] = request.params.conversationId;
|
|
96
|
+
}
|
|
97
|
+
if (request.params.openFullTabView === true) {
|
|
98
|
+
payload['openFullTabView'] = true;
|
|
99
|
+
}
|
|
86
100
|
const result = await dispatchAction(session, payload);
|
|
87
101
|
response.appendResponseLine(result);
|
|
88
102
|
}
|
|
@@ -104,15 +118,23 @@ export const operaDo = definePageTool({
|
|
|
104
118
|
prompt: zod
|
|
105
119
|
.string()
|
|
106
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.'),
|
|
107
125
|
},
|
|
108
126
|
handler: async (request, response) => {
|
|
109
127
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
110
128
|
const session = getCDPSession(request.page.pptrPage);
|
|
111
129
|
try {
|
|
112
|
-
const
|
|
130
|
+
const payload = {
|
|
113
131
|
action: 'do',
|
|
114
132
|
prompt: request.params.prompt,
|
|
115
|
-
}
|
|
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);
|
|
116
138
|
response.appendResponseLine(result);
|
|
117
139
|
}
|
|
118
140
|
catch (e) {
|
|
@@ -134,15 +156,30 @@ export const operaMake = definePageTool({
|
|
|
134
156
|
},
|
|
135
157
|
schema: {
|
|
136
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.'),
|
|
137
167
|
},
|
|
138
168
|
handler: async (request, response) => {
|
|
139
169
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
140
170
|
const session = getCDPSession(request.page.pptrPage);
|
|
141
171
|
try {
|
|
142
|
-
const
|
|
172
|
+
const payload = {
|
|
143
173
|
action: 'make',
|
|
144
174
|
prompt: request.params.prompt,
|
|
145
|
-
}
|
|
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);
|
|
146
183
|
response.appendResponseLine(result);
|
|
147
184
|
}
|
|
148
185
|
catch (e) {
|
|
@@ -165,6 +202,10 @@ export const operaResearch = definePageTool({
|
|
|
165
202
|
.enum(['local', 'one-minute', 'deep'])
|
|
166
203
|
.optional()
|
|
167
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.'),
|
|
168
209
|
},
|
|
169
210
|
handler: async (request, response) => {
|
|
170
211
|
// puppeteer's _client() is internal; cast to the shape getCDPSession needs
|
|
@@ -176,6 +217,9 @@ export const operaResearch = definePageTool({
|
|
|
176
217
|
if (request.params.researchType !== undefined) {
|
|
177
218
|
payload['researchType'] = request.params.researchType;
|
|
178
219
|
}
|
|
220
|
+
if (request.params.openFullTabView === true) {
|
|
221
|
+
payload['openFullTabView'] = true;
|
|
222
|
+
}
|
|
179
223
|
try {
|
|
180
224
|
const result = await dispatchWithStreamedResponse(session, payload, chunk => response.sendLog(chunk), request.signal);
|
|
181
225
|
response.appendResponseLine(result);
|
package/build/src/version.js
CHANGED