Skip to content

armgit / andee

Public Imported from GitHub
0

Andee lives on your phone or Mac and uses any app like you do—no integrations, no root, any model; memory and passwords never leave your device | Andee 住进你的手机或 Mac,像你一样操作任何 App——无需集成、无需 Root、支持任意模型,记忆和密码绝不离开设备。

license: close the component-embedding gap, and make contributors sign off

booboosuid1946ec45540
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index fbdfb65..2a47427 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -68,3 +68,5 @@ unsigned APK that will not install.
- [ ] I have read [CONTRIBUTING.md](https://github.com/kuafuai/andee/blob/main/CONTRIBUTING.md)
([中文](https://github.com/kuafuai/andee/blob/main/CONTRIBUTING.zh-CN.md))
and agree to the contribution licensing terms in [LICENSE](https://github.com/kuafuai/andee/blob/main/LICENSE) §A.2.
+- [ ] Every commit carries a `Signed-off-by:` line (`git commit -s`). CI checks this
+ ([why](https://github.com/kuafuai/andee/blob/main/CONTRIBUTING.md#sign-off-signed-off-by)).
diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml
new file mode 100644
index 0000000..5d36e0f
--- /dev/null
+++ b/.github/workflows/dco.yml
@@ -0,0 +1,50 @@
+# Requires a `Signed-off-by:` line on every commit a pull request adds.
+#
+# Why the DCO and not a CLA service: a CLA needs a hosted bot and an account on
+# it, and it would have to be installed before this repository is even public.
+# The DCO is the same evidence — a statement, attached to each commit, that the
+# contributor has the right to submit the code — carried inside the commit
+# itself, where it survives a fork, a mirror, and a move to another host.
+#
+# It does not replace LICENSE A.2. The DCO records that a contributor *may*
+# submit this work; A.2 is what they *grant* by doing so. Both are wanted and
+# neither substitutes for the other — a sign-off with no licence to grant is
+# as useless as a licence grant from someone who had no right to make it.
+#
+# Merges are skipped. A merge commit has no content of its own, and demanding a
+# sign-off on one would fail every pull request that merged main into itself.
+name: dco
+
+on:
+ pull_request:
+
+jobs:
+ signed-off-by:
+ runs-on: ubuntu-latest
+ steps:
+ # Full history: the range below cannot be resolved from a shallow clone.
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Every commit carries a Signed-off-by line
+ run: |
+ base='${{ github.event.pull_request.base.sha }}'
+ head='${{ github.event.pull_request.head.sha }}'
+ missing=0
+ while read -r sha; do
+ [ -z "$sha" ] && continue
+ if ! git log -1 --format=%B "$sha" | grep -qiE '^Signed-off-by: .+ <[^@]+@[^>]+>'; then
+ subject=$(git log -1 --format='%h %s' "$sha")
+ echo "::error::$subject has no Signed-off-by line"
+ missing=1
+ fi
+ done < <(git rev-list --no-merges "$base..$head")
+
+ if [ "$missing" -ne 0 ]; then
+ echo
+ echo "Add it with one of:"
+ echo " git commit --amend -s # the last commit only"
+ echo " git rebase --signoff $base # every commit on this branch"
+ exit 1
+ fi
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46d82ce..f22099b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,12 +28,22 @@ build time would close this hole; it is not implemented yet.)
### Added
- `LICENSE` — Apache-2.0 with additional conditions (Part A: no multi-tenant SaaS, no
- white-labelling that removes the branding). Note that GitHub reports this as `NOASSERTION`.
+ white-labelling that removes the branding, no embedding it in another product without written
+ authorisation). Note that GitHub reports this as `NOASSERTION`.
- `SECURITY.md` — threat model, the five known security limitations, and a private reporting channel.
- `docs/permissions.md` + `docs/permissions.zh-CN.md` — why the app asks for the permissions it asks
for, each one tied to a concrete tool and to what happens if you refuse it. One file per language.
- `CONTRIBUTING.md` + `CONTRIBUTING.zh-CN.md` — code style, the rules for the three kinds of Chinese
in this codebase, and the contribution licensing terms. One file per language.
+- **A `Signed-off-by:` sign-off is now required on every commit, and CI enforces it.**
+ `.github/workflows/dco.yml` checks each commit on a pull request, and both `CONTRIBUTING` files
+ plus the pull request template explain the one-line change (`git commit -s`). This is a
+ [DCO](https://developercertificate.org/), not a CLA: the contributor keeps their copyright and
+ certifies only that they had the right to submit the work. The reason it exists is LICENSE A.2 —
+ the project is relicensed under terms that differ from stock Apache 2.0, and A.2 asks contributors
+ to grant that. A term nobody has explicitly agreed to is a term a contributor can later dispute;
+ a sign-off line is a per-commit record that they did. Deliberately *not* a CLA, which would need a
+ signature process and an entity to hold it — friction that buys nothing here.
- `CODE_OF_CONDUCT.md` — Contributor Covenant v2.1.
- `THIRD_PARTY_NOTICES.md` — generated dependency license inventory: 93 components across 5
licenses. Notably flags that **ML Kit and the `play-services-*` stubs are not open-source**.
@@ -60,6 +70,18 @@ build time would close this hole; it is not implemented yet.)
### Changed
+- **`LICENSE` Part A gained a fourth condition, (d): shipping the software inside another product
+ now needs written authorisation.** Conditions (a)–(c) already stopped white-labelling, multi-tenant
+ SaaS and dropping the attribution, but nothing stopped someone taking the code and folding it into
+ a product they sell — which is the one path that makes the rest moot. (d) closes it, and is written
+ as narrowly as it can be: running it yourself, running it across your own organisation's devices,
+ forking it and distributing the source so others can build it, and charging to install, configure
+ or support it for a client who runs it themselves are all still permitted. The line drawn is
+ between a **service** and a **product** — doing work that uses the software is fine, shipping the
+ software as part of something else is not. The heading and the lead sentence were corrected from
+ "three conditions" to match. `README.md`, `DISCLAIMER.md` and `docs/acceptable-use.md` reference
+ Part A without counting the clauses, so no copy drifted — the enumerations they do carry are
+ illustrative, and only `LICENSE` itself states all four.
- **Positioning corrected throughout the docs.** Both READMEs and `CLAUDE.md` described this as
"the body side of a Physical Agent system" — i.e. an assistant that a brain drives. That
contradicts the project's own first instruction, in `LocalPrompt.TEXT`: *"you are not a tablet's
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 19d190f..5c50794 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -133,6 +133,24 @@ You keep the copyright to your own contribution. If you are contributing on beha
**If you do not accept A.2, please do not send a PR** — we need this clause to sustain the dual-licensing model, and we would rather say so up front.
+### Sign-off (`Signed-off-by`)
+
+A.2 states what you grant by contributing. A `Signed-off-by:` line is how you state that you were in a position to grant it. Every commit in a pull request needs one, and CI checks it — this is the one part of the licensing that is verified rather than asked for politely.
+
+```bash
+git commit -s -m "your message"
+```
+
+The flag appends a line built from your git identity:
+
+```
+Signed-off-by: Your Name <[email protected]>
+```
+
+Set that identity once (`git config user.name`, `git config user.email`) and it is automatic from then on. Missed one on a branch? `git rebase --signoff <base>` signs the whole branch; `git commit --amend -s` signs just the last commit.
+
+This is the [Developer Certificate of Origin](https://developercertificate.org/), unmodified — the same mechanism the Linux kernel uses. It does not replace A.2 and A.2 does not replace it: a sign-off from someone with no right to submit the work is worthless, and a licence grant from someone who never signed is hard to prove.
+
---
## Language
diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md
index d9246cf..737d6ab 100644
--- a/CONTRIBUTING.zh-CN.md
+++ b/CONTRIBUTING.zh-CN.md
@@ -142,6 +142,24 @@ From Codex
**如果你不接受 A.2,请不要提交 PR** —— 我们需要这条才能维持双授权模式,这是事先说清楚的。
+### 签署(`Signed-off-by`)
+
+A.2 说的是你**授予**什么;`Signed-off-by:` 一行说的是你**有权授予**。PR 里每个提交都要有,CI 会查 —— 这是整套授权里唯一被机器校验、而不是靠口头约定的部分。
+
+```bash
+git commit -s -m "你的提交信息"
+```
+
+`-s` 会从你的 git 身份自动追加一行:
+
+```
+Signed-off-by: 你的名字 <[email protected]>
+```
+
+把那两个身份值配一次(`git config user.name`、`git config user.email`),以后就自动带上。忘了签?`git rebase --signoff <base>` 补签整条分支;`git commit --amend -s` 只补最后一个提交。
+
+这就是[开发者原创声明(DCO)](https://developercertificate.org/),没有改动 —— Linux 内核用的是同一个机制。它和 A.2 互不替代:没有提交权的人签了没用,从没签过的人给出的授权很难举证。
+
---
## 语言
diff --git a/LICENSE b/LICENSE
index e75ea64..782dcd2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -30,12 +30,11 @@ PART A — ADDITIONAL CONDITIONS
Differing from the Apache License 2.0 only in the following respects. Where
Part A and Part B conflict, Part A governs.
-A.1 COMMERCIAL USE IS PERMITTED, SUBJECT TO THREE CONDITIONS
+A.1 COMMERCIAL USE IS PERMITTED, SUBJECT TO FOUR CONDITIONS
Commercial use of this software is allowed without a separate agreement —
-including using it inside a company, shipping it as a component of another
-product, modifying the source, and charging for work that incorporates it.
-The following three conditions are the exceptions.
+including using it inside a company, modifying the source, and charging for
+your own work that uses it. The following four conditions are the exceptions.
(a) No white-labelling.
If you distribute the software, or a derivative work of it, to end users,
@@ -62,6 +61,25 @@ The following three conditions are the exceptions.
(this is Apache 2.0 §4(b), restated here because it is the condition most
often dropped).
+ (d) Shipping it inside another product needs written authorisation.
+ Distributing the software, or a derivative work of it, as a component of
+ a product you offer to others requires prior written authorisation from
+ KUAFUAI. This is the condition that keeps the software from being
+ absorbed into a competing product while its own project is still being
+ built.
+
+ What this does NOT restrict: running it yourself; running it inside your
+ own organisation, on devices you are responsible for; distributing it to
+ other developers as source, including a modified fork that anyone can
+ build and run from their own copy; and selling your own services around
+ it — installing it, configuring it, supporting it — for a client who runs
+ it themselves.
+
+ The line is between a SERVICE and a PRODUCT: doing work that uses the
+ software is permitted, taking the software and putting it inside
+ something you sell is not. If you cannot tell which side a use falls on,
+ ask — the answer is usually yes, with one sentence of permission.
+
A.2 CONTRIBUTIONS
By submitting a contribution to this project, you agree that:
diff --git a/README.md b/README.md
index 151a008..4322412 100644
--- a/README.md
+++ b/README.md
@@ -863,9 +863,9 @@ The four points worth reading even if you read nothing else:
## License
-[Apache-2.0 **with additional conditions**](LICENSE) — no multi-tenant SaaS, and no white-labelling
-that removes the branding. GitHub reports this as `NOASSERTION`; that is expected, not a
-misconfiguration.
+[Apache-2.0 **with additional conditions**](LICENSE) — no multi-tenant SaaS, no white-labelling
+that removes the branding, and no embedding it in another product without written authorisation.
+GitHub reports this as `NOASSERTION`; that is expected, not a misconfiguration.
Bundled third-party components are inventoried in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
Read it before redistributing: **the ML Kit barcode SDK and the `play-services-*` stubs are not