diff --git a/packages/adapters/src/executor.ts b/packages/adapters/src/executor.ts index b82a065..399906e 100644 --- a/packages/adapters/src/executor.ts +++ b/packages/adapters/src/executor.ts @@ -1033,7 +1033,6 @@ export function createRunExecutor(deps: ExecutorDeps) { savedSkills, agentSkills, agentSecretRows, - space, ] = await Promise.all([ deps.prisma.bot.findUniqueOrThrow({ where: { id: run.botId }, @@ -1073,10 +1072,6 @@ export function createRunExecutor(deps: ExecutorDeps) { secret: { select: { id: true, ciphertext: true } }, }, }), - deps.prisma.space.findUnique({ - where: { id: run.spaceId }, - select: { workspacePath: true }, - }), ]); const agentEnvironment = decryptAgentEnvironment(agentSecretRows, deps.secretStore); runSecrets.push(...Object.values(agentEnvironment)); @@ -1468,22 +1463,14 @@ export function createRunExecutor(deps: ExecutorDeps) { : graphical ? `You have a persistent computer filesystem and shell. ${MODEL_CANNOT_SEE_MESSAGE} Desktop observe and act tools are unavailable until a vision-capable model is selected. Use the file tools and shell.` : "You have a persistent sandbox filesystem and shell. This backend does not provide model-visible graphical control, so use the file tools and shell."; - const hasProjectWorkspace = Boolean(space?.workspacePath); const cloudAgentEnabled = cloudAgentsEnabled(cloudAgent, run.spaceId); const productSelfModificationInstruction = formatProductSelfModificationInstruction({ - hasProjectWorkspace, cloudAgentEnabled, + teamComputer: computerMode === "team", }); const workspaceInstruction = computerMode === "team" - ? [ - `Your Team Computer home is ${teamBotWorkspaceDirectory(bot.id)}. Relative file paths and shell working directories start there. Put intentionally shared work under shared/. Other bots' folders are visible under bots/; treat them as their working areas.`, - hasProjectWorkspace - ? "This space links a git repository under project/ — use it for product source edits." - : null, - ] - .filter((line): line is string => Boolean(line)) - .join(" ") + ? `Your Team Computer home is ${teamBotWorkspaceDirectory(bot.id)}. Relative file paths and shell working directories start there. Put intentionally shared work under shared/. Other bots' folders are visible under bots/; treat them as their working areas. When this space links a git repository, its source files live under project/.` : "This entire computer workspace is your private home. Relative file paths and shell working directories start at its root."; let assembled = ""; diff --git a/packages/adapters/src/product-self-modification.test.ts b/packages/adapters/src/product-self-modification.test.ts index ef8b4bf..ccd70ec 100644 --- a/packages/adapters/src/product-self-modification.test.ts +++ b/packages/adapters/src/product-self-modification.test.ts @@ -4,7 +4,7 @@ import { formatProductSelfModificationInstruction } from "./product-self-modific describe("formatProductSelfModificationInstruction", () => { it("steers evOo UI changes to source code, not browser or third-party login", () => { const instruction = formatProductSelfModificationInstruction({ - hasProjectWorkspace: false, + teamComputer: false, cloudAgentEnabled: false, }); @@ -17,9 +17,9 @@ describe("formatProductSelfModificationInstruction", () => { expect(instruction).toMatch(/update_bot only changes this bot's chat profile/); }); - it("mentions project/ when the space has a linked repository", () => { + it("mentions project/ on team computers", () => { const instruction = formatProductSelfModificationInstruction({ - hasProjectWorkspace: true, + teamComputer: true, cloudAgentEnabled: false, }); @@ -28,7 +28,7 @@ describe("formatProductSelfModificationInstruction", () => { it("mentions cloud_agent_launch when the tool is available", () => { const instruction = formatProductSelfModificationInstruction({ - hasProjectWorkspace: false, + teamComputer: false, cloudAgentEnabled: true, }); diff --git a/packages/adapters/src/product-self-modification.ts b/packages/adapters/src/product-self-modification.ts index c815ba9..bee3009 100644 --- a/packages/adapters/src/product-self-modification.ts +++ b/packages/adapters/src/product-self-modification.ts @@ -1,8 +1,8 @@ export type ProductSelfModificationInstructionOptions = { - /** Space has a host folder bound to project/ on the Team Computer. */ - hasProjectWorkspace: boolean; /** cloud_agent_* tools are available for this run. */ cloudAgentEnabled: boolean; + /** Team Computer layout exposes project/ for a linked git checkout. */ + teamComputer: boolean; }; /** @@ -15,8 +15,8 @@ export function formatProductSelfModificationInstruction( ): string { const codePaths = [ "read_file, write_file, and shell to edit source files", - options.hasProjectWorkspace - ? "paths under project/ for this space's linked repository" + options.teamComputer + ? "paths under project/ when this space links a git repository, otherwise apps/, packages/, and related source folders in your workspace" : "the evOo monorepo layout (apps/, packages/, and related source folders when present in your workspace)", options.cloudAgentEnabled ? "cloud_agent_launch for substantial changes that should land as a pull request"