2026-02-17 12:24:48 -06:00
|
|
|
export const queryKeys = {
|
|
|
|
|
companies: {
|
|
|
|
|
all: ["companies"] as const,
|
|
|
|
|
detail: (id: string) => ["companies", id] as const,
|
2026-02-17 20:14:05 -06:00
|
|
|
stats: ["companies", "stats"] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
|
|
|
|
agents: {
|
|
|
|
|
list: (companyId: string) => ["agents", companyId] as const,
|
|
|
|
|
detail: (id: string) => ["agents", "detail", id] as const,
|
Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
|
|
|
runtimeState: (id: string) => ["agents", "runtime-state", id] as const,
|
2026-02-19 14:02:29 -06:00
|
|
|
taskSessions: (id: string) => ["agents", "task-sessions", id] as const,
|
2026-02-17 20:46:12 -06:00
|
|
|
keys: (agentId: string) => ["agents", "keys", agentId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
configRevisions: (agentId: string) => ["agents", "config-revisions", agentId] as const,
|
2026-03-05 15:24:20 +01:00
|
|
|
adapterModels: (companyId: string, adapterType: string) =>
|
|
|
|
|
["agents", companyId, "adapter-models", adapterType] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
|
|
|
|
issues: {
|
|
|
|
|
list: (companyId: string) => ["issues", companyId] as const,
|
2026-02-26 16:33:39 -06:00
|
|
|
search: (companyId: string, q: string, projectId?: string) =>
|
|
|
|
|
["issues", companyId, "search", q, projectId ?? "__all-projects__"] as const,
|
|
|
|
|
listAssignedToMe: (companyId: string) => ["issues", companyId, "assigned-to-me"] as const,
|
2026-03-06 08:21:03 -06:00
|
|
|
listTouchedByMe: (companyId: string) => ["issues", companyId, "touched-by-me"] as const,
|
|
|
|
|
listUnreadTouchedByMe: (companyId: string) => ["issues", companyId, "unread-touched-by-me"] as const,
|
2026-02-25 08:38:37 -06:00
|
|
|
labels: (companyId: string) => ["issues", companyId, "labels"] as const,
|
2026-02-23 14:41:21 -06:00
|
|
|
listByProject: (companyId: string, projectId: string) =>
|
|
|
|
|
["issues", companyId, "project", projectId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
detail: (id: string) => ["issues", "detail", id] as const,
|
|
|
|
|
comments: (issueId: string) => ["issues", "comments", issueId] as const,
|
2026-02-20 10:32:32 -06:00
|
|
|
attachments: (issueId: string) => ["issues", "attachments", issueId] as const,
|
2026-03-13 21:30:48 -05:00
|
|
|
documents: (issueId: string) => ["issues", "documents", issueId] as const,
|
|
|
|
|
documentRevisions: (issueId: string, key: string) => ["issues", "document-revisions", issueId, key] as const,
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
activity: (issueId: string) => ["issues", "activity", issueId] as const,
|
|
|
|
|
runs: (issueId: string) => ["issues", "runs", issueId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
approvals: (issueId: string) => ["issues", "approvals", issueId] as const,
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
liveRuns: (issueId: string) => ["issues", "live-runs", issueId] as const,
|
|
|
|
|
activeRun: (issueId: string) => ["issues", "active-run", issueId] as const,
|
2026-03-13 17:12:25 -05:00
|
|
|
workProducts: (issueId: string) => ["issues", "work-products", issueId] as const,
|
|
|
|
|
},
|
|
|
|
|
executionWorkspaces: {
|
|
|
|
|
list: (companyId: string, filters?: Record<string, string | boolean | undefined>) =>
|
|
|
|
|
["execution-workspaces", companyId, filters ?? {}] as const,
|
|
|
|
|
detail: (id: string) => ["execution-workspaces", "detail", id] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
|
|
|
|
projects: {
|
|
|
|
|
list: (companyId: string) => ["projects", companyId] as const,
|
|
|
|
|
detail: (id: string) => ["projects", "detail", id] as const,
|
|
|
|
|
},
|
|
|
|
|
goals: {
|
|
|
|
|
list: (companyId: string) => ["goals", companyId] as const,
|
|
|
|
|
detail: (id: string) => ["goals", "detail", id] as const,
|
|
|
|
|
},
|
2026-03-14 22:00:12 -05:00
|
|
|
budgets: {
|
|
|
|
|
overview: (companyId: string) => ["budgets", "overview", companyId] as const,
|
|
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
approvals: {
|
|
|
|
|
list: (companyId: string, status?: string) =>
|
|
|
|
|
["approvals", companyId, status] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
detail: (approvalId: string) => ["approvals", "detail", approvalId] as const,
|
|
|
|
|
comments: (approvalId: string) => ["approvals", "comments", approvalId] as const,
|
|
|
|
|
issues: (approvalId: string) => ["approvals", "issues", approvalId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
},
|
2026-02-23 14:41:21 -06:00
|
|
|
access: {
|
|
|
|
|
joinRequests: (companyId: string, status: string = "pending_approval") =>
|
|
|
|
|
["access", "join-requests", companyId, status] as const,
|
|
|
|
|
invite: (token: string) => ["access", "invite", token] as const,
|
|
|
|
|
},
|
|
|
|
|
auth: {
|
|
|
|
|
session: ["auth", "session"] as const,
|
|
|
|
|
},
|
2026-03-12 08:03:55 -05:00
|
|
|
instance: {
|
|
|
|
|
schedulerHeartbeats: ["instance", "scheduler-heartbeats"] as const,
|
|
|
|
|
},
|
2026-02-23 14:41:21 -06:00
|
|
|
health: ["health"] as const,
|
2026-02-19 15:44:05 -06:00
|
|
|
secrets: {
|
|
|
|
|
list: (companyId: string) => ["secrets", companyId] as const,
|
|
|
|
|
providers: (companyId: string) => ["secret-providers", companyId] as const,
|
|
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
dashboard: (companyId: string) => ["dashboard", companyId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
sidebarBadges: (companyId: string) => ["sidebar-badges", companyId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
activity: (companyId: string) => ["activity", companyId] as const,
|
UI: approval detail page, agent hiring UX, costs breakdown, sidebar badges, and dashboard improvements
Add ApprovalDetail page with comment thread, revision request/resubmit flow,
and ApprovalPayload component for structured payload display. Extend AgentDetail
with permissions management, config revision history, and duplicate action.
Add agent hire dialog with permission-gated access. Rework Costs page with
per-agent breakdown table and period filtering. Add sidebar badge counts for
pending approvals and inbox items. Enhance Dashboard with live metrics and
sparkline trends. Extend Agents list with pending_approval status and bulk
actions. Update IssueDetail with approval linking. Various component improvements
to MetricCard, InlineEditor, CommentThread, and StatusBadge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:03:08 -06:00
|
|
|
costs: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["costs", companyId, from, to] as const,
|
feat(ui): add resource and usage dashboard (/usage route)
adds a new /usage page that lets board operators see how much each ai
provider is consuming across any date window, with per-model breakdowns,
rolling 5h/24h/7d burn windows, weekly budget bars, and a deficit notch
when projected spend is on track to exceed the monthly budget.
- new GET /companies/:id/costs/by-provider endpoint aggregates cost events
by provider + model with pro-rated billing type splits from heartbeat runs
- new GET /companies/:id/costs/window-spend endpoint returns rolling window
spend (5h, 24h, 7d) per provider with no schema changes
- QuotaBar: reusable boxed-border progress bar with green/yellow/red
threshold fill colors and optional deficit notch
- ProviderQuotaCard: per-provider card showing budget allocation bars,
rolling windows, subscription usage, and model breakdown with token/cost
share overlays
- Usage page: date preset toggles (mtd, 7d, 30d, ytd, all, custom),
provider tabs, 30s polling plus ws invalidation on cost_event
- custom date range blocks queries until both dates are selected and
treats boundaries as local-time (not utc midnight) so full days are
included regardless of timezone
- query key to timestamp is floored to the nearest minute to prevent
cache churn on every 30s refetch tick
2026-03-08 03:18:37 +05:30
|
|
|
usageByProvider: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["usage-by-provider", companyId, from, to] as const,
|
2026-03-14 22:00:12 -05:00
|
|
|
usageByBiller: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["usage-by-biller", companyId, from, to] as const,
|
|
|
|
|
financeSummary: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["finance-summary", companyId, from, to] as const,
|
|
|
|
|
financeByBiller: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["finance-by-biller", companyId, from, to] as const,
|
|
|
|
|
financeByKind: (companyId: string, from?: string, to?: string) =>
|
|
|
|
|
["finance-by-kind", companyId, from, to] as const,
|
|
|
|
|
financeEvents: (companyId: string, from?: string, to?: string, limit: number = 100) =>
|
|
|
|
|
["finance-events", companyId, from, to, limit] as const,
|
feat(ui): add resource and usage dashboard (/usage route)
adds a new /usage page that lets board operators see how much each ai
provider is consuming across any date window, with per-model breakdowns,
rolling 5h/24h/7d burn windows, weekly budget bars, and a deficit notch
when projected spend is on track to exceed the monthly budget.
- new GET /companies/:id/costs/by-provider endpoint aggregates cost events
by provider + model with pro-rated billing type splits from heartbeat runs
- new GET /companies/:id/costs/window-spend endpoint returns rolling window
spend (5h, 24h, 7d) per provider with no schema changes
- QuotaBar: reusable boxed-border progress bar with green/yellow/red
threshold fill colors and optional deficit notch
- ProviderQuotaCard: per-provider card showing budget allocation bars,
rolling windows, subscription usage, and model breakdown with token/cost
share overlays
- Usage page: date preset toggles (mtd, 7d, 30d, ytd, all, custom),
provider tabs, 30s polling plus ws invalidation on cost_event
- custom date range blocks queries until both dates are selected and
treats boundaries as local-time (not utc midnight) so full days are
included regardless of timezone
- query key to timestamp is floored to the nearest minute to prevent
cache churn on every 30s refetch tick
2026-03-08 03:18:37 +05:30
|
|
|
usageWindowSpend: (companyId: string) =>
|
|
|
|
|
["usage-window-spend", companyId] as const,
|
2026-03-08 16:35:14 +05:30
|
|
|
usageQuotaWindows: (companyId: string) =>
|
|
|
|
|
["usage-quota-windows", companyId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
heartbeats: (companyId: string, agentId?: string) =>
|
|
|
|
|
["heartbeats", companyId, agentId] as const,
|
2026-03-10 21:16:33 -05:00
|
|
|
runDetail: (runId: string) => ["heartbeat-run", runId] as const,
|
2026-02-20 10:32:32 -06:00
|
|
|
liveRuns: (companyId: string) => ["live-runs", companyId] as const,
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
runIssues: (runId: string) => ["run-issues", runId] as const,
|
2026-02-17 12:24:48 -06:00
|
|
|
org: (companyId: string) => ["org", companyId] as const,
|
2026-03-13 16:22:34 -05:00
|
|
|
plugins: {
|
|
|
|
|
all: ["plugins"] as const,
|
|
|
|
|
examples: ["plugins", "examples"] as const,
|
|
|
|
|
detail: (pluginId: string) => ["plugins", pluginId] as const,
|
|
|
|
|
health: (pluginId: string) => ["plugins", pluginId, "health"] as const,
|
2026-03-13 16:58:29 -05:00
|
|
|
uiContributions: ["plugins", "ui-contributions"] as const,
|
2026-03-13 16:22:34 -05:00
|
|
|
config: (pluginId: string) => ["plugins", pluginId, "config"] as const,
|
|
|
|
|
dashboard: (pluginId: string) => ["plugins", pluginId, "dashboard"] as const,
|
|
|
|
|
logs: (pluginId: string) => ["plugins", pluginId, "logs"] as const,
|
|
|
|
|
},
|
2026-02-17 12:24:48 -06:00
|
|
|
};
|