This repository has been archived on 2026-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
ollie-core/pkg/tools/execute
Levi Neely 6abf0cdb3d execute: parallel dispatch via flock; agent: preTool/postTool hooks, turn rollback, mid-turn compact
execute_code auto-batches consecutive tool steps annotated '# ollie:parallel read'
into goroutine fan-outs. Write/global steps serialize. LOCK_SH/LOCK_EX via
syscall.Flock in a per-session lock dir for cross-process safety. Tool scripts
declare their own parallelism profile; no tool names hardcoded in Go.

- flock.go: lockClass, classifyStep (annotation-driven), acquireFlock
- tools.go: LockDirSetter interface
- server.go: lockDir field, SetLockDir method
- pipe.go: runReadBatch with shared-lock goroutine fan-out
- code.go: auto-batching pipeline loop
- core.go: pushLockDir wires session tmpdir to execute server at init;
  preTool/postTool hook callbacks in agentConfig; AutoCompact after each
  tool round; session snapshot/restore on turn failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 09:00:29 +02:00
..
testdata/sandbox remove MCP support, add execute_code tests 2026-04-21 13:25:32 +02:00
code.go execute: parallel dispatch via flock; agent: preTool/postTool hooks, turn rollback, mid-turn compact 2026-04-26 09:00:29 +02:00
execute_test.go test: paths 100%, execute 96.2% (was 71%) 2026-04-21 22:00:08 +02:00
flock.go execute: parallel dispatch via flock; agent: preTool/postTool hooks, turn rollback, mid-turn compact 2026-04-26 09:00:29 +02:00
pipe.go execute: parallel dispatch via flock; agent: preTool/postTool hooks, turn rollback, mid-turn compact 2026-04-26 09:00:29 +02:00
server.go execute: parallel dispatch via flock; agent: preTool/postTool hooks, turn rollback, mid-turn compact 2026-04-26 09:00:29 +02:00
tool.go elevation: replace Elevator interface with x/elevate plugin script 2026-04-18 20:50:20 +02:00