forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
There is no mechanism to delete a file via hashline. With hashline as the sole file editing mechanism, agents cannot remove files during refactoring (e.g. deleting deprecated modules, cleaning up generated files).
Proposed Solution
Add a delete_file operation to hashline_edit:
{ "op": "delete_file" }- Requires a prior
hashline_read(same enforcement as other ops) - Atomically deletes the file from disk
- Clears the file's entry from
FileTimestate
Acceptance Criteria
-
hashline_editwithop: "delete_file"removes the file from disk - Operation is rejected if
hashline_readwas not called first - File deletion is reflected in
FileTimestate (subsequent edits correctly require a new read) - Attempting to delete a non-existent file returns a clear error
- All existing hashline tests still pass
- Adversarial review: APPROVED
Quality Gates
-
bun run typecheck— 0 errors -
bun test— 0 failures
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request