Skip to content

[ADR-026] Rust Binary npm Packaging #335

@ohdearquant

Description

@ohdearquant

Summary

Replace the umbrella Deno/npm packaging path with Rust binary packaging, platform package mapping, shim behavior, and release workflow updates.

Source ADRs

  • F146 ADR-026 (CRIT): The npm package ships only bin/ and README.md (from audit-platform/e2/ADR-026.md)
  • F147 ADR-026 (CRIT): The release matrix runs deno compile for CLI binaries and then publishes one umbrella npm package (from audit-platform/e2/ADR-026.md)
  • F148 ADR-026 (MAJ): The published shim is a Node execFileSync wrapper that runs bundled khive-* CLI binaries from npm/bin. (from audit-platform/e2/ADR-026.md)
  • F149 ADR-026 (MAJ): Linux x86_64 always maps to linux-x64-gnu (from audit-platform/e2/ADR-026.md)

Files affected

  • npm/package.json (24 sampled LOC)
  • .github/workflows/release.yml (71 sampled LOC)
  • npm/bin/khive (49 sampled LOC)
  • cli/lib/kernel.ts (142 sampled LOC)
  • npm/kernel-* (new/planned path pattern)

Acceptance criteria

  • All source findings listed above are addressed exactly once in this cluster.
  • Public types, handlers, schema, and docs touched by the affected files agree on the ADR contract.
  • Regression tests cover happy path and edge cases for the changed public APIs or schema behavior.
  • cargo test --workspace passes.
  • npm test --if-present passes.
  • cargo clippy --workspace -- -D warnings passes.
  • make ci passes.

Dependencies

  • Depends on: #[ADR-035] Import, Export, Remote Resolver, and Sync
  • Blocks: none

LOC estimate

~200 lines added/50 removed; 4 existing affected file(s) sampled at 286 current LOC via wc -l, plus 1 new/planned path(s).

Risk notes

  • Same-file dependencies must merge first; dependency list includes the exact overlapping paths.
  • 1 affected path(s) are new/planned and were not present in rg --files --hidden; create them in the owning PR rather than in independent parallel work.
  • Contains CRIT findings; do not defer without owner approval.

Auto-generated by ADR alignment triage

Metadata

Metadata

Assignees

No one assigned

    Labels

    adr-alignmentADR v1 series alignment workplatformPlatform layer (ADR-016..030)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions