feat(licenses): list the Apache-2.0 files of @waggle/core in the notices

The generator finds the copies from hive-mind-core by their SPDX header
and lists each with the file it came from, whether it changed, the
copyright line and the Apache-2.0 text from packages/core/LICENSE-APACHE.
The text stays in the notices even if no dependency carries it.
This commit is contained in:
shumeiko.it
2026-11-04 10:20:11 +01:00
parent 0fef37ac53
commit 0acaa1cf29
2 changed files with 81 additions and 7 deletions

View File

@@ -1,8 +1,8 @@
# Third-party notices # Third-party notices
The Waggle community edition is MIT-licensed and ships the third-party components listed The Waggle community edition is MIT-licensed, except a few Apache-2.0 files listed below,
below. Each entry names its license; the license and notice texts the components carry are and ships the third-party components listed below. Each entry names its license; the
reproduced at the end of this file. license and notice texts the components carry are reproduced at the end of this file.
Generated by `node scripts/generate-third-party-notices.mjs` from `package-lock.json`, the Generated by `node scripts/generate-third-party-notices.mjs` from `package-lock.json`, the
installed npm packages and `cargo metadata --offline` for `app/src-tauri`. Do not edit by hand; installed npm packages and `cargo metadata --offline` for `app/src-tauri`. Do not edit by hand;
@@ -12,6 +12,7 @@ against the license policy, and cargo-deny checks the crates (`app/src-tauri/den
## Contents ## Contents
- [What ships](#what-ships) - [What ships](#what-ships)
- [Apache-2.0 files in @waggle/core](#apache-20-files-in-wagglecore)
- [LGPL, MPL and other licenses with conditions](#lgpl-mpl-and-other-licenses-with-conditions) - [LGPL, MPL and other licenses with conditions](#lgpl-mpl-and-other-licenses-with-conditions)
- [Node.js runtime and npm](#nodejs-runtime-and-npm) - [Node.js runtime and npm](#nodejs-runtime-and-npm)
- [Sidecar npm packages](#sidecar-npm-packages) - [Sidecar npm packages](#sidecar-npm-packages)
@@ -34,6 +35,38 @@ Linux x64). They include everything the bundlers could pull in, so a few package
tree-shaking drops may be listed. The sidecar list leaves out the packages that tree-shaking drops may be listed. The sidecar list leaves out the packages that
`scripts/stage-sidecar-deps.mjs` never ships (its `SKIP` set). `scripts/stage-sidecar-deps.mjs` never ships (its `SKIP` set).
## Apache-2.0 files in @waggle/core
Waggle's own code is MIT-licensed except the files below, which `service.js` bundles. They
were copied from `@waggle/hive-mind-core`, a package of the commercial Waggle repository, and
keep its license, the Apache License 2.0: [license text 17](#license-text-17). Each file
starts with an `SPDX-License-Identifier: Apache-2.0` header that names the file it came
from; `packages/core/LICENSE.md` also lists the tests copied with them, which do not ship.
Copyright 2026 Marko Marković · Egzakta Group · waggle-os.ai
| File | Copied from `packages/hive-mind-core/` | Changed |
|---|---|---|
| `packages/core/src/awareness.ts` | `src/mind/awareness.ts` | yes |
| `packages/core/src/embeddings/api-embedder.ts` | `src/mind/api-embedder.ts` | no |
| `packages/core/src/embeddings/embedding-provider.ts` | `src/mind/embedding-provider.ts` | yes |
| `packages/core/src/embeddings/embeddings.ts` | `src/mind/embeddings.ts` | parts copied |
| `packages/core/src/embeddings/inprocess-embedder.ts` | `src/mind/inprocess-embedder.ts` | yes |
| `packages/core/src/embeddings/litellm-embedder.ts` | `src/mind/litellm-embedder.ts` | no |
| `packages/core/src/embeddings/ollama-embedder.ts` | `src/mind/ollama-embedder.ts` | no |
| `packages/core/src/embeddings/transformers-model-load.ts` | `src/mind/transformers-model-load.ts` | no |
| `packages/core/src/execution-traces.ts` | `src/mind/execution-traces.ts` | yes |
| `packages/core/src/identity.ts` | `src/mind/identity.ts` | yes |
| `packages/core/src/injection-scanner.ts` | `src/injection-scanner.ts` | no |
| `packages/core/src/logger.ts` | `src/logger.ts` | yes |
| `packages/core/src/memory-ingress-guard.ts` | `src/memory-ingress-guard.ts` | no |
| `packages/core/src/recall/inprocess-reranker.ts` | `src/mind/inprocess-reranker.ts` | yes |
| `packages/core/src/recall/parse-date-window.ts` | `src/mind/parse-date-window.ts` | yes |
| `packages/core/src/recall/recall-context.ts` | `src/mind/recall-context.ts` | no |
| `packages/core/src/recall/resolve-relative-date.ts` | `src/mind/resolve-relative-date.ts` | yes |
| `packages/core/src/waggle-db.ts` | `src/mind/db.ts` | parts copied |
| `packages/core/src/workspace-manager.ts` | `src/workspace-manager.ts` | yes |
## LGPL, MPL and other licenses with conditions ## LGPL, MPL and other licenses with conditions
Most components are under permissive licenses that only ask for their notice to be kept, Most components are under permissive licenses that only ask for their notice to be kept,
@@ -1767,7 +1800,7 @@ SOFTWARE.
### License text 17 ### License text 17
From LICENSE of @huggingface/transformers 3.8.1. Carried by: @huggingface/transformers 3.8.1, @opentelemetry/api 1.9.1, @pkgjs/parseargs 0.11.0, b4a 1.8.1, bare-events 2.8.3, bare-fs 4.7.1, bare-os 3.9.1, bare-path 3.0.0, bare-stream 2.13.1, bare-url 2.4.3, events-universal 1.0.1, pdf-parse 2.4.5, text-decoder 1.2.7, @opentelemetry/api 1.9.1, @opentelemetry/api-logs 0.208.0, @opentelemetry/core 2.2.0, @opentelemetry/core 2.7.1, @opentelemetry/exporter-logs-otlp-http 0.208.0, @opentelemetry/otlp-exporter-base 0.208.0, @opentelemetry/otlp-transformer 0.208.0, @opentelemetry/resources 2.2.0, @opentelemetry/resources 2.7.1, @opentelemetry/sdk-logs 0.208.0, @opentelemetry/sdk-metrics 2.2.0, @opentelemetry/sdk-trace-base 2.2.0, @opentelemetry/semantic-conventions 1.41.1, dompurify 3.4.7, long 5.3.2, atomic-waker 1.1.2, base64 0.21.7, base64 0.22.1, bitflags 1.3.2, bitflags 2.11.0, block-buffer 0.10.4, camino 1.2.2, cfg-if 1.0.4, core-foundation 0.9.4, core-foundation 0.10.1, core-foundation-sys 0.8.7, core-graphics 0.25.0, core-graphics-types 0.2.0, cpufeatures 0.2.17, crossbeam-channel 0.5.15, crossbeam-utils 0.8.21, crypto-common 0.1.7, digest 0.10.7, displaydoc 0.2.5, embed_plist 1.2.2, encoding_rs 0.8.35, equivalent 1.0.2, errno 0.3.14, fastrand 2.3.0, flate2 1.1.9, fnv 1.0.7, form_urlencoded 1.2.2, futf 0.1.5, futures-lite 2.6.1, glob 0.3.3, global-hotkey 0.7.0, hashbrown 0.12.3, hashbrown 0.16.1, heck 0.5.0, html5ever 0.29.1, httparse 1.10.1, hyper-rustls 0.27.7, hyper-tls 0.6.0, idna 1.1.0, idna_adapter 1.2.1, indexmap 1.9.3, indexmap 2.13.0, iri-string 0.7.10, keyboard-types 0.7.0, lock_api 0.4.14, log 0.4.29, markup5ever 0.14.1, mime 0.3.17, muda 0.17.1, nodrop 0.1.14, num-traits 0.2.19, once_cell 1.21.3, parking 2.2.1, parking_lot 0.12.5, parking_lot_core 0.9.12, percent-encoding 2.3.2, png 0.17.16, proc-macro-hack 0.5.20+deprecated, regex 1.12.3, regex-automata 0.4.14, regex-syntax 0.8.10, rustix 1.1.4, rustls 0.23.37, scopeguard 1.2.0, security-framework 3.7.0, security-framework-sys 2.17.0, serde_with 3.17.0, serde_with_macros 3.17.0, serialize-to-javascript 0.1.2, serialize-to-javascript-impl 0.1.2, servo_arc 0.2.0, sha2 0.10.9, signal-hook 0.3.18, signal-hook-registry 1.4.8, smallvec 1.15.1, socket2 0.6.3, stable_deref_trait 1.2.1, string_cache 0.8.9, syn 1.0.109, system-configuration 0.7.0, system-configuration-sys 0.6.0, tempfile 3.26.0, tendril 0.4.3, tray-icon 0.21.3, unicode-segmentation 1.12.0, url 2.5.8, utf8_iter 1.0.4, uuid 1.22.0, window-vibrancy 0.6.0, wry 0.54.2, zeroize 1.8.2. From LICENSE of @huggingface/transformers 3.8.1. Carried by: @huggingface/transformers 3.8.1, @opentelemetry/api 1.9.1, @pkgjs/parseargs 0.11.0, b4a 1.8.1, bare-events 2.8.3, bare-fs 4.7.1, bare-os 3.9.1, bare-path 3.0.0, bare-stream 2.13.1, bare-url 2.4.3, events-universal 1.0.1, pdf-parse 2.4.5, text-decoder 1.2.7, @opentelemetry/api 1.9.1, @opentelemetry/api-logs 0.208.0, @opentelemetry/core 2.2.0, @opentelemetry/core 2.7.1, @opentelemetry/exporter-logs-otlp-http 0.208.0, @opentelemetry/otlp-exporter-base 0.208.0, @opentelemetry/otlp-transformer 0.208.0, @opentelemetry/resources 2.2.0, @opentelemetry/resources 2.7.1, @opentelemetry/sdk-logs 0.208.0, @opentelemetry/sdk-metrics 2.2.0, @opentelemetry/sdk-trace-base 2.2.0, @opentelemetry/semantic-conventions 1.41.1, dompurify 3.4.7, long 5.3.2, atomic-waker 1.1.2, base64 0.21.7, base64 0.22.1, bitflags 1.3.2, bitflags 2.11.0, block-buffer 0.10.4, camino 1.2.2, cfg-if 1.0.4, core-foundation 0.9.4, core-foundation 0.10.1, core-foundation-sys 0.8.7, core-graphics 0.25.0, core-graphics-types 0.2.0, cpufeatures 0.2.17, crossbeam-channel 0.5.15, crossbeam-utils 0.8.21, crypto-common 0.1.7, digest 0.10.7, displaydoc 0.2.5, embed_plist 1.2.2, encoding_rs 0.8.35, equivalent 1.0.2, errno 0.3.14, fastrand 2.3.0, flate2 1.1.9, fnv 1.0.7, form_urlencoded 1.2.2, futf 0.1.5, futures-lite 2.6.1, glob 0.3.3, global-hotkey 0.7.0, hashbrown 0.12.3, hashbrown 0.16.1, heck 0.5.0, html5ever 0.29.1, httparse 1.10.1, hyper-rustls 0.27.7, hyper-tls 0.6.0, idna 1.1.0, idna_adapter 1.2.1, indexmap 1.9.3, indexmap 2.13.0, iri-string 0.7.10, keyboard-types 0.7.0, lock_api 0.4.14, log 0.4.29, markup5ever 0.14.1, mime 0.3.17, muda 0.17.1, nodrop 0.1.14, num-traits 0.2.19, once_cell 1.21.3, parking 2.2.1, parking_lot 0.12.5, parking_lot_core 0.9.12, percent-encoding 2.3.2, png 0.17.16, proc-macro-hack 0.5.20+deprecated, regex 1.12.3, regex-automata 0.4.14, regex-syntax 0.8.10, rustix 1.1.4, rustls 0.23.37, scopeguard 1.2.0, security-framework 3.7.0, security-framework-sys 2.17.0, serde_with 3.17.0, serde_with_macros 3.17.0, serialize-to-javascript 0.1.2, serialize-to-javascript-impl 0.1.2, servo_arc 0.2.0, sha2 0.10.9, signal-hook 0.3.18, signal-hook-registry 1.4.8, smallvec 1.15.1, socket2 0.6.3, stable_deref_trait 1.2.1, string_cache 0.8.9, syn 1.0.109, system-configuration 0.7.0, system-configuration-sys 0.6.0, tempfile 3.26.0, tendril 0.4.3, tray-icon 0.21.3, unicode-segmentation 1.12.0, url 2.5.8, utf8_iter 1.0.4, uuid 1.22.0, window-vibrancy 0.6.0, wry 0.54.2, zeroize 1.8.2, @waggle/core (its Apache-2.0 files).
```text ```text
Apache License Apache License

View File

@@ -159,6 +159,29 @@ const crateRows = [...crates.values()].sort(byNameAndVersion).map((crate) => ({
), ),
})); }));
// First-party files under Apache-2.0: the copies from @waggle/hive-mind-core in
// packages/core, found by their SPDX header (packages/core/LICENSE.md).
const CORE_DIR = path.join(ROOT, 'packages', 'core');
const APACHE_HEADER = /^\/\/ SPDX-License-Identifier: Apache-2\.0\n\/\/ (Copyright [^\n]+)\n\/\/ (Parts copied|Copied) from @waggle\/hive-mind-core (\S+) (without changes|and changed for @waggle\/core)\.\n/;
function apacheCoreFiles(relative) {
return fs.readdirSync(path.join(CORE_DIR, relative), { withFileTypes: true }).flatMap((entry) => {
const child = `${relative}/${entry.name}`;
if (entry.isDirectory()) return apacheCoreFiles(child);
if (!/\.tsx?$/.test(entry.name)) return [];
const match = APACHE_HEADER.exec(fs.readFileSync(path.join(CORE_DIR, child), 'utf8').replace(/\r\n?/g, '\n'));
if (!match) return [];
const changes = match[2] === 'Parts copied' ? 'parts copied' : match[4] === 'without changes' ? 'no' : 'yes';
return [{ file: child, copyright: match[1], from: match[3], changes }];
});
}
const apacheFiles = apacheCoreFiles('src').sort((a, b) => a.file.localeCompare(b.file));
const apacheTextNumber = registerTexts(
[{ file: 'LICENSE-APACHE', text: fs.readFileSync(path.join(CORE_DIR, 'LICENSE-APACHE'), 'utf8').replace(/\r\n?/g, '\n').trim() }],
'@waggle/core (its Apache-2.0 files)',
)[0];
// ── Rendering ────────────────────────────────────────────────────────────── // ── Rendering ──────────────────────────────────────────────────────────────
const nodeVersion = bundledNodeVersion(); const nodeVersion = bundledNodeVersion();
const out = []; const out = [];
@@ -178,9 +201,9 @@ function platformLabel(row) {
line('# Third-party notices'); line('# Third-party notices');
line(); line();
line('The Waggle community edition is MIT-licensed and ships the third-party components listed'); line('The Waggle community edition is MIT-licensed, except a few Apache-2.0 files listed below,');
line('below. Each entry names its license; the license and notice texts the components carry are'); line('and ships the third-party components listed below. Each entry names its license; the');
line('reproduced at the end of this file.'); line('license and notice texts the components carry are reproduced at the end of this file.');
line(); line();
line('Generated by `node scripts/generate-third-party-notices.mjs` from `package-lock.json`, the'); line('Generated by `node scripts/generate-third-party-notices.mjs` from `package-lock.json`, the');
line('installed npm packages and `cargo metadata --offline` for `app/src-tauri`. Do not edit by hand;'); line('installed npm packages and `cargo metadata --offline` for `app/src-tauri`. Do not edit by hand;');
@@ -190,6 +213,7 @@ line();
line('## Contents'); line('## Contents');
line(); line();
line('- [What ships](#what-ships)'); line('- [What ships](#what-ships)');
line('- [Apache-2.0 files in @waggle/core](#apache-20-files-in-wagglecore)');
line('- [LGPL, MPL and other licenses with conditions](#lgpl-mpl-and-other-licenses-with-conditions)'); line('- [LGPL, MPL and other licenses with conditions](#lgpl-mpl-and-other-licenses-with-conditions)');
line('- [Node.js runtime and npm](#nodejs-runtime-and-npm)'); line('- [Node.js runtime and npm](#nodejs-runtime-and-npm)');
for (const artifact of artifacts) { for (const artifact of artifacts) {
@@ -217,6 +241,23 @@ line('tree-shaking drops may be listed. The sidecar list leaves out the packages
line('`scripts/stage-sidecar-deps.mjs` never ships (its `SKIP` set).'); line('`scripts/stage-sidecar-deps.mjs` never ships (its `SKIP` set).');
line(); line();
line('## Apache-2.0 files in @waggle/core');
line();
line('Waggle\'s own code is MIT-licensed except the files below, which `service.js` bundles. They');
line('were copied from `@waggle/hive-mind-core`, a package of the commercial Waggle repository, and');
line(`keep its license, the Apache License 2.0: [license text ${apacheTextNumber}](#license-text-${apacheTextNumber}). Each file`);
line('starts with an `SPDX-License-Identifier: Apache-2.0` header that names the file it came');
line('from; `packages/core/LICENSE.md` also lists the tests copied with them, which do not ship.');
line();
for (const copyright of new Set(apacheFiles.map((entry) => entry.copyright))) line(copyright);
line();
line('| File | Copied from `packages/hive-mind-core/` | Changed |');
line('|---|---|---|');
for (const entry of apacheFiles) {
line(`| \`packages/core/${entry.file}\` | \`${entry.from}\` | ${entry.changes} |`);
}
line();
// Copyleft section // Copyleft section
const components = [...artifacts.flatMap((artifact) => artifact.rows), ...crateRows]; const components = [...artifacts.flatMap((artifact) => artifact.rows), ...crateRows];
const groups = { lgpl: [], mpl: [], ofl: [], none: [], other: [], dual: [] }; const groups = { lgpl: [], mpl: [], ofl: [], none: [], other: [], dual: [] };