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

swamp-extension-quality and swamp-extension-publish skills don't guide zod import map resolution for scorer

Opened by bixu · 4/24/2026· Shipped 4/24/2026

Description

When publishing an extension that uses zod with a bare specifier import (import { z } from "zod") mapped via deno.json, the swamp.club scorer fails with:

deno doc failed (code 1): Warning Import "zod" not a dependency
  hint: If you want to use the npm package, try running `deno add npm:zod`
error: Failed resolving 'zod' from 'file:<redacted>

The root cause is that deno.json is not included in the published tarball by default, so the scorer's deno doc --lint sandbox cannot resolve the bare "zod" specifier.

Expected Skill Guidance

The swamp-extension-quality and swamp-extension-publish skills should explicitly advise:

  1. If the extension uses zod (which the bundler treats specially — not inlined), add deno.json to additionalFiles: in manifest.yaml so the scorer's sandbox has the import map.
  2. Inline npm: specifiers are blocked by the swamp linter (no-import-prefix rule), so the bare specifier + import map approach is the only valid path — but it only works if deno.json is in the tarball.

Workaround Applied

Added deno.json to additionalFiles: in manifest.yaml. This resolved the scorer failure.

Environment

  • swamp version: 20260424.000956.0-sha.25668e08
  • OS: macOS 26.4.1
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 11 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

4/24/2026, 6:09:41 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack724/24/2026, 1:53:40 PM
Editable. Press Enter to edit.

bixu commented 4/24/2026, 7:57:00 AM

After further investigation: Adding deno.json to additionalFiles: in the manifest does not resolve the issue.

Files in additionalFiles: land at extension/files/ in the tarball, not at the tarball root. When the scorer runs deno doc --lint against the model source files, deno looks for deno.json in the file's directory and parents — but extension/files/deno.json is not in that path, so the import map is never found.

Sign in to post a ripple.