Skip to content

InlineElicitationRequest: support URL variant via discriminated union (blocked on hook layer) #1242

@cliffhall

Description

@cliffhall

Background

Documented as a Phase 5 audit partial in specification/v2_ux_interfaces.md (PR #1236). InlineElicitationRequest currently accepts only the form-mode variant: request: ElicitRequest['params']. The spec target is a discriminated union: request: ElicitRequest | InspectorUrlElicitRequest.

Blocked on the v2 core hook layer effort for the same reason as the companion ElicitationUrlPanel issue: InspectorUrlElicitRequest doesn't exist in core/mcp/types.ts yet.

Acceptance criteria

  • After InspectorUrlElicitRequest lands in core/mcp/types.ts, InlineElicitationRequestProps is updated: request: ElicitRequest['params'] | InspectorUrlElicitRequest.
  • Internal rendering discriminates on the request shape (presence of url field, or whatever discriminator the wrapper carries) — not on a separate mode prop.
  • The mode prop, if present, is removed.
  • Form-variant rendering is unchanged from today.
  • URL-variant rendering matches ElicitationUrlPanel's compact equivalent: message + URL display + copy/open/cancel buttons in a smaller card layout.
  • Stories cover: (a) form variant (existing), (b) URL variant, (c) URL variant with isWaiting=true.

Test plan

  • npm run format && npm run lint && npm run build clean.
  • Existing form-variant stories render visually unchanged.
  • New URL-variant stories show the compact URL card; action logger fires onCopyUrl / onOpenInBrowser / onCancel.
  • No leftover mode prop in git grep -n 'InlineElicitationRequest' output.

Out of scope

  • Reconciling the form-variant request typing with the full ElicitRequest (the spec target says ElicitRequest | InspectorUrlElicitRequest, but using ElicitRequest['params'] for the form half is acceptable per the same logic that satisfies ElicitationFormPanel).
  • Building the pending-elicitation queue itself.

Blocked by

  • v2 core/ hook layer effort — provides InspectorUrlElicitRequest.
  • Companion: ElicitationUrlPanel wrapper adoption issue (parallel work, same blocker).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2Issues and PRs for v2

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions