Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(gateway): add credential-free GatewaySummary type\n\nIntroduce a GatewaySummary interface that exposes only the id, label, and kind of a configured gateway, keeping sensitive fields such as bearer tokens and SSH credentials in the Tauri shell store. The listGateways function now returns this summary type instead of the full Gateway, ensuring the renderer never receives credentials it does not need.\n\nAuto-committed-on: dragonfly\n

Steven Enamakeld2fc191503a4
diff --git a/app/src/services/gatewayService.ts b/app/src/services/gatewayService.ts
index 28051b7139..68f12011fa 100644
--- a/app/src/services/gatewayService.ts
+++ b/app/src/services/gatewayService.ts
@@ -67,6 +67,19 @@ export interface Gateway {
spec: GatewaySpec;
}
+/**
+ * The renderer-facing view of a configured gateway.
+ *
+ * Deliberately credential-free: the list UI only shows a label and a kind
+ * badge. The remote bearer, SSH destination and identity path stay in the Tauri
+ * shell store (see {@link GatewaySpec}) and never cross to the renderer.
+ */
+export interface GatewaySummary {
+ id: string;
+ label: string;
+ kind: string;
+}
+
/** What a gateway is doing right now. */
export type GatewayStatus =
| { state: 'inactive' }
@@ -99,10 +112,10 @@ export function gatewaysAvailable(): boolean {
}
/** Every configured gateway, the desktop one first. */
-export async function listGateways(): Promise<Gateway[]> {
+export async function listGateways(): Promise<GatewaySummary[]> {
if (!gatewaysAvailable()) return [];
try {
- const gateways = await invoke<Gateway[]>('gateway_list');
+ const gateways = await invoke<GatewaySummary[]>('gateway_list');
log('listed %d gateway(s)', gateways.length);
return gateways;
} catch (err) {