Skip to content

Plugins: the browser can detect all 12 and declare 7 at launch — neither is implemented #53

Closed

Description

@scttfrdmn

spawn-ts has zero plugin support today — no spore:plugin string anywhere in src/, no plugin field on LaunchSpec. That reads as "plugins are out of scope for the browser", which is wrong in both directions: a majority of the registry is browser-installable, and every plugin is browser-detectable. The matrix needs two columns or it will keep being read as one.

The transport split is what decides the tiers

Go has two distinct plugin paths, and only one of them needs a controller:

Path 1 — install on a running instance (spawn plugin install). Not portable. remotePluginInstall (cmd/plugin.go:529) POSTs to http://127.0.0.1:7777/v1/plugins/install through an SSH tunnel (withSSHTunnel), authenticated with a token read over SSH (sshReadToken). A browser has no SSH.

Path 2 — declare at launch (spawn launch --plugin ref[@version]). Portable. collectPluginDeclarations (cmd/launch_config.go:584) collects plugin.Declaration{Ref, Config} and BuildLinuxBootstrap writes them into user-data (pkg/launcher/bootstrap.go:147):

cat > /etc/spawn/plugins.json <<'EOFPLUGINS'
[{"ref":"jupyterlab","config":{...}}]
EOFPLUGINS
chmod 644 /etc/spawn/plugins.json

spored reads it back at pkg/provider/ec2.go:630 (loadPluginDeclarations) and installs via Runtime.LoadFromDeclarations (pkg/pluginruntime/runtime.go:224). This is pure user-data. src/aws/userdata.ts already builds a bootstrap and already embeds a heredoc block for --command (line 62) — the same mechanism, ~20 lines. The declaration type is trivial:

type Declaration struct {
	Ref    string            `json:"ref"`
	Config map[string]string `json:"config,omitempty"`
}

Column 1: can the browser install it?

The registry is spore-host/spore-plugins/plugins/ — 12 plugins. Counting local: vs remote: blocks in each plugin.yaml:

plugin local steps browser can declare at launch
jupyterlab, code-server, rstudio-server, docker, mountpoint-s3, cloudwatch-agent, vscode-tunnel 0 yes — tier B
github-actions-runner, globus-personal-endpoint, rclone, spore-sync, tailscale 2–3 no — tier D

The seven remote-only plugins are the launch-time path with nothing else needed. That includes mountpoint-s3, which is the S3-as-filesystem half of data movement — so declaring it at launch gives data-in with no installed software anywhere.

The five with local steps have a subtlety worth recording, because it also limits Go. Their local halves mint secrets on the controller and push them to the instance (grep -c push: globus-personal-endpoint 4, rclone 4, tailscale 3, github-actions-runner 3, spore-sync 0). The launch-time declaration path has no controller to run local provision, so runtime.go:62 documents the consequence:

NOTE: the launch-time / async path (LoadFromDeclarations → Install with nil pushed) has no controller to run local provision, so a plugin whose configure step needs a pushed value still parks at StatusWaitingForPush and is not automatically resumed when ReceivePush later delivers the value […] That path is unused by the current registry plugins and is left as a known limitation.

So for four of those five, --plugin at launch parks even in Go. spawn-ts must not offer them in the declare-at-launch path; it would produce a plugin stuck in waiting-for-push with no way to unstick it. spore-sync (0 pushes) is the interesting exception — its local half is mutagen on the developer's machine, which is legitimately the CLI's job and stays there.

Globus is the special case the user flagged, and it splits. globus-personal-endpoint wraps Globus Connect Personal and its local precondition is literally globus whoami — tier D, correctly. But Globus Transfer against managed collections is a REST API with no local half at all, it's CORS-open, and we already hold a Globus token from the existing PKCE sign-in. That's tracked separately (Phase 3) — it isn't a plugin port, it's a new browser-native capability.

Column 2: can the browser detect it? Yes — always

recordPluginProvenanceTag (cmd/plugin.go:301) writes an EC2 tag per installed plugin:

spore:plugin:<name> = version=1.2;sha256=abc123def456;commit=789abc;verify=signature

Built by pluginProvenanceTagValue (cmd/plugin.go:279), capped well under EC2's 256-char limit; hashes are truncated to 12 chars by shortHash (cmd/plugin_inspect.go:101), which returns the literal "(none)" for an empty hash. verify= is one of signature | manifest | none — the verification tier actually reached, in that precedence order.

DescribeInstances already returns these tags into ManagedInstance.tags (src/aws/ec2.ts:227). So a pure parsePluginTag() is all that stands between spawn-ts and rendering "jupyterlab v1.2, verify=signature" — including for spore-sync, which the browser could never install. Detection is universal; install is not. Two columns.

Three things the parser has to get right:

  1. An absent or unparseable tag must read as "unknown", never "not installed". The tag is written best-effort — recordPluginProvenanceTag returns early with no tag when the instance isn't EC2-resolvable, and only warns on a UpdateInstanceTags failure. So absence genuinely means "we don't know", and a UI that renders it as "not installed" is asserting something the data doesn't support. Same fix(extend): add the safety floor, write both TTL tags, nudge spored (#54) #63 invariant as everywhere else in this audit.
  2. verify=none must be visibly distinct from a missing verify=. The first says "installed and verification failed to reach signature or manifest"; the second says "we can't tell". Collapsing them hides a real supply-chain signal.
  3. Unknown key=value pairs must be preserved, not dropped. The Go builder can grow fields; a strict parser that discards them would silently lose provenance on newer instances.

What to file as work

item tier
parsePluginTag() + plugin display over spore:plugin:* (pure, no SDK) B — do first; unblocks the portal for all 12
plugins?: PluginDeclaration[] on LaunchSpec → /etc/spawn/plugins.json heredoc in src/aws/userdata.ts B — 7 remote-only plugins
declare-at-launch for the 4 push-dependent plugins D — parks at StatusWaitingForPush in Go too; must be refused, not attempted
spawn plugin install on a running instance (SSH tunnel → :7777) D — no SSH in a browser
spore-sync / Globus Connect Personal local halves D — the CLI's job, by design
Globus Transfer (managed collections) separate — browser-native, Phase 3

Part of the parity audit.

Activity

  1. added
    enhancement
    area: core
    area: aws
    on Jul 31, 2026
  2. scttfrdmn commented on Jul 31, 2026

    @scttfrdmn
    ContributorAuthor

    Part of #57 (spawn-ts vs spawn parity audit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: awsarea: coreenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions