refactor(web): rename agent workspace files → context to match budagent#52
Open
dittops wants to merge 2 commits into
Open
refactor(web): rename agent workspace files → context to match budagent#52dittops wants to merge 2 commits into
dittops wants to merge 2 commits into
Conversation
Companion to BudEcosystem/bda#29. The budagent rename moves the agent's prompt-context surface from "workspace" to "context" everywhere it referred to the AGENTS / SOUL / USER / MEMORY layer (the previous name was overloaded with Rust workspaces, exec sandbox dirs, etc.). Frontend changes — breaking, no back-compat: - AgentConfigView.tsx * interface WorkspaceFile → AgentContextFile * fetch URLs `/api/agent/workspace-files[/{path}]` → `/api/agent/context[/{path}]` * UI strings "Workspace Files" / error toasts → "Context Files" - lib/agent/tools/local-execution.ts * syncWorkspaceFileToBackend → syncAgentContextFileToBackend * fetch URL → `/api/agent/context` - lib/agent/tools/tool-catalog.ts * tool names workspace_read / workspace_write / workspace_list → context_read / context_write / context_list * descriptions reworded to "context file(s)" - app/api/local-agent/{execute,cron-tool-execute}/route.ts * import + call site renamed to syncAgentContextFileToBackend * comments updated Untouched (separate concept): `workspace_path` / `workspacePath` on session payloads — that's the agent's session working directory, not the prompt-context files. Also untouched: SandboxPolicy enum values in cli-agent-tool.ts (`workspace-write`), generic Slack/Asana "workspace" product names. Verified: edited files clean under `pnpm tsc --noEmit` (31 pre-existing errors elsewhere, all unrelated). Lint clean on touched dirs. Must land in lockstep with BudEcosystem/bda#29 — frontend will 404 against the old `/api/agent/workspace-files` paths after the backend deploy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request renames 'workspace files' to 'context files' across the codebase to ensure consistent terminology. The changes involve updating API endpoints from /api/agent/workspace-files to /api/agent/context, renaming internal functions and interfaces such as syncWorkspaceFileToBackend and WorkspaceFile, and modifying tool names in the catalog (e.g., workspace_read to context_read). I have no feedback to provide.
…mpt-cleanup # Conflicts: # web/src/app/api/local-agent/execute/route.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGENTS/SOUL/USER/MEMORY) from "workspace" to "context" everywhere — the previous name was overloaded with Rust workspaces, exec sandbox dirs, etc./api/agent/workspace-filespaths after the backend deploy.Renames (breaking, no back-compat)
components/desktop/AgentConfigView.tsxinterface WorkspaceFile→AgentContextFile; 4 fetch URLs/api/agent/workspace-files[/{path}]→/api/agent/context[/{path}]; UI strings "Workspace Files" → "Context Files"lib/agent/tools/local-execution.tssyncWorkspaceFileToBackend→syncAgentContextFileToBackend; fetch URL →/api/agent/contextlib/agent/tools/tool-catalog.tsnamefieldsworkspace_read/write/list→context_read/write/list; descriptions rewordedapp/api/local-agent/{execute,cron-tool-execute}/route.tsUntouched (separate concept)
workspace_path/workspacePathon session payloads — that's the agent's session working directory, not the prompt-context files. Lives ingateway.ts,executor.ts,session-client.ts,BudAgentScreen.tsx, etc. Unaffected.SandboxPolicy::WorkspaceWrite/"workspace-write"enum values incli-agent-tool.ts— Codex CLI sandbox-policy concept.lib/connectors/connectors.tsx.Verification
pnpm tsc --noEmit(31 pre-existing errors elsewhere, all unrelated)context_*tool calls round-tripTest plan
/api/agent/workspace-filesafter rolloutcontext_listtool namesyncAgentContextFileToBackendflushes correctly🤖 Generated with Claude Code