MCPcopy Index your code
hub / github.com/callstack/agent-device / invokeMaestroRunScript

Function invokeMaestroRunScript

src/compat/maestro/runtime.ts:79–101  ·  view source on GitHub ↗
(params: {
  baseReq: ReplayBaseRequest;
  positionals: string[];
  scope: ReplayVarScope;
})

Source from the content-addressed store, hash-verified

77}
78
79function invokeMaestroRunScript(params: {
80 baseReq: ReplayBaseRequest;
81 positionals: string[];
82 scope: ReplayVarScope;
83}): DaemonResponse {
84 const [scriptPath] = params.positionals;
85 if (!scriptPath) {
86 return errorResponse('INVALID_ARGS', 'runScript requires a file path.');
87 }
88 try {
89 const outputEnv = executeRunScriptFile({
90 scriptPath,
91 env: {
92 ...params.scope.values,
93 ...(params.baseReq.flags?.maestro?.runScriptEnv ?? {}),
94 },
95 });
96 return { ok: true, data: { outputEnv } };
97 } catch (error) {
98 const appError = asAppError(error);
99 return errorResponse(appError.code, appError.message, appError.details);
100 }
101}

Callers 1

Calls 3

errorResponseFunction · 0.90
executeRunScriptFileFunction · 0.90
asAppErrorFunction · 0.90

Tested by

no test coverage detected