release: bump version to 0.82.0
ci / backend (push) Waiting to run
ci / frontend (push) Waiting to run

This commit is contained in:
linkong committed 2026-12-01 18:43:57 +08:00
1 parent b3d2d9e9f1
commit 04cebdc504
131 files changed
+17975 -2323

No files matched your search

+14 -5
View File
@@ -132,15 +132,24 @@ New Model Studio endpoints for Beijing, Tokyo, Frankfurt and Virginia require th
Pagination and retries have a 30-second overall deadline. Network failures and 502/503/504 allow up to two attempts; authentication failures are not retried. Models are sorted by supplied creation/release dates, preserving upstream order on ties, without arbitrary list truncation. Public catalog membership does not establish account-specific generation permission.
Admin separates AI infrastructure from workflow orchestration across two areas:
Admin separates AI configuration from workflow orchestration across two areas:
- **Operations and Settings → AI Infrastructure (`/ai`)**:
- **Operations and Settings → AI (`/ai`)**:
- `Model Providers`: manages provider, wire adapter, default model, LLM API key, proxy URL/token, catalog refresh (keyless official providers fall back to public aggregator catalogs sorted selected-first + MRU + release date with a 6-item collapsible list), set-as-default, and connectivity testing.
- `Tool Calling`: manages WebSearch (including keyless SearXNG) and OCR tool credentials.
- **AI Advisor (`/advisor/*`)**:
- `Playground` (`/advisor/playground`): pure-chat debugging bench defaulting to `default.general` with slash commands and client-owned local Earth context drawer (`planet.earth_context.v1` / same-origin IndexedDB / `localStorage`).
- `Workflows & Nodes` (`/advisor/workflows`): `@xyflow/react` visual graph over all 9 built-in workflows supporting node prompts, allowlisted tools, guardrails, immutable revisions/rollback, and allowlisted AI Diff tuning proposals.
- `Run History` (`/advisor/runs`): execution trace audit with one-click canvas replay.
- `Playground` (`/advisor/playground`): unified multimodal debugging workbench (text, images, sampled video keyframes, SSRF-isolated web links, JSON, and automatic Earth context mounting) with slash commands, Markdown rendering, and inline 👍/👎 assistant feedback persisted in `WorkflowRun.budget_used`.
- `Workflows & Nodes` (`/advisor/workflows`): `@xyflow/react` visual graph studio over all 10 built-in workflows (including `meta.workflow_evolver`) and custom DAGs executed via `dag_executor.py`, supporting Earth interactive `bindings`, immutable revisions/rollback, Fixture A/B evaluation, and 3-tier bounded self-evolution controls.
- `Run History` (`/advisor/runs`): execution trace audit surfacing model, latency, revision, and feedback filters with one-click canvas replay and trace-guided tuning.
### Three-Tier Workflow Self-Evolution and Meta-Evolution
Implemented in [workflow_evolver.py](/home/ray/dev/linkong/planet/backend/app/services/ai/workflow_evolver.py) with **zero database schema changes or migrations** by reusing `ai_workflows`, `ai_workflow_revisions`, `ai_workflow_fixtures`, `workflow_runs.budget_used`, and `system_settings` (`ai_evolution_policy` and `ai_evolution_ledger`):
- **Tier 0 (Immutable Python Constitution Kernel)**: enforces acyclic DAG structure and trigger/output preservation, blocks emptying `system_prompt`, restricts tools to allowlisted IDs, caps auto-mode blast radius (`<= 2` nodes and `<= 40%` of nodes), freezes the `verify_output` node on `meta.workflow_evolver`, blocks custom `meta.*` creation (single-level recursion lock), enforces `24h / 7d` cooldowns and daily auto-evolution quotas, and runs a **5-run canary window** with automatic rollback on consecutive failures or elevated bad-rating rates (with a 3-outcome meta-canary rollback guard on `meta.workflow_evolver`).
- **Tier 1 (Business Optimization & Model Drift Adaptation)**: `GET /api/v1/ai/evolution/health/{workflow_id}` computes 0-token health metrics, active model capability drift, unused tools, and DGM best-parent revision recommendations; `POST /api/v1/ai/evolution/propose/{workflow_id}` reads live `diag_node` / `patch_node` prompts from `meta.workflow_evolver` alongside historical ledger lessons; `POST /api/v1/ai/evolution/eval/{workflow_id}` runs Fixture A/B checks and `POST /api/v1/ai/evolution/incubate` proposes new workflows from frequent `default.general` queries. Non-blocking post-run hooks run via `schedule_post_run_evolution`.
- **Tier 2 (Meta-Evolution & Extensibility Hooks)**: `POST /api/v1/ai/evolution/meta-evolve` evolves `meta.workflow_evolver` prompts under an independent `meta_mode` (`off | draft | auto`) using objective ledger outcomes; `EvolutionSignalDetector` (`SIGNAL_DETECTORS`) and `EvolutionEvaluator` (`EVALUATORS`) provide clean `Protocol` extension points.
- **Feedback & Policy APIs**: `POST /api/v1/ai/runs/{run_id}/feedback`, `GET /api/v1/ai/runs?feedback=negative|positive`, `GET/PUT /api/v1/ai/evolution/policy`, `GET /api/v1/ai/evolution/ledger`, and `POST /api/v1/ai/evolution/ledger/{entry_id}/dismiss`.
Save, set-as-default, and connectivity testing remain three separate responsibilities. Runtime prompts resolve from published `AIWorkflow` nodes and versioned `default_prompts.json` resources while preserving `task_key` compatibility.
@@ -609,3 +609,8 @@ When compute image configuration has no model/group rules, resolution uses a bou
### Satellite Compression, Twinkle & Compute Site Differentiation
`compute-site-types.js` distinguishes `supercomputer`, `gpu_cluster`, `data_center`, `cloud_center`, and `edge_node` markers/legends by color, while `satellites.js` provides altitude compression (`altitudeCompression`), short comet trails, and GPU-attribute twinkle intensity controls (`twinklePhase` / `twinkleShape`) alongside a simplified footprint toggle focused on Starlink.
### Dynamic Workflow Bindings, Borderless Desktop Recording, and Bilingual Alignment
- `workflow-bindings.js` fetches `/api/v1/earth/workflow-bindings` and dynamically projects published custom/built-in workflow actions onto matching Earth surfaces (info cards, news/topic cards, Copilot quick actions, and multi-target comparison tray).
- Electron `screen-recorder.ts` captures `win.webContents.mainFrame` cleanly without framing chrome while preserving native Alt menu access, and Earth `i18n.js` / `index.html` keep `zh-CN` and `en-US` copy separated cleanly while syncing locale preferences with the console.
@@ -35,14 +35,13 @@ Admin now owns the official admin routes:
- `/advisor/playground`
- `/advisor/workflows`
- `/advisor/runs`
- `/ops/monitoring`
- `/ai`
- `/earth-content`
- `/collection-management`
- `/settings`
- `/logs`
(Legacy `/bgp`, `/alerts/*`, `/ai/prompts`, and `/ai/playground` remain only as `<Navigate replace />` redirects.)
(Legacy `/ops/monitoring`, `/bgp`, `/alerts/*`, `/ai/prompts`, and `/ai/playground` remain only as `<Navigate replace />` redirects to `/advisor/*`.)
These routes render [AdminRoutes.tsx](/home/ray/dev/linkong/planet/frontend/src/admin/AdminRoutes.tsx). Page metadata and menu entries come from [manifest.tsx](/home/ray/dev/linkong/planet/frontend/src/admin/routes/manifest.tsx). Admin is the only console entry point; there is no parallel console or rollback route.
@@ -301,7 +300,7 @@ Responsibilities:
`App.tsx` uses it to decide whether to redirect to the login page. `/docs` remains a public route, but the backend decides the visible catalog and content from the token; anonymous visitors only receive public docs.
### 2. AI Infrastructure and AI Advisor
### 2. AI and AI Advisor
Files:
@@ -312,11 +311,11 @@ Files:
Responsibilities:
- `/ai` is scoped to **AI Infrastructure** (`模型供应商` Model Providers and `工具调用` Tool Calling only), redirecting `?section=prompts` and `?section=playground` to `/advisor/*`
- `模型供应商` includes keyless official-provider aggregator fallback sorting (`selected-first -> MRU -> release date`) with a collapsible 6-item list, unified tactile `<Select>` and dark-mode numeric steppers, and active sidebar group persistence across reloads
- `/advisor/playground` delivers a pure-chat debugging workspace with slash commands and a Client-Owned Local Context Drawer (`localStorage`, same-origin Earth IndexedDB, `planet.earth_context.v1` JSON paste, and explicit Save Fixture)
- `/advisor/workflows` renders a 3-column `@xyflow/react` visual editor over all 9 built-in workflows, allowlisted tools, guardrails, immutable revisions/rollback, and AI Diff proposals
- `/advisor/runs` and `/ops/monitoring` house execution trace audits and consolidated non-AI monitoring alerts
- `/ai` focuses on **AI** (`模型供应商` Model Providers and `工具调用` Tool Calling), redirecting `?section=prompts` and `?section=playground` to `/advisor/*`
- `模型供应商` includes keyless official-provider aggregator fallback sorting (`selected-first -> MRU -> release date`), a collapsible 6-item list with permanent vendor/keyword filters, chevron expand with auto-scroll, unified tactile `<Select>` and dark-mode numeric steppers, and active sidebar group persistence across reloads
- `/advisor/playground` delivers a unified multimodal debugging workspace (images, sampled video frames, SSRF-isolated links, JSON, Markdown output, Client-Owned Local Context Drawer, and inline 👍/👎 run feedback)
- `/advisor/workflows` renders a 3-column `@xyflow/react` visual editor over all 10 built-in workflows (including `meta.workflow_evolver`) and custom DAGs with Earth interactive bindings, revisions/rollback, lazy-loaded header `Evolution` policy/meta-evolution popover, and Inspector 0-token health/drift diagnostics + Fixture A/B comparison
- `/advisor/runs` houses execution trace audits (model, latency, revision, and feedback filter) and canvas replay; Admin & Advisor pages share auto-hiding `<Scrollbar>` overlays and clean zh/en separation. Legacy `/ops/monitoring`, `/bgp`, and `/alerts/*` redirect cleanly to `/advisor/playground`, while live BGP layers render on `/earth`
Legacy `/playground`, `/bgp`, and `/alerts/*` routes are preserved only as `<Navigate replace />` redirects.
+10 -12
View File
@@ -76,8 +76,7 @@ The console at `http://localhost:3000/admin` is built with React plus Tactile UI
| Playground | `/advisor/playground` | Pure-chat AI Advisor workbench with local Earth context drawer |
| Workflows & Nodes | `/advisor/workflows` | `@xyflow/react` visual workflow editor, revision rollback, and AI Diff tuning |
| Run History | `/advisor/runs` | AI workflow execution trace audit and canvas replay |
| Monitoring & Alerts | `/ops/monitoring` | Consolidated system alerts, BGP incidents/anomalies/events, and collector health |
| AI Infrastructure | `/ai` | Model providers and WebSearch/OCR tool credentials |
| AI | `/ai` | Model providers and WebSearch/OCR tool credentials |
| Earth Content | `/earth-content` | TV livestreams, boundary precision, base-map and layer-resource entry points |
| Collection Management | `/collection-management` | Collectors, scheduling, collection history entry points |
| Logs | `/logs` | Usually visible only to super admin |
@@ -144,21 +143,21 @@ Steps:
- `total stored`, `last 24h`, `last 1h`, and `unique MMSI` show historical collection volume
- `disconnected` with a recent error means the upstream or network dropped; click `Reconnect`
## Configure AI Infrastructure and Use AI Advisor
## Configure AI and Use AI Advisor
`/ai?section=integrations` (**AI Infrastructure**) manages model providers and tool credentials, while `/advisor/playground`, `/advisor/workflows`, and `/advisor/runs` (**AI Advisor**) provide pure-chat debugging, visual node orchestration, and run auditing:
`/ai?section=integrations` (**AI**) manages model providers and tool credentials, while `/advisor/playground`, `/advisor/workflows`, and `/advisor/runs` (**AI Advisor**) provide pure-chat debugging, visual node orchestration, and run auditing:
- **AI Infrastructure (`/ai`)**:
- `Model Providers`: default LLM provider, model, base URL, API key, local `aiprovider` proxy, and connection test; official keyless providers (incl. GLM, Meta, Gemini, Grok, DeepSeek, OpenAI, MiniMax) fall back to public aggregator catalogs sorted selected-first + MRU + release date with a collapsible 6-item list
- **AI (`/ai`)**:
- `Model Providers`: default LLM provider, model, base URL, API key, local `aiprovider` proxy, and connection test; official keyless providers (incl. GLM, Meta, Gemini, Grok, DeepSeek, OpenAI, MiniMax) fall back to public aggregator catalogs sorted selected-first + MRU + release date, showing 6 collapsed items by default with persistent vendor/keyword search and chevron-only expansion
- `Tool Calls`: dropdown for WebSearch (including keyless SearXNG) and OCR
- **AI Advisor (`/advisor/*`)**:
- `Playground` (`/advisor/playground`): pure-chat debugging workbench defaulting to `default.general`; supports `/bgp-brief`, `/alerts-brief`, `/situational-brief`, and `/locate` slash commands plus a **Client-Owned Local Context Drawer** (reads browser `localStorage`, same-origin Earth IndexedDB sessions, or pasted `planet.earth_context.v1` JSON exported from Earth Copilot without forcing backend persistence unless explicitly saved as a workflow fixture)
- `Workflows & Nodes` (`/advisor/workflows`): `@xyflow/react` canvas for all 9 built-in workflows (`default.general`, `earth.copilot.chat`, `earth.news.enrich`, `earth.news.analysis`, `location.resolve_unknown`, `ops.bgp_brief`, `ops.alerts_brief`, `ops.situational_alerts_brief`, `collection.mapping_and_guide`) supporting prompts, allowlisted tools, guardrails, draft/publish/rollback revisions, run trace replay, and **AI Diff Auto-Tuning Proposals**
- `Run History` (`/advisor/runs`): filterable audit log linking directly to canvas replay and workflow optimization
- `Playground` (`/advisor/playground`): unified multimodal debugging workbench (images, sampled video frames, web links, JSON, and Markdown rendering) defaulting to `default.general`; supports `/bgp-brief`, `/alerts-brief`, `/situational-brief`, and `/locate` slash commands plus a Client-Owned Local Context Drawer (`localStorage`, same-origin Earth IndexedDB, or pasted `planet.earth_context.v1` JSON), and inline 👍/👎 response feedback for continuous workflow improvement.
- `Workflows & Nodes` (`/advisor/workflows`): `@xyflow/react` visual studio for all 10 built-in workflows (including `meta.workflow_evolver`) and custom DAGs with Earth interactive bindings and revision rollback; the header **Evolution** policy popover configures global auto-optimization / meta-evolution (`off`, auto-draft, or auto-publish with 5-run canary rollback) and recent ledger entries, while the Inspector **Tuning** tab shows 0-token health metrics, active model drift alerts, per-workflow lock toggle, one-click Optimize / Adapt Model / Incubate New actions, and Fixture A/B comparison.
- `Run History` (`/advisor/runs`): filterable audit log by workflow, status, and feedback quality, displaying model, latency, revision badges, and one-click links to canvas replay or tuning.
Legacy routes (`/ai/prompts`, `/ai/playground`, `/playground`, `/bgp`, `/alerts/*`, plus legacy prompts/playground query sections) automatically redirect to their new counterparts under `/advisor/*` and `/ops/monitoring`.
Legacy routes (`/ai/prompts`, `/ai/playground`, `/playground`, `/ops/monitoring`, `/bgp`, `/alerts/*`, plus legacy prompts/playground query sections) automatically redirect to their counterparts under `/advisor/*`.
> The Electron Desktop Client also includes native Screen Recording (`CmdOrCtrl+Shift+F9` under the **Screen Recording** menu) with audio toggle (`recordAudio`), hide-cursor/custom cursor overlay (`recordHideCursor`), auto-save to `Videos/Planet Earth/`, and Windows portable/installer layout under `C:\Users\qklov\AppData\Local\Planet\{current,releases}`.
> The Electron Desktop Client also includes native borderless main-frame Screen Recording (`CmdOrCtrl+Shift+F9` under the **Screen Recording** menu, preserving native Alt menu access) with audio toggle (`recordAudio`), hide-cursor/custom cursor overlay (`recordHideCursor`), auto-save to `Videos/Planet Earth/`, and Windows portable/installer layout under `C:\Users\qklov\AppData\Local\Planet\{current,releases}`.
### Model Providers
@@ -255,7 +254,6 @@ To let a regular user read developer or operations docs, add `docs_developer` or
- `/datasources`: source directory. The `Built-in Sources` tab can be filtered by product domain, layer/module, enabled state, last run status, whether collected records exist, and search text. With no rows selected, the primary button shows `Trigger All`; after selecting rows, it becomes `Trigger Selected N` and submits only those sources. The top-right queue button shows a queue icon when empty and a pure circular total-progress indicator while tasks exist; it opens a floating panel grouped by running, completed, failed, and skipped. Failed rows can retry, and completed rows can jump to detail. `Realtime Sources` is for AISStream / WebSocket long connections and shows connection health, stored totals, time-window counters, and Start / Stop / Reconnect actions. Endpoint/credential/header editing happens at `/collection-management -> Collectors`.
- `/data`: collected data table — used to verify "did data arrive", "is the freshness right", "does a source emit valid records"
- `/ops/monitoring`: consolidated operational monitoring and alerts view (system alerts, BGP incidents, anomalies, collectors with location collection, and observation events; legacy `/bgp` and `/alerts/*` routes redirect here)
## AI Advisor (Playground, Workflows, and Run History)
+3
View File
@@ -493,6 +493,9 @@ The production host checks the latest stable Git tags and OCI `release-manifest:
A failed rollout restores the previous application images and hotfix manifest while preserving database writes. An interrupted rollout resumes recovery on the next check. A failed version waits for an explicit retry or a newer release. The most recent pre-change database backups and version records are under `/var/lib/planet-release-deploy/last-success/` and `last-failed/`. Retry after resolving the underlying error.
> [!WARNING]
> **Host-managed files are NOT auto-updated by `planet-release-deploy.timer` (publishing ≠ deployed)**: The timer replaces application container digests and publishes Earth hotfixes from OCI `release-manifest:<tag>`, but does **not** overwrite host-resident `/usr/local/lib/planet-release/production_deploy.py`, `deploy/systemd/*`, `/opt/planet/current/compose*.yaml` env/mounts, or host Nginx configs. Whenever a release modifies those files and deployment (`部署` / `发版部署`) is requested, sync the changed host files before rolling out or running `--retry` (so stale host verification logic such as new 401 auth gates cannot trigger a false-positive rollback), then verify live container digests plus `https://api.rclaw.top/health/ready` and `https://rclaw.top/api/v1/client/update-manifest`.
```bash
systemctl list-timers planet-release-deploy.timer
journalctl -u planet-release-deploy.service -n 40
+1 -1
View File
@@ -38,7 +38,7 @@ After landing on the `/admin` dashboard, here's a recommended walk-through:
2. `/ai?section=integrations`: fill an LLM provider (e.g. `minimax` / `openai`), model, base URL, API key, and click the plug at the end of the base URL to check the model catalog (official keyless providers fall back to public aggregator catalogs sorted selected-first + MRU + release date with a collapsible 6-item list); verify generation in `/advisor/playground` and edit node workflows in `/advisor/workflows`. Optional WebSearch / OCR tools live under `/ai?section=tools`
3. `/earth-content?section=brand`: maintain the Earth HUD logo and title image in Branding. The Upload button inside each URL field opens a file picker, and image files can also be dropped directly onto the matching field. Save the brand configuration after upload
4. `/datasources` or `/data`: check whether collectors have produced data. Use `/datasources -> Built-in Sources` for finite collectors: with no rows selected, click `Trigger All`; after selecting rows, the primary button becomes `Trigger Selected N`. The top-right queue button shows progress. Use `/datasources -> Realtime Sources` for AISStream / WebSocket health and counters
5. `/ops/monitoring`: inspect system alerts, BGP incidents/anomalies/events, and collector health
5. `/advisor/playground`: chat with AI Advisor or run `/bgp-brief` / `/alerts-brief` for BGP posture and collection-health briefings (live BGP layers render on `/earth`)
6. `/users` (super_admin only): open accounts for teammates or adjust their groups (or issue scoped `X-API-Key` tokens in `/settings` and grant `api_access` for external/UE5 API consumers)
## 4. Open Earth
+14 -5
View File
@@ -132,15 +132,24 @@ AI 配置页使用的接口:
完整分页和重试受 30 秒总超时保护;网络故障及 502/503/504 最多尝试两次,鉴权失败不重试。按接口提供的创建/发布日期倒序排列;日期相同时保留上游顺序,不截断为固定数量。公共目录只表示供应商公开的模型集合,不代表账号已获得每个模型的生成权限。
Admin 的 AI 页面已按基础设施与参谋编排拆分为两组信息架构:
Admin 的 AI 页面已按模型配置与参谋编排拆分为两部分:
- **运维与配置 → AI 基础设施 (`/ai`)**:
- **运维与配置 → AI (`/ai`)**:
- `模型供应商`:管理 provider、协议适配、默认模型、LLM API Key、代理地址、代理 token、模型列表刷新(无 Key 官方源回退公共聚合目录,按「已选优先 + 最近使用 + 发布时间」排序并折叠展示 6 项)、设为默认和轻量连通性测试。
- `工具调用`:管理 WebSearch(支持免 Key 的 SearXNG 等)和 OCR 等工具配置。
- **AI 参谋 (`/advisor/*`)**:
- `Playground` (`/advisor/playground`):纯净对话调试台,默认 `default.general`,支持斜杠简报指令及客户端自持的本地地球上下文抽屉(`planet.earth_context.v1` / 同源 IndexedDB / `localStorage`)。
- `工作流与节点` (`/advisor/workflows`):管理全站 9 条内建工作流的 `@xyflow/react` 节点图(提示词、工具白名单、护栏、`Draft / Publish / Rollback` 版本历史与受白名单约束的 AI Diff 调优提案)。
- `运行记录` (`/advisor/runs`):审计每次对话、地球 Copilot 与位置 Agent 的执行轨迹。
- `Playground` (`/advisor/playground`):统一多模态对话调试台(文本、图片、视频关键帧、SSRF 安全隔离外链、JSON 及自动识别地球上下文),支持斜杠简报/定位指令、Markdown 渲染以及助手回复行内 👍/👎 反馈采集(写入 `WorkflowRun.budget_used`)。
- `工作流与节点` (`/advisor/workflows`):基于 `@xyflow/react` 编排全站 10 条内建工作流(含 `meta.workflow_evolver` 自进化元引擎)及自定义工作流,支持多节点 DAG 流式执行(`dag_executor.py`)、地球交互绑定(`bindings`)、`Draft / Publish / Rollback` 版本历史,以及三层有界自进化/元进化控制与 Fixture A/B 样本对照。
- `运行记录` (`/advisor/runs`):记录模型、耗时、版本号与赞踩评价,支持按质量筛选并一键跳转画布回放或带轨迹调优。
### 三层工作流自进化与元进化
后端 [workflow_evolver.py](/home/ray/dev/linkong/planet/backend/app/services/ai/workflow_evolver.py) 在 **零新增数据库表/零迁移脚本** 的前提下,复用 `ai_workflows`、`ai_workflow_revisions`、`ai_workflow_fixtures`、`workflow_runs.budget_used` 与 `system_settings`(`ai_evolution_policy`、`ai_evolution_ledger`)实现有界自举:
- **Tier 0(Python 不可变宪法内核)**:强制校验 DAG 无环与入口/输出保留、禁止清空 `system_prompt`、禁止使用非白名单工具、限制自动变更半径(单次 `<= 2` 个且 `<= 40%` 节点)、永久冻结元引擎 `verify_output` 节点、禁止自定义 `meta.*` 命名空间(单层元递归锁)、按 `24h / 7d` 冷却与每日自动预算加锁,并在自动发布后启动 **5 次运行灰度观察窗**(连续 2 次失败或差评/失败率超阈即自动回滚,元引擎自身受下游 3 次结果窗口自动回退保护)。
- **Tier 1(业务自优化与模型漂移适配)**:`GET /api/v1/ai/evolution/health/{workflow_id}` 执行 0-Token 健康度与活跃模型能力漂移诊断并计算 DGM 历史最佳父版本;`POST /api/v1/ai/evolution/propose/{workflow_id}` 结合 `meta.workflow_evolver` 线上发布的 `diag_node` / `patch_node` 提示词及历史进化台账正负经验产出补丁;`POST /api/v1/ai/evolution/eval/{workflow_id}` 与 `POST /api/v1/ai/evolution/incubate` 分别支持样本 A/B 对照与从 `default.general` 高频提问孵化新工作流。运行完成后通过 `schedule_post_run_evolution` 异步非阻塞检查灰度与冷却条件。
- **Tier 2(元进化 & 可扩展注册表)**:`POST /api/v1/ai/evolution/meta-evolve` 按独立开关(`off | draft | auto`)迭代 `meta.workflow_evolver` 提示词策略;同时通过 `EvolutionSignalDetector`(`SIGNAL_DETECTORS`)与 `EvolutionEvaluator`(`EVALUATORS`)协议方便后续扩展新探针或评测器。
- **反馈与运行记录接口**:`POST /api/v1/ai/runs/{run_id}/feedback`(提交 `-1 | 0 | 1` 评价与原因备注,差评实时复核灰度健康)与 `GET /api/v1/ai/runs?feedback=negative|positive`;战略策略与台账维护由 `GET/PUT /api/v1/ai/evolution/policy`、`GET /api/v1/ai/evolution/ledger` 与 `POST /api/v1/ai/evolution/ledger/{entry_id}/dismiss` 提供。
保存、设为默认和连通性测试是三个独立职责:保存只持久化表单,设为默认只切换默认 provider/tool,连通性测试只验证当前草稿是否可用,不应隐式保存或切换默认项。
@@ -748,3 +748,8 @@ BGP 观测站以 collector 编号建立标记索引。共享索引不登记空 I
- `compute-site-types.js` 为 `supercomputer`、`gpu_cluster`、`data_center`、`cloud_center`、`edge_node` 提供差异化配色与图例辨识;
- `satellites.js` 支持卫星高度压缩滑块(`altitudeCompression`)、短彗尾轨迹效果与基于 GPU 顶点属性(`twinklePhase` / `twinkleShape`)的闪烁强度调节,并移除了非 Starlink 星座的冗余地表覆盖开关以保持图面洁净。
### 动态工作流绑定、桌面无边框录屏与双语对齐
- `workflow-bindings.js` 拉取 `/api/v1/earth/workflow-bindings` 发布的白名单工作流绑定,依据当前选中实体类型与交互界面位面(信息卡、新闻卡、算力专题卡、Copilot 快捷动作与多选对比托盘)动态渲染专项分析动作。
- Electron 客户端 `screen-recorder.ts` 以 `win.webContents.mainFrame` 捕获无边框纯净画面并保持 Windows 原生 Alt 菜单兼容;`i18n.js` 与 `index.html` 对齐 `zh-CN` / `en-US` 纯净语种映射并同步管理台语言偏好。
@@ -35,14 +35,13 @@
- `/advisor/playground`
- `/advisor/workflows`
- `/advisor/runs`
- `/ops/monitoring`
- `/ai`
- `/earth-content`
- `/collection-management`
- `/settings`
- `/logs`
(旧 `/bgp`、`/alerts/*`、`/ai/prompts`、`/ai/playground` 作为 `<Navigate replace />` 兼容重定向保留。)
(旧 `/ops/monitoring`、`/bgp`、`/alerts/*`、`/ai/prompts`、`/ai/playground` 作为 `<Navigate replace />` 兼容重定向至 `/advisor/*` 保留。)
这些路径渲染 [AdminRoutes.tsx](/home/ray/dev/linkong/planet/frontend/src/admin/AdminRoutes.tsx),页面清单和菜单元信息来自 [manifest.tsx](/home/ray/dev/linkong/planet/frontend/src/admin/routes/manifest.tsx)。控制台是唯一后台入口,不再维护并行控制台或回退路由。
@@ -301,7 +300,7 @@ Admin 的状态标签统一走 [StatusText](/home/ray/dev/linkong/planet/fronten
`App.tsx` 用它判断是否进入登录页。`/docs` 仍是公开路由,但目录和正文由后端按 token 决定;未登录时只返回公开文档。
### 2. AI 基础设施与 AI 参谋
### 2. AI 与 AI 参谋
文件:
@@ -312,12 +311,12 @@ Admin 的状态标签统一走 [StatusText](/home/ray/dev/linkong/planet/fronten
职责:
- `/ai` 收口为 **AI 基础设施**(仅保留 `模型供应商` 与 `工具调用` 两个分区),不再承担 `提示词` 与 `Playground`;旧参数 `prompts`、`playground` 自动跳转至 `/advisor/workflows` 与 `/advisor/playground`
- `模型供应商` 分区支持免 Key 官方供应商的公共聚合目录回退、「已选优先 + 最近使用 + 发布时间」排序与默认 6 项折叠预览、自定义 `<Select>` 与深色数字步进控件,以及左侧栏按当前激活分组自动保持展开
- `/ai` 收口为 **AI**(保留 `模型供应商` 与 `工具调用` 两个分区),不再承担 `提示词` 与 `Playground`;旧参数 `prompts`、`playground` 自动跳转至 `/advisor/workflows` 与 `/advisor/playground`
- `模型供应商` 分区支持免 Key 官方供应商的公共聚合目录回退、「已选优先 + 最近使用 + 发布时间」排序与默认 6 项折叠预览、纯箭头展开与展开后自动下滚聚焦、常驻厂商/关键词筛选、自定义 `<Select>` 与深色数字步进控件,以及左侧栏按当前激活分组自动保持展开
- `工具调用` 分区先选择工具(WebSearch 含免 Key 的 SearXNG / OCR),再管理对应 API 与开关状态;未启用时除开关外的配置项和测试入口置灰
- `/advisor/playground` 为纯净对话调试台,配备客户端本地上下文抽屉(同源 IndexedDB + `localStorage` + `planet.earth_context.v1` JSON 导入/挂载,可选保存为样本)与斜杠简报指令
- `/advisor/workflows` 采用三栏单屏 `@xyflow/react` 画布,编辑 9 条内建工作流节点提示词、白名单工具、护栏、版本回滚与 AI Patch Diff 提案预览
- `/advisor/runs` 与 `/ops/monitoring` 分别承接运行审计轨迹与合并后的系统/BGP 原始观测告警
- `/advisor/playground` 为统一多模态对话调试台(支持图片/视频采样/网页链接/JSON、Markdown 渲染、客户端本地上下文抽屉与 👍/👎 运行质量反馈)
- `/advisor/workflows` 采用三栏单屏 `@xyflow/react` 画布,编辑 10 条内建工作流(含 `meta.workflow_evolver` 元引擎)与自定义工作流节点提示词、白名单工具、地球交互绑定、版本回滚,并提供懒加载的顶栏「自进化策略」弹窗及检查器「调优」0-Token 健康/漂移面板与 Fixture A/B 样本对照
- `/advisor/runs` 承接运行审计轨迹(展示版本号、模型、耗时与赞踩反馈筛选)与画布回放;控制台与 AI 参谋全部界面文案已完成中英文隔离与自动隐藏 `<Scrollbar>` 统一。旧 `/ops/monitoring`、`/bgp` 与 `/alerts/*` 已合并重定向至 `/advisor/playground`,BGP 实时空间图层仍在 `/earth` 展示。
旧路径 `/playground`、`/bgp`、`/alerts/*` 仅保留 `<Navigate replace />` 兼容重定向。
+10 -12
View File
@@ -76,8 +76,7 @@
| Playground | `/advisor/playground` | AI 参谋纯净对话调试台与本地上下文抽屉 |
| 工作流与节点 | `/advisor/workflows` | `@xyflow/react` 9 条工作流节点编排、修订历史与 AI Diff 调优 |
| 运行记录 | `/advisor/runs` | AI 工作流运行轨迹审计与画布回放 |
| 告警与观测 | `/ops/monitoring` | 集中查看系统告警、BGP 事故/异常/观测事件与采集器健康度 |
| AI 基础设施 | `/ai` | 模型供应商与 WebSearch/OCR 工具凭据配置 |
| AI | `/ai` | 模型供应商与 WebSearch/OCR 工具凭据配置 |
| 智能星球内容 | `/earth-content` | 电视直播、国界精度、底图和图层资源入口 |
| 采集管理 | `/collection-management` | 采集器、采集调度、采集历史入口 |
| 系统日志 | `/logs` | 通常仅 super admin 可见 |
@@ -147,21 +146,21 @@
- `累计入库`、`近 24h`、`近 1h` 和 `唯一 MMSI` 用于判断历史采集量
- 如果显示 `disconnected` 且有最近错误,可以点击 `重连`
## 配置 AI 基础设施与使用 AI 参谋
## 配置 AI 与使用 AI 参谋
`/ai?section=integrations`(**AI 基础设施**)用于维护模型供应商与外部工具凭据,`/advisor/playground`、`/advisor/workflows` 与 `/advisor/runs`(**AI 参谋**)负责纯对话调试、节点编排与审计:
`/ai?section=integrations`(**AI**)用于维护模型供应商与外部工具凭据,`/advisor/playground`、`/advisor/workflows` 与 `/advisor/runs`(**AI 参谋**)负责纯对话调试、节点编排与审计:
- **AI 基础设施 (`/ai`)**:
- `模型供应商`:默认 LLM provider、模型、Base URL、API Key、本地 `aiprovider` 代理和连接测试;未填 Key 的主流官方供应商(含 GLM、Meta、Gemini、Grok、DeepSeek、OpenAI、MiniMax 等)可免 Key 刷新公共聚合目录并按已选优先/最近使用排序、默认折叠展示 6 项
- **AI (`/ai`)**:
- `模型供应商`:默认 LLM provider、模型、Base URL、API Key、本地 `aiprovider` 代理和连接测试;未填 Key 的主流官方供应商(含 GLM、Meta、Gemini、Grok、DeepSeek、OpenAI、MiniMax 等)可免 Key 刷新公共聚合目录并按「已选优先 + 最近使用」排序,默认折叠展示 6 项,下拉厂商/关键词常驻可见并支持一键展开查看更多。
- `工具调用`:通过下拉菜单选择具体工具,当前支持 WebSearch(含免 Key 的 SearXNG)和 OCR
- **AI 参谋 (`/advisor/*`)**:
- `Playground` (`/advisor/playground`):纯净对话调试台,默认绑定 `default.general` 通用参谋工作流;支持 `/bgp-brief`、`/alerts-brief`、`/situational-brief`、`/locate` 等斜杠简报/定位指令,并自带 **客户端本地上下文抽屉**(直读同源 Earth IndexedDB 会话与浏览器 `localStorage`,也可粘贴桌面端导出的 `planet.earth_context.v1` JSON;只有显式点击「保存为工作流样本」才会写入工作流测试样本表)
- `工作流与节点` (`/advisor/workflows`):基于 `@xyflow/react` 可视化编排 9 条内建工作流(`default.general`、`earth.copilot.chat`、`earth.news.enrich`、`earth.news.analysis`、`location.resolve_unknown`、`ops.bgp_brief`、`ops.alerts_brief`、`ops.situational_alerts_brief`、`collection.mapping_and_guide`),编辑各节点提示词、白名单工具、模型覆盖与护栏,支持草稿、发布回滚、运行轨迹画布回放以及「AI Diff 自动调优提案」
- `运行记录` (`/advisor/runs`):审计每次参谋对话、地球 Copilot 与位置 Agent 的执行链路并一键跳至画布回放
- `Playground` (`/advisor/playground`):统一多模态对话调试台(支持图片、视频采样帧、外链与 JSON,以及 Markdown 渲染),默认绑定 `default.general` 通用参谋工作流;支持 `/bgp-brief`、`/alerts-brief`、`/situational-brief`、`/locate` 等斜杠简报/定位指令,并提供客户端本地上下文抽屉(直读同源 Earth IndexedDB 会话与浏览器 `localStorage`,或自动识别粘贴的 `planet.earth_context.v1` JSON;只有显式点击「保存为工作流样本」才会写入测试样本表)。每条助手回复右下角支持 👍/👎 反馈并补充原因备注,用于持续改进工作流质量。
- `工作流与节点` (`/advisor/workflows`):基于 `@xyflow/react` 可视化编排 10 条内建工作流(含 `meta.workflow_evolver` 自进化元引擎)及自定义工作流,编辑提示词、白名单工具、地球交互绑定与护栏,支持草稿/发布/回滚。顶栏「自进化策略」可配置全局自动优化与元进化模式(关闭 / 自动草稿 / 自动发布 + 5 次运行灰度回滚)及近期 50 条进化台账;检查器「调优」页签提供 0-Token 健康度诊断、活跃模型切换漂移提示、工作流防自动改锁定开关、一键优化/适配模型/孵化新工作流以及样本 A/B 对照。
- `运行记录` (`/advisor/runs`):支持按工作流、运行状态与赞踩反馈筛选,审计模型、耗时、版本号、轨迹并一键跳转画布回放或带记录调优。
旧路径 `/ai/prompts`、`/ai/playground`、`/playground` 以及旧的 prompts / playground 查询参数会自动重定向到新的 `AI 参谋` 页面。
> 桌面客户端内置录屏能力(`12a478a9`):在桌面端菜单栏「录屏 / Screen Recording」中可使用 `CmdOrCtrl+Shift+F9` 启停录屏,支持勾选「录制声音」与「隐藏光标 / 自定义光标浮层」,录制完成后自动保存至系统 `Videos/Planet Earth/` 并提供一键打开目录。Windows 本地安装约定位于 `C:\Users\qklov\AppData\Local\Planet\current` 与 `releases\`。
> 桌面客户端内置录屏能力:在桌面端菜单栏「录屏 / Screen Recording」中可使用 `CmdOrCtrl+Shift+F9` 启停无边框主画面录屏(支持原生 Alt 菜单),支持勾选「录制声音」与「隐藏光标 / 自定义光标浮层」,录制完成后自动保存至系统 `Videos/Planet Earth/` 并提供一键打开目录。Windows 本地安装约定位于 `C:\Users\qklov\AppData\Local\Planet\current` 与 `releases\`。
### 模型供应商
@@ -190,7 +189,7 @@ Base URL 输入框尾端的插头图标会触发轻量连接测试:检查代
进入 `/advisor/workflows` 选择具体工作流与节点,可在右侧检查器修改 `System Prompt`、`Prompt`、授权工具白名单与护栏 JSON;保存为草稿可先在 Playground 验证,点击「发布生效」即写入不可变版本历史并支持一键回滚。
旧的 `/bgp`、`/alerts/system`、`/alerts/bgp` 与 `/alerts/situational` 已合并收敛为 `/ops/monitoring`(**运维与配置 → 告警与观测**),访问旧链接会自动跳转。
旧的 `/ops/monitoring`、`/bgp`、`/alerts/system`、`/alerts/bgp` 与 `/alerts/situational` 已收口进 **AI 参谋**(`/advisor/playground` `/bgp-brief` 与 `/alerts-brief`),原实时 BGP 图层直接在 `/earth` 查看;访问旧链接会自动跳转。
## 系统设置
@@ -256,7 +255,6 @@ Base URL 输入框尾端的插头图标会触发轻量连接测试:检查代
- `/datasources`:数据源目录。`内置源` 支持按产品域、层级、启用状态、最近执行状态、是否已有采集数据和关键词筛选;未勾选时主按钮显示“触发全部”,勾选多行后会变成“触发已选 N”,并只提交所选数据源。右上角队列按钮空态显示队列图标,有任务时显示纯圆环总进度;点击后打开队列浮层,按运行中、完成、失败和跳过分组,失败项可重试,完成项可跳到详情或按任务编号打开系统日志。`实时源` 面向 AISStream / WebSocket 长连接,展示连接健康、累计入库、时间窗统计和启动 / 停止 / 重连操作。接口、凭证、请求头的编辑统一在 `/collection-management` 的"采集器"。
- `/data`:采集后数据表,适合排查"数据是否已经进入系统"、"更新时间是否符合预期"、"某个数据源是否产出有效记录"
- `/ops/monitoring`:统一的运维告警与 BGP 观测台,包含系统告警、BGP 事故、BGP 异常、BGP 采集器(含位置采集)与 BGP 观测事件(原 `/bgp`、`/alerts/*` 自动跳转至此)
## AI 参谋(Playground、工作流与运行审计)
+3
View File
@@ -493,6 +493,9 @@ python3 scripts/release_publish.py --tag "$(git describe --tags --exact-match)"
上线失败时,服务恢复上一版的镜像摘要和热更新清单,保留数据库里的业务写入。事务记录在重启后仍可恢复。失败的版本会暂停自动重试,较新的正式版仍可上线。`/var/lib/planet-release-deploy/last-success/` 和 `last-failed/` 分别保留最近一次成功或失败切换前的数据库备份和版本信息。确认故障已排除后可以单独重试该版本。
> [!WARNING]
> **宿主机文件不会随发版镜像自动更新(发版 ≠ 已部署)**:`planet-release-deploy.timer` 只按 OCI manifest 替换应用容器镜像与发布 Earth 热更包,**不会**自动覆盖宿主机上的 `/usr/local/lib/planet-release/production_deploy.py`、`deploy/systemd/*`、`/opt/planet/current/compose*.yaml`(如新增环境变量或挂载)以及宿主机 Nginx 配置。每次改动这些文件并要求“部署 / 发版部署 / 上线”时,务必先按下方安装命令同步宿主机对应文件,再执行 `--retry` 或重启服务,否则旧版 `production_deploy.py` 可能按过时验收规则(例如新增鉴权后返回 `401`)误判失败并自动回退;完成后还应校验目标容器镜像摘要与公网 `/health/ready`、`/api/v1/client/update-manifest` 版本号。
```bash
systemctl list-timers planet-release-deploy.timer
journalctl -u planet-release-deploy.service -n 40
+1 -1
View File
@@ -38,7 +38,7 @@
2. `/ai?section=integrations`:填一个 LLM provider(例如 `minimax` / `openai`)、模型名、Base URL、API Key,点 Base URL 末端的插头检查模型目录;未填写 Key 的官方主流供应商(含 GLM、Meta、Gemini、Grok、DeepSeek、OpenAI、MiniMax 等)会自动回退公共聚合目录,目录按「已选优先 + 最近使用 + 发布时间」排序并支持 6 项折叠预览;实际生成前往 `/advisor/playground` 验证,提示词与工具流可在 `/advisor/workflows` 编排。WebSearch / OCR 工具可在 `/ai?section=tools` 配置
3. `/earth-content?section=brand`:在“品牌标识”里维护智能星球的 Logo 和标题图;对应地址字段内的“上传”按钮支持选择文件,也支持把图片直接拖到字段上,保存后会应用到智能星球 HUD
4. `/datasources` 或 `/data`:看采集器是否已经产出数据。有限采集器看 `/datasources -> 内置源`,不勾选时点“触发全部”,勾选后主按钮会变成“触发已选 N”;右上角队列按钮可查看进度。AISStream / WebSocket 长连接看 `/datasources -> 实时源` 的健康状态和计数
5. `/ops/monitoring`:集中查看系统告警、BGP 事故/异常/观测事件与采集器健康状态
5. `/advisor/playground`:与 AI 参谋对话调试或输入 `/bgp-brief`、`/alerts-brief` 查看 BGP 态势与采集健康简报(原始 BGP 图层直接在 `/earth` 查看)
6. `/users`(仅 `super_admin`):根据需要给同事开账号或调权限组(如外部 UE5/API 集成可在 `/settings` 生成长期 `X-API-Key` 或分配 `api_access` 权限组)
## 4. 打开智能星球