Documentation
¶
Overview ¶
Package cursor is the Cursor IDE adapter for agent-memory. It bundles a worked Cursor-rule (.mdc) file teaching the editor's agent when and how to call memory.fetch_context / memory.propose_update, plus an Install function that drops the file at the documented location.
Cursor reads .mdc files from .cursor/rules/ (project-local) and from ~/.cursor/rules/ (user-global). Both are supported here.
Index ¶
Constants ¶
const AdapterName = "cursor"
AdapterName is the stable identifier used by `agent-memory install <name>`.
Variables ¶
This section is empty.
Functions ¶
func RuleContent ¶
func RuleContent() []byte
RuleContent returns the embedded .mdc bytes verbatim. Used by tests and by future `install cursor --print`.
Types ¶
type Result ¶
type Result struct {
Adapter string `json:"adapter"`
Files []string `json:"files,omitempty"`
Skipped []string `json:"skipped,omitempty"`
}
Result reports what Install did. Same shape as claude/agents/gemini so the CLI dispatch layer can render results uniformly.
func Install ¶
Install writes the embedded agent-memory.mdc to the chosen rules directory, creating intermediate directories as needed. Existing files are preserved unless Force is set.
Symmetric with claude's Install: same return-result contract, "skipped because already present" reported in Result.Skipped (not as an error).