@adonis-agora/telescope-ui

中文文档
2.1.0发布于 2026/10/30MITTypeScriptES Module构建来源已验证近 30 天下载 3008

Observability dashboard for @adonis-agora/telescope — a React SPA (overview, entries + live tail, entry detail, traces & waterfall, exception groups, Pulse health, CPU profiles, live queues and schedules, extension pages, client-side exports) built with T

原始使用文档
文档目录3 节
  1. What it shows
  2. Install
  3. Design

@adonis-agora/telescope-ui

The observability dashboard for @adonis-agora/telescope — a dependency-light React SPA served by a thin AdonisJS provider, behind the same auth guard as the JSON API it consumes. Part of the Agora ecosystem.

What it shows

  • AI — AI spend (total, platform and estimated shares, by feature / model / payer, over time), agent runs with queue / model / tools timings and a per-step breakdown linked to the trace, and unpriced calls, from @adonis-agora/agent ≥ 0.93.0's usage.recorded and run.* events.
  • Pulse — the getHealth "at a glance" rollup: throughput, error rate, p99 latency, HTTP status breakdown, slowest entries, slow routes, top exceptions, N+1 hotspots, load-by-user, cache hit ratio.
  • Entries — the entries list with type + free-text filters and an SSE live tail that prepends new entries as they are recorded. Rows deep-link to the entry detail and the trace waterfall.
  • Entry detail — the full entry: a type-aware header (method/url/status for requests), a metadata list, and the pretty-printed content. Exception/client_exception entries additionally get an AI diagnosis panel (shown only when @adonis-agora/telescope/ai is installed and configured) — "Diagnose with AI" calls the Anthropic-backed DiagnosisCoordinator and renders a probable cause + suggested fix, cached by exception family so re-opening the same error doesn't burn a second model call. request entries get a Replay action that re-issues the captured request against the live server (disabled by default server-side; the panel surfaces why when it is).
  • Traces — recent traces with their type mix, plus a per-trace waterfall (hand-rolled, no chart library) and a trace-scoped entries view.
  • Exceptions — exception groups (class + message) over a window, with counts and trend sparklines.

It is a pure consumer of the telescope core's real routes under <path>/api/* (/entries, /entries/:id, /trace/:id, /metrics/{pulse,stats,traces,waterfall,n-plus-one}) and the SSE live stream at <path>/api/stream. No bundled API, no NestJS module.

Install

// adonisrc.ts — after the core telescope providers
providers: [
  // …
  () => import('@adonis-agora/telescope/telescope_provider'),
  () => import('@adonis-agora/telescope/ui_provider'),          // JSON API + SSE under <path>/api/*
  () => import('@adonis-agora/telescope-ui'),                   // serves the SPA at <path>
]

The SPA mounts at config('telescope_ui').path (default /telescope) and reuses that block's authorize guard. Toggle it or override the mount with the optional telescope_ui.dashboard block:

// config/telescope_ui.ts
import { defineConfig } from '@adonis-agora/telescope/ui'

export default defineConfig({
  path: '/telescope',
  // authorize: (ctx) => ctx.auth.user?.isAdmin === true,
  // dashboard: { enabled: true, path: '/telescope' },
})

Design

Tailwind + a vendored shadcn-style component layer on Base UI (button, badge, dialog, tabs, tooltip, popover, input, select, table — src/app/primitives/), on the Aviary design tokens shared across the Agora ecosystem's consoles — same neutrals/status hues as @dudousxd/nestjs-telescope-ui (this dashboard's NestJS sibling), same magenta --accent, so the two Telescope dashboards match pixel-for-pixel regardless of host framework. Dark-mode-first with a .light-class override (persisted to localStorage), responsive. Still dependency-light where it counts: hand-rolled SVG sparklines and a CSS waterfall (a dense, grid-based timeline that loses legibility as pure utilities), a tiny useAsync instead of a query library, and native EventSource for the live tail — no react-router, no charting library, no table library.

版本与发布记录

@adonis-agora/telescope-ui 共发布 27 个版本,首次发布于 2026/07/15;过去 12 个月发布了 27 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.1.0latest2026/10/308 天前
2.0.22026/10/2810 天前
2.0.12026/10/2810 天前
2.0.02026/10/1721 天前
1.5.22026/10/1325 天前
1.5.12026/09/171 个月前

关于 @adonis-agora/telescope-ui 的常见问题

@adonis-agora/telescope-ui 是什么?

Observability dashboard for @adonis-agora/telescope — a React SPA (overview, entries + live tail, entry detail, traces & waterfall, exception groups, Pulse health, CPU profiles, live queues and schedules, extension pages, client-side exports) built with T

如何安装 @adonis-agora/telescope-ui?

在项目目录运行 npm install @adonis-agora/telescope-ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@adonis-agora/telescope(>=0.11.0 <1.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@adonis-agora/telescope-ui 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@adonis-agora/telescope-ui 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adonis-agora/telescope-ui 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adonis-agora/telescope-ui 可以商用吗?

@adonis-agora/telescope-ui 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@adonis-agora/telescope-ui 的下载量有多少?

根据 npm 官方下载统计,@adonis-agora/telescope-ui 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,008 次,日均约 100 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adonis-agora/telescope-ui 还在维护吗?

最新版本 2.1.0 发布于 2026/10/30(8 天前);至今共发布 27 个版本,其中过去 12 个月发布了 27 个;首次发布于 2026/07/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。