## Mechanism first, no npm release change
Introduce `.npm-version` at the npm release already supplied by the
pinned Node archive. Both desktop hosts package that exact registry
release. This PR does not adopt npm 12: after it merges, maintenance
will be dispatched to test creation of an independent candidate PR.
## Implementation
- Download the exact npm registry tarball and verify its canonical
metadata, package/version, sha512 integrity, bundled dependencies and
engines against each host's Node. Reuse the platform tar extractor; no
handwritten archive parser. The registry supplies both metadata and
archive, so this checks registry content consistency, not an independent
publisher signature.
- Preserve Tauri's Node binary and existing per-platform npm layout, and
Electron's npm-only resources. Smoke and verification check the npm pin.
- Scope lifecycle script permission to the exact `@opencode/cli` release
for direct installs and native upgrade. No blanket script permission or
user npmrc edits.
- Daily maintenance audits the pinned npm and candidate and proposes
`.npm-version` changes only when declared engines accept both runtimes.
A major is explicitly unqualified and needs maintainer review; engines
acceptance is not behavioral validation. No automatic merge or release.
- Partial proposals remain visible errors naming the existing branch,
with reconciliation instructions; no forced overwrite/deletion. A
candidate-audit failure blocks only the npm proposal; pinned audit and
metadata failures remain failures.
- Documentation references pins rather than copied versions. GitHub
token-created proposal validation requires approving the workflow runs,
or closing/reopening with a maintainer account; no new credentials
added.
## Validation
- Unit/packaging/maintenance/Tauri script suites: 47 pass. Server update
tests: 70 pass, 1 platform skip. Typecheck passes.
- Windows Electron45 package and Tauri release binary build/smoke pass.
- Real install, upgrade and legacy-replacement fixtures pass on both
Windows layouts with current npm11 and a temporary, uncommitted npm12
candidate.
- Ubuntu: both layouts prepare/verify; first-install fixture passes with
both npm releases.
- The candidate removes the two high audit entries, but their
applicability to CodeNomad's prebuilt OpenCode installation is low; 32
moderate entries remain. The proposal requires release-note review and
native-fixture qualification rather than equating a lower audit count
with safety.
macOS candidate behavior still needs CI qualification. No pin to npm12,
application release, registry publishing or daemon restart is part of
this PR.