Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

- Adopted AGPL-3.0-only for the current combined project, retaining original third-party notices and all previously granted MIT permissions. Existing HA beta.3 and macOS 0.1.1 release artifacts are unchanged.
- Added bilingual voluntary-sponsorship and contribution policies. Sponsorship is not a condition of commercial use, a royalty, a copyright transfer, a support contract or a commercial-license exception. Payment destinations remain unpublished until confirmed.
- Added source/license/support links to the shared settings and login pages, project/retained license files to packaging, Go dependency notices to container builds, and a corresponding-source release checklist.

## 2.8.0-beta.3 (Beta)

- Released the accumulated shared-server and standalone improvements below for the HA add-on. Added crown-and-wings artwork to the bundled settings header/favicon, HA store icon/logo and bilingual README headers.
Expand Down
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing / 参与贡献

Thank you for contributing fixes, documentation, testing or translations.
Please discuss substantial changes in an issue first and include relevant tests.
Never submit API keys, tokens, private wallet material or personal device data.

## License and ownership

New contributions are accepted under **AGPL-3.0-only**, the current project
license, unless explicitly agreed otherwise before acceptance. You must have the
right to contribute the code. Identify reused material and keep its original
copyright/license notices; do not label third-party work as your own.

You retain copyright in your contribution. Submitting a contribution does not
assign copyright, grant a blanket proprietary-relicensing right, or require a
donation. There is no copyright-assignment CLA. If a future commercial exception
needs permissions beyond the existing licenses, those permissions must be
obtained separately from the relevant rights holders.

AGPL source availability does not require a downstream developer to submit a PR
to this repository. Upstream contributions and sponsorship are welcome but
voluntary. See [copyright notices](stackchan-server/NOTICE.md),
[licensing policy](docs/licensing.md) and [sponsorship](SPONSORING.md).

## 中文

欢迎修复、文档、测试和翻译贡献。较大改动请先开 issue 讨论,并补充相关测试。
请勿提交密钥、令牌、钱包私钥/助记词或私人设备资料。

新增贡献默认以 **AGPL-3.0-only** 提供;如有例外,须在接纳前明确约定。你必须有权
提交相关代码,注明复用来源,并保留上游的版权与许可声明。

贡献者保留版权;提交代码不等于转让版权,也不自动授权维护者把你的贡献改成
专有商业许可。没有强制版权转让 CLA,没有强制捐赠。未来若商业授权需要超出
现有许可证的权限,必须另行取得相关权利人的同意。

下游按 AGPL 提供对应源码,不等于必须向本仓库提交 PR;回馈代码与赞助均自愿。
682 changes: 661 additions & 21 deletions LICENSE

Large diffs are not rendered by default.

19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center"><img src="stackchan-server/logo.png" alt="StackChan with a hand-drawn crown and angel wings" width="200" height="200"></p>

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![License: AGPL-3.0-only](https://img.shields.io/badge/License-AGPL--3.0--only-blue.svg)](LICENSE)

English | [中文](README.zh.md)

Expand Down Expand Up @@ -382,4 +382,19 @@ Check whether the device still uses your local OTA URL. If the upgrade or reflas

## License

MIT — see [LICENSE](LICENSE)
The current combined project is **AGPL-3.0-only** — see [LICENSE](LICENSE),
[copyright and retained third-party rights](stackchan-server/NOTICE.md), and
[contribution rules](CONTRIBUTING.md). Commercial use is allowed when the license
is followed; there is no mandatory donation, profit share, or upstream PR.

Previously published MIT versions, including HA `v2.8.0-beta.3` and the downloadable
`macos-v0.1.1` DMG, keep their original license. This change applies to the current
source and future applicable versions; it does not replace old release artifacts.
See [licensing and source-distribution guidance](docs/licensing.md).

## Support the project

[Sponsorship is entirely voluntary](SPONSORING.md). It helps fund maintenance,
device/provider testing and packaging. Not donating does not restrict your
licensed rights. No verified payment destination is published yet; PayPal and
optional cryptocurrency details will appear only after maintainer confirmation.
16 changes: 14 additions & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center"><img src="stackchan-server/logo.png" alt="戴手绘皇冠、带天使翅膀的 StackChan" width="200" height="200"></p>

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![License: AGPL-3.0-only](https://img.shields.io/badge/License-AGPL--3.0--only-blue.svg)](LICENSE)

[English](README.md) | 中文

Expand Down Expand Up @@ -384,4 +384,16 @@ python3 $IDF_PATH/components/partition_table/parttool.py \

## 许可证

MIT — 详见 [LICENSE](LICENSE)
当前组合项目采用 **AGPL-3.0-only**,详见 [LICENSE](LICENSE)、
[版权及保留的第三方权利](stackchan-server/NOTICE.md)和[贡献规则](CONTRIBUTING.md)。
遵守许可证即可商业使用;没有强制捐赠、利润分成或向本仓库提交 PR 的要求。

已经发布的 MIT 版本,包括 HA `v2.8.0-beta.3` 和可下载的 `macos-v0.1.1` DMG,
保留原有许可。这次调整适用于当前源码和未来适用版本,不会覆盖旧版发布文件。
分发和网络服务的源码提供要求见[许可说明](docs/licensing.md)。

## 支持项目

[赞助完全自愿](SPONSORING.md),用于持续维护、设备和 AI 服务测试、打包等工作。
不赞助不影响许可证授予的权利。目前尚未公布已核实的收款渠道;PayPal 及可选
加密货币收款信息只会在维护者确认后发布。
40 changes: 40 additions & 0 deletions SPONSORING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Support StackChan AI Server / 支持项目

Sponsorship is **entirely voluntary**. You may use, modify and commercially
redistribute the software without donating, subject to its applicable license.
Donations do not waive source-availability obligations or buy copyright,
exclusive rights, priority support, promised features or a commercial exception.
Paid support or custom development, if offered, requires a separate agreement.

Support helps fund maintenance, device testing, AI-provider compatibility tests,
and packaging/signing work. Contributions of bug reports, documentation,
translations and testing are equally welcome. Sponsors are acknowledged publicly
only with their consent. Do not assume charitable tax deductibility.

## Payment destinations

**No verified payment destination is published yet.** A maintainer-confirmed
public PayPal link can be added here and to GitHub's Sponsor button later. Do not
send money to payment details copied from unrelated issues, comments or forks.

Cryptocurrency is optional, subject to local rules and explicit confirmation of
the currency, network, public receiving address and memo/tag if required. Public
blockchain payments can expose transaction relationships. Never share private
keys, recovery phrases or account passwords. No payment is needed to use this
project, and the project never asks you to connect a wallet to unlock features.

## 中文

赞助**完全自愿**。不赞助也可以按适用许可证使用、修改和商业分发本项目;没有
强制捐赠、销售提成或利润分成。赞助不会免除源码提供义务,也不会购买版权、
独占权、优先支持、功能承诺或商业许可例外。付费支持、定制开发须另行约定。

赞助用于持续维护、设备测试、AI 服务兼容性测试以及打包和签名。问题反馈、文档、
翻译和测试同样有帮助。仅在赞助者同意后公开鸣谢,不承诺慈善抵税资格。

**目前尚未公布已核实的收款渠道。** 确认维护者提供的公开 PayPal 链接后,会更新
本页和 GitHub 赞助按钮。请勿向无关 issue、评论或分支中的收款地址付款。

加密货币收款为可选项,需要符合所在地规则并明确币种、网络、公开地址及必要的
备注。链上交易可能暴露资金关联。不要提供私钥、助记词或账户密码;本项目不会
要求连接钱包或付款来解锁功能。
76 changes: 76 additions & 0 deletions docs/licensing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Licensing and voluntary sponsorship

## Decision — 2026-09-03

The maintainer approved **AGPL-3.0-only** for the current combined project and
voluntary sponsorship as the funding model. This is not a non-commercial
license. Commercial users who comply do not owe a donation or profit share.
There is no automatic proprietary/dual-license offer; any future exception needs
adequate rights and a separately reviewed agreement. See [CONTRIBUTING](../CONTRIBUTING.md).

The root and add-on LICENSE files contain the identical GNU AGPLv3 text.
[NOTICE](../stackchan-server/NOTICE.md) defines the scope, copyright attribution,
and retained MIT permissions. Do not overwrite historical MIT release artifacts,
rewrite their notes as AGPL, or remove original third-party notices.

## Engineering license inventory

Checked the tracked history and the root license/notice files of all 37 external
Go modules selected by `go list -mod=readonly -deps ./...` at the transition.
This is a scoped engineering check, not a legal opinion or exhaustive audit of
all assets, patents, jurisdictions and per-file notices. Dependencies were not
changed for this transition. Versions remain pinned in go.mod/go.sum.

- M5Stack-derived source: MIT; original notices retained. The one non-maintainer
commit in the checked history changes go.mod under the then-current MIT terms;
its attribution and prior permissions remain intact.
- MIT: GoFrame, golang-jwt, Go Opus bindings, TOML, xxhash, mxj, clipperhouse
displaywidth/uax29, fatih/color, goccy/go-json, go-colorable, go-isatty,
go-runewidth, olekukonko cat/errors/ll/tablewriter.
- BSD-family: Go standard library, edwards25519, fsnotify, google/uuid,
gorilla/websocket, html-strip-tags-go, properties and golang.org/x/net/sys/text.
gods/v2 carries BSD and an additional ISC notice; preserve both.
- Apache-2.0: go-logr/logr and stdr, OpenTelemetry auto/sdk and otel modules.
The latter also carry a Go BSD notice. yaml.v3 carries MIT/Apache notices.
- `github.com/go-sql-driver/mysql v1.9.3`: **MPL-2.0**, not MIT. Its actual source
headers contain no attached "Incompatible With Secondary Licenses" notice
(the standard LICENSE includes Exhibit B as a template). Preserve MPL notices
and source availability; use section 3.3 when distributing the combined AGPL
work. Do not relabel the dependency as exclusively AGPL.
- Native OPUS 1.6.1 used by the macOS builder: BSD-style COPYING plus the listed
royalty-free patent notices. Container native-library versions come from
Alpine; preserve and review their own notices when preparing a distribution.

Primary references: [GNU compatibility](https://www.gnu.org/licenses/license-compatibility.en.html),
[Mozilla MPL terms, sections 1.12/3.3](https://www.mozilla.org/en-US/MPL/2.0/),
[AGPL section 13](https://www.gnu.org/licenses/agpl.en.html#section13).

## Release/source-availability checklist

1. Review new dependencies and copied code, retain original notices, and include
the project license and third-party licenses in distributed packages.
2. Identify the exact source revision for each distributed binary/container.
Provide the complete corresponding source, including modifications and
required build/install scripts and dependency source as applicable. For
packaged releases, prepare and verify a matching source archive; a repository
homepage or moving main branch alone is insufficient.
3. Keep a prominent source link in network-facing interfaces. Operators of
modified services must update that offer to their exact source and make it
available to the users covered by section 13, not merely link upstream.
4. Source offers must not require sponsorship or transfer of copyright. AGPL
compliance does not force a downstream PR to this project.
5. Before publishing a future AGPL DMG/container release, verify the source
download, build correspondence, license bundle and user-visible source offer.
The transition does not claim that old MIT artifacts were rebuilt as AGPL.

## Funding workflow

[SPONSORING](../SPONSORING.md) is the bilingual public policy. Only add payment
destinations supplied and approved by the maintainer. Once an actual public
PayPal URL is confirmed, add it as a custom URL to `.github/FUNDING.yml` and the
sponsorship page, then verify the destination and rendered Sponsor button.
Until then, do not publish placeholders, guessed PayPal usernames, or crypto
addresses. Cryptocurrency requires explicit currency/network/address approval.

This project-specific license decision does not mandate AGPL for every future
project; voluntary sponsorship is the shared default, licenses remain scoped.
9 changes: 9 additions & 0 deletions scripts/smoke-containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ def main():
"-v", "/data", "-p", "127.0.0.1::8099", "-p", "127.0.0.1::12800", args.image)
run("docker", "cp", str(options), container + ":/data/options.json")
run("docker", "start", container)
license_dir = "/usr/share/licenses/stackchan/"
for packaged, source in (("LICENSE", "stackchan-server/LICENSE"),
("NOTICE.md", "stackchan-server/NOTICE.md"),
("retained/MIT-M5Stack.txt", "stackchan-server/licenses/MIT-M5Stack.txt"),
("retained/MIT-legacy-project.txt", "stackchan-server/licenses/MIT-legacy-project.txt")):
assert run("docker", "exec", container, "cat", license_dir + packaged) == (ROOT / source).read_text().strip()
mysql_notice = run("docker", "exec", container, "cat", license_dir + "dependencies/github.com_go-sql-driver_mysql-LICENSE")
assert "Mozilla Public License Version 2.0" in mysql_notice
print("PASS packaged AGPL, retained MIT and dependency notices", flush=True)
ha_ui = published_port(container, 8099)
ha_ws = published_port(container, 12800)
base, token = check_runtime(ha_ui, ha_ws, 12800, ha=True)
Expand Down
5 changes: 5 additions & 0 deletions stackchan-server/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
!Dockerfile
!run.sh
!standalone.sh
!collect-licenses.sh
!LICENSE
!NOTICE.md
!licenses/
!licenses/**
!server/
!server/**
**/.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions stackchan-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

- Adopted AGPL-3.0-only for the current combined project, retaining original third-party notices and all previously granted MIT permissions. Existing HA beta.3 and macOS 0.1.1 release artifacts are unchanged.
- Added bilingual voluntary-sponsorship and contribution policies. Sponsorship is not a condition of commercial use, a royalty, a copyright transfer, a support contract or a commercial-license exception. Payment destinations remain unpublished until confirmed.
- Added source/license/support links to the shared settings and login pages, project/retained license files to packaging, Go dependency notices to container builds, and a corresponding-source release checklist.

## 2.8.0-beta.3 (Beta)

- Released the accumulated shared-server and standalone improvements below for the HA add-on. Added crown-and-wings artwork to the bundled settings header/favicon, HA store icon/logo and bilingual README headers.
Expand Down
5 changes: 5 additions & 0 deletions stackchan-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ COPY server/go.mod server/go.sum ./
RUN go mod download
COPY server/ .
RUN CGO_ENABLED=1 go build -mod=readonly -trimpath -o stackchan-server .
COPY collect-licenses.sh /collect-licenses.sh
RUN sh /collect-licenses.sh /build/licenses

# ── Runtime: plain Alpine from Docker Hub (avoids ghcr.io) ─────────────────
FROM ${BUILD_FROM}

RUN apk add --no-cache opus opusfile jq bash ca-certificates
COPY LICENSE NOTICE.md /usr/share/licenses/stackchan/
COPY licenses/ /usr/share/licenses/stackchan/retained/
COPY --from=builder /build/licenses/ /usr/share/licenses/stackchan/dependencies/

WORKDIR /app
COPY --from=builder /build/stackchan-server .
Expand Down
Loading
Loading