MCPcopy Index your code
hub / github.com/simstudioai/sim / guard

Function guard

apps/sim/executor/handlers/pi/ssh-tools.ts:91–97  ·  view source on GitHub ↗
(run: () => Promise<PiToolResult>)

Source from the content-addressed store, hash-verified

89}
90
91async function guard(run: () => Promise<PiToolResult>): Promise<PiToolResult> {
92 try {
93 return await run()
94 } catch (error) {
95 return { text: getErrorMessage(error, 'SSH tool failed'), isError: true }
96 }
97}
98
99/**
100 * Best-effort working-tree snapshot of the repo over the run's SSH session, for

Callers 1

buildSshToolSpecsFunction · 0.85

Calls 2

getErrorMessageFunction · 0.90
runFunction · 0.50

Tested by

no test coverage detected