theseus/bundled-addons/hermes/index.js
Local Dev 4a7667c06e hermes.x: standalone site + sidebar addon side:left + mark v2 (tapered trails)
New site-hermes-x/ — standalone .x site (own nav, own assets, own OG tags),
sibling to site-theseus-x and site-sirius-x. Internal nav stays on hermes.x:
Overview, Messenger (preview + UI mockup), Branding (brand kit). The only
cross-link is 'Get Theseus' pointing at theseus.x where appropriate.

Mark redesigned: tilted winged envelope with three tapered speed-trails on
the back-left (top longest, bottom shortest). Default colour sky #38BDF8 —
swappable via --sky in site-hermes-x/assets/shared.css. Alternate orange
palette documented but not applied by default. Mark propagated to:
  - site-hermes-x/assets/mark.svg + mark-stroke.svg (16-20px variant)
  - site/hermes/{index.html, branding/{index.html, mark.svg, mark-stroke.svg}}
  - TheseusNavigator/bundled-addons/hermes/{addon.json, panel.html}

Theseus addon moves out of the top-right extensions dock and into the
left-strip sidebar: panels[].side = 'left' + registerSidebarPanel({side:'left'}).
Appears alongside Mail/Pithos/Telegram, excluded from rightPanels() so the
extensions dock no longer lists it. Verified via sidebarState() CDP query —
hermes:main is no longer in the right-panels list.

site/hermes/ (the nested silentmode.st/hermes page) also updated to the new
mark for consistency; both the sovereign hermes.x and the silentmode-nested
page now show the same winged envelope.
2026-10-21 02:19:58 +03:00

38 lines
1.6 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",
// Dock on the LEFT strip (alongside mail/pithos/telegram etc.), not
// the right-hand add-on dock. The host checks `side` on both the
// manifest's panels[] entry and the registerSidebarPanel call —
// declaring it in both keeps dormant vs active renders consistent.
side: "left",
});
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");
},
};