4aae61297f
Analytics parity phases 2–7 (docs/plans/analytics-parity/), built on
138e706 and ported onto v2.3.1:
- Cost by AI tool (?tool= on cost/analytics/stats/workflows, by_tool,
Codex fast/priority and flex tiers, agenthub_cost_usd_total{tool,model})
- Date ranges (from/to) on cost/analytics/workflows; Analytics range select
with Today / This week (Monday) / This month (1st) / 7d / 30d / 90d / All /
Custom; workflow filters carried into workflow-stats.js (read worker)
- Budgets and cost alerts as alert rule types (alert_rules rebuilt without
its rule_type CHECK), GET /api/budgets/status, rule preview, spend pace,
status-bar budget chip; rules stay editable in place
- Query Explorer (/query, allowlisted sort, CSV/JSON export) and scheduled
reports (report_definitions/report_runs, Settings → Reports)
- Session Replay tab and immutable snapshots (session_snapshots, /snapshot/:token)
- Remote Codex sync, push ingest with a hashed token, privacy redaction and
ignored folders (Settings → Data), Cursor sessions (no cost)
- Read-only MCP server, statusline, Grafana/Prometheus files
Also: resizable sidebar, pet run/wave animations, the workspace home keeps a
half-typed prompt, and the pre-commit hook runs only the related tests for a
small commit.
120 lines
6.4 KiB
JSON
120 lines
6.4 KiB
JSON
{
|
||
"title": "Alerts",
|
||
"subtitle": "Rules-based alerting for sessions, agents, events, and token usage",
|
||
"refresh": "Refresh",
|
||
"ackAll": "Acknowledge all ({{count}})",
|
||
"ruleTypes": {
|
||
"event_pattern": "Event pattern",
|
||
"inactivity": "Inactivity",
|
||
"status_duration": "Stuck agent",
|
||
"token_threshold": "Token threshold",
|
||
"cost_threshold": "Cost threshold",
|
||
"budget": "Spend budget"
|
||
},
|
||
"ruleTypeHints": {
|
||
"event_pattern": "Fires when an ingested event matches the pattern. Set a count above 1 to require N matching events within a time window (e.g. more than 5 errors in 2 minutes).",
|
||
"inactivity": "Fires when an active session has received no events for the configured number of minutes.",
|
||
"status_duration": "Fires when an agent has remained in the selected status with no activity for the configured number of minutes.",
|
||
"token_threshold": "Fires when a session's total token usage (input + output + cache) exceeds the threshold.",
|
||
"cost_threshold": "Fires when a session's cost reaches the amount, priced like the session's own cost.",
|
||
"budget": "Fires once per period at each threshold of a spend limit — per day, week or month in your local time, optionally for one AI tool."
|
||
},
|
||
"ruleDesc": {
|
||
"eventPattern": "Matches {{pattern}}",
|
||
"eventPatternCount": "≥{{count}} × {{pattern}} within {{window}} min",
|
||
"inactivity": "No session activity for {{minutes}} min",
|
||
"statusDuration": "Agent stuck in {{status}} for {{minutes}} min",
|
||
"tokenThreshold": "Session tokens exceed {{tokens}}",
|
||
"costThreshold": "Session cost reaches {{usd}}",
|
||
"budget": "{{limit}} per {{period}} · alerts at {{thresholds}}"
|
||
},
|
||
"rules": {
|
||
"title": "Alert rules",
|
||
"add": "Add rule",
|
||
"cancel": "Cancel",
|
||
"create": "Create rule",
|
||
"saving": "Saving…",
|
||
"empty": "No alert rules yet",
|
||
"enabled": "Enabled",
|
||
"disabled": "Disabled",
|
||
"enable": "Enable rule",
|
||
"disable": "Disable rule",
|
||
"delete": "Delete rule",
|
||
"confirmDelete": "Delete rule \"{{name}}\" and its alert history?",
|
||
"cooldown": "{{seconds}}s cooldown",
|
||
"form": {
|
||
"name": "Rule name",
|
||
"namePlaceholder": "e.g. Error burst",
|
||
"type": "Rule type",
|
||
"eventType": "Event type (exact)",
|
||
"toolName": "Tool name (exact)",
|
||
"summaryContains": "Summary contains",
|
||
"count": "Trigger count",
|
||
"windowMinutes": "Window (minutes)",
|
||
"agentStatus": "Agent status",
|
||
"minutes": "Minutes",
|
||
"totalTokens": "Total tokens",
|
||
"cooldown": "Cooldown (seconds)",
|
||
"usd": "Cost (USD)",
|
||
"period": "Period",
|
||
"limitUsd": "Limit (USD)",
|
||
"thresholds": "Alert at (%)",
|
||
"budgetTool": "AI tool",
|
||
"allTools": "All AI tools"
|
||
},
|
||
"deleteTitle": "Delete alert rule?",
|
||
"help": {
|
||
"name": "A label for this rule. Shows in the alert feed and is included in webhook payloads (rule_name). e.g. 'Repeated Bash errors'.",
|
||
"type": "What this rule watches. event_pattern matches the live event stream; inactivity = an active session goes quiet; status_duration = an agent is stuck in a state; token_threshold = a session's token usage crosses a limit.",
|
||
"eventType": "The Claude Code hook event to match. Leave blank to match any event type. Matched exactly (case-sensitive).",
|
||
"toolName": "The tool the agent invoked (on PreToolUse / PostToolUse events). Leave blank to match any tool. Matched exactly.",
|
||
"summaryContains": "Case-insensitive substring match against the event's summary text. Useful for catching errors or specific phrases. Leave blank to skip.",
|
||
"count": "How many matching events must occur before the alert fires. 1 = fire on the first match. Set above 1 to detect bursts (e.g. repeated errors).",
|
||
"window": "The rolling look-back window for the count. e.g. count 5 + window 2 means '5 matching events within any 2-minute span'.",
|
||
"status": "Which agent state to watch. 'working' catches agents stuck mid-task; 'waiting' catches agents blocked on input/permission.",
|
||
"minutesInactivity": "Fire when an active session has had no events for this many minutes (a stalled or forgotten session).",
|
||
"minutesStatus": "Fire when an agent stays in the selected status with no activity for this many minutes (a stuck agent).",
|
||
"totalTokens": "Fire when a session's cumulative tokens (input + output + cache read + cache write) cross this number. e.g. 1000000 = 1M tokens.",
|
||
"cooldown": "Minimum seconds between repeat alerts for the same rule + session + agent. Prevents noisy duplicates. Default 300 (5 min); 0 = no cooldown.",
|
||
"usd": "A session reaching this many US dollars fires the alert.",
|
||
"period": "Day starts at your local midnight, week on Monday, month on the 1st.",
|
||
"limitUsd": "The spend limit for one period, in US dollars.",
|
||
"thresholds": "Percents of the limit, comma-separated, e.g. 50, 80, 100. Each fires once per period.",
|
||
"budgetTool": "Count only this AI tool's sessions."
|
||
},
|
||
"preview": "Preview",
|
||
"previewing": "Checking…",
|
||
"previewHint": "What this rule would have fired over the last 7 days — nothing is saved or sent",
|
||
"previewResult": "Would have fired {{fires}} times in {{sessions}} sessions over the last {{days}} days.",
|
||
"previewBudget": "Spend per period (this one and the five before it):",
|
||
"previewUnsupported": "This rule type cannot be replayed from history.",
|
||
"edit": "Edit rule",
|
||
"save": "Save rule",
|
||
"typeFixed": "A rule's type cannot be changed — create a new rule instead.",
|
||
"cooldownInvalid": "Enter a whole number of seconds (0 or more)."
|
||
},
|
||
"feed": {
|
||
"title": "Alert feed",
|
||
"unackedCount": "{{count}} unacknowledged",
|
||
"unackedOnly": "Unacknowledged only",
|
||
"ack": "Acknowledge",
|
||
"viewSession": "View session",
|
||
"loadMore": "Load more ({{shown}} of {{total}})",
|
||
"emptyTitle": "No alerts",
|
||
"emptyDescription": "Alerts fired by your rules will appear here in real time.",
|
||
"emptyUnacked": "Everything is acknowledged. New alerts will appear here as they fire."
|
||
},
|
||
"periods": {
|
||
"day": "day",
|
||
"week": "week",
|
||
"month": "month"
|
||
},
|
||
"errors": {
|
||
"loadRules": "Could not load alert rules: {{error}}",
|
||
"loadAlerts": "Could not load alerts: {{error}}",
|
||
"toggleRule": "Could not change the rule: {{error}}",
|
||
"deleteRule": "Could not delete the rule: {{error}}",
|
||
"ack": "Could not acknowledge: {{error}}"
|
||
}
|
||
}
|