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
- Create a repo-local extension model in
extensions/models/with a type likesandbox/coder-server - Verify it loads:
swamp model type search coder --jsonshowssandbox/coder-server - 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 statusSuggested 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)
Shipped
Click a lifecycle step above to view its details.