Skip to content

feat: add live session signals#149

Open
ccf wants to merge 2 commits intomainfrom
feat/live-session-signals
Open

feat: add live session signals#149
ccf wants to merge 2 commits intomainfrom
feat/live-session-signals

Conversation

@ccf
Copy link
Owner

@ccf ccf commented Mar 26, 2026

Summary

  • add live local session signal analysis for friction, satisfaction, and abandonment risk
  • expose a new MCP tool for polling live session signals during an active session
  • mark the roadmap live-session-signals item shipped

Testing

  • PYTHONPATH=src pytest tests/test_live_session_signals.py tests/test_mcp_tools.py tests/test_mcp_server.py -q
  • ruff check src/primer/common/schemas.py src/primer/server/services/live_session_signal_service.py src/primer/mcp/tools.py src/primer/mcp/server.py tests/test_live_session_signals.py tests/test_mcp_tools.py tests/test_mcp_server.py
  • ruff format --check src/primer/common/schemas.py src/primer/server/services/live_session_signal_service.py src/primer/mcp/tools.py src/primer/mcp/server.py tests/test_live_session_signals.py tests/test_mcp_tools.py tests/test_mcp_server.py

Note

Medium Risk
Adds a new MCP-exposed capability that analyzes in-progress local transcripts and derives risk/sentiment heuristics, which could affect user-facing guidance if the scoring or session selection is wrong. Changes are self-contained and covered by new unit tests, with no auth or persistence changes.

Overview
Adds live local session signal analysis that summarizes in-progress sessions for friction, sentiment, and abandonment risk, returning a LiveSessionSignalsResponse with structured signals, risk_level, and satisfaction_signal.

Exposes this via a new MCP tool live_session_signals (wired through primer_live_session_signals) that formats the live summary for repeated polling during a session, and updates tests/roadmap to reflect the shipped capability.

Written by Cursor Bugbot for commit 0fcccb6. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the spend limit has been reached. To enable Bugbot Autofix, raise your spend limit in the Cursor dashboard.

"run_terminal_command_v2",
"shell",
"terminal",
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated _EXECUTION_TOOL_NAMES risks silent divergence

Medium Severity

_EXECUTION_TOOL_NAMES is copy-pasted from execution_evidence_service.py into live_session_signal_service.py. The new file already imports _classify_status and extract_execution_evidence from that module, so it could import this constant too. If a new tool name is added to one copy but not the other, _count_tool_errors would silently drift from the execution-evidence logic, miscounting errors for the forgotten tool.

Fix in Cursor Fix in Web

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