evOo-local/packages/db/src/project-workspace-mount.ts
Cursor Agent c858cb816c
Phase 3: real code work in evOo (git tools, workspace mount, push policy)
Add git, gh, openssh-client, curl, and sudo to the computer image with a docker
smoke test. Mount deployment-owner project workspacePath at /home/rakazo/project,
align /home/rakazo file paths with shell, and resolve default branch from origin/HEAD.

Inject the owner GitHub token from encrypted deployment settings only into project
computers; enforce branch-only push, block force-push, and require approval before
the first push or gh pr in a run. Add runaway guards (tool fuse and stall pause),
collapse live narration, fix streaming progress merge, DE run strings, and Lead as
the project main Oo name. Fix evo-deploy test flake.

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
2026-10-07 21:41:56 +00:00

16 lines
698 B
TypeScript

import { homedir } from "node:os";
import path from "node:path";
import { InvalidProjectWorkspacePathError } from "./project-workspace.js";
/** Host folder allowed to bind into a project computer at /home/rakazo/project. */
export function assertProjectWorkspaceMountAllowed(resolvedDirectory: string): void {
const normalized = path.resolve(resolvedDirectory);
if (normalized === path.parse(normalized).root) {
throw new InvalidProjectWorkspacePathError("The project folder cannot be the filesystem root.");
}
const home = path.resolve(homedir());
if (normalized === home) {
throw new InvalidProjectWorkspacePathError("The project folder cannot be your home directory.");
}
}