eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 776 B
JavaScript
import{isEveProject}from"#setup/scaffold/index.js";import{findEveProjectContext}from"#internal/project-context.js";const NOT_AN_AGENT_MESSAGE="No eve agent in this directory. Run `eve init <name>`, then run this command from inside the new project.";async function validateWorkspaceProjectCommand(e){let t=await findEveProjectContext(e.appRoot);return t?.kind===`workspace-member`?(e.logger.error(e.workspaceMemberMessage(t.workspace)),process.exitCode=1,!1):t===void 0||t.kind===`standalone`&&!await(e.isEveProject??isEveProject)(e.appRoot)?(e.logger.error(NOT_AN_AGENT_MESSAGE),process.exitCode=1,!1):!0}function hasInteractiveTerminal(){return!!(process.stdin.isTTY&&process.stdout.isTTY)}export{NOT_AN_AGENT_MESSAGE,hasInteractiveTerminal,validateWorkspaceProjectCommand};