Skip to content

feat: re-add encrypted-file backend, fix body parsing, reframe messaging - #6

Merged
YairEtzion merged 1 commit into
mainfrom
fix/project-review-actions
Apr 2, 2026
Merged

feat: re-add encrypted-file backend, fix body parsing, reframe messaging#6
YairEtzion merged 1 commit into
mainfrom
fix/project-review-actions

Conversation

@YairEtzion

Copy link
Copy Markdown
Contributor

Summary

  • Re-add encrypted-file keystore as explicit opt-in (--backend encrypted-file --passphrase) for cloud VMs and containers without hardware key storage. Hardware backends remain preferred when available.
  • Fix SDK body parsing footgun — middleware now handles express.json(), express.text(), raw streams, and no body parser at all. No more express.text({ type: '*/*' }) workaround.
  • Reframe messaging from "hardware-bound" to "device-bound" across landing page, README, protocol spec, guides, ADRs, and packaging. Remove claims like "key is in silicon" and "signed by hardware."
  • Quick fixes — remove "serverless" from protocol spec, remove "Fastify" from landing page CTA, fix test count inconsistency, add TypeScript/Node.js language limitation disclosure, update ADR-003.

Files changed (22)

Keystore: detect.ts (add encrypted-file to StorageBackend, passphrase param), detect.test.ts (+2 tests), README.md
CLI: init.ts (--passphrase flag, --backend encrypted-file, key rename), context.ts (pass AUTH_MESH_PASSPHRASE)
SDK: amesh.ts (keyAlias support, passphrase, getBody), middleware.ts (async getBody with stream/JSON/Buffer support), README.md
Docs: protocol-spec, guide, integration-guide, why-amesh, architecture-decisions, project-review
Site: app.html, +page.svelte, docs/+page.svelte
Packaging: nfpm.yaml, homebrew formula, release workflow

Test plan

  • bun run build — all 6 packages build clean
  • bun run test — 142 tests pass (including 2 new detect tests for encrypted-file)
  • bun run lint — clean
  • Manual: amesh init --backend encrypted-file --passphrase test on a machine without TPM/Keychain
  • Manual: verify amesh.verify() works with express.json() without express.text({ type: '*/*' })

Re-add encrypted-file keystore as explicit opt-in for cloud VMs:
- `amesh init --backend encrypted-file --passphrase <passphrase>`
- Auto-detected only when passphrase is provided and no hardware found
- CLI, SDK, and context all pass AUTH_MESH_PASSPHRASE through

Fix SDK body parsing footgun:
- Middleware now handles express.json(), express.text(), raw streams
- No longer requires express.text({ type: '*/*' }) workaround
- Buffers from stream if no body parser ran

Reframe messaging from "hardware-bound" to "device-bound":
- Landing page, README, protocol spec, guides, packaging
- Remove "key is in silicon", "signed by hardware" claims
- Add language limitation disclosure (TypeScript/Node.js)
- Remove Fastify from landing page CTA (doesn't exist yet)
- Remove "serverless" from protocol spec target user
- Fix ADR-003 note about encrypted-file removal
@YairEtzion
YairEtzion merged commit fea9e93 into main Apr 2, 2026
1 check passed
@YairEtzion
YairEtzion deleted the fix/project-review-actions branch April 2, 2026 17:15
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