From a8b2ff5e2e8c788823f53a15ef9ca5bd304c1e99 Mon Sep 17 00:00:00 2001 From: -Puter <22245429+puterhimself@users.noreply.github.com> Date: Wed, 29 Jul 2026 20:10:57 +0530 Subject: [PATCH] feat(agents): add --- packages/agents/src/agents/zopu.ts | 7 +++++++ packages/agents/src/prompts/zopu-instructions.md | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/agents/src/agents/zopu.ts b/packages/agents/src/agents/zopu.ts index c04c1f7..fd419a5 100644 --- a/packages/agents/src/agents/zopu.ts +++ b/packages/agents/src/agents/zopu.ts @@ -1,5 +1,6 @@ import { parseAgentEnv } from "@code/env/agent"; import { defineAgent } from "@flue/runtime"; +import { local } from "@flue/runtime/node"; import INSTRUCTIONS from "../prompts/zopu-instructions.md" with { type: "markdown" }; import { createSliceOneTools } from "../tools/slice-one"; @@ -9,6 +10,11 @@ export { convexAgentRoute as route, } from "../auth"; +// The host checkout the chat agent explores. The `local()` sandbox reuses the +// machine's existing shell, Git, and Tea install unchanged; its cwd becomes the +// default working directory for every command the agent runs. +const ZOPU_CODE_PATH = "/Users/puter/Workspace/zopu/code"; + export default defineAgent(({ env, id }) => { const { AGENT_MODEL_NAME, AGENT_MODEL_PROVIDER } = parseAgentEnv(env); @@ -18,6 +24,7 @@ export default defineAgent(({ env, id }) => { instructions: INSTRUCTIONS, model: `${AGENT_MODEL_PROVIDER}/${AGENT_MODEL_NAME}`, thinkingLevel: "medium", + sandbox: local({ cwd: ZOPU_CODE_PATH }), tools: createSliceOneTools(id, env), }; }); diff --git a/packages/agents/src/prompts/zopu-instructions.md b/packages/agents/src/prompts/zopu-instructions.md index 4a287c6..72de7d5 100644 --- a/packages/agents/src/prompts/zopu-instructions.md +++ b/packages/agents/src/prompts/zopu-instructions.md @@ -40,6 +40,17 @@ When a user sends a message, follow this decision flow: - Preserve project and organization scope at all times. - Repeated delivery of the same message must not create duplicate Signals or attachments. The backend is idempotent. - Never claim you created a Signal until the tool call returns successfully. -- Do not start implementation, planning, sandboxes, Git, verification, or delivery. Those are explicitly outside Slice 1. +- Do not start implementation, planning, sandboxes, verification, or delivery. Those are explicitly outside Slice 1. - After creating proposed Work, the system may invoke the private work-planner. Never claim that a Definition, Design, approval, or implementation exists unless Convex reports it. - - Proposed Work is the only Work status you directly create. \ No newline at end of file + - Proposed Work is the only Work status you directly create. + +## Repository access + +Your shell runs inside the `puter/zopu-code` checkout at `/Users/puter/Workspace/zopu/code`, so you can answer questions about this repository and manage its Gitea issues. + +- Explore the repository with read-only Git: `git log`, `git status`, `git diff`, `git branch`, `git show`, and reading files. Use this to ground answers about the codebase. +- List open issues with `tea issues list` (defaults to open issues). +- Create a Gitea issue in this repo with `tea issues create --title "" [--description "<details>"]`. +- Never mutate repository state: do not run `git push`, `git merge`, `git rebase`, `git reset`, `git commit`, `git add`, force operations, or any history rewrite. +- Never close, reopen, or edit existing issues (`tea issues close|reopen|edit`); only list and create. +- Never expose credentials, tokens, or the contents of Tea/Git config files. \ No newline at end of file