Skip to content

feat(plugin): expose platform-safe external URL opener #42418

Description

@kitlangton

Problem

V2 TUI plugins that open documentation, logs, pull requests, or other external URLs currently need to spawn platform-specific commands such as macOS open. This leaks host/platform concerns into plugins and does not work consistently on Linux or Windows.

Proposed Direction

Expose a small host-owned plugin API, for example:

context.app.openExternal(url)

The host should validate the URL and dispatch through the platform-appropriate mechanism.

Acceptance Criteria

  • Available to V2 TUI plugins through Plugin.Context.
  • Supports at least http: and https: URLs.
  • Works on macOS, Linux, and Windows through host-owned behavior.
  • Rejects unsupported or malformed schemes with a useful error.
  • Has focused platform/validation tests.

Scope

This is a generic host capability. Plugins remain responsible for deciding which URL to open and when.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions