MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readSidecar

Function readSidecar

e2e/desktop/local-auth-mcp.test.ts:63–72  ·  view source on GitHub ↗
(home: string)

Source from the content-addressed store, hash-verified

61// which is exactly when firstWindow resolves — so this is always safe to read
62// after the window is up.
63const readSidecar = (home: string): SidecarConn => {
64 const manifest = JSON.parse(
65 readFileSync(join(home, ".executor/server-control/server.json"), "utf8"),
66 ) as { connection: { origin: string; auth?: { token?: string } } };
67 const origin = manifest.connection.origin;
68 const token = manifest.connection.auth?.token;
69 expect(typeof origin, "sidecar origin in the manifest").toBe("string");
70 expect(typeof token, "sidecar bearer token in the manifest").toBe("string");
71 return { origin, token: token! };
72};
73
74const closeWithVideo = async (app: ElectronApplication, runDir: string, home: string) => {
75 const page = app.windows()[0];

Callers 2

runApprovalFunction · 0.85
runBearerScopingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected