Documentation
¶
Overview ¶
Package adapters defines the contract every AI-agent integration implements. Adapters only translate: agent JSON ↔ hookapi types, and desired config edits → install.Plan. All decision logic lives in the core packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent interface {
// Name is the agent identifier used on the command line (--agent).
Name() hookapi.Agent
// Detect reports whether the agent appears installed for env's HOME.
Detect(env install.Env) bool
// ParseEvent converts a raw hook payload into the neutral event.
// event is the event name graphmaster was invoked with; env is os.Environ().
ParseEvent(event hookapi.Event, payload []byte, env []string) (hookapi.HookEvent, error)
// RenderDecision converts a neutral decision into the agent's wire format.
RenderDecision(ev hookapi.HookEvent, d hookapi.Decision) HookOutput
// InstallPlan describes every config edit needed for MCP registration,
// hooks and instructions at user level.
InstallPlan(env install.Env, opts InstallOptions) (install.Plan, error)
// Notes returns human-facing post-install reminders (e.g. Codex /hooks trust).
Notes(env install.Env) []string
}
Agent is implemented by each package under internal/adapters/<agent>.
type HookOutput ¶
HookOutput is what the hook dispatcher writes back to the agent process.
type InstallOptions ¶
type InstallOptions struct {
// Binary is the stable absolute path of the graphmaster executable.
Binary string
// Instructions is the agent-neutral steering text placed in the agent's
// instruction file (CLAUDE.md, AGENTS.md, ...).
Instructions string
}
InstallOptions carries what an adapter needs to build its install plan.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package claude adapts Claude Code to graphmaster: it parses Claude's hook payloads, renders decisions as hookSpecificOutput JSON and builds the user-level install plan (~/.claude.json, ~/.claude/settings.json and ~/.claude/CLAUDE.md).
|
Package claude adapts Claude Code to graphmaster: it parses Claude's hook payloads, renders decisions as hookSpecificOutput JSON and builds the user-level install plan (~/.claude.json, ~/.claude/settings.json and ~/.claude/CLAUDE.md). |
|
Package codex adapts the OpenAI Codex CLI to graphmaster.
|
Package codex adapts the OpenAI Codex CLI to graphmaster. |
|
Package cursor adapts graphmaster to the Cursor editor's agent.
|
Package cursor adapts graphmaster to the Cursor editor's agent. |
|
Package opencode integrates graphmaster with OpenCode (v1.x).
|
Package opencode integrates graphmaster with OpenCode (v1.x). |
Click to show internal directories.
Click to hide internal directories.