Code cleanup, heartbeat agent, eventing improvements #99
No reviewers
Labels
No labels
bug
commercial
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jasoncouture/llama-shears!99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/code-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Big chunk of refactor + feature work on top of
main. Highlights:Features
AgentHeartbeatServiceperiodically spawns a transientITransientAgentunder a child session whenHEARTBEAT.mdis present in the agent's workspace. Briefs the transient with aSystemEphemeralsnapshot of recent parent activity instead of replaying turns wholesale. DedicatedHEARTBEAT.mdsystem prompt + per-turn context template.ITransientAgent(self-shuts on idle),ITransientAgentFactory(resolves parent SessionPath from the data scope, names child session, stamps initial turn into context data, delegates toIAgentFactory). AcceptsUserorFrameworkUserinitial turn role.Agentsubscribes toLifecycle.Updateevents; updated config swaps into the agent's data scope at the start of the next turn so downstream scoped services pick it up by re-reading the scope.EventBusFileLogDecorator— JSONL log of every Subscribe / PublishAsync to a file under the data root. Off by default, dev appsettings flips it on.(parent, name)keeping newest UUIDv7.Refactors / conventions
user:<channel>for human messages,subagent:<full-session-id>for sub-agent forwards.system:reserved.NO_RESPONSEliteral into a single constant.IAgentFactory.CreateAgentAsync<TAgent>— agent service type carried onAgentHandle, resolved atStart()instead of hard-codedIAgent..mdappend; callers pass full filename, matching the system-prompt provider convention.ToolCall.InternalToolSourcereplaces the private literal inContextCompactor.IEventBusregistration.Eventslog category for diagnosis.Fixes
FileShare.ReadWrite | FileShare.Delete— unix sharing semantics onGrepTool,ReadFileTool,JsonLineContextStore.Tests
TransientAgentTestscovering constructor guards, prompt removal, idle→stop, subscription topology, message_send tool short-circuit, parent forwarding rules.LlamaShears.Apireference for tests that target API types.Run
git log --oneline origin/main..HEADfor the full commit list (40+ commits).Test plan
dotnet buildclean, 0 warningsdotnet test— all 549 passHEARTBEAT.mdpopulated; stays silent when empty