27f8feda04
- Add playwright-cli to BrowserAutomationProviderSchema enum - Add playwright-cli to BuiltinSkillNameSchema - Create playwrightCliSkill with official Microsoft template - Update skill selection logic to handle 3 providers - Add comprehensive tests for schema and skill selection - Regenerate JSON schema Closes #<issue-number-if-any>
25 lines
881 B
TypeScript
25 lines
881 B
TypeScript
import { z } from "zod"
|
|
|
|
export const BrowserAutomationProviderSchema = z.enum([
|
|
"playwright",
|
|
"agent-browser",
|
|
"dev-browser",
|
|
"playwright-cli",
|
|
])
|
|
|
|
export const BrowserAutomationConfigSchema = z.object({
|
|
/**
|
|
* Browser automation provider to use for the "playwright" skill.
|
|
* - "playwright": Uses Playwright MCP server (@playwright/mcp) - default
|
|
* - "agent-browser": Uses Vercel's agent-browser CLI (requires: bun add -g agent-browser)
|
|
* - "dev-browser": Uses dev-browser skill with persistent browser state
|
|
* - "playwright-cli": Uses Playwright CLI (@playwright/cli) - token-efficient CLI alternative
|
|
*/
|
|
provider: BrowserAutomationProviderSchema.default("playwright"),
|
|
})
|
|
|
|
export type BrowserAutomationProvider = z.infer<
|
|
typeof BrowserAutomationProviderSchema
|
|
>
|
|
export type BrowserAutomationConfig = z.infer<typeof BrowserAutomationConfigSchema>
|