MCPcopy
hub / github.com/callstack/agent-device / hashRemoteConfigFile

Function hashRemoteConfigFile

src/remote/remote-connection-state.ts:175–183  ·  view source on GitHub ↗
(configPath: string)

Source from the content-addressed store, hash-verified

173}
174
175export function hashRemoteConfigFile(configPath: string): string {
176 try {
177 return crypto.createHash('sha256').update(fs.readFileSync(configPath)).digest('hex');
178 } catch (error) {
179 throw new AppError('INVALID_ARGS', `Remote config file not found: ${configPath}`, {
180 cause: error instanceof Error ? error.message : String(error),
181 });
182 }
183}
184
185function remoteConnectionStatePath(options: { stateDir: string; session: string }): string {
186 return path.join(

Calls 1

updateMethod · 0.80

Tested by 1