MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / toMetadata

Function toMetadata

scripts/mars-credentials.mjs:234–247  ·  view source on GitHub ↗

Public shape of a connection: everything except the secret.

(connection)

Source from the content-addressed store, hash-verified

232
233 /** Public shape of a connection: everything except the secret. */
234 function toMetadata(connection) {
235 if (!connection) return null;
236 return {
237 id: connection.id,
238 kind: connection.kind,
239 label: connection.label,
240 teamName: connection.teamName ?? null,
241 email: connection.email ?? null,
242 expiresAt: connection.expiresAt ?? null,
243 // No readable token (a locked keychain, a lost key) means sign in again.
244 isExpired: isExpired(connection) || decrypt(connection) === null,
245 isSaved: connection.isSaved !== false,
246 };
247 }
248
249 /**
250 * Where tokens are kept, for the UI. Mirrors the SecretStore when there is

Callers 3

getActiveFunction · 0.85
saveFunction · 0.85
setTeamFunction · 0.85

Calls 2

isExpiredFunction · 0.85
decryptFunction · 0.85

Tested by

no test coverage detected