Skip to content

refactor(session): replace event emitter with plugin system for lifec…#9

Merged
apzuk3 merged 1 commit intomainfrom
feat/client-agent-state-access
Mar 7, 2026
Merged

refactor(session): replace event emitter with plugin system for lifec…#9
apzuk3 merged 1 commit intomainfrom
feat/client-agent-state-access

Conversation

@apzuk3
Copy link
Copy Markdown
Owner

@apzuk3 apzuk3 commented Mar 7, 2026

…ycle control

Replace the fire-and-forget SessionListener/SessionEventEmitter pattern with a SessionPlugin interface and PluginChain. Plugins can now make decisions about session lifecycle (e.g. gate tool calls via BeforeToolCall, enforce token budgets via AfterModelCall). Logging and auditing are now LogPlugin and AuditPlugin embedding BasePlugin. External systems can import agentd and register plugins to control execution.

…ycle control

Replace the fire-and-forget SessionListener/SessionEventEmitter pattern with a SessionPlugin interface and PluginChain. Plugins can now make decisions about session lifecycle (e.g. gate tool calls via BeforeToolCall, enforce token budgets via AfterModelCall). Logging and auditing are now LogPlugin and AuditPlugin embedding BasePlugin. External systems can import agentd and register plugins to control execution.
@apzuk3 apzuk3 merged commit a09f13c into main Mar 7, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant