theseus/bundled-addons/hermes/index.js
Local Dev 8eae448dde Hermes: Ermis shortcut (Ctrl+Shift+E), sidebar add-on, vCard import, brand kit
Shortcut: Ctrl+Shift+M -> Ctrl+Shift+E. Chrome owns Ctrl+Shift+M as
'switch profile' and E matches the Greek spelling (Ermis).

Sidebar discoverability: new bundled add-on at bundled-addons/hermes/
registers a left-strip icon + launcher panel. The panel is a thin chrome
(mark + 'Open Messages' + shortcut hint) that forwards clicks through
api.onMessage -> ipcMain.emit('hermes-open-request') -> openHermesWindow.
All real messaging code stays in main.js — add-on is purely for discovery.

Address book: opt-in vCard (.vcf) import. Dialog in the Add Contact modal
lets the user pick a file; main.js parses BEGIN:VCARD blocks for X-BNS-NAME
/ X-NOSTR-NPUB / X-NOSTR-PUBKEY plus .bch names and npubs mentioned in
NOTE fields. Candidates are previewed per-contact with checkboxes; nothing
is added until the user confirms. Non-matching vCards are returned too (so
the user can still add manually) rather than silently dropped. Nothing is
uploaded; parsing is local.

site/hermes: status badge flipped from 'designed - not yet built' to
'MVP - desktop'. New 'What ships today' grid covers threaded chat, send by
name, address book, local history (all live) and mobile + Tor (next /
planned). Hero carries the new Ctrl+Shift+E shortcut and a link to
/hermes/branding.

site/hermes/branding: new page. Mark SVG (winged envelope, two variants
for 16-20px and 24-160px display sizes), palette (reuses Silent Mode
tokens + an amber accent that's distinctly warm-yellow, not Hermes-orange
— so it never collides with Hermès the fashion house), name explanation
(English Hermes / Greek Ermis), voice notes, do/don't table, MPL-2.0
attribution.

Hermes/MOBILE-RECOMMENDATION.md: analysis of three mobile paths (inside
Ariadne / standalone / hybrid). Recommendation is Option 1: ship as a
screen inside Ariadne. Reuses the wallet seed, aligns with the design
doc's 'one seed many purposes' architecture, lowest total cost.
2026-10-21 00:45:25 +03:00

33 lines
1.3 KiB
JavaScript

// Hermes bundled add-on — thin launcher.
//
// Real messaging code (NIP-17 wrap/unwrap, relay subscriptions, persistent
// inbox, contacts) lives in Theseus main.js: too much raw network + crypto to
// run under the add-on sandbox. This add-on exists for ONE reason: register a
// left-strip sidebar entry so the Messages panel is discoverable without
// pressing Ctrl+Shift+E.
//
// The panel (panel.html) is a small chrome: mark, "Open Messages" button,
// shortcut hint. Click → forwarded through api.onMessage → an in-process
// ipcMain.emit that main.js listens for and resolves to openHermesWindow().
// Keeping the forwarding tiny: nothing crypto-sensitive flows through this
// add-on, so a compromise of this one-handler surface can at worst open an
// otherwise-openable window.
const { ipcMain } = require("electron");
module.exports = {
activate(api) {
api.registerSidebarPanel({
id: "main",
title: "Hermes",
page: "panel.html",
});
api.onMessage("open-messages", () => {
// In-process emit: main.js listens on "hermes-open-request" and calls
// openHermesWindow(). Using emit (not .send) because this is a
// same-process signal, not an IPC to a renderer.
ipcMain.emit("hermes-open-request");
return { ok: true };
});
api.log("registered hermes sidebar panel");
},
};