← Back to list
01Issue
FeatureOpenSwamp CLI
AssigneesNone
Recommend or manage lockfile strategy for extension model npm dependencies
Opened by swampadmin · 1/26/2026
Problem
When extension models use Deno-style npm: import specifiers (e.g. import { z } from "npm:zod@4"), the repo's deno.lock does not include the npm dependency resolution. Agentic code reviewers (e.g. pi-judge) flag this as a reproducibility gap and suggest regenerating the lockfile — but the fix can't be cleanly applied.
Current behavior
- Extension models import npm packages via
npm:zod@4specifiers - Swamp resolves these internally via its own Deno runtime
- The repo's
deno.lockhas no entry for these npm dependencies - Running
deno cacheto fix it fails without adeno.json, or requires--node-modules-dir=autowhich also resolves unrelatedpackage.jsondependencies (e.g.@anthropic-ai/claude-codeand all its optional deps), bloating the lockfile
Proposed solution
One of:
- Swamp manages a lockfile for extension model dependencies (e.g. during
swamp extension pushorswamp repo index) - Recommend a
deno.jsonpattern scoped toextensions/with explicit imports, so users can rundeno cachecleanly - Document that
deno.lockis not expected to cover swamp model deps, so agentic reviewers and humans know to ignore this
Alternatives considered
- Adding npm deps to
package.json— wrong tool for Deno-style imports - Creating a root
deno.json— pulls in unrelated deps frompackage.jsonin the same directory
Additional context
Discovered during PR review of swamp extension models in https://github.com/hivemq/hivemq-terraform-harvester/pull/69. An automated multi-model reviewer flagged the missing npm:zod@4 resolution in deno.lock as a medium-severity reproducibility issue.
02Bog Flow
Open
No activity in this phase yet.
03Sludge Pulse
Sign in to post a ripple.