alwaysai
Version:
The alwaysAI command-line interface (CLI)
29 lines (26 loc) • 684 B
text/typescript
import { run } from './run';
import { runForegroundSync } from './run-foreground-sync';
import { runForeground } from './run-foreground';
import { runStreaming } from './run-streaming';
import { Cmd } from '../types';
export function SpawnerBase(translate: (cmd: Cmd) => Cmd) {
return {
run(cmd: Cmd) {
return run(translate(cmd));
},
runForeground(cmd: Cmd) {
return runForeground(translate(cmd));
},
runForegroundSync(cmd: Cmd) {
return runForegroundSync(translate(cmd));
},
runStreaming(cmd: Cmd) {
return runStreaming(translate(cmd));
},
};
}
export const spawnerBase = {
run,
runForegroundSync,
runStreaming,
};