Commit Graph
8 Commits
Author SHA1 Message Date
Alessandro Frau 4fb17f9512 Merge pull request #1965 from MohammadHijjawi97/fix-text-editor-append-unterminated-last-line
Keep line-edit appends off an unterminated last line
2026-11-10 16:54:09 +01:00
linkliti ad02938ce9 feat(tools): drop agent prefix from tool log headlines
The subordinate, unknown, MCP, and generic fallback tool log headlines no longer repeat the agent name. The unknown tool inherits the prefix-free base heading and takes the class-level blank line used by sibling tools, MCP keeps the tool name visible as an argument row, parallel children without a resolvable dedicated tool log through the prefix-free fallback, and the input and text editor fallback headings drop the prefix too. Framework helper DOX and both plugin AGENTS files document the prefix-free fallback rows, and regression tests cover the named headings for method and no-method calls, the generic fallback rows, and source guards for the plugin fallbacks.

Validation: pytest tests/test_tool_heading_prefixes.py tests/test_text_editor_message_handler.py tests/test_parallel_tool.py
2026-10-21 23:37:32 +03:00
Mohammad Hijjawi 871224d274 Keep line-edit appends off an unterminated last line
When a file has no trailing newline (for example one created by
text_editor write without a final newline), a line edit that inserts
past the last line was written straight after it, merging the two
lines: "alpha\nbeta" + {from: 3, content: "gamma\n"} became
"alpha\nbetagamma\n", while the tool reported 3 lines.

Terminate the unterminated last line before writing content appended
past end of file.
2026-10-21 16:56:18 +01:00
Alessandro e9384d2748 Preserve file permissions and ownership when applying editor patches
All three patch methods replaced the destination with a root-owned 0600
file, removing executable bits and preventing host users from editing
bind-mounted files. Preserve the existing mode and, when running as root,
UID/GID in one shared helper before atomic replacement. Read metadata once
and use os.replace directly; metadata errors leave the original intact.

Add regression coverage for each patch format, permission modes, root
ownership preservation and failed metadata updates. Document the existing-
file scope; ownership policy for new workspace files remains separate.

Validation: 48 focused editor tests passed, plus 15 metadata checks in the
root container. Live bind-mount checks confirmed host-owned files remain
writable and executable by the host user after all three patch methods.
2026-09-14 23:00:41 +02:00
Alessandro 6f0f036fea Share editor log presentation across local and remote tools
Move the duplicated editor log builder into the existing text-editor helper boundary while preserving headings, remote markers, log routing and tool identity. Correct the documentation that confused plugin activation with availability of shipped Python dependencies.

Verified with 100 editor, action and policy tests, six final log checks, and a framework local/remote log probe with plugin discovery disabled. File operations and connector routing are unchanged.
2026-09-06 20:35:27 +02:00
Alessandro f17198e126 fix: tighten tool guidance and editor workflows 2026-05-11 11:51:58 +02:00
Alessandro 4c2bc3d783 Add context-based patch_text support to text_editor
Introduces patch_text editing for the Docker-local text_editor, sharing request validation and freshness-state logic with text_editor_remote while preserving legacy line-number edits. Adds anchored context patching, safer state handling after context edits, updated model guidance, live remote wrapper reuse, and focused regression coverage for chained patches and Python replacement cases.
2026-04-21 18:18:59 +02:00
frdel 6515626242 refactor - plugin names and builtin plugins 2026-03-10 22:20:53 +01:00