Skip to content

Commit 25328bb

Browse files
committed
feat: gate screencast tools behind --experimental-screencast flag
Screencast tools (screencast_start, screencast_stop) are now only registered when the --experimental-screencast CLI flag is provided, following the existing experimental conditions pattern used by --experimental-vision.
1 parent 65288a5 commit 25328bb

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/cli.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ export const cliOptions = {
173173
describe: 'Whether to enable interoperability tools',
174174
hidden: true,
175175
},
176+
experimentalScreencast: {
177+
type: 'boolean',
178+
describe: 'Whether to enable screencast tools',
179+
hidden: true,
180+
},
176181
chromeArg: {
177182
type: 'array',
178183
describe:

src/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ function registerTool(tool: ToolDefinition): void {
182182
) {
183183
return;
184184
}
185+
if (
186+
tool.annotations.conditions?.includes('screencast') &&
187+
!args.experimentalScreencast
188+
) {
189+
return;
190+
}
185191
server.registerTool(
186192
tool.name,
187193
{

src/tools/screencast.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const startScreencast = defineTool({
2727
annotations: {
2828
category: ToolCategory.DEBUGGING,
2929
readOnlyHint: false,
30+
conditions: ['screencast'],
3031
},
3132
schema: {
3233
filePath: zod
@@ -114,6 +115,7 @@ export const stopScreencast = defineTool({
114115
annotations: {
115116
category: ToolCategory.DEBUGGING,
116117
readOnlyHint: false,
118+
conditions: ['screencast'],
117119
},
118120
schema: {},
119121
handler: async (_request, response, context) => {

0 commit comments

Comments
 (0)