Repository navigation
feat(cli): Trinity CLI tool with email auth onboarding (#231) - #245
Merged
Merged
Conversation
Adds a pip-installable Python Click CLI (`trinity`) that provides shell-level access to the platform. Includes email-based login flow with auto-approve access request endpoint for public instance onboarding, plus 20 core commands covering agents, chat, logs, health, skills, schedules, and tags. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
9 smoke tests covering the POST /api/access/request endpoint: happy path, idempotency, input validation, email normalization, and whitelist integration. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
dolho
added a commit
that referenced
this pull request
Aug 25, 2026
…253) Audit first, per the issue's own AC #1: all 31 interval-refreshed files, each with its verdict and the evidence for it, posted as a comment on ent#253 before any change. #1927 had already fixed four surfaces and shipped the rule (`utils/loadingState.js::viewState`) plus the bare-gate ratchet, so most of the inventory was already green. Three were not: MetricsPanel, DashboardPanel, and ObservabilityPanel via the observability store. All three shared a defect worse than the cosmetic one the issue describes. The re-flash was real — each set its loading flag inside the function the poll calls, so the panel was replaced by a spinner on every tick — but the `catch` was the serious half: it OVERWROTE the data with a synthetic empty payload (`{has_metrics: false}`, `{has_dashboard: false}`, `available = false`). One transient 502 therefore rewrote a working agent as one with no metrics, no dashboard, or an unreachable collector, and the real values were gone until the next success — a claim about the subject manufactured out of a claim about the request, which is #1926 one layer down. Each also logged to `console.error` and nowhere else. The fix, per surface: gate on "no data yet" via `viewState`, keep `loading` meaning "fetch in flight" for the retry labels, keep the data on a failed refresh and raise the shared stale banner beside it (never as an else-if arm, which would replace the data it promises to keep), give a failed FIRST load a `LoadFailed` with a retry — distinct from the empty state, which is a statement about the agent — and replace the bespoke spinners with the #245 `ScanlineReveal` primitive, which brings `prefers-reduced-motion` with it. The agent-switch watchers clear the error too, so agent B's first failure is not reported with agent A's detail. In the store, a transport failure is now held apart from `error`, which carries the collector's own message out of a successful response — collapsing the two let a dropped request read as the collector declaring itself down. Verified live against a local stack (Vite-mounted branch source) on the one mounted surface, driving the panel's real 30s poll with the endpoint aborting: the loading face is never re-entered, the dashboard stays on screen, the "no dashboard" empty state does not appear, and the stale banner does. Honest scope, and it corrects the audit: MetricsPanel and ObservabilityPanel turn out to be mounted by NOTHING (`stores/observability.js` has exactly one consumer — that orphaned panel). Their defect is real in code and unreachable in the app; the live win is DashboardPanel. Correction posted on the issue, and the convention note now says to record consumer-reachability in the audit, because `grep setInterval` finds code that polls, not surfaces a user reaches. Out of scope and untouched: ReplayTimeline (excluded by the issue), and the bare gates on surfaces that do not poll — they re-flash only on a user-triggered refetch, which is a different complaint, and they stay in the ratchet baseline. Related to Abilityai/trinity-enterprise#253 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
dolho
added a commit
that referenced
this pull request
Aug 25, 2026
…253) Audit first, per the issue's own AC #1: all 31 interval-refreshed files, each with its verdict and the evidence for it, posted as a comment on ent#253 before any change. #1927 had already fixed four surfaces and shipped the rule (`utils/loadingState.js::viewState`) plus the bare-gate ratchet, so most of the inventory was already green. Three were not: MetricsPanel, DashboardPanel, and ObservabilityPanel via the observability store. All three shared a defect worse than the cosmetic one the issue describes. The re-flash was real — each set its loading flag inside the function the poll calls, so the panel was replaced by a spinner on every tick — but the `catch` was the serious half: it OVERWROTE the data with a synthetic empty payload (`{has_metrics: false}`, `{has_dashboard: false}`, `available = false`). One transient 502 therefore rewrote a working agent as one with no metrics, no dashboard, or an unreachable collector, and the real values were gone until the next success — a claim about the subject manufactured out of a claim about the request, which is #1926 one layer down. Each also logged to `console.error` and nowhere else. The fix, per surface: gate on "no data yet" via `viewState`, keep `loading` meaning "fetch in flight" for the retry labels, keep the data on a failed refresh and raise the shared stale banner beside it (never as an else-if arm, which would replace the data it promises to keep), give a failed FIRST load a `LoadFailed` with a retry — distinct from the empty state, which is a statement about the agent — and replace the bespoke spinners with the #245 `ScanlineReveal` primitive, which brings `prefers-reduced-motion` with it. The agent-switch watchers clear the error too, so agent B's first failure is not reported with agent A's detail. In the store, a transport failure is now held apart from `error`, which carries the collector's own message out of a successful response — collapsing the two let a dropped request read as the collector declaring itself down. Verified live against a local stack (Vite-mounted branch source) on the one mounted surface, driving the panel's real 30s poll with the endpoint aborting: the loading face is never re-entered, the dashboard stays on screen, the "no dashboard" empty state does not appear, and the stale banner does. Honest scope, and it corrects the audit: MetricsPanel and ObservabilityPanel turn out to be mounted by NOTHING (`stores/observability.js` has exactly one consumer — that orphaned panel). Their defect is real in code and unreachable in the app; the live win is DashboardPanel. Correction posted on the issue, and the convention note now says to record consumer-reachability in the audit, because `grep setInterval` finds code that polls, not surfaces a user reaches. Out of scope and untouched: ReplayTimeline (excluded by the issue), and the bare gates on surfaces that do not poll — they re-flash only on a user-triggered refetch, which is a different complaint, and they stay in the ratchet baseline. Related to Abilityai/trinity-enterprise#253 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trinityCLI (Python Click, pip-installable fromsrc/cli/) with 20 core commands: agents, chat, logs, health, skills, schedules, tagstrinity initonboarding flow: configure instance → auto-register email → email/code login → readyPOST /api/access/requestfor auto-approve whitelist registration (rate-limited, idempotent)--format tablevia Rich for human-readable displayChanges
src/cli/— 14 new files (CLI package)src/backend/routers/auth.py— new/api/access/requestendpoint (+62 lines)docs/CLI.md— CLI usage documentationdocs/memory/feature-flows/cli-tool.md— feature flowdocs/memory/requirements.md— Section 30 (CLI-001)docs/memory/feature-flows.md— index updateTest Plan
trinity --helpshows all commandstrinity agents list --format tablereturns live datatrinity health fleet,trinity logs,trinity tags listverified against running backendPOST /api/access/requestauto-approves and is idempotenttrinity initfull onboarding flow with email verificationCloses #231
Generated with Claude Code