Skip to content

[FEAT] Web connection capture: connect widget + pending-connection routes - #1

Merged
ScottieR merged 2 commits into
mainfrom
feature/web-connections-admin
Aug 31, 2026
Merged

ScottieR merged 2 commits into
mainfrom
feature/web-connections-admin

Conversation

@ScottieR

Copy link
Copy Markdown
Owner

Server-side counterpart to canopy PR #29 (web-hosted API key capture).

Rescued from a worktree that had no commits of its own and no remote — all of this existed only as uncommitted changes on local disk, and its branch was mistracking origin/main as upstream so nothing would ever have reported it as unpushed.

What's here

  • src/connect-widget/main.ts + scripts/build-connect-widget.mjs — browser widget that encrypts the pasted key to the requesting Canopy install's X25519 public key before it leaves the page (ECDH → HKDF-SHA256 → ChaCha20-Poly1305). canopy-admin only ever sees ciphertext. Built to public/connect-widget.js, which is generated and now gitignored.
  • connections-routes.js (+ tests) — pending-connection endpoints
  • migrations/002_pending_connections.sqlpending_connections table
  • server.js / server-security.js — route mounting and hardening

Verification

npm test → 53 passing. A follow-up commit wires connect-widget.test.js into the test script; it had been written but never run.

Its Rust counterpart pins a ciphertext produced by this exact module — see canopy PR #94.

🤖 Generated with Claude Code

ScottieR and others added 2 commits August 25, 2026 16:33
…utes

Rescues uncommitted work that existed only on local disk — this branch
had no commits of its own and no remote.

- src/connect-widget/main.ts + scripts/build-connect-widget.mjs:
  browser widget for capturing provider credentials, built to
  public/connect-widget.js (generated, now gitignored)
- connections-routes.js (+ tests): pending-connection endpoints
- migrations/002_pending_connections.sql: pending_connections table
- server.js / server-security.js: route mounting and hardening

Server-side counterpart to canopy PR #29 (web-hosted API key capture).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The file was written but never added to the npm test script, so its four
tests — including the ones proving the ephemeral key is fresh per call
and that tampered ciphertext fails AEAD verification — had never run in
CI. They pass; suite is 53 green.

It is the JS half of a cross-repo pair: canopy's js_interop_check test
pins a ciphertext produced by this exact module.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ScottieR
ScottieR merged commit a09bded into main Aug 31, 2026
1 check failed
@ScottieR
ScottieR deleted the feature/web-connections-admin branch August 31, 2026 22:11
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