Skip to content

refactor(api,mcp,auth)!: align thread history, panel routes, tool names and user fields with shared conventions - #292

Merged
vishr merged 2 commits into
mainfrom
refactor/canon-names
Oct 9, 2026
Merged

vishr merged 2 commits into
mainfrom
refactor/canon-names

Conversation

@vishr

@vishr vishr commented Oct 9, 2026

Copy link
Copy Markdown
Member

What changed

Align Fanout's remaining API and MCP names with the shared LabStack naming conventions, which AGENTS.md now states directly.

  • Agent thread history returns items and next_cursor (null at the end) and accepts page_size. A thread summary is {id, title, updated_at} and a thread reads as {id, messages, updated_at}. The route parameter is :id. AG-UI messages, run inputs and events keep their protocol names.
  • Panel variables resolve at POST /api/panels/variables/resolve, next to the other panel routes and matching the resolve_panel_variables tool.
  • MCP: the app helper get_panel_exemplars becomes list_panel_exemplars, because it returns a bounded set of traces rather than one known resource. replace_dashboard no longer claims to be idempotent: base_version is optional and every save appends a version.
  • Users separate profile edits from role and status changes.
    • PATCH /api/users/{id} changes only email and display_name.
    • The new admin-only routes PATCH /api/users/{id}/role and PATCH /api/users/{id}/status change role and status. All three reject unknown fields and bound the request body.
    • User JSON, including /api/auth/me and setup, uses display_name and status (active or suspended).
    • Suspension blocks every sign-in path, session and OAuth token, as inactive accounts did before. Role and status changes still revoke sessions, and the last active administrator is still protected. The audit event is user.suspended.
  • Cleanup: the auth middleware no longer reserves the retired /-/ prefix.
  • AGENTS.md states the conventions without pointing at private projects, adds rules for IDs, pagination and annotations, and records the single-provider OIDC routes as an exception.

Contract changes. None of these have aliases.

  • Thread history JSON: items, next_cursor, page_size, id and updated_at.
  • Moved: POST /api/variables/resolve is now POST /api/panels/variables/resolve.
  • MCP: get_panel_exemplars is now list_panel_exemplars.
  • User JSON: name is now display_name, and active is replaced by status.
  • User routes: PATCH /api/users/{id} no longer changes role or status. The two new routes above do that.
  • Migration: 20261009000000_user_profile_status.sql (Goose) renames users.name to display_name and replaces the active flag with status.

Verification

  • just check
  • just test-race when auth, API, ingest, query, MCP, or agent paths changed
  • just e2e (28/28)
  • User-facing behavior and configuration docs are current
  • No credentials, private telemetry, host details, or enterprise-only source are included
  • API, migration, ingest, MCP/AG-UI, or release-contract changes are called out

vishr added 2 commits October 9, 2026 15:15
Bring the remaining API and MCP names in line with the shared LabStack
conventions now recorded in AGENTS.md.

- Agent thread history returns items and next_cursor (null at the end),
  accepts page_size, and summarises threads as {id, title, updated_at}.
  A thread reads as {id, messages, updated_at}; AG-UI messages, run
  inputs and events keep their protocol names. The route parameter is :id.
- POST /api/variables/resolve moves to POST /api/panels/variables/resolve,
  next to the other panel routes and matching resolve_panel_variables.
- The MCP app helper get_panel_exemplars becomes list_panel_exemplars: it
  returns a bounded set of traces, not one known resource.
- replace_dashboard no longer claims to be idempotent. base_version is
  optional and every save appends a version.
- The auth middleware no longer reserves the retired /-/ prefix.
- AGENTS.md states the conventions without pointing at private projects,
  adds id, pagination and annotation rules, and records the single-provider
  OIDC routes as an exception.

BREAKING CHANGE: thread history JSON, the variable resolution route and the
exemplar tool name change with no aliases.
User accounts follow the shared user conventions: role and status
changes are separate operations from profile edits, and the fields use
the shared names.

- Migration 20261009000000 renames users.name to display_name and
  replaces the active flag with status ('active' or 'suspended').
- PATCH /api/users/{id} changes only email and display_name.
  PATCH /api/users/{id}/role and PATCH /api/users/{id}/status are new,
  admin-only routes. All three reject unknown fields and bound the body.
- User JSON, including /api/auth/me and setup, uses display_name and
  status.
- Suspension blocks every sign-in path, sessions and OAuth tokens as
  inactive accounts did. Role and status changes still revoke sessions,
  and the last active administrator is still protected.
- The suspension audit event is user.suspended.

BREAKING CHANGE: user JSON fields and the user update routes change with
no aliases.
@vishr
vishr merged commit 7012af6 into main Oct 9, 2026
13 checks passed
@vishr
vishr deleted the refactor/canon-names branch October 9, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant