Files
hermes-agent/web/src
kshitijk4poor 8e6de6153b refactor(profiles): one neutral TypeScript owner for the profile-id grammar
The TS profile-id grammar lived in electron/profile-id-guard.ts, so renderer
code imported an Electron module for a regex, and the Bot creation dialog plus
the dashboard ProfilesPage and ProfileBuilderPage still carried private copies.

apps/shared/src/profile-id.ts now holds the one literal (PROFILE_ID_ARG_RE),
exposed as the narrow @hermes/shared/profile-id subpath. Electron gates import
it relatively (esbuild bundles electron/ without tsconfig paths); the renderer
and the dashboard import the subpath; plugins get it through a one-line
@hermes/plugin-sdk utility re-export, since the plugin fence allows only the
SDK. profile-id-guard.ts keeps backendProfileArg and re-exports the regex.
Per-caller trimming, case-folding, default/reserved names and the bot slugifier
are unchanged.

Guards swap the shared owner and prove every gate follows it, including the
Bot dialog (owner-driven rejection on a reachable slug), ProfilesPage and
ProfileBuilderPage, and backendProfileArg.

Refs #155595
2026-11-20 17:36:20 +05:30
..
…
…
…
…