UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

11 lines (10 loc) • 544 B
import { errorResult } from "../../core/tools.js"; import { BASH_BACKGROUND_UNAVAILABLE } from "./fs-bash-background-text.js"; export { backgroundLifecycleOf, mountedModelShellOf, startedShellDeclaration } from "../../core/model-shell.js"; export function bashBackgroundUnavailable() { return errorResult(BASH_BACKGROUND_UNAVAILABLE); } export function modelShellExec(reading, command, readFloor, options) { const { start } = reading; return start.exec(command, { ...options, ...(readFloor !== undefined ? { readFloor } : {}) }); }