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

Function createMemoryStore

scripts/mars-secret-store.mjs:302–312  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

300
301/** This process only: what is left when nothing else is available. */
302export function createMemoryStore() {
303 const values = new Map();
304 return {
305 kind: SECRET_STORE_MEMORY,
306 label: "memory",
307 isPersistent: false,
308 read: (account) => values.get(account) ?? null,
309 write: (account, value) => values.set(account, value),
310 remove: (account) => values.delete(account),
311 };
312}
313
314function hasSecretTool(env, run) {
315 if (!env.DBUS_SESSION_BUS_ADDRESS) return false;

Callers 2

openSecretStoreFunction · 0.85

Calls 2

setMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected