Skip to content

Add napi-rs CI for hardware-keys platform builds#2

Merged
dickhardt merged 8 commits into
mainfrom
hardware-keys-ci
Apr 10, 2026
Merged

Add napi-rs CI for hardware-keys platform builds#2
dickhardt merged 8 commits into
mainfrom
hardware-keys-ci

Conversation

@dickhardt
Copy link
Copy Markdown
Contributor

Summary

  • Add hardware-keys.yml workflow that builds native .node binaries on 4 platforms (darwin-arm64, darwin-x64, linux-x64-gnu, win32-x64-msvc)
  • Darwin packages include the prebuilt se-helper Swift binary
  • Each build job includes a smoke test (discover() call) to verify the module loads
  • Integrate into release.yml via workflow_call for publishing platform packages with provenance

Test plan

  • Verify all 4 platform build jobs pass in this PR's CI run
  • Verify smoke tests log discover: [] (no hardware on runners)
  • Review build artifacts contain expected files

🤖 Generated with Claude Code

dickhardt and others added 8 commits April 9, 2026 15:18
…y resolution

- New @aauth/hardware-keys napi-rs package: Rust crate wrapping the `yubikey`
  crate for PIV slot 9e signing (no PIN) and `security-framework` for Secure
  Enclave, compiled as a Node.js native addon via napi-rs

- Swift SE helper (se-helper): codesigned binary for persistent Secure Enclave
  key management — generate, sign, list, delete via CryptoKit

- Backend abstraction: software (OS keychain), yubikey-piv, secure-enclave —
  each with discover, generateKey, signHash, listKeys, getPublicKey,
  getDeviceLabel

- Key resolution chain: fetch JWKS → match thumbprints against local keys →
  config fallback → hardware fallback → software fallback. Hardware always
  preferred, unavailable devices gracefully skipped.

- Multi-agent config (~/.aauth/config.json): agents map with per-agent
  personServerUrl, hosting platform, and keys map (kid → backend metadata)

- Updated agent-token.ts: hardware key signing via manual JWT assembly + hash
  signing, person server URL as `ps` claim

- CLI redesigned for agent use: discover, generate, sign-token, public-key,
  add-agent, config, show, skill — all JSON output except show/help

- Skills system with front matter: setup skill for key generation + platform
  discovery, platform skills (github-pages, gitlab-pages, cloudflare-pages,
  netlify) with detection metadata for agent-driven discovery

- 23 vitest tests covering all backends, agent token signing + verification,
  config management, and device labels

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add jti (randomUUID) to agent tokens (both software and hardware signing paths)
- Add jti to resource tokens
- Rename Mission.manager → Mission.approver per spec (MM → Person Server)
- Update setup skill: default person server is https://issuer.hello.coop

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- mcp-stdio: --agent-url is now optional, resolved from ~/.aauth/config.json
- mcp-openclaw: agent_url is now optional in PluginConfig
- local-keys config: added agentServerUrl and jwksUri fields to AgentConfig
- resolveKey: fetches JWKS and agent metadata in parallel when jwksUri is cached,
  verifies agent server still points to same jwksUri
- CLI: auto-derives and stores agentServerUrl/jwksUri on generate and add-agent

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ackages

- Bump hardware-keys to v0.3.0 to match all workspace packages
- Add singleFork to root vitest config (YubiKey exclusive access)
- Remove prebuilt se-helper from local-keys/bin (will ship in platform packages)
- SE backend looks for se-helper in @aauth/hardware-keys-{arch} package first
- Add @aauth/hardware-keys as optionalDependency of local-keys
- Add hardware-keys to release workflow version check
- Remove postinstall (se-helper is prebuilt, not built at install time)
- 146/146 tests passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build native .node binaries for darwin-arm64, darwin-x64, linux-x64-gnu,
and win32-x64-msvc. Include prebuilt se-helper Swift binary in darwin
platform packages. Integrate into release.yml via workflow_call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- darwin-x64: cross-compile Rust + Swift from arm64 runner (macos-13 unavailable)
- Smoke tests: use index.js loader from hardware-keys/ working directory
- Stage step: rename output to index.{platform}.node for npm packages
- Add debug ls step to confirm build output filenames

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
napi build produces hardware-keys.{platform}.node, not index.{platform}.node.
Load the binary directly instead of through index.js which expects the index prefix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dickhardt dickhardt merged commit 22e4e07 into main Apr 10, 2026
6 checks passed
@rohanharikr rohanharikr deleted the hardware-keys-ci branch May 11, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant