Commit Graph

8105 Commits

Author SHA1 Message Date
Katia Bulatova 4e39228be1 fix(dashboard-agent): pin only a live investigation into a compacted context 2026-08-06 01:41:04 +00:00
Katia Bulatova ddc6d25a66 fix(dashboard-agent): describe a value at the redaction depth cap instead of passing it to the judge 2026-08-06 01:41:04 +00:00
Katia Bulatova 6c993f213b chore: note the summarised long conversations in the release note 2026-08-06 00:49:02 +00:00
Katia Bulatova 0c41a70fa4 perf(dashboard-agent): cap search_docs to a few short excerpts 2026-08-06 00:49:01 +00:00
Katia Bulatova 42a76fb93d perf(dashboard-agent): say a settled watch outcome without a model, and narrate the rest with Haiku 2026-08-06 00:49:01 +00:00
Katia Bulatova 1d083f3ea9 test(dashboard-agent): budget the real prompt prefix with ceilings and a committed snapshot 2026-08-06 00:49:00 +00:00
Katia Bulatova 99850acc2d feat(dashboard-agent): summarise an oversized conversation, keeping live investigations and watches 2026-08-06 00:48:59 +00:00
Katia Bulatova f96361452a chore(webapp): restore the dashboard agent's flag gate 2026-08-06 00:38:40 +00:00
Katia Bulatova fc32fc61e2 refactor(webapp): split the suggested-prompt registry by responsibility
The chip factory and slot vocabulary, the evergreen docs chips, the per-page slot
table and the signal chips each get their own module; registry.ts is now the
public face that re-exports them. A pure move.
2026-08-06 00:13:25 +00:00
Katia Bulatova 4876e074ed refactor(webapp): give each watch condition family its own module
dashboardAgentWatchChecks.ts keeps the dispatcher, the failure envelope and the
previous-facts reader, and re-exports the run, queue, error and health families
plus the shared reader contract. A pure move; every import path is unchanged.
2026-08-06 00:13:25 +00:00
Katia Bulatova fea1a29220 refactor(dashboard-agent): split the watch tick into delivery, condition, batch and adapters
watch-tick.ts keeps the two task definitions and the per-watch check; the wake
delivery, the condition lifecycle, the group tick and the db/session/callback
adapters each move to their own module. A pure move: watch-tick.ts re-exports
everything it exported before.
2026-08-06 00:13:24 +00:00
Katia Bulatova 31698fa0db refactor(dashboard-agent): split the tool set into one module per responsibility
tools.ts now only assembles ready adapters, in the same frozen key order: the
HTTP/JWT client, result curation, the docs client, the source-read ledger,
evidence canonicalisation, investigation persistence, and the api/navigation/
watch/alert tool groups each own their own module. A pure move.

The prompt-prefix fingerprints are unchanged, which is what keeps the head-start
and agent prefixes byte-identical.
2026-08-06 00:13:23 +00:00
Katia Bulatova 29d9a8e423 chore: note the conversation scoring in the release note 2026-08-06 00:11:26 +00:00
Katia Bulatova 99b89338c3 docs(dashboard-agent): make the eval docs match the code
The docs claimed every turn is judged; the sampled rate, the redaction rule, the code-mode
skip, the opt-out and the retention period are now written down in one place.
2026-08-06 00:11:26 +00:00
Katia Bulatova 263b32467d feat(dashboard-agent): give the golden runs their own eval sample rate
The CI lane reads its own variable and defaults to every turn, so neither lane can change
the other's rate.
2026-08-06 00:11:25 +00:00
Katia Bulatova a4b4ef1b55 feat(webapp): let an organization turn off judging of its agent turns
A per-org feature flag the agent checks before every judged turn, and a turn is judged only
on an explicit yes.
2026-08-06 00:11:23 +00:00
Katia Bulatova 3c5b2d5d6b feat(dashboard-agent): never judge a turn that read source 2026-08-06 00:11:22 +00:00
Katia Bulatova 42ddcffef0 feat(dashboard-agent): keep customer data out of the judged-turn row and the judge
Payloads, outputs, query rows and file contents are replaced by their shape before a turn
reaches the judge, and the row now keeps the derived verdict only.
2026-08-06 00:11:22 +00:00
Katia Bulatova 7f13add1a0 feat(webapp): retire judged-turn rows after 30 days
The table is append-only quality data with no reader, so the sweep now drops rows past
the period in one bounded statement per run.
2026-08-06 00:11:21 +00:00
Katia Bulatova 08dc7ba732 fix(webapp): keep the watch card in step with its draft, and frozen while it submits 2026-08-05 23:48:03 +00:00
Katia Bulatova c3ee6a4dbe perf(webapp): resolve the agent card's links in one request 2026-08-05 23:48:02 +00:00
Katia Bulatova ebad471b43 fix(webapp): cap the size of a message to the agent 2026-08-05 23:48:01 +00:00
Katia Bulatova a0d06e4eec fix(webapp): send the agent wake signal to a browser that has never opened the panel 2026-08-05 23:48:01 +00:00
Katia Bulatova 18dffa6364 refactor(dashboard-agent): give the watch tests their own file
The wake narration and watch investigation cases move verbatim to
watch-actions.test.ts; the scaffolding both test files use moves to
test-support.ts. Same 146 passed / 2 skipped.
2026-08-05 23:42:35 +00:00
Katia Bulatova 46290d1ca6 refactor(dashboard-agent): move the watch wake and investigate lanes out of the agent
Pure move. The wake narration and the consented investigation now live in
watch-actions.ts, reached from one call in onAction; the runtime they share with
the agent's own hooks moves to agent-runtime.ts. Every export is re-exported from
dashboard-agent.ts, so no import path changes.
2026-08-05 23:42:35 +00:00
Katia Bulatova 2ed5d52260 refactor(dashboard-agent-db): move the watch tables into their own schema module
Pure move, re-exported from schema.ts so drizzle-kit reads the same six tables
and the generated SQL is unchanged.
2026-08-05 23:42:34 +00:00
Katia Bulatova 30ec754a37 refactor(dashboard-agent-db): move the watch queries into their own module
Pure move: the watch, wake and batch-chain queries leave queries.ts for
watch-queries.ts, re-exported so every import path still resolves.
2026-08-05 23:42:33 +00:00
Katia Bulatova d6debe8fb7 test(webapp): cover the user-actor token's environment scope on every route that accepts one 2026-08-05 23:34:45 +00:00
Katia Bulatova 5b5a25882f fix(webapp): scope a delegated user-actor token to the environment it was minted for 2026-08-05 23:34:44 +00:00
Katia Bulatova b6ebe55500 fix(dashboard-agent): escape the prefix separator so the file reviews as text 2026-08-05 23:23:40 +00:00
Katia Bulatova a88228c838 chore(webapp): move the agent storybook gallery out to a follow-up
The gallery pages, their fixtures and the screenshot script only exist to
look at the agent UI, so they ship separately. The fixtures two unit tests
read — the report view models and the page contexts — stay here.
2026-08-05 22:30:45 +00:00
Katia Bulatova cafd920060 chore: keep the release notes as one 2026-08-05 22:18:03 +00:00
Katia Bulatova be1cb0458e perf(dashboard-agent-db): index the open investigations the sweep scans 2026-08-05 22:17:43 +00:00
Katia Bulatova 8b042bed30 perf(webapp): skip the admin read on the watch authorization path 2026-08-05 22:17:43 +00:00
Katia Bulatova 1dd85367b7 perf(webapp): answer the wake poll with one narrow read per database 2026-08-05 22:17:42 +00:00
Katia Bulatova d26a28b0e6 perf(webapp): only poll the wake feed for a browser that knows a watch exists 2026-08-05 22:17:41 +00:00
Katia Bulatova e109a243f5 fix(webapp): read the alert channel and the watch target on the primary 2026-08-05 22:17:41 +00:00
Katia Bulatova fc4381d50e fix(webapp): keep the agent wake poll to one chain per tab 2026-08-05 22:17:40 +00:00
Katia Bulatova 9b4e4734a1 perf(dashboard-agent): share one 1h-TTL prompt cache between head start and the agent
Head start passed `system` as a bare string, so Anthropic neither wrote nor read
the cache: the ~18.4k-token prefix was billed in full and the agent's step 2 then
paid for a fresh write. Both breakpoints now carry a 1-hour TTL.

The two prefixes were also not identical — `get_run` sat in a different position in
the agent's tool set than in the canonical schema-only one, so they could never have
shared a cache. Reordered, and a fingerprint over system text + tool definitions is
logged per model call alongside the provider's cache-write, cache-read and uncached
input token counts, so a future drift is visible instead of silent.
2026-08-05 22:16:30 +00:00
Katia Bulatova 893b9e866c chore(dashboard-agent): oxfmt 2026-08-05 22:16:29 +00:00
Katia Bulatova e8d35fab8c perf(dashboard-agent): cap read_file at 48KB / 1500 lines
A single read could put ~65k tokens in the transcript, paid for on every later
turn. The truncation notice points at the line range, and the range is now applied
before the cap so a read past the ceiling returns the lines asked for.
2026-08-05 22:16:29 +00:00
Katia Bulatova 7850289107 perf(dashboard-agent): stop echoing the panel's view model back to the model
render_view and get_report both return the panel's view model. Their toModelOutput
now gives the model an acknowledgement and the graded summary respectively, while
the client still receives the blocks and the full report. Errors pass through
verbatim, so the fix-and-render-again loop is unchanged.
2026-08-05 22:16:28 +00:00
Katia Bulatova dd1f309bae perf(dashboard-agent): cap the judge's tool payload and stop pretty-printing it
Each tool output is capped at 1500 characters with a truncation marker, and the
prompt no longer indents the whole turn of tool traffic.
2026-08-05 22:16:27 +00:00
Katia Bulatova 02debc62d9 perf(dashboard-agent): sample a tenth of turns for the judge by default
The per-turn LLM judge was billing every turn, and an unparseable
DASHBOARD_AGENT_EVAL_SAMPLE_RATE fell back to full rate too. Nothing reads
chat_turn_evals yet, so 10% loses no signal we consume.
2026-08-05 22:16:27 +00:00
Katia Bulatova 6a6fa1f4fd chore: keep the release notes as one 2026-08-05 22:13:07 +00:00
Katia Bulatova d4f0357ac1 chore(webapp): move the gallery's transcripts into the storybook fixtures and drop demo-chats 2026-08-05 22:12:44 +00:00
Katia Bulatova a7a29f368f chore: add a server-changes note for the report card fixes 2026-08-05 22:12:43 +00:00
Katia Bulatova 0760f1b55d refactor(webapp): give the agent cards one card primitive 2026-08-05 22:12:42 +00:00
Katia Bulatova 3f85acc2a7 fix(webapp): give the diagnosis card links a focus ring via a TextLink variant 2026-08-05 22:12:41 +00:00
Katia Bulatova 5a80876b16 fix(webapp): ring the unread dot against the navbar surface 2026-08-05 22:12:40 +00:00