MCPcopy Create free account
hub / github.com/callstack/agent-device / bootCommand

Function bootCommand

src/commands/management/runtime/admin.ts:90–106  ·  view source on GitHub ↗
(runtime, options = {})

Source from the content-addressed store, hash-verified

88 AdminBootCommandOptions | undefined,
89 AdminBootCommandResult
90> = async (runtime, options = {}): Promise<AdminBootCommandResult> => {
91 if (!runtime.backend.bootDevice) {
92 throw new AppError('UNSUPPORTED_OPERATION', 'admin.boot is not supported by this backend');
93 }
94 const target = normalizeDeviceTarget(options.target);
95 const backendResult = await runtime.backend.bootDevice(
96 toBackendContext(runtime, options),
97 target,
98 );
99 const formattedBackendResult = toBackendResult(backendResult);
100 return {
101 kind: 'deviceBooted',
102 ...(target ? { target } : {}),
103 ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}),
104 ...successText('Booted device'),
105 };
106};
107
108export const shutdownCommand: RuntimeCommand<
109 AdminShutdownCommandOptions | undefined,

Callers

nothing calls this directly

Calls 4

toBackendContextFunction · 0.90
toBackendResultFunction · 0.90
successTextFunction · 0.90
normalizeDeviceTargetFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…