You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The view catalog. The agent renders UI by emitting a spec of blocks from a fixed
306
-
// catalog rather than arbitrary markup; the webapp maps each block `type` to a
307
-
// React component in components/dashboard-agent/view-catalog.tsx.
308
-
//
309
-
// Block schemas live in `@internal/dashboard-agent-contracts` (src/blocks.ts) so
310
-
// the webapp, the agent and persistence share one definition. Add a new block
311
-
// there, then add a renderer entry in the webapp registry.
312
-
//
313
-
// The tool takes `viewBlockInputSchema`, the body-only schema with no
314
-
// `{ id, revision, version }` envelope: block identity is system-owned, and the
315
-
// executor in `tools.ts` stamps the envelope on. The enveloped `viewBlockSchema`
316
-
// is for renderers and storage, never for the model.
295
+
// A new block needs a schema in dashboard-agent-contracts (src/blocks.ts) and a
296
+
// renderer entry in components/dashboard-agent/view-catalog.tsx.
317
297
318
298
exportconstrenderViewSchema=tool({
319
299
description:
320
300
"Render a structured view in the dashboard panel: a stack of catalog blocks, instead of plain prose. The catalog has four blocks: `diagnosis` (the 'why did this run fail?' failure card, after gathering evidence with the read/source tools), `chart` (a line/bar chart of run_query results), `actions` (a row of 1-3 buttons offering next steps — a `watch` intent opens the watch configuration card pre-filled with the spec you composed, an `ask` intent sends the labelled question as the user's next message), and `investigation` (a live card for a hypothesis-driven investigation: report the state and the tool assigns and keeps its identity, so re-rendering it updates the same card). The result carries the `investigationId` it assigned — pass that back as `investigationId` when you render the same investigation again, including on a later turn. An investigation is rendered at least TWICE: once as `in_progress` when you open it, then again with the same `investigationId` carrying the final outcome (`concluded` or `inconclusive`), as the last tool call of the turn. A card left at `in_progress` is an unfinished answer whatever your prose says: the user is left watching a spinner. Keep any accompanying message to a one-line lead-in.",
321
301
inputSchema: z.object({
322
302
blocks: z.array(viewBlockInputSchema).min(1).describe("The blocks to render, top to bottom."),
323
-
// Cross-turn continuation. Identity stays out of the block body: this is a
324
-
// tool-level pointer at an existing row, and the store verifies it belongs to
325
-
// this chat, project and environment before touching it.
// Watch alerts: project-level email subscriptions on top of the always-on
352
-
// dashboard notification. Creating one is a write the user has to ask for, and it
353
-
// can be denied by plan or feature flag with a 403.
354
-
355
325
exportconstlistAlertsSchema=tool({
356
326
description:
357
327
'List this project\'s alert subscriptions for watch results — who gets notified when a watch resolves, and whether each one is enabled. Use this to answer "what alerts do I have?".',
0 commit comments