Skip to content

Feat/stream loop - #37

Merged
wangxingjun778 merged 7 commits into
mainfrom
feat/stream_loop
Aug 11, 2026
Merged

Feat/stream loop#37
wangxingjun778 merged 7 commits into
mainfrom
feat/stream_loop

Conversation

@wangxingjun778

Copy link
Copy Markdown
Member

No description provided.

Separate task focus from control-plane events, resolve deictic references against structured session focus, and surface focus diagnostics through /orient.
…-hardcoding refactor

Layer 0: Signal pipeline hardening
- CompositeEventSource bounded queue (maxsize=2048, drop-oldest)
- SignalBuffer overflow observability (dropped_count)
- EventBus subscriber isolation (slow subscriber warning)
- EventReorderBuffer capacity limit (max_buffer_size=5000)
- CacheManager concurrency protection (threading.Lock)
- CliNdjsonEventSource ProcessGroup migration
- Unified _mono_ts time base across all observers

Layer 1: Event-driven real-time monitoring
- EventBridge: EventBus → EventTrigger adapter with debounce
- WatchSpec event:pattern trigger expression support
- Scheduler wake mechanism (<2s latency vs 120s poll)
- Gateway event passthrough + MonitorCoordinator subscription
- End-to-end event-driven watch tests

LeapBoard Signal Observation:
- New signals.yaml template (Signal Health + Live Stream + Watch Portfolio + Findings)
- signal.stream push channel (rate-limited, ring buffer)
- Auto-refresh (5s) + manual refresh button
- Daemon auto-arms default event-driven watches
- mock_signals --daemon mode for live injection

Engine anti-hardcoding refactor:
- reference_resolver: regex routing → SessionFocusState structural lookup
- error_classifier: if-elif chains → data-table + registry pattern
- context_focus: tool name lists → x_leapflow.plane metadata
- context_disclosure: substring inference → x_leapflow.category priority
- AGENTS.md: anti-hardcoding audit clause added

Tests: 1678 mock-layer tests passing, 6 e2e journeys intact.
- skills_list and skill_view declared x_leapflow.category='read' so they
  remain directly available (no capability_expand required)
- Reseeded journey cassettes to match updated system prompt fingerprints
- Surface provider thinking/reasoning to TUI stream renderer
- Deduplicate and cap thinking display length
…ns default

- Surface LLM thinking/reasoning content during long task execution
  - Engine emits StreamEvent(type='thinking') from resp.thinking_content
  - Engine emits pre-tool-call reasoning as thinking events
  - StreamRenderer flushes thinking buffer incrementally at tool_started()
  - Noise filtering: min length, dedup, truncation
  - show_thinking config switch (default: true)
  - enable_thinking=True passed from both TUI paths

- Add approval_bypass mode for maximum privilege execution
  - New approval_bypass config field (LEAPFLOW_APPROVAL_BYPASS env var)
  - PolicyEngine short-circuits to ALLOW for non-hardline/CRITICAL actions
  - Workspace boundary checks skipped when bypass active
  - ToolExecutionContext carries bypass flag from settings
  - TUI startup warning when bypass is active

- Convert workspace boundary from hard-gate to approval-gated
  - shell_run workspace violations now route through ApprovalOrchestrator
  - User sees approval prompt instead of silent failure
  - ToolExecutionContext carries orchestrator reference
  - Error messages updated to reflect approvable boundary

- Add 'Allow ALL for this session' option in approval modal
  - New ALLOW_ALL_SESSION enum value in ApprovalDecision
  - SessionAwareGate._bypass_all flag auto-approves subsequent requests
  - New choice in approval view and orchestrator choices

- Enable terminal sessions by default (tools_terminal_session_enabled=True)
@wangxingjun778
wangxingjun778 merged commit aee23b5 into main Aug 11, 2026
5 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