Skip to main content

Module surface

Module surface 

Source
Expand description

AgentSurface — abstraction over an AI-agent integration surface.

Design: [docs/design.md §3.1, §5]. Each agent (Claude Code, Codex, Cursor, Aider) has a structurally different install path: Claude merges into a JSON file, Codex writes a managed-block markdown into AGENTS.md, Cursor writes .cursor/rules/*.mdc, Aider edits .aider.conf.yml. A trait — not an enum + match — keeps each impl free to share no state with the others, and lets v0.3 plugins ship third-party AgentSurface implementations without forking klasp.

Structs§

InstallContext
Inputs handed to every install invocation. Holds enough context that an AgentSurface impl needs no further filesystem probing.
InstallReport
What an install (or dry-run) actually did. The paths_written field is empty when dry_run was true.

Enums§

InstallError

Traits§

AgentSurface
Object-safe trait. The surface registry stores impls as Box<dyn AgentSurface>; built-in surfaces (Claude in v0.1, Codex in v0.2, etc.) are registered statically, and v0.3 subprocess plugins add dynamic registrations at startup.