From 50b1687f0d9004f17f959d75a0e97641975362e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A1=E5=8F=A3=E6=B5=AA=E4=BA=BA?= Date: Sun, 18 Oct 2026 18:45:03 +0800 Subject: [PATCH] release: v1.0.3 open-source delivery and audit fixes --- .github/workflows/verify.yml | 23 +++++++++++++++++++++++ CONTRIBUTING.md | 9 +++++++++ README.md | 4 ++-- README.zh-CN.md | 6 +++--- RELEASE_NOTES.md | 5 +++++ SECURITY.md | 7 +++++++ SHA256SUMS | 17 +++++++++++++++++ docs/README.md | 4 +++- plugin/LICENSE | 21 +++++++++++++++++++++ plugin/manifest.json | 2 +- pyproject.toml | 4 +++- 11 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/verify.yml create mode 100644 CONTRIBUTING.md create mode 100644 RELEASE_NOTES.md create mode 100644 SECURITY.md create mode 100644 SHA256SUMS create mode 100644 plugin/LICENSE diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..a34e968 --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,23 @@ +name: Verify +on: + push: + branches: [main] + pull_request: + workflow_dispatch: +permissions: + contents: read +jobs: + test: + # Fork code may run on GitHub-hosted runners, never the trusted Gitea runner. + if: github.server_url == 'https://github.com' || github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + persist-credentials: false + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: '3.13' + - run: python -m pip install pytest==9.1.1 + - run: python -m pytest -q + - run: git diff --check diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f818fd8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# 贡献指南 / Contributing + +安装和运行步骤见项目首页;使用 Python 3.13 或 3.14,修改保持小而集中。运行 `python3 -m pytest -q`(先安装 `pytest`),Shell 脚本使用 `bash -n`,提交前运行 `git diff --check`。 + +测试只能使用临时目录、模拟服务和设备桩;不得访问真实设备、执行生产写入或提交密钥、令牌、数据库、照片及部署回执。真实设备验证由维护者另行执行。 + +请通过仓库 Pull Request 提交,说明问题、行为变化和验证结果。行为修复应覆盖对应回归风险。新增代码按本项目 MIT 许可证提供,保留第三方许可及来源。 + +See README.md for installation. Keep changes focused, test with mocks, and submit a pull request describing the behavior and checks. Never include credentials or production data. Contributions use the MIT license; preserve third-party notices. diff --git a/README.md b/README.md index 5d6e8a7..4b1f593 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,11 @@ For development, set `PIGWAY_ADAPTER_PATH` to this repository's absolute `plugin ## Build -Current adapter version: **1.0.2**. +Current adapter version: **1.0.3**. ```sh mkdir -p dist -python3 package.py plugin dist/pigway-frame-flow-1.0.2.zip +python3 package.py plugin dist/pigway-frame-flow-1.0.3.zip ``` [Documentation](docs/README.md) diff --git a/README.zh-CN.md b/README.zh-CN.md index 3c75c8f..1345622 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -2,11 +2,11 @@ 简体中文 | [English](README.md) -独立 ZIP 插件 `pigway-frame-flow` v1.0.2,采用现有 Console adapter protocol v1,仅依赖 Python 标准库。源码在独立仓库 `pigway-console-adapter-frame-flow` 维护,无需修改 Console 核心或部署额外服务。 +独立 ZIP 插件 `pigway-frame-flow` v1.0.3,采用现有 Console adapter protocol v1,仅依赖 Python 标准库。源码在独立仓库 `pigway-console-adapter-frame-flow` 维护,无需修改 Console 核心或部署额外服务。 ## 安装 -1. 在 Console「机器管理」上传 `dist/pigway-frame-flow-1.0.2.zip`,启用插件。 +1. 在 Console「机器管理」上传 `dist/pigway-frame-flow-1.0.3.zip`,启用插件。 2. 添加设备,选择 PIGWay Frame Flow,填写 Console 能访问的 Frame Flow HTTP(S) 根地址(不含 `/api/v1`)和 **Frame Flow API 令牌**,不是 KoKonna Key 或网页登录密码。 3. 若使用受限 API 客户端,授予 `devices:read`、`jobs:read`;默认 `FRAME_FLOW_TOKEN` 也可使用。令牌保存于 Console 敏感字段。跨不可信网络使用 HTTPS。 4. 查看通用资源看板、告警与历史;默认每 60 秒采集一次。卡片和告警随 Console 中英文切换,资源显示 API 上报名称或 Console 中设置的显示名称。 @@ -26,7 +26,7 @@ python3 -m venv .venv .venv/bin/python -m pip install pytest ruff .venv/bin/python -m pytest -q mkdir -p dist -.venv/bin/python package.py plugin dist/pigway-frame-flow-1.0.2.zip +.venv/bin/python package.py plugin dist/pigway-frame-flow-1.0.3.zip ``` 开发时可将 `PIGWAY_ADAPTER_PATH` 指向本目录 `plugin` 的绝对路径。ZIP 安装默认停用;生产安装与设备登记需在 Console 中执行。本地验证覆盖模拟接口、RPC 和隔离安装。 diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 0000000..76d6ca8 --- /dev/null +++ b/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +# pigway-console-adapter-frame-flow v1.0.3 + +统一开源许可证、贡献和安全反馈入口;完善当前版本的文档导航、源码分发和校验和。插件 ZIP 携带许可证。运行功能边界保持项目首页所述。 + +本轮 6 项 Python 测试通过。源码语法、文档入口、打包和校验和检查通过;生产运行状态以实际部署验收为准。 diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..bb81770 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# 安全反馈 / Security + +仅支持当前发布版本。请勿在公开 Issue 中发布密钥、令牌、个人数据或可直接利用的完整漏洞细节。 + +请通过仓库维护者 [way](https://tea.pigway.com/way) 的私有联系渠道报告,包含受影响版本、复现条件、影响和最小化示例。若尚未建立私有渠道,先在 Issue 请求私下联系,不附敏感细节。 + +Only the current release is supported. Contact the maintainer privately before disclosing exploit details; include the version, impact and a minimal reproduction. Do not attach credentials or private data to public issues. diff --git a/SHA256SUMS b/SHA256SUMS new file mode 100644 index 0000000..0c775c9 --- /dev/null +++ b/SHA256SUMS @@ -0,0 +1,17 @@ +893561073913b0db1ec5977bdc0d51ce33122649f5943f0e126dc99806e29421 .github/workflows/verify.yml +469e82c2812830629864510971466868e94f5e973c7abf9c3f674753a7fae187 .gitignore +d2705ae14671873d176e9a306b82566bafe9b7c4504cb2396bc027867e60af71 CONTRIBUTING.md +ea01675553f3737ca0f0cefb9459566a7cab8a44f545ec3bdda0a17144681dcd LICENSE +281a088726d22cf31f0cfca312289cb1e6d2edd59ad17daa1930aa3e49337796 README.md +03ecbd2b6710097aa01f54a82123c72c7aaebe478dbf49385184d9be55018280 README.zh-CN.md +2c25fdab1918da78bb51eac81ef8359df0434b736afdde8f296519ee797b682a RELEASE_NOTES.md +6cead6c1378cd840f655adc3d467e2cd6fd3ab368d7200a3afbfe85d9ed159be SECURITY.md +43d322e37914b73c4d0ca9974137b540bf7ad92afa5d168e22fc278c7eaedf90 docs/README.md +416ab1f006fae6d448603e7812f26b196296b8999c8555245bce8b7e36b87fe0 package.py +ea01675553f3737ca0f0cefb9459566a7cab8a44f545ec3bdda0a17144681dcd plugin/LICENSE +a590a3b3bde8712ee2abe0c49e30f736a4dd40e6487fb708b9b24a0b44371d9d plugin/manifest.json +a4f8b2f66e2ae19386ac62edfd2285890a4f48336e7a791098584f53a7b05a64 plugin/ui/index.js +9cb8ae3c212c73b3205a6ba352c15685b83a4f4add88c9b2b493147314dad93c plugin/worker.py +721d1d363229b7fee62065ccff86677e5e12c778ef0adfc2de152bc7b35858e2 pyproject.toml +a427151c6e34c78fb0239bdb2f26d5bad685dae37e012477c5b61ec7a8cbb523 tests/test_adapter.py +69d4bdd8b4395cfceff573d981e475cd74eadb946c71532e0d9fe084ae8682e3 tests/ui.cjs diff --git a/docs/README.md b/docs/README.md index fc8d74a..522d92c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,7 @@ # 文档目录 -安装、连接及日常使用从[中文首页](../README.zh-CN.md)或[英文首页](../README.md)开始。本目录收录仍适用的功能、配置与开发说明;版本变化见 Git 提交历史。 +安装、连接及日常使用从[中文首页](../README.zh-CN.md)或[英文首页](../README.md)开始。本目录收录仍适用的功能、配置与开发说明;版本变化见[版本记录](../RELEASE_NOTES.md)。 本项目是轻量 Console 适配器,安装、配置、打包和测试均在首页说明,无额外部署手册。 + +[贡献指南](../CONTRIBUTING.md) · [安全反馈](../SECURITY.md) · [许可证](../LICENSE) diff --git a/plugin/LICENSE b/plugin/LICENSE new file mode 100644 index 0000000..61d52b2 --- /dev/null +++ b/plugin/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Pigway + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugin/manifest.json b/plugin/manifest.json index 2c9d28a..79e696c 100644 --- a/plugin/manifest.json +++ b/plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "pigway-frame-flow", "name": "PIGWay Frame Flow", - "version": "1.0.2", + "version": "1.0.3", "protocol_version": 1, "runtime": "python3", "entrypoint": "worker.py", diff --git a/pyproject.toml b/pyproject.toml index 68c95a1..b2fdcc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,10 @@ [project] name = "pigway-console-adapter-frame-flow" -version = "1.0.2" +version = "1.0.3" requires-python = ">=3.12" dependencies = [] +readme = "README.md" +license = {file = "LICENSE"} [project.optional-dependencies] test = ["pytest>=8", "ruff>=0.9"]