Skip to content

feat: pre-install the StepPage plugin on startup - #160

Open
lit26 wants to merge 1 commit into
stepfun-ai:mainfrom
lit26:feat/preinstall-steppage-plugin
Open

lit26 wants to merge 1 commit into
stepfun-ai:mainfrom
lit26:feat/preinstall-steppage-plugin

Conversation

@lit26

@lit26 lit26 commented Sep 23, 2026

Copy link
Copy Markdown

What

Pre-install the built-in StepPage plugin into a fresh install so its deploy tools (page_deploy, site/version listing, promote/rollback, preview links) are available out of the box — no manual /plugin install steppage required, per the StepPage plugin reference.

How

  • plugins.ts
    • ensureBuiltinPluginsInstalled() — materializes the built-in marketplace and copies the StepPage manifest into the user plugin root. Idempotent and once-only via a .stepcode-preinstalled marker (mirrors the existing .stepcode-builtin-fingerprint pattern), so a plugin the user later uninstalls is not silently resurrected on the next launch.
    • installMarketplacePlugin(entry, dir, { provision }) — new opt to copy the manifest without running the installer.
    • Exported provisionBuiltinPlugin (was the private provisionPluginCommand).
  • mcp.ts — in the MCP session-start block, before discovery: await ensureBuiltinPluginsInstalled() (fast manifest copy, so this session's discovery sees StepPage), then fire provisionBuiltinPlugin in the background so a first launch never blocks on the curl … | sh installer. A still-missing executable surfaces the existing actionable connect-failure remedy.

Behavior notes

  • steppage-mcp is still auto-supplied by the official installer when absent (guarded by command -v, honors STEPCODE_STEPPAGE_INSTALLER_URL, skipped on Windows) — unchanged.
  • STEPFUN_API_KEY / Step-login fallback path unchanged.
  • Activation follows the documented "restart to activate" model: if the executable wasn't present at first launch, it lands via background provision and connects on the next launch.

Verification

  • tsgo --noEmit (repo-wide, via pre-commit): clean.
  • Full coding-agent suite: 3475 passed, 0 failed (adds pre-installs the built-in StepPage plugin once and respects a later uninstall).
  • Production-faithful runtime smoke: after ensureBuiltinPluginsInstalled()discoverStepMcpServers() surfaces steppage__steppage (carrying the steppage-mcp provision) in the same session; idempotent; respects uninstall.

StepPage previously required a manual `/plugin install steppage` before its
deploy tools were available. Provision the built-in StepPage plugin into a
fresh install automatically so `page_deploy`, site/version listing, and
promote/rollback work out of the box, per the StepPage plugin reference.

- plugins.ts: add `ensureBuiltinPluginsInstalled()` (materializes the built-in
  marketplace and copies the StepPage manifest into the user plugin root).
  Idempotent and once-only via a `.stepcode-preinstalled` marker, mirroring the
  `.stepcode-builtin-fingerprint` pattern, so a plugin the user later uninstalls
  is not silently resurrected on the next launch. Add a `{ provision }` option
  to `installMarketplacePlugin` and export `provisionBuiltinPlugin`.
- mcp.ts: before discovery in session start, copy the manifest (fast, so the
  current session's discovery sees it) and fire the `steppage-mcp` installer in
  the background so a first launch never blocks on the network. A still-missing
  executable surfaces the existing actionable connect-failure remedy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant