prompt-event: add tool/model/timing/text fields#1017
prompt-event: add tool/model/timing/text fields#1017shortdiv wants to merge 1 commit intofeat/prompt-event-metricfrom
Conversation
Extends PromptEventValues with fields needed by the sessions UI: tool_call_name, model, error, start_ts, reported_duration_ms, observed_duration_ms, input_hash, input_text. Adds SkillInvocation and McpCall kinds. Wires the Claude transcript parser to populate the new fields where they're available; fallback hook paths set input_hash + tool_call_name. Existing fields are unchanged so this is back-compat with PR 852. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Proposal: add skill file metadata to
|
Addendum: daemon telemetry contextAfter digging into the daemon code I wanted to add context I didn't have when writing the proposal above — it answers open question #1 and tightens the server-side reaper story. How telemetry flows today:
There is no current daemon heartbeat. I grepped the same terms and confirmed. Socket reachability is the only liveness notion, and it only gates wrapper → daemon RPC, not session → server. What this means for the proposal: The good news — the 3s flush interval means we don't need a dedicated heartbeat. Any The bad news — hard wrapper death is invisible to the daemon too. If the wrapper process is
Small refinement to the proposal: The daemon could cheaply help the reaper by adding a second in-flight map, parallel to So the layered story becomes:
Three independent mechanisms, each catching what the layer above can't. The daemon-side sweep is optional for the MVP (rollout step 1 still works with just 1 and 3), but worth designing space for now. Refined answer to open question #3 ("what counts as a user-facing event for the idle timer"): given the 3s flush, we can afford to be stricter than I initially thought. |
Summary
PromptEventValueswith sparse positional fields needed for the Sessions UI:tool_call_name,model,error,start_ts,reported_duration_ms,observed_duration_ms,input_hash,input_text.feat/prompt-event-metric) — targets that branch, not main.Why
The base PR introduces the
PromptEventmetric (event id 5) but only carries the core identification fields (kind, event_id, parent). The downstream Sessions dashboard in the monorepo needs:modelon AiMessage / ThinkingMessage to attribute turnstool_call_name+erroron ToolCall for tool usage / friction analysisstart_ts/*_duration_msfor session timinginput_text(truncated) on HumanMessage / AiMessage for friction regex + session titlesinput_hashfor dedupe across re-emitsTest plan
parseMetricsBatchprompt_eventstable🤖 Generated with Claude Code