Skip to content

feat(chat): Add precise sandbox file tools#313

Merged
dcramer merged 3 commits intomainfrom
feat/sandbox-file-tools
May 9, 2026
Merged

feat(chat): Add precise sandbox file tools#313
dcramer merged 3 commits intomainfrom
feat/sandbox-file-tools

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented May 8, 2026

Add first-class sandbox file tools for exact edits and structured discovery so Junior can inspect and mutate files without relying on broad bash output or full-file writes.

Sandbox File Tools

editFile applies exact non-overlapping replacements, preserves line endings, and returns a compact diff. grep, findFiles, and listDir expose bounded structured discovery, while readFile supports line-window reads.

Tool Metadata

Tool definitions can now carry prompt guidance, argument preparation, and per-tool execution mode. Mutating file tools run sequentially, and terse guidance is surfaced in per-turn context.

Refs GH-312

@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment May 9, 2026 0:18am

Request Review

@dcramer dcramer force-pushed the feat/sandbox-file-tools branch from 5a2af56 to 6648d2e Compare May 8, 2026 23:41
@dcramer dcramer marked this pull request as ready for review May 8, 2026 23:41
@dcramer dcramer marked this pull request as draft May 8, 2026 23:41
@dcramer dcramer marked this pull request as ready for review May 8, 2026 23:44
Add exact edit, grep, findFiles, and listDir sandbox tools so agent file inspection and mutation can use structured bounded outputs instead of shell or full-file write paths.

Refs GH-312
Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer dcramer force-pushed the feat/sandbox-file-tools branch from 6648d2e to 63fcec7 Compare May 8, 2026 23:46
@dcramer dcramer marked this pull request as draft May 8, 2026 23:46
@dcramer dcramer marked this pull request as ready for review May 8, 2026 23:50
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 63fcec7. Configure here.

Comment thread packages/junior/src/chat/tools/sandbox/file-utils.ts
Comment thread packages/junior/src/chat/tools/sandbox/grep.ts
Comment thread packages/junior/src/chat/sandbox/sandbox.ts Outdated
Handle globstar path segments without requiring a nested directory and deduplicate overlapping grep context output.

Refs GH-312

Co-Authored-By: GPT-5 Codex <[email protected]>
Remove the duplicate sandbox number parser so sub-unit numeric values normalize consistently across sandbox tools.

Refs GH-312

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer dcramer marked this pull request as ready for review May 9, 2026 00:30
@dcramer dcramer merged commit 5146ffd into main May 9, 2026
15 checks passed
@dcramer dcramer deleted the feat/sandbox-file-tools branch May 9, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant