Auto-resolver fails when extensions/models/ directory does not exist for vault-only extensions
Opened by swampadmin · 11/26/2025
Description
When auto-resolving a vault-only extension (e.g., @swamp/1password), the installer fails if the extensions/models/ directory does not exist. The error is:
No such file or directory (os error 2): open '/private/tmp/swamp-vault-test/extensions/models/upstream_extensions.json.lock'The installExtension adapter writes to upstream_extensions.json.lock inside the models directory regardless of whether the extension contains models. Vault-only extensions should not require the models directory to exist.
Steps to reproduce
swamp repo initin a fresh directory (noextensions/models/exists)- Create a vault config referencing
@swamp/1password(or any vault extension) - Run a vault command that triggers auto-resolution (e.g.,
swamp vault list-keys <name>) - The extension is found and downloaded, but installation fails because
extensions/models/upstream_extensions.json.lockcannot be created
Workaround: manually mkdir -p extensions/models/ before triggering auto-resolution.
Environment
- macOS (darwin-aarch64)
- Compiled binary via
deno run compile
Summary
This affects the extension install path in src/cli/commands/extension_pull.ts or src/cli/auto_resolver_adapters.ts. The upstream_extensions.json lockfile management assumes the models directory exists. The fix should either create the directory if it doesn't exist, or move the lockfile to a location that always exists (e.g., .swamp/).
Closed
No activity in this phase yet.
Sign in to post a ripple.