diff --git a/apps/web/src/components/settings/AddProviderInstanceDialog.logic.ts b/apps/web/src/components/settings/AddProviderInstanceDialog.logic.ts index 10030681c7..bd7ef3caa3 100644 --- a/apps/web/src/components/settings/AddProviderInstanceDialog.logic.ts +++ b/apps/web/src/components/settings/AddProviderInstanceDialog.logic.ts @@ -41,6 +41,12 @@ export function createHermesProviderInstanceId(label: string, randomUuid: () => */ export const HERMES_PLUGIN_INSTALL_COMMAND = "./integrations/hermes-t3-gateway/install.sh" as const; +/** + * Activates the pairing. The gateway only constructs the platform adapter at + * startup, so it keeps reporting offline until it is restarted. + */ +export const HERMES_GATEWAY_RESTART_COMMAND = "hermes gateway restart" as const; + export function isHermesInstanceRemovedError(error: unknown): boolean { return ( typeof error === "object" && diff --git a/apps/web/src/components/settings/AddProviderInstanceDialog.tsx b/apps/web/src/components/settings/AddProviderInstanceDialog.tsx index d86f80db8f..1d2eccc6ba 100644 --- a/apps/web/src/components/settings/AddProviderInstanceDialog.tsx +++ b/apps/web/src/components/settings/AddProviderInstanceDialog.tsx @@ -37,6 +37,7 @@ import { AnimatedHeight } from "../AnimatedHeight"; import { ADD_PROVIDER_WIZARD_STEPS, createHermesProviderInstanceId, + HERMES_GATEWAY_RESTART_COMMAND, HERMES_PLUGIN_INSTALL_COMMAND, isHermesInstanceRemovedError, isOwnedHermesEnrollmentRetry, @@ -208,6 +209,16 @@ export function AddProviderInstanceDialog({ open, onOpenChange }: AddProviderIns description: "Run it from the T3 Code checkout on the Hermes host.", }), }); + const { copyToClipboard: copyRestartCommand, isCopied: isRestartCommandCopied } = + useCopyToClipboard({ + target: "Hermes gateway restart command", + onCopy: () => + toastManager.add({ + type: "success", + title: "Restart command copied", + description: "Run it on the Hermes host to activate the pairing.", + }), + }); // Rollback of a failed Hermes enrollment must survive the dialog closing // mid-failure, so the pending undo lives in a ref that an unmount-safe @@ -675,10 +686,31 @@ export function AddProviderInstanceDialog({ open, onOpenChange }: AddProviderIns 3. Restart the gateway on that host
- Run hermes gateway restart. This step is required — the plugin
- only dials T3 Code after the restart, so nothing is wrong while this panel
- still says {hermesGatewayStatusLabel(hermesWaitingState.statusLabelState)}.
- This page updates itself the moment Hermes connects.
+ This step is required — the plugin only dials T3 Code after the restart, so
+ nothing is wrong while this panel still says{" "}
+ {hermesGatewayStatusLabel(hermesWaitingState.statusLabelState)}. This page
+ updates itself the moment Hermes connects.
+
+ {HERMES_GATEWAY_RESTART_COMMAND}
+
+
+
+ Without an installed service this runs in the foreground and keeps the
+ terminal — that is expected. Use hermes gateway install to run
+ it as a background service instead.