Skip to content

Migrate Paseo plugin to v0.8's split client/server/shared architecture - #6

Merged
4mGLn merged 1 commit into
mainfrom
fix/paseo-0.8-plugin-migration
Sep 11, 2026
Merged

4mGLn merged 1 commit into
mainfrom
fix/paseo-0.8-plugin-migration

Conversation

@4mGLn

@4mGLn 4mGLn commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Problem

After updating Paseo to 0.8.0, the installed sessionforge plugin fails to load:

Plugin "sessionforge" requires Paseo <0.8.0. Your daemon is 0.8.0. This plugin has no
requirements.paseo and targets Paseo before 0.8. Ask its author to migrate it:
https://paseo.sh/docs/plugins/v0.8/migration

Reproduced this exact error locally against a real Paseo 0.8.0 daemon before starting the fix.

What changed

  • paseo-plugin.json: added requirements.paseo: ">=0.8.0"
  • Split index.ts into index.client.tsx (surface/sidebar/command-center) and index.server.ts (RPC
    handlers + cleanup)
  • Moved files into the new client//server//shared/ layout Paseo 0.8 requires
  • Updated imports for the new module split (useRpc/PluginSurfaceProps from @getpaseo/plugin/client;
    defineRpc from the shared root @getpaseo/plugin)
  • Rewrote paseo-plugin.d.ts's hand-written ambient types to match the new module split
  • Updated scripts/package-plugin.mjs's staged file list

Also discovered while verifying this for real

Paseo 0.8's build step scans the entire plugin directory and rejects anything outside
client//server//shared/ — including this monorepo's own unrelated packages/cli/dist/**. The
previously-documented "point paseo at the repo root for local dev" flow is now completely broken; only
the packaged bundle from npm run package:plugin works. Updated docs/MANUAL.md and CONTRIBUTING.md
with the actual working dev loop.

Also fixed an unrelated but real bug found along the way: discover.server.test.ts's fixture used a
hardcoded absolute date instead of a relative one, so it silently broke 3 tests as real time passed a
14-day classification threshold. Made it relative to test-run time.

Verification

  • Real Paseo 0.8.0 daemon, not just a clean typecheck: installed the packaged bundle standalone
    (paseo plugin ls → running, clean logs), then used it to fix the actual broken sessionforge
    registration on this machine
  • Verified the edit → repackage → reload dev loop actually picks up source changes
  • npm run typecheck and npm test (134/134) both pass

Note for the maintainer

This needs a new tagged release (git tag vX.Y.Z && git push origin vX.Y.Z) once merged, so
sessionforge wire-paseo distributes the fix to anyone else who's hit this.

Fixes the real, user-reported breakage: after updating Paseo to 0.8.0, the
installed sessionforge plugin failed to load with "Plugin \"sessionforge\"
requires Paseo <0.8.0. [...] Ask its author to migrate it." Reproduced the
exact same error locally against a real Paseo 0.8.0 daemon before starting.

Fetched the current v0.8 migration guide and reference docs (not relying on
memory, since this is a real breaking API change) to get the actual new
module shapes right:

- paseo-plugin.json: added requirements.paseo: ">=0.8.0" (missing the field
  at all defaults to "<0.8.0", which is exactly what broke)
- Split the old single index.ts into index.client.tsx (surface/sidebar/
  command-center registration) and index.server.ts (RPC handler registration
  + the background-rescan cleanup hook)
- Moved main.client.tsx -> client/sessions.tsx, src/server/session-handlers.
  server.ts -> server/session-handlers.ts, src/server/session-contracts.
  shared.ts -> shared/session-contracts.ts, per the new "the directory is
  the boundary" rule
- Updated imports for the new module split: useRpc/PluginSurfaceProps now
  from @getpaseo/plugin/client (were @getpaseo/plugin); defineRpc now from
  the shared root @getpaseo/plugin (was @getpaseo/plugin/server)
- Rewrote paseo-plugin.d.ts's hand-written ambient type declarations to
  match the new @getpaseo/plugin / @getpaseo/plugin/client /
  @getpaseo/plugin/server module split (there's no real installed
  @getpaseo/plugin package here to pull types from — Paseo supplies the
  real runtime at install time, this project has always hand-declared its
  own types against it)
- Updated scripts/package-plugin.mjs's staged file list for the new layout

Also discovered while testing this for real: Paseo 0.8's build step now
scans the *entire* given plugin directory and rejects any file outside
client/server/shared — including this monorepo's own unrelated
packages/cli/dist/**. That means the previously-documented "point paseo
straight at the repo root for local dev" flow no longer works at all here;
only the packaged, self-contained bundle from `npm run package:plugin`
does. Updated docs/MANUAL.md and CONTRIBUTING.md to document the actual
working dev loop (package:plugin, then install/reload against
build/paseo-plugin, not the repo root).

Verified for real against the actual installed Paseo 0.8.0 daemon, not just
a clean typecheck: installed the packaged bundle standalone (paseo plugin
ls reports "running", clean logs), then used it to fix the actual broken
"sessionforge" registration on this machine (same daemon that produced the
original error), and separately verified the edit -> repackage -> reload
dev loop actually picks up source changes.

Also fixed an unrelated but real test-fragility bug found along the way:
discover.server.test.ts's "keep-session" fixture used a hardcoded absolute
date instead of one relative to "now", so it silently flipped from KEEP to
ARCHIVE (crossing classifySession's 14-day threshold) as real time passed,
breaking 3 tests that depended on it. Made the fixture dates relative to
test-run time instead, so this can't happen again.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d3e1633281

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/MANUAL.md

The manual way — needed if you're developing the plugin itself, since it points `paseo` straight at your
working tree instead of a downloaded release snapshot:
The manual way — needed if you're developing the plugin itself. **Point `paseo` at `build/paseo-plugin`, not

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the README's stale manual install command

This migration makes paseo plugin install /path/to/sessionforge fail for a repository checkout, as this new section explains, but README.md:54-56 and README.ko.md:54-56 still direct plugin developers to use exactly that command. Users following the project landing page will therefore hit the v0.8 module-location rejection instead of staging the plugin first; update those links/text to use npm run package:plugin and build/paseo-plugin.

Useful? React with 👍 / 👎.

@4mGLn
4mGLn merged commit 31e1349 into main Sep 11, 2026
4 checks passed
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.

2 participants