Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(legal): include vendored OpenCodex in desktop notices

Chris3aed76f0c48d
diff --git a/apps/desktop/resources/THIRD-PARTY-NOTICES.txt b/apps/desktop/resources/THIRD-PARTY-NOTICES.txt
index 106ae0af36..2bc1ae6fc1 100644
--- a/apps/desktop/resources/THIRD-PARTY-NOTICES.txt
+++ b/apps/desktop/resources/THIRD-PARTY-NOTICES.txt
@@ -3877,6 +3877,33 @@ 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.
+------------------------------------------------------------------------------
+OpenCodex compatibility sources (vendored) c155cc7923dbc0102e27d79185505a85d4357b2c
+License: MIT
+Source: https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c
+------------------------------------------------------------------------------
+MIT License
+
+Copyright (c) 2026 opencodex contributors
+
+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.
+
------------------------------------------------------------------------------
pi coding agent (runtime-downloaded binary) 0.84.4
License: MIT
diff --git a/docs/legal/notices/THIRD-PARTY-NOTICES.txt b/docs/legal/notices/THIRD-PARTY-NOTICES.txt
index a021344dc6..49c3840b2c 100644
--- a/docs/legal/notices/THIRD-PARTY-NOTICES.txt
+++ b/docs/legal/notices/THIRD-PARTY-NOTICES.txt
@@ -4597,6 +4597,33 @@ 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.
+------------------------------------------------------------------------------
+OpenCodex compatibility sources (vendored) c155cc7923dbc0102e27d79185505a85d4357b2c
+License: MIT
+Source: https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c
+------------------------------------------------------------------------------
+MIT License
+
+Copyright (c) 2026 opencodex contributors
+
+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.
+
------------------------------------------------------------------------------
pi coding agent (runtime-downloaded binary) 0.84.4
License: MIT
diff --git a/docs/legal/notices/desktop-linux.txt b/docs/legal/notices/desktop-linux.txt
index 4f7c20c785..5e39b6c5f7 100644
--- a/docs/legal/notices/desktop-linux.txt
+++ b/docs/legal/notices/desktop-linux.txt
@@ -993,6 +993,33 @@ 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.
+------------------------------------------------------------------------------
+OpenCodex compatibility sources (vendored) c155cc7923dbc0102e27d79185505a85d4357b2c
+License: MIT
+Source: https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c
+------------------------------------------------------------------------------
+MIT License
+
+Copyright (c) 2026 opencodex contributors
+
+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.
+
------------------------------------------------------------------------------
Tencent openclaw-weixin protocol sources (adapted) 2.4.6
License: MIT
diff --git a/docs/legal/notices/desktop-macos.txt b/docs/legal/notices/desktop-macos.txt
index 46e28ffff4..9b47a0b48b 100644
--- a/docs/legal/notices/desktop-macos.txt
+++ b/docs/legal/notices/desktop-macos.txt
@@ -993,6 +993,33 @@ 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.
+------------------------------------------------------------------------------
+OpenCodex compatibility sources (vendored) c155cc7923dbc0102e27d79185505a85d4357b2c
+License: MIT
+Source: https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c
+------------------------------------------------------------------------------
+MIT License
+
+Copyright (c) 2026 opencodex contributors
+
+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.
+
------------------------------------------------------------------------------
Tencent openclaw-weixin protocol sources (adapted) 2.4.6
License: MIT
diff --git a/docs/legal/notices/desktop-win.txt b/docs/legal/notices/desktop-win.txt
index d0f843da66..af7f13d2a4 100644
--- a/docs/legal/notices/desktop-win.txt
+++ b/docs/legal/notices/desktop-win.txt
@@ -920,6 +920,33 @@ 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.
+------------------------------------------------------------------------------
+OpenCodex compatibility sources (vendored) c155cc7923dbc0102e27d79185505a85d4357b2c
+License: MIT
+Source: https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c
+------------------------------------------------------------------------------
+MIT License
+
+Copyright (c) 2026 opencodex contributors
+
+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.
+
------------------------------------------------------------------------------
Tencent openclaw-weixin protocol sources (adapted) 2.4.6
License: MIT
diff --git a/docs/legal/notices/sbom/desktop-linux.spdx.json b/docs/legal/notices/sbom/desktop-linux.spdx.json
index f9a68aa291..00ff386734 100644
--- a/docs/legal/notices/sbom/desktop-linux.spdx.json
+++ b/docs/legal/notices/sbom/desktop-linux.spdx.json
@@ -3,10 +3,12 @@
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "cindy-desktop-linux",
- "documentNamespace": "https://cindy.app/spdx/desktop-linux/f50b1ffaaabe7683b25bbab0193449d1f3d86142ed23fe302c3dc623fe260c5f",
+ "documentNamespace": "https://cindy.app/spdx/desktop-linux/69b25dcb173f0ccfb23d09b0f907fb66d00386d3d1a81bbda62836fb2db77e0b",
"creationInfo": {
- "created": "2026-09-08T11:11:04Z",
- "creators": ["Tool: scripts/generate-third-party-notices.mjs"]
+ "created": "2026-09-13T03:14:43Z",
+ "creators": [
+ "Tool: scripts/generate-third-party-notices.mjs"
+ ]
},
"packages": [
{
@@ -99,6 +101,16 @@
"licenseDeclared": "MIT",
"copyrightText": "NOASSERTION"
},
+ {
+ "name": "OpenCodex compatibility sources (vendored)",
+ "SPDXID": "SPDXRef-Package-fa0d2644b7f5bf42",
+ "versionInfo": "c155cc7923dbc0102e27d79185505a85d4357b2c",
+ "downloadLocation": "https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c",
+ "filesAnalyzed": false,
+ "licenseConcluded": "MIT",
+ "licenseDeclared": "MIT",
+ "copyrightText": "NOASSERTION"
+ },
{
"name": "pi coding agent (runtime-downloaded binary)",
"SPDXID": "SPDXRef-Package-a3cbdbce86e6fdc7",
@@ -14911,6 +14923,11 @@
"relationshipType": "DESCRIBES",
"relatedSpdxElement": "SPDXRef-Package-4e840ef8561a058f"
},
+ {
+ "spdxElementId": "SPDXRef-DOCUMENT",
+ "relationshipType": "DESCRIBES",
+ "relatedSpdxElement": "SPDXRef-Package-fa0d2644b7f5bf42"
+ },
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relationshipType": "DESCRIBES",
diff --git a/docs/legal/notices/sbom/desktop-macos.spdx.json b/docs/legal/notices/sbom/desktop-macos.spdx.json
index 2ecdcb4671..aa94e1726e 100644
--- a/docs/legal/notices/sbom/desktop-macos.spdx.json
+++ b/docs/legal/notices/sbom/desktop-macos.spdx.json
@@ -3,10 +3,12 @@
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "cindy-desktop-macos",
- "documentNamespace": "https://cindy.app/spdx/desktop-macos/e7f9b863272c3418e5d4500080cde79497fe814150f31ec2a5f164ec0a1b464f",
+ "documentNamespace": "https://cindy.app/spdx/desktop-macos/f9d1b71d3f3af4644b3f44e9db58602b3c23dad7f2ee02a00658954a5aae73d2",
"creationInfo": {
- "created": "2026-09-08T11:11:04Z",
- "creators": ["Tool: scripts/generate-third-party-notices.mjs"]
+ "created": "2026-09-13T03:14:43Z",
+ "creators": [
+ "Tool: scripts/generate-third-party-notices.mjs"
+ ]
},
"packages": [
{
@@ -119,6 +121,16 @@
"licenseDeclared": "MIT",
"copyrightText": "NOASSERTION"
},
+ {
+ "name": "OpenCodex compatibility sources (vendored)",
+ "SPDXID": "SPDXRef-Package-fa0d2644b7f5bf42",
+ "versionInfo": "c155cc7923dbc0102e27d79185505a85d4357b2c",
+ "downloadLocation": "https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c",
+ "filesAnalyzed": false,
+ "licenseConcluded": "MIT",
+ "licenseDeclared": "MIT",
+ "copyrightText": "NOASSERTION"
+ },
{
"name": "pi coding agent (runtime-downloaded binary)",
"SPDXID": "SPDXRef-Package-a3cbdbce86e6fdc7",
@@ -14941,6 +14953,11 @@
"relationshipType": "DESCRIBES",
"relatedSpdxElement": "SPDXRef-Package-4e840ef8561a058f"
},
+ {
+ "spdxElementId": "SPDXRef-DOCUMENT",
+ "relationshipType": "DESCRIBES",
+ "relatedSpdxElement": "SPDXRef-Package-fa0d2644b7f5bf42"
+ },
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relationshipType": "DESCRIBES",
diff --git a/docs/legal/notices/sbom/desktop-win.spdx.json b/docs/legal/notices/sbom/desktop-win.spdx.json
index 81cbf816d3..295fcfd6fb 100644
--- a/docs/legal/notices/sbom/desktop-win.spdx.json
+++ b/docs/legal/notices/sbom/desktop-win.spdx.json
@@ -3,10 +3,12 @@
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "cindy-desktop-win",
- "documentNamespace": "https://cindy.app/spdx/desktop-win/68ba748a0dbf03435636111e284ced5231d7391f7af08ddea098ffcbd1fd7f3a",
+ "documentNamespace": "https://cindy.app/spdx/desktop-win/babd9b0bb955664a481f20a11daffb7bc8efaed8764c49646e6ecb0e8df8bdec",
"creationInfo": {
- "created": "2026-09-08T11:11:04Z",
- "creators": ["Tool: scripts/generate-third-party-notices.mjs"]
+ "created": "2026-09-13T03:14:43Z",
+ "creators": [
+ "Tool: scripts/generate-third-party-notices.mjs"
+ ]
},
"packages": [
{
@@ -99,6 +101,16 @@
"licenseDeclared": "MIT",
"copyrightText": "NOASSERTION"
},
+ {
+ "name": "OpenCodex compatibility sources (vendored)",
+ "SPDXID": "SPDXRef-Package-fa0d2644b7f5bf42",
+ "versionInfo": "c155cc7923dbc0102e27d79185505a85d4357b2c",
+ "downloadLocation": "https://github.com/lidge-jun/opencodex/tree/c155cc7923dbc0102e27d79185505a85d4357b2c",
+ "filesAnalyzed": false,
+ "licenseConcluded": "MIT",
+ "licenseDeclared": "MIT",
+ "copyrightText": "NOASSERTION"
+ },
{
"name": "pi coding agent (runtime-downloaded binary)",
"SPDXID": "SPDXRef-Package-a3cbdbce86e6fdc7",
@@ -19688,6 +19700,11 @@
"relationshipType": "DESCRIBES",
"relatedSpdxElement": "SPDXRef-Package-4e840ef8561a058f"
},
+ {
+ "spdxElementId": "SPDXRef-DOCUMENT",
+ "relationshipType": "DESCRIBES",
+ "relatedSpdxElement": "SPDXRef-Package-fa0d2644b7f5bf42"
+ },
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relationshipType": "DESCRIBES",
diff --git a/packages/model-compat/README.md b/packages/model-compat/README.md
index 9a95535e20..d30b3aa69c 100644
--- a/packages/model-compat/README.md
+++ b/packages/model-compat/README.md
@@ -127,7 +127,8 @@ conflicts fail with an explicit error. The updater does not fetch or run upstrea
An update writes `UPSTREAM-CHANGES.json` with new, changed and deleted paths. Review this report as
well as the ported diff: a new upstream compatibility module outside the imported closure requires
an explicit port decision. Sync is a reviewed dependency update, not a promise that upstream can
-change arbitrarily without integration work. Preserve upstream license notices on every update.
+change arbitrarily without integration work. Preserve upstream license notices on every update. Run `pnpm licenses:generate` after updating
+the pinned commit/license so Desktop notices and SPDX inventories follow the same revision.
Run package conformance tests and all affected bridge/host tests, package typechecks and the
repository's `pnpm test:unit:related` gate before delivery. Original Bun tests are transpiled to
diff --git a/scripts/__tests__/third-party-notices.test.mjs b/scripts/__tests__/third-party-notices.test.mjs
index 5b70b85088..63c2f16311 100644
--- a/scripts/__tests__/third-party-notices.test.mjs
+++ b/scripts/__tests__/third-party-notices.test.mjs
@@ -263,3 +263,22 @@ test("desktop resources include both open-source and restricted disclosures", ()
),
);
});
+
+test("all shipped desktop notices contain the complete pinned OpenCodex license", () => {
+ const upstream = JSON.parse(read("packages/model-compat/UPSTREAM.json"));
+ const license = read("packages/model-compat/LICENSE.opencodex").replace(/\r\n/g, "\n").trim();
+ for (const artifact of ["desktop-win", "desktop-macos", "desktop-linux"]) {
+ const notice = read(`docs/legal/notices/${artifact}.txt`);
+ assert.ok(notice.includes(license), `${artifact} includes the full MIT text`);
+ const sbom = JSON.parse(read(`docs/legal/notices/sbom/${artifact}.spdx.json`));
+ const component = sbom.packages.find(pkg => pkg.name === "OpenCodex compatibility sources (vendored)");
+ assert.ok(component, `${artifact} inventories OpenCodex`);
+ assert.equal(component.versionInfo, upstream.commit);
+ assert.equal(component.licenseDeclared, "MIT");
+ }
+ for (const file of ["apps/desktop/resources/THIRD-PARTY-NOTICES.txt", "docs/legal/notices/THIRD-PARTY-NOTICES.txt"]) {
+ const notice = read(file);
+ assert.ok(notice.includes(license), `${file} includes the full MIT text`);
+ assert.ok(notice.includes(`${upstream.repository}/tree/${upstream.commit}`));
+ }
+});
diff --git a/scripts/generate-third-party-notices.mjs b/scripts/generate-third-party-notices.mjs
index 874cf43968..50425da713 100644
--- a/scripts/generate-third-party-notices.mjs
+++ b/scripts/generate-third-party-notices.mjs
@@ -869,6 +869,19 @@ function buildDesktopCommonEntries(apacheText, sharpPackageNames) {
}),
);
+ // Workspace packages are skipped by npm closure discovery. The vendored
+ // OpenCodex helpers are also bundled into Desktop main, not only the SSH proxy.
+ const opencodex = readJson(path.join(REPO_ROOT, "packages/model-compat/UPSTREAM.json"));
+ entries.push(
+ bundledComponent({
+ name: "OpenCodex compatibility sources (vendored)",
+ version: opencodex.commit,
+ license: "MIT",
+ url: `${opencodex.repository}/tree/${opencodex.commit}`,
+ licenseText: readBundledLicense("packages/model-compat/LICENSE.opencodex"),
+ }),
+ );
+
// Tencent's public iLink client is the pinned protocol reference for the
// Cindy-owned, host-agnostic implementation under packages/wechat-ilink.
entries.push(