MCPcopy Create free account
hub / github.com/apache/maka / isValidShellRunStatusTransition

Function isValidShellRunStatusTransition

packages/core/src/shell-run.ts:173–182  ·  view source on GitHub ↗
(
  current: ShellRunStatus,
  next: ShellRunStatus,
)

Source from the content-addressed store, hash-verified

171}
172
173export function isValidShellRunStatusTransition(
174 current: ShellRunStatus,
175 next: ShellRunStatus,
176): boolean {
177 if (current === next) return true;
178 if (current === 'starting') {
179 return next === 'running' || next === 'failed' || next === 'orphaned';
180 }
181 return current === 'running' && isTerminalShellRunStatus(next);
182}
183
184export function isShellOutput(value: unknown): value is ShellOutput {
185 if (!value || typeof value !== 'object' || Array.isArray(value)) return false;

Callers 1

nextShellRunRecordFunction · 0.85

Calls 1

isTerminalShellRunStatusFunction · 0.85

Tested by

no test coverage detected