Skip to main content
← Back to list
01Issue
BugShippedSwamp CLI
Assigneesstack72

Relationships

#433 Direct execution @type prefix fails for repo-local extension model types

Opened by webframp · 5/24/2026· Shipped 5/24/2026

Description

The swamp model @<type> method run direct execution syntax unconditionally prepends @ to the type name before looking it up in the type registry. This works for published extensions (whose types are registered as @collective/name) but fails for repo-local extension models whose types are registered without the @ prefix (e.g. sandbox/coder-server).

The help text documents this as: "With @type prefix, auto-creates the definition if needed" — but the auto-creation also fails because the lookup uses the @-prefixed name that doesn't match any registered type.

Steps to Reproduce

  1. Create a repo-local extension model in extensions/models/ with a type like sandbox/coder-server
  2. Verify it loads: swamp model type search coder --json shows sandbox/coder-server
  3. Attempt direct execution: swamp model @sandbox/coder-server method run status my-server

Expected Behavior

Direct execution should resolve sandbox/coder-server from the local type registry and auto-create a model instance, then run the method — the same behavior published extensions get with @collective/name.

Actual Behavior

FTL error Error: "Unknown model type: @sandbox/coder-server"

The @ is prepended to the type string, producing @sandbox/coder-server which doesn't match the registered type sandbox/coder-server.

Workaround

Create the model instance explicitly first, then use the name-based invocation:

swamp model create sandbox/coder-server coder-server --json
swamp model method run coder-server status

Suggested Fix

The direct execution type resolver should strip the @ prefix used as the CLI syntax marker before looking up the type in the registry, or it should attempt lookup both with and without the @ prefix to support both published (@collective/name) and local (namespace/name) types.

Environment

  • swamp version: 20260524.004133.0-sha.93c9a4fd
  • Platform: linux x86_64 (WSL2)
  • Extension location: extensions/models/sandbox-coder-server/mod.ts
  • Type registered as: sandbox/coder-server (no @ prefix)
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

5/24/2026, 8:43:15 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/24/2026, 8:11:26 PM
Editable. Press Enter to edit.

stack72 commented 5/24/2026, 8:43:25 PM

Thanks @webframp for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.