Summary
Propose a minimal incremental refresh path for --watch on AgentCard roots to avoid full app rebuilds, handle partial writes safely, and update only affected agents.
Scope
Applies to --watch for AgentCard roots.
Proposed behavior
- Detect changes using
mtime + size; reload only changed card files.
- If a card fails to parse (empty/partial write), log a warning and skip; retry on next change.
- If a tool file changes, reload only cards that reference that tool file.
- Handle removals by unregistering the agent and updating the available agent list without restarting the session.
- Refresh only affected agent instances (no full app rebuild):
instance_scope=shared: swap updated agents in place
instance_scope=request/connection: bump registry version so new instances see the update
- UX: emit a short “AgentCards reloaded” line and refresh the available agent list.
Why
- Avoids unnecessary full reloads for small edits
- Prevents crashes on partial writes during save
- Enables smooth REPL workflows (add/modify/delete cards live)
Notes
This is intentionally minimal; deeper dependency/graph handling can follow later.
Summary
Propose a minimal incremental refresh path for
--watchon AgentCard roots to avoid full app rebuilds, handle partial writes safely, and update only affected agents.Scope
Applies to
--watchfor AgentCard roots.Proposed behavior
mtime + size; reload only changed card files.instance_scope=shared: swap updated agents in placeinstance_scope=request/connection: bump registry version so new instances see the updateWhy
Notes
This is intentionally minimal; deeper dependency/graph handling can follow later.