Skip to content

[dashboard DDX-1] @netscript/aspire command + app resource kinds #411

Description

@rickylabs

DDX-1: Widen the Aspire seam — command + app resource kinds (Seam A)

Summary

Extend packages/aspire's AspireResourceKind union (today 'deno-service' | 'deno-background' | 'container' | 'database' | 'cache') with 'command' and 'app', and extend AspireNSPluginContribution so plugins contribute resource commands through contribute(). This is the seam that lets the dashboard register itself as a first-class app resource and lets plugins surface parameterized actions inside Aspire's own chrome.

DX thesis

The dashboard and its actions must appear inside Aspire (Endpoints column, Actions menu, aspire resource CLI, Aspire MCP) — "one seam, three surfaces" — so the user never leaves the tool that already has their attention.

Scope

  • Add 'command' and 'app' to AspireResourceKind; keep AspireResource as the closed {name, kind, port?, metadata?} shape (do not introduce C#-only IResource/IResourceBuilder<T>).
  • Extend AspireNSPluginContribution to admit command contributions: withCommand(name, displayName, executeCommand, options) where options.arguments: InteractionInput[] + options.confirmationMessage are the only TS-reachable substitute for the C#-only IInteractionService.
  • Register the dashboard as an app-kind resource (auto-launch on aspire start, fixed port, live updates).

Non-goals

  • Not re-implementing Aspire resource start/stop/restart as a dashboard panel (that is Aspire-native; killed DDX-12). Resource control is delivered only as withCommand contributions that render in Aspire's Actions menu.
  • Not designing around IInteractionService/PromptInputAsync — confirmed absent from the TS AppHost SDK.
  • Not the generator emission itself (that is [dashboard DDX-14] CLI surface + auto-launch #424) — this issue is the type/seam layer in @netscript/aspire only.

Acceptance criteria

  • AspireResourceKind includes command and app; deno check green across packages/aspire consumers.
  • A plugin can contribute a resource command via contribute() that appears in Aspire's Actions menu and is invokable from aspire resource <name> <cmd> and Aspire MCP.
  • The dashboard registers as an app resource with a resolved fixed port (single source, §5 of integration doc).
  • Fallback documented: until merged, the two fixed framework commands ship via hand-edited Seam B (register-*.mts).

Dependencies

Unblocks the parameterized-action UX and the resource-control hand-off (#422 folded here + #424). Co-requisite for S2/S5 "Open in Aspire" round-trips.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions