Expand description
Transport-free agent-definition CRUD over a persistence layer.
These free functions hold the agent-store behavior shared by the HTTP service
handlers (api/discovery.rs) and the embedded SDK admin surface, so both edit
agent definitions through one code path. They own only the storage-shaping
rules (id assignment, the agent kind marker, RFC 7396 merge on patch, and the
built-in-agent delete guard); transport concerns (status codes, JSON framing)
stay in the callers.
Enums§
- Agent
Store Error - Typed failures from the mutating agent-store operations so callers can map them to the right transport response (e.g. 404 vs 403 vs 500).
Functions§
- create_
agent - Create a new agent, assigning an id when absent and marking its kind.
- delete_
agent - Delete an agent by id, refusing to remove built-in agents.
- get_
agent - Load a single agent definition by id.
- is_
protected_ agent_ id - Built-in agents that must never be deleted through the store.
- json_
merge - RFC 7396 JSON Merge Patch: recursively merge
patchintotarget. - list_
agents - List persisted agent definitions.
- patch_
agent - Apply an RFC 7396 JSON Merge Patch to an existing agent and persist it.
- replace_
agent - Full-replacement upsert of an agent under a fixed id.
- upsert_
agent - Upsert an agent artifact as-is (used by the embedded admin surface).