Repository navigation
feat: add built-in shell tool and migrate interfaces to intrusive VTables - #6
Merged
Merged
Conversation
…l.wrapExecute for stateful tools
… prompt instructions
…s ACP and Google provider modules
oca-agent
reviewed
Oct 24, 2026
oca-agent
reviewed
Oct 24, 2026
…rectory resolution
oca-agent
approved these changes
Oct 24, 2026
oca-agent
left a comment
There was a problem hiding this comment.
LGTM! All review comments have been cleanly resolved in commit 1966e08:
- Added explicit cancellation support to and propagated across , , and .
- Replaced the hardcoded Windows temp path with dynamic lookup () checking , , and before fallback.
- Properly propagated and in .
- Removed dead code in .
- Switched to POSIX octal escapes in the non-UTF8 sanitization test, resolving CI test failures on dash/Ubuntu.
All 232 tests pass locally and in CI.
oca-agent
approved these changes
Oct 24, 2026
oca-agent
left a comment
There was a problem hiding this comment.
LGTM! All review comments have been cleanly resolved in commit 1966e08:
- Added explicit cancellation support to
Tool.CallError(std.Io.Cancelable) and cleanly propagatederror.CanceledacrossBlockingTool,Shell, andSession.executeTurnInternal. - Replaced the hardcoded Windows temp path with dynamic lookup (
getTempDirAlloc) checkingTEMP,TMP, and%USERPROFILE%\AppData\Local\Tempwith fallback toC:\Windows\Temp. - Explicitly propagated
error.OutOfMemoryanderror.CanceledinprocessStream. - Removed dead code in
findCutoff. - Switched
printfto POSIX octal escapes in the non-UTF8 sanitization test, resolving the CI failure on Ubuntu / dash.
All 232 tests pass locally and in GitHub Actions CI.
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
src/agent/tool/shell.zig):agent.Tool.BuiltIn.Shellsupporting POSIX shells (sh,bash,zsh), Windowscmd, and PowerShell (powershell,pwsh), plusShell.default.stdout,stderr, exit codes, and signal termination messages as structured JSON, and truncates outputs exceeding 2,000 lines into temporary overflow files.Shell.defaultinsrc/main.zigand updates Todo/system prompt instructions.@fieldParentPtr) Migration:agent.Tool,llm.Provider,llm.types.ListModelsResult,llm.types.StepResult, andllm.types.StepContinuationfromptr: *anyopaque/ctx: ?*anyopaquefat pointers to the intrusive VTable (@fieldParentPtr) pattern matching Zig 0.16 (std.Io.Reader/Writer).Tool.init/Tool.initWithContextwithTool.initStateless(for stateless function tools) andTool.wrapExecute+Tool.VTable(for stateful tools embeddingtool: Tool), and updatesSessionConfig.toolsto[]const *const Tool.BlockingTooltosrc/agent/testing/BlockingTool.zigas a non-generic struct.Testing
zig build test --summary all(all 227 tests pass)zig build