You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#5: Add sub-agent event streaming and fine-grained permissive control (#6)
This commit addresses both issues raised in #5:
## Issue 1: Sub-agent event streaming
- Added `event_tx` field to `SubAgentHandle` to enable event subscriptions
- Added `events()` method to `SubAgentHandle` for filtered event streams
- Forward `TextDelta` and `TurnStart` events as `SubAgentInternalEvent` in wrapper
- Updated `spawn_subagent()` to pass event transmitter to handle
Now users can call `handle.events()` to get a stream of all events for that
specific sub-agent, including LLM thinking text, tool calls, and state changes.
## Issue 2: Fine-grained permissive control
- Added `permissive_deny` field to `SubAgentConfig` and `AgentSlot`
- Added `with_permissive_deny()` builder methods
- Modified wrapper to build permissive policy that respects deny rules
- When `permissive=true`, deny rules from both config and agent definition are enforced
Now users can use `permissive=true` for broad permissions while still blocking
specific tools via `permissive_deny` (e.g., ["mcp__longvt__*"]).
## SDK Updates
- Updated Python SDK to expose `permissive_deny` parameter
- Updated Node.js SDK to expose `permissive_deny` parameter
Both SDKs now support the new fine-grained permissive control.
Co-authored-by: RoyLin <roylin@RoyLindeMacBook-Pro.local>
0 commit comments