mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-21 00:21:27 +00:00
Apply cleanups from a reuse/simplification/efficiency review of the bounded-tool-output changes: - Share one MAX_RUN_EVENT_BODY_BYTES constant in fabro-types; the server body limit, the agent's serialized-output reservation, and the event headroom test all derive from it. - Rework truncation.rs around one split_head_tail helper: drop the hand-rolled ceil_char_boundary (std's is stable), the duplicate truncate_plain_output splitter and its dead Tail arm, and the head_bytes field with its sentinel values. - Return Cow from preview_tool_output and take retain_tool_output's input by value, so untruncated output crosses the pipeline without full copies. Measure serialized JSON size with a counting writer instead of materializing the payload. - Reuse fabro-llm's byte-token estimate (now public) instead of a third copy of the 4-bytes-per-token heuristic. - Take retain_tool_result's ToolResult by value and mutate content in place; extract the triplicated error retain-emit-truncate block into finish_error_result. - Share the shell retain-and-record sequence between the native and kimi shell tools as retain_shell_output. - Move OutputCaptureBuffer::into_parts to reuse the head allocation, skip the buffer round-trip in replay_exec_result when output fits, and replace daytona's byte-iterator suffix matching with contiguous slice comparisons behind one retained_slices accessor. - Make SessionBoundEmitter's fields private. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TK3QTWQHiXhRbFwTr57LzX |
||
|---|---|---|
| .. | ||
| profiles | ||
| agent_profile.rs | ||
| apply_patch.lark | ||
| apply_patch.rs | ||
| cli.rs | ||
| compaction.rs | ||
| config.rs | ||
| context_window.rs | ||
| docker_sandbox.rs | ||
| error.rs | ||
| event.rs | ||
| file_tracker.rs | ||
| history.rs | ||
| lib.rs | ||
| local_sandbox.rs | ||
| loop_detection.rs | ||
| mcp_integration.rs | ||
| memory.rs | ||
| native_tool.rs | ||
| question_tools.rs | ||
| sandbox.rs | ||
| session.rs | ||
| skills.rs | ||
| subagent.rs | ||
| task_reminder.rs | ||
| test_support.rs | ||
| todo_runtime.rs | ||
| todo_tools.rs | ||
| tool_execution.rs | ||
| tool_permissions.rs | ||
| tool_registry.rs | ||
| tools.rs | ||
| truncation.rs | ||
| types.rs | ||
| web_search.rs | ||