Repository navigation
feat: add agent harness CLI - #6
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR turns the crate into an “agent-harness” CLI/library that can render harness assets into an output directory, install them into user home directories, verify expected files, and sync a managed subset of Codex TOML config keys.
Changes:
- Added a Clap-based CLI with
render,install,verify, andsync-codex-configsubcommands. - Implemented filesystem helpers and harness rendering/installation logic for Codex/Claude layouts.
- Added Codex config syncing via
toml_edit, plus basic unit tests for rendering and config merge behavior.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Switches to running the library CLI entrypoint and returning anyhow::Result. |
| src/lib.rs | Introduces library modules and re-exports run() for the binary. |
| src/cli.rs | Adds Clap CLI definition and command dispatch; determines home directory. |
| src/render.rs | Implements render/install/verify logic for harness files; includes render test. |
| src/fs_ops.rs | Adds directory/file copy and symlink utilities used by render/install. |
| src/codex_config.rs | Adds managed-key syncing from a source TOML into a target TOML with atomic-ish write. |
| Cargo.toml | Adds dependencies (anyhow, clap, toml_edit) and lint configuration. |
| Cargo.lock | Updates lockfile for new crate name and dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+49
to
+55
| pub fn install(source: &Path, home: &Path, mode: InstallMode) -> Result<()> { | ||
| let data_dir = home.join(".local/share/agent-harness"); | ||
| render(source, &data_dir)?; | ||
|
|
||
| install_path(&data_dir.join("codex"), &home.join(".codex"), mode)?; | ||
| install_path(&data_dir.join("claude"), &home.join(".claude"), mode)?; | ||
|
|
Comment on lines
+34
to
+49
| pub fn symlink_dir(source: &Path, target: &Path) -> Result<()> { | ||
| if target.exists() { | ||
| std::fs::remove_dir_all(target) | ||
| .with_context(|| format!("failed to remove directory {}", target.display()))?; | ||
| } | ||
| if let Some(parent) = target.parent() { | ||
| std::fs::create_dir_all(parent) | ||
| .with_context(|| format!("failed to create directory {}", parent.display()))?; | ||
| } | ||
| std::os::unix::fs::symlink(source, target).with_context(|| { | ||
| format!( | ||
| "failed to create symlink {} -> {}", | ||
| target.display(), | ||
| source.display(), | ||
| ) | ||
| }) |
Comment on lines
+88
to
+90
| fn default_home_dir() -> PathBuf { | ||
| std::env::var_os("HOME").map_or_else(|| PathBuf::from("."), PathBuf::from) | ||
| } |
furedea
added a commit
that referenced
this pull request
May 28, 2026
🤖 I have created a release *beep* *boop* --- ## [0.2.0](agent-harness-v0.1.0...agent-harness-v0.2.0) (2026-05-28) ### Features * add agent harness CLI ([#6](#6)) ([7f3c775](7f3c775)) * expose Nix package and Home Manager module ([#7](#7)) ([137a5da](137a5da)) * generate command policy files ([#14](#14)) ([9a3c7d0](9a3c7d0)) * generate hook configurations ([#17](#17)) ([b5ec4d8](b5ec4d8)) * generate protected path policy ([#18](#18)) ([725c04c](725c04c)) * refine agent harness command layout ([#12](#12)) ([ca57421](ca57421)) * render provider skills ([#20](#20)) ([e7e4a21](e7e4a21)) * **skills:** add ADR operation skill ([#30](#30)) ([3d89283](3d89283)) * **skills:** add git workflow skill ([#28](#28)) ([9764417](9764417)) * standardize CLI option names ([#13](#13)) ([110c284](110c284)) * synthesize provider configs ([#19](#19)) ([41dfb40](41dfb40)) * use file-level generated outputs ([#11](#11)) ([64cf683](64cf683)) * use packaged source by default ([#32](#32)) ([6c44f34](6c44f34)) ### Bug Fixes * avoid git in json syntax test ([#26](#26)) ([d64b992](d64b992)) * install generated codex guarded config ([#25](#25)) ([1647802](1647802)) * keep user tools visible in dev shell ([#23](#23)) ([9a572e6](9a572e6)) * protect installed harness paths only ([#27](#27)) ([9911632](9911632)) * **release:** use token for release PRs ([#38](#38)) ([31c010e](31c010e)) * validate skill patch descriptions ([#33](#33)) ([519a9ad](519a9ad)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Kaito Shigyo / 執行凱斗 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.