cli/pkg
Snider 5631e04a12
feat(io): Migrate filesystem access to pkg/io Medium abstraction (#172)
* feat(io): add pkg/io with symlink-safe path validation

- Add pkg/io with Medium interface for filesystem abstraction
- Add pkg/io/local with sandboxed filesystem implementation
- Add symlink-safe path validation to prevent bypass attacks
- Add sentinel errors (ErrPathTraversal, ErrSymlinkTraversal)
- Add NewSandboxed() for creating sandboxed Medium instances
- Add MockMedium for testing

Closes #169

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(io): extend Medium interface with Delete, Rename, List, Stat operations

Add missing filesystem operations to Medium interface:
- Delete(path) - removes file or empty directory
- DeleteAll(path) - removes path and contents recursively
- Rename(old, new) - moves or renames files/directories
- Exists(path) - checks if path exists
- IsDir(path) - checks if path is a directory
- List(path) - returns directory contents as []os.DirEntry
- Stat(path) - returns file info as os.FileInfo

Implements both local.Medium and MockMedium with full support.

Closes #102

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(io): MockMedium.Read returns os.ErrNotExist for consistency

Ensures os.IsNotExist(err) works with MockMedium like with real filesystem.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:50:55 +00:00
..
agentic fix(agentic): use context.TODO instead of nil Context (#94) 2026-02-01 15:58:26 +00:00
build feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
cache refactor: flatten CLI to root, simplify pkg/mcp for CLI-only use 2026-01-29 18:13:51 +00:00
cli feat(cli): add NO_COLOR environment variable support (#98) 2026-02-01 16:40:03 +00:00
container feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
devops fix(test): use manual cleanup for TestDevOps_Boot_Good_Success 2026-02-01 11:55:10 +00:00
errors feat(pkg): add standalone log and errors packages 2026-01-30 22:02:40 +00:00
framework fix(core): add thread-safety to global Core instance (#95) 2026-02-01 16:03:44 +00:00
git feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
i18n feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
io feat(io): Migrate filesystem access to pkg/io Medium abstraction (#172) 2026-02-01 22:50:55 +00:00
log feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
mcp feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
process docs(process): add docstrings to Logger interface methods (#97) 2026-02-01 16:12:01 +00:00
release feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
repos feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00