wu-sheng opened a new pull request, #95:
URL: https://github.com/apache/skywalking-horizon-ui/pull/95

   ## Why
   
   SkyWalking operators triage across many screens — alarms → metrics → 
topology → traces → logs → pod logs. An assistant that reads the **same live 
OAP data** and answers in plain language, rendering the **real widgets and 
feature views inline**, shortens that loop — while staying strictly read-only 
and inheriting the operator's own permissions.
   
   ## What
   
   An **opt-in AI assistant** (floating launcher after login → side drawer / 
full page `/ai` / new tab; conversations persist locally in the browser):
   
   - Streams an **ordered narrative with numbered inline figures** (charts, 
top-N lists, tables) built from live OAP data via the same query path as the 
dashboards.
   - Mounts the **real feature views inline**, read-only and service-focused: 
topology (focused one-hop ego graph), cross-layer Smartscape hierarchy, 
**native and Zipkin** traces (list → match → embed for mesh/k8s layers), layer 
logs, browser errors, deployment (intra-service instance graph), the per-pair 
instance map (source → dest), and API-dependency chains. Each reuses the 
**actual layer-tab component** via an additive, default-off `embedded` prop 
that seeds focus from props and never writes shared state (time range, route, 
refresh ticker) — the non-embedded full page is untouched. On-demand Kubernetes 
pod logs are fetched and shown inline as a **read-only result** (the live tail 
lives in the Pod Logs tab).
   - **Read-only and permission-inheriting**: every data tool re-checks the 
same read verb the operator already holds (metrics / alarms / topology / traces 
/ logs / browser-errors), so the assistant never sees more than the user and 
never changes configuration. Its one gated action is **proposing a profile** — 
a decision card the user approves in a popout; nothing runs otherwise.
   - **Guided root-cause** playbooks (master method + latency / error-rate / 
saturation / middleware / kubernetes-workload / service-mesh specializations) 
that walk the dependency topology upstream and follow the cross-layer hierarchy 
down into backing infra.
   - **Vendor-neutral, off by default**: the `ai:` config block 
(`HORIZON_AI_*`) takes an OpenAI-compatible endpoint (default) or Amazon 
Bedrock; the API key is env-only, redacted from logs, and excluded from the 
audit trail. System prompt and starter chips are operator-overridable; a 
starter naming `<service>` opens a free-text fill-in the assistant resolves to 
a real service.
   
   **BFF**: new `ai/` subsystem — chat SSE (`reply.hijack`), per-request 
session lifecycle + abort, provider/model build, tools, and prompt/playbook 
resource files. `client/` stays the only OAP-talking layer; every route is 
RBAC-gated (`ai:read`). **UI**: new `ai/` feature (drawer + `/ai` page), api 
façade, and the embedded-mode props on the reused layer/render views.
   
   **Docs**: `docs/operate/ai-assistant.md` (registered in `menu.yml`). 
**CHANGELOG** under the unreleased `1.0.0` section. English-source i18n across 
all 8 locales.
   
   ## Validation
   
   - `type-check`, `lint`, `build-ui`, `build-bff`, `test:unit` (213 BFF / 140 
UI), `license:check` (0 invalid), and i18n all-8-locale symmetry — **all 
green**.
   - **Pre-PR multi-agent review** of the full branch diff (per-subsystem 
finders + adversarial verification): 4 confirmed findings, **all fixed** — a 
stale "live-tail pane you Start/Pause" claim in the system prompt and the 
pod-log tool header (the block is now a read-only result), a false 
`~/.aws/config` bedrock-region claim in the docs + schema comment (the code 
reads only `AWS_REGION` / `AWS_DEFAULT_REGION`), and 14 orphaned i18n keys left 
over from the "reuse the real view" refactor.
   - **Live OAP**: the feature was iteratively validated against a live 
demo/local OAP throughout development (topology / traces / logs / pod-logs / 
hierarchy rendered end-to-end). Reviewers: a fresh smoke against your own OAP 
is worthwhile for the trace-mode (native vs Zipkin) and Bedrock provider paths.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to