extension source add does not discover brand new types — only overrides already-pulled types
Opened by bixu · 4/21/2026· Shipped 4/21/2026
Description
swamp extension source add is documented as a way to load extensions from a local path, including new types under development. In practice, it only overrides types that were previously pulled from the registry. Brand new types in the source directory are silently ignored.
Steps to Reproduce
- Initialize a fresh swamp repo (
swamp repo init) with no extensions pulled yet - In a sister repo, create a new extension model with a manifest:
extensions/models/my-model.tsexporting@collective/my-modelextensions/models/my_model.manifest.yaml
- Add the sister repo's models dir as a source:
Returns:swamp extension source add /path/to/sister-repo/extensions/models{ "action": "added", "status": "valid" } - Search for the new type:
swamp model type search my-model - Attempt to describe the new type:
swamp model type describe @collective/my-model
Expected Behavior
The new type @collective/my-model appears in swamp model type search and is describable/usable without requiring a prior registry publish.
Actual Behavior
- The type does not appear in
swamp model type search swamp model type describe @collective/my-modelreturns "Model type not found"swamp extension source rm+swamp extension source add(re-adding) does not helpswamp repo indexdoes not help
The source directory also contains a manifest for @collective/existing-model, which IS a previously-pulled type. That type continues to appear in search (from its existing pulled bundle), confirming the source path is valid and readable. Only the brand new, never-pulled type is silently ignored.
Environment
- Swamp version:
20260420.232916.0-sha.858cc512 - Platform: macOS (darwin)
- Source path structure:
extensions/models/ existing_model.manifest.yaml # previously-pulled type — works via source override my_model.manifest.yaml # new type, never published — NOT discovered my_model.ts
Workaround
Copying or symlinking the .ts file into the consumer repo's own extensions/models/ directory works, since local extensions are always discovered. This suggests the bundling/discovery step for source extensions is skipped when the type has no prior pulled bundle to override.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.