Skip to content

[plan] Type Playwright tool configuration arrays #10828

Description

@github-actions

Objective

Replace []any usage in Playwright tool configuration with strongly-typed slices for allowed domains and other configuration arrays.

Context

From discussion #10816: The Playwright tool configuration uses []any for configuration arrays, requiring type assertions. This affects domain allowlists and other array-based configuration.

Approach

  1. Define semantic types in pkg/workflow/tools_types.go:

    type PlaywrightDomain string
    type PlaywrightAllowedDomains []PlaywrightDomain
    // Add other Playwright-specific types as needed
  2. Update PlaywrightToolConfig struct to use typed slices:

    • Change domain allowlist field to use PlaywrightAllowedDomains
    • Update other array fields in Playwright configuration
  3. Update Playwright tool parsing in pkg/workflow/tools_parser.go:

    • Remove type assertions for domain lists
    • Use direct type conversion from YAML
  4. Update code that validates and uses Playwright configuration:

    • Search for Playwright tool usage in pkg/workflow/
    • Remove type assertion logic
  5. Update test fixtures

Files to Modify

  • Update: pkg/workflow/tools_types.go (add Playwright semantic types)
  • Update: pkg/workflow/tools_parser.go (update Playwright parsing)
  • Update: Files that validate or use Playwright configuration
  • Update: Test files with Playwright tool fixtures

Acceptance Criteria

  • Semantic types for Playwright domains are defined
  • PlaywrightToolConfig uses typed slices instead of []any
  • Type assertions for Playwright arrays are eliminated
  • All existing tests pass
  • Run make agent-finish successfully before committing

AI generated by Plan Command for discussion #10816

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions