opera-devtools-mcp 0.5.1 → 0.6.1

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.
@@ -956,6 +956,12 @@ export const commands = {
956
956
  description: 'Conversation ID to continue an existing conversation. Omit to start a new conversation.',
957
957
  required: false,
958
958
  },
959
+ openFullTabView: {
960
+ name: 'openFullTabView',
961
+ type: 'boolean',
962
+ description: '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.',
963
+ required: false,
964
+ },
959
965
  },
960
966
  },
961
967
  opera_connect_mcp_server: {
@@ -992,6 +998,12 @@ export const commands = {
992
998
  description: 'The action to perform, described in natural language.',
993
999
  required: true,
994
1000
  },
1001
+ openFullTabView: {
1002
+ name: 'openFullTabView',
1003
+ type: 'boolean',
1004
+ description: '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.',
1005
+ required: false,
1006
+ },
995
1007
  },
996
1008
  },
997
1009
  opera_enable_mcp_server: {
@@ -1038,6 +1050,18 @@ export const commands = {
1038
1050
  description: 'Description of what to create or generate.',
1039
1051
  required: true,
1040
1052
  },
1053
+ conversationId: {
1054
+ name: 'conversationId',
1055
+ type: 'string',
1056
+ description: 'Conversation ID to continue an existing conversation. Omit to start a new conversation.',
1057
+ required: false,
1058
+ },
1059
+ openFullTabView: {
1060
+ name: 'openFullTabView',
1061
+ type: 'boolean',
1062
+ description: '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.',
1063
+ required: false,
1064
+ },
1041
1065
  },
1042
1066
  },
1043
1067
  opera_register_mcp_server: {
@@ -1075,6 +1099,12 @@ export const commands = {
1075
1099
  required: false,
1076
1100
  enum: ['local', 'one-minute', 'deep'],
1077
1101
  },
1102
+ openFullTabView: {
1103
+ name: 'openFullTabView',
1104
+ type: 'boolean',
1105
+ description: '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.',
1106
+ required: false,
1107
+ },
1078
1108
  },
1079
1109
  },
1080
1110
  opera_unregister_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 result = await dispatchWithStreamedResponse(session, {
130
+ const payload = {
120
131
  action: 'do',
121
132
  prompt: request.params.prompt,
122
- }, chunk => response.sendLog(chunk), request.signal);
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 result = await dispatchAction(session, {
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);
@@ -5,5 +5,5 @@
5
5
  *
6
6
  * Modified by Opera Software AS.
7
7
  */
8
- export const VERSION = '0.5.0';
8
+ export const VERSION = '0.6.1';
9
9
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opera-devtools-mcp",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "description": "MCP server for Opera DevTools",
5
5
  "type": "module",
6
6
  "bin": {