Skip to content

feat(agent-isolation): expose harness-agnostic agent-iso entry point#764

Open
justinmclean wants to merge 2 commits into
apache:mainfrom
justinmclean:harness-posture-portability
Open

feat(agent-isolation): expose harness-agnostic agent-iso entry point#764
justinmclean wants to merge 2 commits into
apache:mainfrom
justinmclean:harness-posture-portability

Conversation

@justinmclean

Copy link
Copy Markdown
Member

Summary

The env-isolation core of agent-iso.sh already worked for any CLI; this makes that capability explicit and documented:

  • Add agent-iso() shell function (sourced) and a sub-command mode bash agent-iso.sh agent-iso <cli> [args] (direct exec) so any harness CLI can be launched with the same credential-strip posture that claude-iso and opencode-iso provide. A symlink named agent-iso (no .sh extension) also works — first positional arg is the CLI name.
  • The Claude-specific --settings sandbox allowRead injection continues to be skipped for all non-claude agents (guard was already in place).
  • Change **Harness:** Claude Code, OpenCode**Harness:** agnostic in tools/agent-isolation/README.md; the env-isolation layer is now available for Codex, Cursor, Gemini CLI, Aider, and any future CLI.
  • Update docs/vendor-neutrality.md harness table and harness index to reflect agent-isolation moving from portable to agnostic; the hook regenerates the score section automatically.
  • Update docs/adapters/add-a-harness.md Step 2 and Step 4 to document agent-iso <cli> as the ready-made layer-0 wrapper for runtimes without a built-in hook API.
  • Add tests/test_generic_iso.py covering both the direct-exec and sourced entry points: credential strip, no --settings injection, banner, missing-CLI exit-127, no-CLI-arg usage message, and multiple harness names (codex/cursor/gemini).

All 72 agent-isolation tests pass; vendor-neutrality-score and skill-and-tool-validate both pass.

Generated-by: Claude (claude-sonnet-4-6)

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
    (PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
    (a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
  • Other:

The env-isolation core of agent-iso.sh already worked for any CLI;
this makes that capability explicit and documented:

- Add `agent-iso()` shell function (sourced) and a sub-command mode
  `bash agent-iso.sh agent-iso <cli> [args]` (direct exec) so any
  harness CLI can be launched with the same credential-strip posture
  that claude-iso and opencode-iso provide.  A symlink named `agent-iso`
  (no .sh extension) also works — first positional arg is the CLI name.
- The Claude-specific --settings sandbox allowRead injection continues
  to be skipped for all non-claude agents (guard was already in place).
- Change `**Harness:** Claude Code, OpenCode` → `**Harness:** agnostic`
  in tools/agent-isolation/README.md; the env-isolation layer is now
  available for Codex, Cursor, Gemini CLI, Aider, and any future CLI.
- Update docs/vendor-neutrality.md harness table and harness index to
  reflect agent-isolation moving from portable to agnostic; the hook
  regenerates the score section automatically.
- Update docs/adapters/add-a-harness.md Step 2 and Step 4 to document
  `agent-iso <cli>` as the ready-made layer-0 wrapper for runtimes
  without a built-in hook API.
- Add tests/test_generic_iso.py covering both the direct-exec and
  sourced entry points: credential strip, no --settings injection,
  banner, missing-CLI exit-127, no-CLI-arg usage message, and multiple
  harness names (codex/cursor/gemini).

All 72 agent-isolation tests pass; vendor-neutrality-score and
skill-and-tool-validate both pass.

Generated-by: Claude (claude-sonnet-4-6)
@justinmclean justinmclean self-assigned this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant