Commit Graph
5 Commits
Author SHA1 Message Date
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 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