From cc56630975deb43040aa19e7cfadca17f7a8e839 Mon Sep 17 00:00:00 2001 From: zjhong Date: Sun, 8 Nov 2026 13:03:14 +0800 Subject: [PATCH 1/2] docs: update Home Assistant plugin release status --- .../plugin-release-installation.md | 106 ++++++++++++++++++ .../plugin-release-installation.md | 106 ++++++++++++++++++ 2 files changed, 212 insertions(+) create mode 100644 docs/developer-guide/plugin-release-installation.md create mode 100644 i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md diff --git a/docs/developer-guide/plugin-release-installation.md b/docs/developer-guide/plugin-release-installation.md new file mode 100644 index 000000000..606d802b9 --- /dev/null +++ b/docs/developer-guide/plugin-release-installation.md @@ -0,0 +1,106 @@ +--- +sidebar_position: 21 +--- + +# Plugin Development, Release, and Installation + +This guide explains the current ThingsPanel paths for device-access plugins, third-party service plugins, and notification plugins. These plugin types have different contracts and management screens. Registering a plugin in a platform does not automatically publish it in the public resource center. + +> **Home Assistant scope:** The Home Assistant item described here is a **ThingsPanel third-party service connector**. It is not the Home Assistant website, an add-on installed inside Home Assistant, or a Home Assistant app-store integration. You must already have a Home Assistant server. The connector runs with ThingsPanel and connects to that existing server after a tenant enters its HA URL and token in ThingsPanel. + +```mermaid +flowchart LR + R[ThingsPanel resource page] -->|browser link| TP[Your ThingsPanel platform] + TP -->|verify and install| Agent[ThingsPanel host Agent] + Agent --> Connector[Home Assistant service connector] + Tenant[Tenant user] -->|HA URL and token| TP + Connector -->|connect to existing HA| HA[Home Assistant server] +``` + +The user stays in ThingsPanel for installation and tenant configuration. The connector does not install or configure Home Assistant itself. + +## 1. Choose the plugin type first + +| Type | What it does | Platform management path | Public listing | +| --- | --- | --- | --- | +| Device-access protocol plugin | Connects devices using a protocol or protocol-specific service | The existing plugin-management page distinguishes protocol services (`service_type=1`) from service plugins (`service_type=2`). Follow the selected protocol plugin's own SDK and runtime contract. | Registration is not a public market listing. The current release path is reviewed and managed separately. | +| Third-party service plugin | Connects ThingsPanel to an external service, such as Home Assistant | Install the signed plugin catalog and artifact with the platform installer. A platform super administrator installs it; each tenant configures its own service access point afterward. | The current Home Assistant resource page is descriptive and links to an installer page. It is not an artifact repository or an author upload form. | +| Notification plugin | Adapts the notification core to an email, SMS, or messaging provider | Use the notification plugin contract. A system super administrator registers the plugin, manages provider accounts, and grants tenant access. | Publishing source code does not register or distribute the plugin in a ThingsPanel instance. See the [notification plugin guide](./notification-plugin.md) and [notification administration guide](../user-guide/system-admin-operation-manual/system-managment/notice_settings.md). | + +The legacy [visual-plugin publishing guide](./developing-plug-in/visualPublishPlugin.md) is marked deprecated and incompatible with the current version. Do not use it as the release procedure for device-access, third-party service, or notification plugins. + +## 2. What “publish to the market” means today + +There are three separate operations: + +1. **Build and release a plugin:** produce a versioned package or container image and its metadata. +2. **Register it in a ThingsPanel instance:** add a protocol/service plugin to the platform's plugin management, or register a notification plugin in its own catalog. Granting access and configuring credentials are separate operations. +3. **List it in the public resource center:** have the resource-center maintainer review and publish a page or item that points to the intended release and installation path. + +ThingsPanel currently has no single author-facing upload flow that accepts all three plugin types and automatically performs these operations. A public source repository, an entry in the platform plugin list, and a public market listing are not interchangeable. + +## 3. From plugin development to release: the current Home Assistant path + +Release is more than pushing source code to GitHub. This section separates the source, signed artifacts, host update, platform installation, and resource-center listing. It describes the current published installer and plugin artifacts, then calls out the platform and clean-host checks that remain open. + +### 3.1 Plugin developer: submit reproducible source + +1. Implement the ThingsPanel plugin contract in the connector repository, including configuration fields, startup parameters, health checks, and relevant tests. The Home Assistant connector runs on the ThingsPanel host. A tenant enters the HA URL and credentials later in that tenant's ThingsPanel access point. +2. Pin dependencies to a published SDK version. Do not build public artifacts with a local `replace`, uncommitted files, or an unpublished SDK commit. +3. Submit and review the changes. Record the full connector source commit, semantic version, and SDK tag/commit. A public build must use these immutable revisions. + +### 3.2 ThingsPanel release owner: build and sign candidate artifacts + +The release artifacts were built by `.github/workflows/ha-plugin-candidate.yml`. An authorized release owner starts it manually in GitHub Actions and supplies the plugin version, full Home Assistant source commit, SDK tag, and full SDK commit. The workflow checks that the SDK tag resolves to that commit, that the connector checkout is clean, and that `go.mod` uses the published SDK. It then builds the Agent and connector image for `linux/amd64` and `linux/arm64`. + +Each architecture's candidate contains the Agent binary, Docker image archive, catalog JSON, and signature. The catalog records the plugin/image version, immutable image ID, archive SHA-256, Agent SHA-256, target architecture, and source/SDK/installer commits. CI signs the catalog with the repository secret `TP_PLUGIN_CATALOG_SIGNING_KEY` and verifies it against the public key independently pinned in reviewed installer source. Never download, print, or place the private signing key in the connector repository, artifacts, public pages, or chat. + +**Verified current state:** version `1.0.0` is available in the public plugin-only GitHub Release [`plugin-ha-v1.0.0`](https://github.com/ThingsPanel/thingspanel-installer/releases/tag/plugin-ha-v1.0.0). The matching signed `linux/amd64` and `linux/arm64` catalogs are public at `https://install.thingspanel.io/plugins/`; the catalog signatures, helper SHA-256 pins, and four Release asset digests were fetched from the public URLs and verified. The public installer Pages source is branch `codex/ha-plugin-public-site-20261108` at commit `72946f1`. This proves public, integrity-checked distribution; it does not prove installation on an arbitrary clean host or the complete platform Resource Center flow. + +### 3.3 Installer maintainer: connect trusted delivery to install/upgrade + +The public installer works as follows: the official install or upgrade flow first updates the reviewed updater. The updater downloads required helper scripts from the installer Pages site and checks them against SHA-256 pins embedded in updater source. Its trust root comes from reviewed installer code and is fixed independently from the catalog; users should not download a key from the catalog or type one in. The installer then fetches the current architecture-specific catalog from `https://install.thingspanel.io/plugins/catalog-linux-{amd64,arm64}.json` and its `.sig`, then downloads the catalog-selected Agent and HA image archive from the fixed ThingsPanel GitHub Release base. + +The installer verifies the catalog signature, Agent/image archive digests, target architecture, and image ID before loading the image and starting the managed Agent. Clicking an install link in a browser does not transfer or execute these files. An existing host must first run a supported install/upgrade flow that includes the installer changes; opening a new web link alone does not update its Agent. + +**Verified current state:** the public install/upgrade flow downloads the pinned helper scripts and architecture-specific signed catalog, then verifies the selected Agent and image archive. The `plugin-ha-v1.0.0` artifacts were staged from public URLs for both architectures and their digests matched the signed catalogs. An isolated runtime smoke using the public arm64 bundle passed Agent catalog, prepare, grant, activate, health, renew, and revoke calls. A full clean-host install/upgrade and platform UI acceptance remain pending; do not infer them from this smoke. + +### 3.4 Platform super administrator, tenant, and resource-center maintainer + +1. After the official installer update has deployed and started the Agent, a platform system super administrator (`SYS_ADMIN`) signs into ThingsPanel and opens `/apply/plugin?tab=install&plugin=homeassistant`. They select and install the connector from the Agent's verified catalog. No HA URL or token is entered here. +2. A tenant user signs into their tenant, opens **Device → Third-Party Integration** (`/device/integration`), creates their own HA service access point, and enters the HA URL and tenant-owned token. They then select entities using the existing flow. Plugin installation is platform-wide; access points and credentials are isolated by tenant. +3. The resource-center maintainer reviews and maintains the public descriptive page. It may link to an installation page on the user's chosen ThingsPanel instance, but that link is ordinary browser navigation. It does not carry the image, bypass sign-in or `SYS_ADMIN` authorization, or install/upgrade the Agent on the server. + +A successful browser redirect, Actions artifact, or resource-center page alone does not prove a formal plugin release. The fixed source commit, signed catalog, public-key fingerprint, Agent/image digests, permanent download location, usable installer version, and actual installation result must all refer to the same release and pass acceptance before it is announced publicly. + +## 4. Home Assistant installation and tenant setup + +The current intended roles are: + +1. After the host has completed a supported install/upgrade flow that includes the official installer update, and the architecture-matched trusted catalog, image, and Agent are available, a platform **system super administrator (`SYS_ADMIN`)** signs into that ThingsPanel instance, opens the plugin installation page, and installs Home Assistant. Installation does not ask for a Home Assistant URL or token. A tenant user cannot perform this platform installation. Opening the resource link alone does not update an older host's Agent. +2. A tenant user signs into that tenant and opens **Device → Third-Party Integration** (`/device/integration`). The tenant creates its own Home Assistant access point and enters the reachable HA base URL and its own long-lived access token there. +3. The tenant selects the entities it needs and completes the existing device onboarding flow. Credentials belong to that tenant's access-point configuration and must not be placed in the public plugin package, R page, logs, or documentation. + +The plugin process being healthy does not prove that a tenant's HA URL or token works. Keep plugin health and each tenant access point's connection state distinct. + +## 5. How the resource-center button works + +A link such as: + +```text +https:///apply/plugin?tab=install&plugin=homeassistant +``` + +is ordinary browser navigation to the specified ThingsPanel host. The `tab=install` query selects the install tab, and `plugin=homeassistant` asks the install page to select and open that plugin when it appears in the host's catalog. The page requires sign-in, and the installation action requires platform `SYS_ADMIN`. The host must already run a supported installer version with its reviewed trust-root pin and have the architecture-matched signed catalog, image, and Agent available. The platform and its Agent then perform authorization, signature checks, and installation. + +The link itself does not transfer a plugin image, grant platform permissions, update the host Agent, or install anything. A link to `127.0.0.1` or `localhost` points to the computer running the browser. That is useful only when ThingsPanel is running on that same computer. For a public listing, use the intended reachable platform/install flow; do not publish a developer's loopback URL as a universal installer. + +## 6. Current Home Assistant release status + +The [Home Assistant Resource Center page](https://r.thingspanel.cn/marketplace/plugins/homeassistant) is a public description and installer deep link for the ThingsPanel third-party service plugin. It is not a Home Assistant app or an installer that runs on the visitor's computer. Its current public copy accurately says that users enter their own ThingsPanel platform address and sign in as that platform's super administrator. + +**Public distribution is available:** plugin version `1.0.0` is published as the plugin-only GitHub Release [`plugin-ha-v1.0.0`](https://github.com/ThingsPanel/thingspanel-installer/releases/tag/plugin-ha-v1.0.0), with signed catalogs and architecture-matched assets for Linux amd64 and arm64. Public catalog signatures, helper pins, artifact digests, public URL staging, and an isolated arm64 runtime lifecycle smoke have been verified. + +**Acceptance still open:** no clean new ThingsPanel installation was completed; the live Resource Center to real platform installation flow was not exercised; no production platform backend or Home Assistant endpoint was connected. Device telemetry, commands, and tenant HA connectivity are outside the completed smoke. Do not call those scenarios verified or require them as a prerequisite for starting the planned manual installation test. + +For manual testing, record the ThingsPanel revision and installer/Agent version, host architecture, whether the test is a clean install or upgrade, platform super-administrator install result, plugin health, and tenant access-point result as separate observations. Keep tenant HA credentials out of screenshots and logs. A healthy plugin alone does not prove a tenant connection. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md new file mode 100644 index 000000000..05201a3c2 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md @@ -0,0 +1,106 @@ +--- +sidebar_position: 21 +--- + +# 插件开发、发布与安装全流程 + +本文说明 ThingsPanel 当前对设备接入插件、第三方服务插件和通知插件的处理方式。它们使用不同的契约和管理入口。在平台中登记插件,不代表它已发布到公开资源中心。 + +> **Home Assistant 插件的准确含义:**这里说的 Home Assistant 插件,是 **ThingsPanel 的 Home Assistant 三方接入服务插件**。它不是 Home Assistant 网站,不是安装在 HA 内部的 Add-on,也不是让用户跳转到 HA 商店安装的集成。用户需要先有一个正在运行、可被 ThingsPanel 访问的 Home Assistant 服务;插件运行在 ThingsPanel 一侧。租户之后在 ThingsPanel 接入点里填写自己的 HA 地址和令牌。 + +```mermaid +flowchart LR + R[ThingsPanel 资源页] -->|普通网页跳转| TP[用户自己的 ThingsPanel] + TP -->|验签并安装| Agent[ThingsPanel 主机 Agent] + Agent --> Connector[Home Assistant 三方接入插件] + Tenant[租户用户] -->|HA 地址和令牌| TP + Connector -->|连接已有 HA 服务| HA[Home Assistant 服务] +``` + +安装和租户配置都在 ThingsPanel 中完成。该插件不会替用户安装或配置 Home Assistant 本身。 + +## 1. 先确定插件类型 + +| 类型 | 用途 | 平台管理入口 | 是否自动公开上架 | +| --- | --- | --- | --- | +| 设备接入协议插件 | 通过某种协议或协议服务连接设备 | 现有插件管理页面区分协议服务(`service_type=1`)和服务插件(`service_type=2`)。按所选协议插件自己的 SDK 和运行契约开发。 | 平台登记不等于公开市场上架;公开发布仍需单独审核和维护条目。 | +| 第三方服务插件 | 连接 ThingsPanel 与外部服务,例如 Home Assistant | 由平台安装器安装经过签名的插件目录和制品。平台超级管理员负责安装;每个租户随后配置自己的服务接入点。 | 当前 Home Assistant 资源页用于介绍和跳转,不是制品仓库,也不是作者上传入口。 | +| 通知插件 | 将通知核心适配到邮件、短信或消息服务商 | 使用独立通知插件契约。系统超级管理员登记插件、管理服务商账号并授权租户。 | 发布源码不等于已登记或分发到 ThingsPanel 实例。参见[通知插件开发指南](./notification-plugin.md)和[通知服务与插件管理](../user-guide/system-admin-operation-manual/system-managment/notice_settings.md)。 | + +旧的[可视化插件发布指南](./developing-plug-in/visualPublishPlugin.md)已标为弃用且不兼容当前版本,不能作为设备接入、第三方服务或通知插件的发布流程。 + +## 2. 当前“发布到市场”具体包含什么 + +以下是三个不同动作: + +1. **构建并发布插件:**产出带版本号的安装包或容器镜像及其元数据。 +2. **登记到 ThingsPanel 实例:**协议/服务插件在平台插件管理中登记;通知插件在自己的插件目录登记。授权租户和配置凭据是另外的步骤。 +3. **在公开资源中心上架:**资源中心维护人员审核后,发布介绍条目,并指向对应版本和安装入口。 + +当前没有一个面向作者、能接收所有类型插件并自动完成以上三项的统一上传入口。公开源码仓库、平台中的插件登记和资源中心公开条目不能相互替代。 + +## 3. 插件从开发到发布:Home Assistant 的实际操作链 + +发布不是“把源码推到 GitHub”一个动作。下面按参与人说明源码、签名制品、主机更新、平台安装和资源中心页面的先后关系。本文描述当前已公开的安装器和插件制品,并单独列出仍待完成的平台端与干净主机验收。 + +### 3.1 插件开发者:提交可复现的源码 + +1. 在插件自己的仓库实现 ThingsPanel 插件契约,补齐配置字段、启动参数、健康检查和必要测试。HA 连接器是运行在 ThingsPanel 主机上的三方服务插件,HA 地址和认证信息由租户稍后在 ThingsPanel 接入点填写。 +2. 将依赖固定到已发布的 SDK 版本;不能用本机 `replace`、未提交文件或未发布的 SDK 提交来构建公共制品。 +3. 提交变更并通过代码审查。记录插件源代码完整 commit、插件语义版本和使用的 SDK tag/commit。发布构建必须从这组不可变提交产生。 + +### 3.2 ThingsPanel 发布负责人:构建并签名候选制品 + +正式发布制品由 `.github/workflows/ha-plugin-candidate.yml` 构建,由有权限的发布负责人在 GitHub Actions 手动启动,填写:插件版本、HA 源码完整 commit、SDK tag、SDK 对应完整 commit。工作流会校验 SDK tag 指向的 commit 与输入一致,要求 HA 工作区干净且 `go.mod` 使用该已发布 SDK,然后针对 `linux/amd64` 和 `linux/arm64` 分别构建 Agent 和 HA 容器镜像。 + +每个架构产物包含 Agent、Docker 镜像归档、catalog JSON 和签名。catalog 记录插件/镜像版本、镜像 ID、镜像归档 SHA-256、Agent SHA-256、目标架构及源代码/SDK/安装器 commit。CI 使用仓库受控的 `TP_PLUGIN_CATALOG_SIGNING_KEY` 对 catalog 签名,并用安装器中独立固定的公钥验签。签名私钥不得下载、打印或放进插件仓库、制品、公开页面或聊天。 + +**当前已核实:**版本 `1.0.0` 已发布在公开的插件专用 GitHub Release [`plugin-ha-v1.0.0`](https://github.com/ThingsPanel/thingspanel-installer/releases/tag/plugin-ha-v1.0.0)。匹配的 `linux/amd64` 和 `linux/arm64` 签名 catalog 已在 `https://install.thingspanel.io/plugins/` 公开。我们从公网 URL 下载并验证了 catalog 签名、辅助脚本 SHA-256 固定值和四个 Release 制品摘要。公开安装器 Pages 使用分支 `codex/ha-plugin-public-site-20261108`,提交 `72946f1`。这证明公开分发及完整性校验可用,不代表任意干净主机安装或资源中心到平台的完整链路已验收。 + +### 3.3 安装器维护者:把受信分发接入安装/升级 + +公开安装器的工作流程是:官方安装或升级流程先更新已审查的 updater;updater 使用源码内置的 SHA-256 pins 下载并校验必要辅助脚本;信任根来自经过审查的安装器代码(并在 catalog 之外固定),用户不需要从 catalog 自行下载或输入公钥。随后安装器从 `https://install.thingspanel.io/plugins/catalog-linux-{amd64,arm64}.json` 及对应 `.sig` 取出当前主机架构 catalog,并从固定的 ThingsPanel GitHub Release 地址下载 catalog 指定的 Agent 与 HA 镜像归档。 + +安装器先验证 catalog 签名,再核对 Agent/镜像归档摘要、目标机器架构和镜像 ID;只有校验通过才加载镜像、启动受管 Agent。租户/超管在网页点击按钮不会直接传输或执行这些文件。已有主机也要先运行包含该安装器改动的受支持安装/升级流程;仅打开新网页链接不会替旧主机更新 Agent。 + +**当前已核实:**公开安装/升级链路可下载固定摘要辅助脚本和架构对应的签名 catalog,并校验选中的 Agent 与镜像归档。双架构制品均从公网 URL 分发并与签名 catalog 摘要一致;使用公网 arm64 bundle 的隔离运行 smoke 已通过 Agent catalog、prepare、grant、activate、health、renew 和 revoke 调用。完整干净主机安装/升级及平台 UI 验收仍待完成,不能从该 smoke 推断通过。 + +### 3.4 平台系统超级管理员、租户和资源中心维护者 + +1. 安装器正式更新部署并启动 Agent 后,平台系统超级管理员(`SYS_ADMIN`)登录 ThingsPanel,打开 `/apply/plugin?tab=install&plugin=homeassistant`,从 Agent 提供的已验签 catalog 选中并安装连接器。此处不填 HA 地址或令牌。 +2. 租户用户登录自己的租户,在**设备 → 三方接入**(`/device/integration`)创建自己的 HA 服务接入点,填写 HA 地址和租户自己的令牌,再按现有流程选择实体。插件安装是平台范围能力;接入点和凭据按租户隔离。 +3. 资源中心维护者审核并维护公开介绍页。页面可以链接到用户指定 ThingsPanel 实例的安装网页,但链接只是普通浏览器导航;页面不会带来镜像,不绕过登录/`SYS_ADMIN` 权限,也不会替服务器安装或升级 Agent。 + +成功的网页跳转、Actions artifact 或资源中心介绍页都不能单独证明插件正式发布。只有固定版本的 source commit、签名 catalog、公钥指纹、Agent/镜像摘要、永久下载位置、可用安装器版本和实际安装结果相互对应,并通过验收,才可对外宣布发布。 + +## 4. Home Assistant 安装与租户配置 + +当前预期流程如下: + +1. 主机已通过包含正式安装器更新的受支持安装/升级流程,并且对应架构的可信 catalog、镜像和 Agent 已可用后,平台**系统超级管理员(`SYS_ADMIN`)**登录该 ThingsPanel 实例,打开插件安装页并安装 Home Assistant。安装时不填写 HA 地址或令牌;租户用户不能执行这项平台安装。仅从资源页点进来不会更新老主机上的 Agent。 +2. 租户用户登录所属租户,打开**设备 → 三方接入**(`/device/integration`),创建自己的 Home Assistant 接入点,并填写平台可访问的 HA 地址和该租户自己的长期访问令牌。 +3. 租户选择需要的实体,并通过现有设备接入流程完成配置。认证信息属于该租户的接入点,不应放进公开插件包、R 页面、日志或文档。 + +插件进程健康不代表某个租户的 HA 地址和令牌有效。插件健康状态应与各租户接入点的连接状态分别展示。 + +## 5. 资源中心按钮如何工作 + +例如下面这个链接: + +```text +https://<用户可访问的 ThingsPanel 主机>/apply/plugin?tab=install&plugin=homeassistant +``` + +它只是跳转到指定 ThingsPanel 主机的普通网页链接。`tab=install` 参数让插件页打开“安装”标签,`plugin=homeassistant` 参数则让安装页在该主机 catalog 中找到插件后自动选中并打开安装抽屉。页面需要登录,安装操作要求平台 `SYS_ADMIN`。主机还必须先运行带有经审查信任根 pin 的受支持安装器版本,并能访问匹配架构的签名 catalog、Agent 和镜像。之后平台和 Agent 执行授权、签名校验和插件安装。 + +链接本身不会传送插件镜像、授予平台权限、更新主机 Agent 或执行安装。指向 `127.0.0.1` 或 `localhost` 的链接会访问正在打开浏览器的那台电脑;只有 ThingsPanel 也运行在同一台电脑时才适合本机演示。公开条目应使用预期的可访问平台/安装流程,不能把开发者的回环地址作为通用安装链接。 + +## 6. 当前 Home Assistant 发布状态 + +[Home Assistant 资源中心页面](https://r.thingspanel.cn/marketplace/plugins/homeassistant)是 ThingsPanel 三方服务插件的公开介绍和安装跳转页,不是 Home Assistant 应用,也不会在访问者电脑上运行安装器。当前页面文案已准确说明:用户填写自己的 ThingsPanel 平台地址,并以该平台超级管理员身份登录。 + +**公开分发已可用:**插件版本 `1.0.0` 已发布为插件专用 GitHub Release [`plugin-ha-v1.0.0`](https://github.com/ThingsPanel/thingspanel-installer/releases/tag/plugin-ha-v1.0.0),提供 Linux amd64 和 arm64 的签名 catalog 与匹配制品。公网 catalog 签名、辅助脚本固定摘要、制品摘要、公网下载暂存以及隔离 arm64 runtime 生命周期 smoke 均已验证。 + +**仍待验收:**尚未完成全新的 ThingsPanel 干净安装;没有实际操作线上资源中心跳转到真实平台的完整安装流程;没有连接生产平台后端或 Home Assistant 端点。设备遥测、命令和租户 HA 连通性不属于已完成 smoke 的范围。不能把这些场景说成已验证,也无需把它们设为启动本轮手工安装验收的前置条件。 + +手工测试时分别记录 ThingsPanel revision、安装器/Agent 版本、主机架构、干净安装或升级、平台超级管理员安装结果、插件健康状态、租户接入点结果。截图和日志不得包含租户 HA 凭据。插件健康不等于租户连接成功。 From 15b6e683b3e8de5fd6abcddcfb190822f08fd45c Mon Sep 17 00:00:00 2001 From: zjhong Date: Sun, 8 Nov 2026 14:12:52 +0800 Subject: [PATCH 2/2] docs: record isolated HA UI installation acceptance --- docs/developer-guide/plugin-release-installation.md | 8 ++++---- .../developer-guide/plugin-release-installation.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/developer-guide/plugin-release-installation.md b/docs/developer-guide/plugin-release-installation.md index 606d802b9..1f8282abd 100644 --- a/docs/developer-guide/plugin-release-installation.md +++ b/docs/developer-guide/plugin-release-installation.md @@ -63,7 +63,7 @@ The public installer works as follows: the official install or upgrade flow firs The installer verifies the catalog signature, Agent/image archive digests, target architecture, and image ID before loading the image and starting the managed Agent. Clicking an install link in a browser does not transfer or execute these files. An existing host must first run a supported install/upgrade flow that includes the installer changes; opening a new web link alone does not update its Agent. -**Verified current state:** the public install/upgrade flow downloads the pinned helper scripts and architecture-specific signed catalog, then verifies the selected Agent and image archive. The `plugin-ha-v1.0.0` artifacts were staged from public URLs for both architectures and their digests matched the signed catalogs. An isolated runtime smoke using the public arm64 bundle passed Agent catalog, prepare, grant, activate, health, renew, and revoke calls. A full clean-host install/upgrade and platform UI acceptance remain pending; do not infer them from this smoke. +**Verified current state:** the public install/upgrade flow downloads the pinned helper scripts and architecture-specific signed catalog, then verifies the selected Agent and image archive. The `plugin-ha-v1.0.0` artifacts were staged from public URLs for both architectures and their digests matched the signed catalogs. An isolated runtime smoke using the public arm64 bundle passed Agent catalog, prepare, grant, activate, health, renew, and revoke calls. A separate isolated-platform UI acceptance has since passed: starting from the Resource Center page, the tester opened the target platform and installed the public arm64 `1.0.0` plugin; the install row reached `enabled` and health `ok`. This was not a clean-host test: before UI acceptance, the existing isolated stack required manual PostgreSQL/Agent/proxy recovery and the public signed Agent and image had to be restored/loaded. The detailed operator report is retained with the acceptance evidence. Clean-host installation and upgrade acceptance remain open. ### 3.4 Platform super administrator, tenant, and resource-center maintainer @@ -97,10 +97,10 @@ The link itself does not transfer a plugin image, grant platform permissions, up ## 6. Current Home Assistant release status -The [Home Assistant Resource Center page](https://r.thingspanel.cn/marketplace/plugins/homeassistant) is a public description and installer deep link for the ThingsPanel third-party service plugin. It is not a Home Assistant app or an installer that runs on the visitor's computer. Its current public copy accurately says that users enter their own ThingsPanel platform address and sign in as that platform's super administrator. +The [Home Assistant Resource Center page](https://r.thingspanel.cn/marketplace/plugins/homeassistant) is a public description and installer entry for the ThingsPanel third-party service plugin. The updated page lets a user enter a ThingsPanel address, optionally remember it, and open that platform’s installer page. It is not a Home Assistant app or an installer that runs on the visitor’s computer. The target platform still requires sign-in and platform super-administrator authorization. **Public distribution is available:** plugin version `1.0.0` is published as the plugin-only GitHub Release [`plugin-ha-v1.0.0`](https://github.com/ThingsPanel/thingspanel-installer/releases/tag/plugin-ha-v1.0.0), with signed catalogs and architecture-matched assets for Linux amd64 and arm64. Public catalog signatures, helper pins, artifact digests, public URL staging, and an isolated arm64 runtime lifecycle smoke have been verified. -**Acceptance still open:** no clean new ThingsPanel installation was completed; the live Resource Center to real platform installation flow was not exercised; no production platform backend or Home Assistant endpoint was connected. Device telemetry, commands, and tenant HA connectivity are outside the completed smoke. Do not call those scenarios verified or require them as a prerequisite for starting the planned manual installation test. +**UI acceptance passed with a setup caveat:** the public Resource Center entry opened an isolated ThingsPanel platform, and a platform super administrator installed the public arm64 `1.0.0` catalog entry through the UI. The plugin reached `enabled` with health `ok`, using the official image ID recorded in the acceptance report. Before that test, the existing isolated stack needed manual database recovery, Agent/proxy restoration, and loading of the public signed artifacts. Therefore this proves the Resource Center-to-platform UI installation path on a repaired isolated stack; it does not prove a clean new-host installation or an upgrade from an unprepared host. The detailed operator report is retained with the acceptance evidence. -For manual testing, record the ThingsPanel revision and installer/Agent version, host architecture, whether the test is a clean install or upgrade, platform super-administrator install result, plugin health, and tenant access-point result as separate observations. Keep tenant HA credentials out of screenshots and logs. A healthy plugin alone does not prove a tenant connection. +This acceptance ended at platform installation and plugin health. Keep the test report focused on the platform revision, installer/Agent version, host architecture, required preparation, UI install result, and health status. Do not configure a tenant HA access point or test device traffic as part of this acceptance. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md index 05201a3c2..bee3e510d 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugin-release-installation.md @@ -63,7 +63,7 @@ flowchart LR 安装器先验证 catalog 签名,再核对 Agent/镜像归档摘要、目标机器架构和镜像 ID;只有校验通过才加载镜像、启动受管 Agent。租户/超管在网页点击按钮不会直接传输或执行这些文件。已有主机也要先运行包含该安装器改动的受支持安装/升级流程;仅打开新网页链接不会替旧主机更新 Agent。 -**当前已核实:**公开安装/升级链路可下载固定摘要辅助脚本和架构对应的签名 catalog,并校验选中的 Agent 与镜像归档。双架构制品均从公网 URL 分发并与签名 catalog 摘要一致;使用公网 arm64 bundle 的隔离运行 smoke 已通过 Agent catalog、prepare、grant、activate、health、renew 和 revoke 调用。完整干净主机安装/升级及平台 UI 验收仍待完成,不能从该 smoke 推断通过。 +**当前已核实:**公开安装/升级链路可下载固定摘要辅助脚本和架构对应的签名 catalog,并校验选中的 Agent 与镜像归档。双架构制品均从公网 URL 分发并与签名 catalog 摘要一致;使用公网 arm64 bundle 的隔离运行 smoke 已通过 Agent catalog、prepare、grant、activate、health、renew 和 revoke 调用。随后完成了单独的隔离平台 UI 验收:从资源中心页面进入目标平台,并通过 UI 安装公开 arm64 `1.0.0` 插件;安装记录变为 `enabled`,健康状态为 `ok`。这不是干净主机验收:UI 操作前,已有隔离环境需要人工恢复 PostgreSQL、Agent 和代理,并恢复/加载公开签名 Agent 与镜像。详细操作记录保存在本次验收证据中。干净主机安装和升级验收仍未完成。 ### 3.4 平台系统超级管理员、租户和资源中心维护者 @@ -97,10 +97,10 @@ https://<用户可访问的 ThingsPanel 主机>/apply/plugin?tab=install&plugin= ## 6. 当前 Home Assistant 发布状态 -[Home Assistant 资源中心页面](https://r.thingspanel.cn/marketplace/plugins/homeassistant)是 ThingsPanel 三方服务插件的公开介绍和安装跳转页,不是 Home Assistant 应用,也不会在访问者电脑上运行安装器。当前页面文案已准确说明:用户填写自己的 ThingsPanel 平台地址,并以该平台超级管理员身份登录。 +[Home Assistant 资源中心页面](https://r.thingspanel.cn/marketplace/plugins/homeassistant)是 ThingsPanel 三方服务插件的公开介绍和安装入口。更新后的页面支持填写 ThingsPanel 地址、选择记住地址,并打开目标平台的安装页。它不是 Home Assistant 应用,也不会在访问者电脑上运行安装器;目标平台仍要求登录和平台超级管理员权限。 **公开分发已可用:**插件版本 `1.0.0` 已发布为插件专用 GitHub Release [`plugin-ha-v1.0.0`](https://github.com/ThingsPanel/thingspanel-installer/releases/tag/plugin-ha-v1.0.0),提供 Linux amd64 和 arm64 的签名 catalog 与匹配制品。公网 catalog 签名、辅助脚本固定摘要、制品摘要、公网下载暂存以及隔离 arm64 runtime 生命周期 smoke 均已验证。 -**仍待验收:**尚未完成全新的 ThingsPanel 干净安装;没有实际操作线上资源中心跳转到真实平台的完整安装流程;没有连接生产平台后端或 Home Assistant 端点。设备遥测、命令和租户 HA 连通性不属于已完成 smoke 的范围。不能把这些场景说成已验证,也无需把它们设为启动本轮手工安装验收的前置条件。 +**UI 验收已通过,但有环境前提:**从公开资源中心入口进入隔离 ThingsPanel 平台后,平台超级管理员通过 UI 安装了公开 arm64 `1.0.0` catalog 条目;插件状态为 `enabled`,健康状态为 `ok`,镜像 ID 见验收报告。测试前已有隔离环境需要人工恢复数据库、Agent/代理,并加载公开签名制品。因此,本次证明的是修复后的隔离环境中“资源中心到平台 UI 安装”路径可用;不能证明全新主机安装或未准备主机升级已通过。详细操作记录保存在本次验收证据中。 -手工测试时分别记录 ThingsPanel revision、安装器/Agent 版本、主机架构、干净安装或升级、平台超级管理员安装结果、插件健康状态、租户接入点结果。截图和日志不得包含租户 HA 凭据。插件健康不等于租户连接成功。 +此次验收到平台插件安装和健康状态即结束。测试记录聚焦平台 revision、安装器/Agent 版本、主机架构、必要的环境准备、UI 安装结果和健康状态;本次不配置租户 HA 接入点,也不测试设备流量。