diff --git a/.agents/skills/topo-archify-maintenance/references/integration.md b/.agents/skills/topo-archify-maintenance/references/integration.md index 1c0875d..c3ffe40 100644 --- a/.agents/skills/topo-archify-maintenance/references/integration.md +++ b/.agents/skills/topo-archify-maintenance/references/integration.md @@ -55,6 +55,20 @@ https://github.com/jdylanmc/topo-code/issues/13. not semantic truth. The installed tarball fixture must move source, observe stale-anchor failure, repair only affected fields, preserve stable IDs and unrelated intent, then preview and bundle. +- **Theme ownership:** core owns `topo.theme.v1`, including native T/button/command + actions, reconstructed focus URLs and default SVG export's explicit-theme + seam. Test hostile old storage and live OS media plus actual SVG/PNG pixels. + A one-time `?theme=dark` is insufficient. Renderer package bytes stay pristine; + adapted/shared output hashes are separate from upstream receipts. +- **Technical backend:** explicit Graphviz 16.0.0 via `@viz-js/viz@3.30.0` handles + authored decisions/data with engine-specific receipts. Preserve native families; + never silently route a failing native story through Graphviz or call its + checks Archify certification. The exact embedded EPL-2.0 exception, backend + digest, build provenance and complete notices are enforced separately. +- **Language boundary:** normal core commands compose first-party parser-backed + Rust and Tauri evidence. Do not restore a private experimental CLI, infer + Rust semantics from spelling, or hide partial/unresolved coverage. Installed + `docs/rust-tauri.md` records durable operation and regression findings. ## Where the executable evidence lives diff --git a/.agents/skills/topo-story-authoring/SKILL.md b/.agents/skills/topo-story-authoring/SKILL.md index 2bbf3af..c1fb7fc 100644 --- a/.agents/skills/topo-story-authoring/SKILL.md +++ b/.agents/skills/topo-story-authoring/SKILL.md @@ -36,7 +36,7 @@ npm exec --no -- topo story validate . stories/example.topo.json ``` Repair each reported `invalid-document`, `missing-file`, `missing-symbol`, or -`missing-pattern` failure by rereading the cited source and updating the +`missing-pattern` or `stale-source` failure by rereading the cited source and updating the smallest affected authored fields. Repeat until validation succeeds. A success lists every resolved source location but does **not** establish semantic accuracy or complete explanation coverage; the author and human reviewer remain @@ -90,3 +90,31 @@ small focused stories and short labels. For source moves, reread both sides, repair only affected anchors and explanation, and retain IDs/unrelated intent. The package includes executable before/after fixtures under `node_modules/@jdylanmc/topo-code/examples/story-authoring/`. + +## Rust/Tauri technical workflows + +Read installed `node_modules/@jdylanmc/topo-code/docs/rust-tauri.md` and +`examples/rust-tauri/stories/` before using the extended contract. +Rust anchors support `language: "rust"`, an unambiguous lexical `symbol` and +exact `pattern`. Use `renderer: "graphviz", diagramFamily: "workflow"` explicitly +for decisions (`kind: "decision"`) or values (`kind: "data"`); native families +remain the default. Every technical anchor pins the complete file's SHA-256. +Every connection declares `classification: "source-traced"` or `"inferred"`, +`rationale` and `anchorIds`; source-traced connections require verified evidence. +Do not label an authored arrow source-derived or compiler control flow. + +Hash changes require rereading and reconciling the explanation, not blindly +refreshing digests. Retain IDs when meaning is unchanged. Check exact node and +edge excerpts, cross-story/return links, Home inventory, shared app theme and +actual exports. Graphviz has its own layout receipt, not borrowed Archify +certification. A generic fixture is not evidence for another application's +behavior; disposable consumer diagrams/caches must not enter Topocode source. + +Impl/trait methods are first-class source nodes. Repeated method names require +their structural qualified symbol, for example +`src/lib.rs::impl Engine#0::snapshot`, not an owner line/column. Comments and +blank lines change freshness/evidence but not these identities; preserve the +qualified symbol during comment-only hash repair. Tauri rest values and +spread-shifted argument positions remain unresolved, as do overwritten helpers +after dot or computed-member writes. Never promote those unresolved cases to +specific source-derived calls in a narrative. diff --git a/.agents/skills/topo/SKILL.md b/.agents/skills/topo/SKILL.md index 4751291..a91e24b 100644 --- a/.agents/skills/topo/SKILL.md +++ b/.agents/skills/topo/SKILL.md @@ -17,10 +17,16 @@ Corepack, model service, account or renderer download is needed. Both forms create a ready-to-serve diagram home without analysis, rendering or browser/server launch, even in an empty/unborn repository. Repeated init preserves authored context and the existing generated site. -2. Optionally run `npm exec --no -- topo scan .`. It scans TypeScript/JavaScript and renders +2. Optionally run `npm exec --no -- topo scan .`. It defaults to TypeScript/JavaScript and renders committed stories plus Repository exploration. It never invokes a model. Unsupported/unresolved source fails; an explicitly requested `--allow-partial` preview is visibly partial and exits 2, not success. + For Rust/Tauri, first read installed + `node_modules/@jdylanmc/topo-code/docs/rust-tauri.md`. Explicitly configure + `analysis.languages: ["typescript", "rust"]` and `analysis.frameworks: ["tauri"]` + in durable `.topo/config.json`. The bridge requires both languages. Rust alone + is also supported. These parser-backed adapters remain partial; no Cargo, + rust-analyzer, proc-macro expansion or arbitrary plugin loader is implied. 3. Read [story authoring](../topo-story-authoring/SKILL.md). Author/refine a focused explanation from source evidence. Validate drafts; commit only with the repository owner's authority, then scan/preview the committed story. @@ -32,7 +38,7 @@ Corepack, model service, account or renderer download is needed. Serve the output with a static server. Hosting, access control and uploading are separate owner decisions. Preserve all emitted license notices. -The init-first home is an unreleased source/local-candidate feature; public +The init-first home and Rust/Tauri support are unreleased source/local-candidate features; public npm 0.1.0 predates it. Use a candidate containing this change, not a claim that the existing registry version was updated. @@ -42,3 +48,8 @@ Never execute an unknown enrichment command or claim inferred commentary is fact Do not edit generated `.topo/cache` artifacts. Keep story IDs stable when source moves. [Renderer maintenance](../topo-archify-maintenance/SKILL.md) is a maintainer workflow, not an automatic consumer update or global skill installation. + +After deleting only `.topo/cache`, regenerate with `topo scan . --allow-partial` +(exit 2 for Rust/Tauri), not edits to generated HTML. Preserve config, source, +stories and stable IDs. Bundles carry evidence, renderer assets and legal notices. +The synthetic installed `examples/rust-tauri/` demonstrates the portable workflow. diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9e8fc12 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Preserve upstream attribution bytes; the generated notices normalize whitespace. +licenses/third-party/* -text -whitespace diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f3fd23..5713164 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,20 @@ publication remains a separate release-owner action. ### Added +- Support explicit first-party Rust language and Tauri bridge selection through + normal scan/preview/bundle commands, retaining JS/TS defaults, deterministic + source identities, lexical ownership, per-plugin partial/unresolved evidence + and conservative shadowing/mutation handling. No Cargo, proc-macro or model + execution is introduced. +- Add snapshot-bound technical Workflow stories with decision/data shapes, + exact node/edge excerpts and source-traced versus inferred connections. + Explicit Graphviz 16.0.0 rendering has engine-specific layout receipts and a + narrowly pinned embedded EPL-2.0 exception with full notices and source + availability. Native diagram families remain unchanged. +- Ship generic Rust/Tauri fixtures, installed authoring/operation guidance and + transferable parser, rendering, theme, publication and regeneration findings. + No consumer application's authored diagrams or caches are included. + - Create a ready-to-serve, branded diagram Home on plain or skills-enabled `topo init`, including empty/unborn repositories without scanning. Reuse the categorized inventory across Home and native story pages, keep Repository @@ -128,6 +142,22 @@ publication remains a separate release-owner action. ### Fixed +- Retain Rust impl/trait methods through validated Repository publication, + preview, bundle and cache recreation. Structural impl/extern owner identities + keep named descendants and qualified anchors stable across comment-only moves. +- Reject uncertain Tauri helper positions across spreads/rest bindings and + invalidate obsolete helpers after equivalent dot/computed-member writes, + while preserving known scalar and unmodified-receiver controls. +- Preserve byte-pinned upstream license files through Git checkout conversion, + including Windows autocrlf, without weakening exact license digest gates. + +- Make shell, evidence, authored/generated viewers and native default exports + share one app-owned theme across focus navigation, stored preferences, media + changes and native actions without altering pristine renderer package bytes. +- Preserve renderer-owned evidence/specification assets through scan and bundle, + distinguish native and adapted/shared-output hashes, and roll back reported + generation-replacement failures rather than leaving mixed generations. + - Publish explicit local tarball paths so npm cannot interpret `dist/filename.tgz` as GitHub shorthand; verify both release modes with offline dry-run publication. - Prevent static-bundle browser fixture cleanup from waiting on unused TCP diff --git a/README.md b/README.md index b1e29aa..3e72d72 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ Initialize a repository to create a ready-to-serve static diagram home in `.topo/`. Add authored stories or scan supported source when needed. No hosted service, no telemetry, no account. +Normal commands also support explicitly selected, parser-backed **Rust/Tauri** +and snapshot-bound technical workflows with decisions, exact node/edge source +evidence and an explicit Graphviz renderer. These capabilities are unreleased; +the existing registry 0.1.0 is unchanged. See [supported configuration, portable +examples and limits](./docs/rust-tauri.md). + The goal is to put a software engineer in the human-in-the-loop position: every claim the tool makes about a codebase is backed by evidence you can follow, and everything a human adds is recorded as such. diff --git a/THIRD_PARTY_NOTICES.txt b/THIRD_PARTY_NOTICES.txt index d4a6aea..f3d0b79 100644 --- a/THIRD_PARTY_NOTICES.txt +++ b/THIRD_PARTY_NOTICES.txt @@ -1,7 +1,444 @@ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION This file is generated by scripts/dependency-notices.mjs. -Shipped dependency count: 9 +Shipped dependency count: 23 + +================================================================================ +@ast-grep/lang-rust@0.0.7 +License: ISC +Required by: +- @topo/languages -> @ast-grep/lang-rust + +----- BEGIN LICENSE ----- +MIT License + +Copyright (c) 2025 ast-grep + +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. +----- END LICENSE ----- + +================================================================================ +@ast-grep/napi-darwin-arm64@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-darwin-arm64 + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-darwin-arm64/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-darwin-x64@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-darwin-x64 + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-darwin-x64/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-linux-arm64-gnu@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-linux-arm64-gnu + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-linux-arm64-gnu/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-linux-arm64-musl@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-linux-arm64-musl + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-linux-arm64-musl/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-linux-x64-gnu@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-linux-x64-gnu + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-linux-x64-gnu/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-linux-x64-musl@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-linux-x64-musl + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-linux-x64-musl/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-win32-arm64-msvc@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-win32-arm64-msvc + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-win32-arm64-msvc/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-win32-ia32-msvc@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-win32-ia32-msvc + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-win32-ia32-msvc/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi-win32-x64-msvc@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi -> @ast-grep/napi-win32-x64-msvc + +Optional platform distribution: attribution covers this exact declared variant whether or not installed on the build host. + +Reviewed package metadata: https://www.npmjs.com/package/@ast-grep/napi-win32-x64-msvc/v/0.45.3 +Verified source commit: https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0 +Verified source license: https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE +Vendored license SHA-256: 81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9 +----- BEGIN ast-grep.LICENSE ----- +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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. +----- END ast-grep.LICENSE ----- + +================================================================================ +@ast-grep/napi@0.45.3 +License: MIT +Required by: +- @topo/languages -> @ast-grep/napi + +----- BEGIN LICENSE ----- +MIT License + +Copyright (c) 2020 N-API for Rust + +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. +----- END LICENSE ----- + +================================================================================ +@ast-grep/setup-lang@0.0.6 +License: ISC +Required by: +- @topo/languages -> @ast-grep/lang-rust -> @ast-grep/setup-lang + +----- BEGIN LICENSE ----- +MIT License + +Copyright (c) 2025 ast-grep + +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. +----- END LICENSE ----- + +================================================================================ +@iarna/toml@2.2.5 +License: ISC +Required by: +- @topo/languages -> @iarna/toml + +----- BEGIN LICENSE ----- +Copyright (c) 2016, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- END LICENSE ----- ================================================================================ @jdylanmc/topo-archify@0.1.0 @@ -34,6 +471,679 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- END LICENSE ----- +================================================================================ +@viz-js/viz@3.30.0 +License: MIT +Required by: +- @topo/diagram-core -> @viz-js/viz + +Reviewed package metadata: https://www.npmjs.com/package/@viz-js/viz/v/3.30.0 +Verified source commit: https://github.com/mdaines/viz-js/commit/99da545270e6e7b127a5c7ba65974b8a604a6358 +Verified source license: https://raw.githubusercontent.com/mdaines/viz-js/99da545270e6e7b127a5c7ba65974b8a604a6358/LICENSE +Vendored license SHA-256: f1fb91bf7cbcb42b2af56949e4fa909e1979d5b57c2826cabacdb4b631457720 +----- BEGIN viz-js.LICENSE ----- +MIT License + +Copyright (c) Michael Daines + +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. +----- END viz-js.LICENSE ----- + +----- BEGIN graphviz.COPYING ----- +Embedded component: Graphviz 16.0.0 +License: EPL-2.0 +Source available at: https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/16.0.0/graphviz-16.0.0.tar.gz +Source archive SHA-256: 36a1de1aaf5a2023b14f95170a5f8f0b12522d1c305b517fc261966597050749 +Upstream license: https://gitlab.com/graphviz/graphviz/-/raw/16.0.0/COPYING +License SHA-256: 0becf16567beb77fa252b7664631dd177c8f9a1889e48995b45379c7130e5303 +Viz.js build source: https://github.com/mdaines/viz-js/tree/99da545270e6e7b127a5c7ba65974b8a604a6358/packages/viz/backend +Topocode does not modify these embedded components. Their licenses remain in force. + +Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. +----- END graphviz.COPYING ----- + +----- BEGIN expat.COPYING ----- +Embedded component: Expat 2.8.4 +License: MIT +Source available at: https://github.com/libexpat/libexpat/releases/download/R_2_8_4/expat-2.8.4.tar.gz +Source archive SHA-256: b8ece2437692dad44d851c4532723390a5a330990007706be9c8d2b90d294f36 +Upstream license: https://raw.githubusercontent.com/libexpat/libexpat/R_2_8_4/COPYING +License SHA-256: 73cc92f80889ab23c7287b1a11dd50fdec190c3f26ebe5938c579043817d651e +Viz.js build source: https://github.com/mdaines/viz-js/tree/99da545270e6e7b127a5c7ba65974b8a604a6358/packages/viz/backend +Topocode does not modify these embedded components. Their licenses remain in force. + +Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper +Copyright (c) 2001-2026 Expat maintainers + +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. +----- END expat.COPYING ----- + +----- BEGIN emscripten.LICENSE ----- +Embedded component: Emscripten 5.0.7 runtime +License: MIT (selected option) +Source available at: https://github.com/emscripten-core/emscripten/tree/263db4cffa6f9fc2ec514a70abac81362ea41849 +Upstream license: https://raw.githubusercontent.com/emscripten-core/emscripten/263db4cffa6f9fc2ec514a70abac81362ea41849/LICENSE +License SHA-256: 620a78084fc7ca97c0b5dea9abf891f3ffcadfdbf305276f099c9c4e12fc1d86 +Viz.js build source: https://github.com/mdaines/viz-js/tree/99da545270e6e7b127a5c7ba65974b8a604a6358/packages/viz/backend +Topocode does not modify these embedded components. Their licenses remain in force. + +Emscripten is available under 2 licenses, the MIT license and the +University of Illinois/NCSA Open Source License. + +Both are permissive open source licenses, with little if any +practical difference between them. + +The reason for offering both is that (1) the MIT license is +well-known, while (2) the University of Illinois/NCSA Open Source +License allows Emscripten's code to be integrated upstream into +LLVM, which uses that license, should the opportunity arise. + +The full text of both licenses follows. + +============================================================================== + +Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file. + +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. + +============================================================================== + +Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal with 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: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimers. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimers + in the documentation and/or other materials provided with the + distribution. + + Neither the names of Mozilla, + nor the names of its contributors may be used to endorse + or promote products derived from this Software without specific prior + written permission. + +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 CONTRIBUTORS 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 WITH THE SOFTWARE. + +============================================================================== + +This program uses portions of Node.js source code located in src/library_path.js, +in accordance with the terms of the MIT license. Node's license follows: + + """ + Copyright Joyent, Inc. and other Node contributors. All rights reserved. + 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. + """ + +The musl libc project is bundled in this repo, and it has the MIT license, see +system/lib/libc/musl/COPYRIGHT + +The third_party/ subdirectory contains code with other licenses. None of it is +used by default, but certain options use it (e.g., the optional closure compiler +flag will run closure compiler from third_party/). + +----- END emscripten.LICENSE ----- + +----- BEGIN musl.COPYRIGHT ----- +Embedded component: musl bundled by Emscripten 5.0.7 +License: MIT and retained component notices +Source available at: https://github.com/emscripten-core/emscripten/tree/263db4cffa6f9fc2ec514a70abac81362ea41849/system/lib/libc/musl +Upstream license: https://raw.githubusercontent.com/emscripten-core/emscripten/263db4cffa6f9fc2ec514a70abac81362ea41849/system/lib/libc/musl/COPYRIGHT +License SHA-256: f9bc4423732350eb0b3f7ed7e91d530298476f8fec0c6c427a1c04ade22655af +Viz.js build source: https://github.com/mdaines/viz-js/tree/99da545270e6e7b127a5c7ba65974b8a604a6358/packages/viz/backend +Topocode does not modify these embedded components. Their licenses remain in force. + +musl as a whole is licensed under the following standard MIT license: + +---------------------------------------------------------------------- +Copyright © 2005-2020 Rich Felker, et al. + +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. +---------------------------------------------------------------------- + +Authors/contributors include: + +A. Wilcox +Ada Worcester +Alex Dowad +Alex Suykov +Alexander Monakov +Andre McCurdy +Andrew Kelley +Anthony G. Basile +Aric Belsito +Arvid Picciani +Bartosz Brachaczek +Benjamin Peterson +Bobby Bingham +Boris Brezillon +Brent Cook +Chris Spiegel +Clément Vasseur +Daniel Micay +Daniel Sabogal +Daurnimator +David Carlier +David Edelsohn +Denys Vlasenko +Dmitry Ivanov +Dmitry V. Levin +Drew DeVault +Emil Renner Berthing +Fangrui Song +Felix Fietkau +Felix Janda +Gianluca Anzolin +Hauke Mehrtens +He X +Hiltjo Posthuma +Isaac Dunham +Jaydeep Patil +Jens Gustedt +Jeremy Huntwork +Jo-Philipp Wich +Joakim Sindholt +John Spencer +Julien Ramseier +Justin Cormack +Kaarle Ritvanen +Khem Raj +Kylie McClain +Leah Neukirchen +Luca Barbato +Luka Perkov +M Farkas-Dyck (Strake) +Mahesh Bodapati +Markus Wichmann +Masanori Ogino +Michael Clark +Michael Forney +Mikhail Kremnyov +Natanael Copa +Nicholas J. Kain +orc +Pascal Cuoq +Patrick Oppenlander +Petr Hosek +Petr Skocik +Pierre Carrier +Reini Urban +Rich Felker +Richard Pennington +Ryan Fairfax +Samuel Holland +Segev Finer +Shiz +sin +Solar Designer +Stefan Kristiansson +Stefan O'Rear +Szabolcs Nagy +Timo Teräs +Trutz Behn +Valentin Ochs +Will Dietz +William Haddon +William Pitcock + +Portions of this software are derived from third-party works licensed +under terms compatible with the above MIT license: + +The TRE regular expression implementation (src/regex/reg* and +src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +under a 2-clause BSD license (license text in the source files). The +included version has been heavily modified by Rich Felker in 2012, in +the interests of size, simplicity, and namespace cleanliness. + +Much of the math library code (src/math/* and src/complex/*) is +Copyright © 1993,2004 Sun Microsystems or +Copyright © 2003-2011 David Schultz or +Copyright © 2003-2009 Steven G. Kargl or +Copyright © 2003-2009 Bruce D. Evans or +Copyright © 2008 Stephen L. Moshier or +Copyright © 2017-2018 Arm Limited +and labelled as such in comments in the individual source files. All +have been licensed under extremely permissive terms. + +The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +The Android Open Source Project and is licensed under a two-clause BSD +license. It was taken from Bionic libc, used on Android. + +The AArch64 memcpy and memset code (src/string/aarch64/*) are +Copyright © 1999-2019, Arm Limited. + +The implementation of DES for crypt (src/crypt/crypt_des.c) is +Copyright © 1994 David Burren. It is licensed under a BSD license. + +The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +originally written by Solar Designer and placed into the public +domain. The code also comes with a fallback permissive license for use +in jurisdictions that may not recognize the public domain. + +The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +Valentin Ochs and is licensed under an MIT-style license. + +The x86_64 port was written by Nicholas J. Kain and is licensed under +the standard MIT terms. + +The mips and microblaze ports were originally written by Richard +Pennington for use in the ellcc project. The original code was adapted +by Rich Felker for build system and code conventions during upstream +integration. It is licensed under the standard MIT terms. + +The mips64 port was contributed by Imagination Technologies and is +licensed under the standard MIT terms. + +The powerpc port was also originally written by Richard Pennington, +and later supplemented and integrated by John Spencer. It is licensed +under the standard MIT terms. + +All other files which have no copyright comments are original works +produced specifically for use as part of this library, written either +by Rich Felker, the main author of the library, or by one or more +contibutors listed above. Details on authorship of individual files +can be found in the git version control history of the project. The +omission of copyright and license comments in each file is in the +interest of source tree size. + +In addition, permission is hereby granted for all public header files +(include/* and arch/*/bits/*) and crt files intended to be linked into +applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +the copyright notice and permission notice otherwise required by the +license, and to use these files without any requirement of +attribution. These files include substantial contributions from: + +Bobby Bingham +John Spencer +Nicholas J. Kain +Rich Felker +Richard Pennington +Stefan Kristiansson +Szabolcs Nagy + +all of whom have explicitly granted such permission. + +This file previously contained text expressing a belief that most of +the files covered by the above exception were sufficiently trivial not +to be subject to copyright, resulting in confusion over whether it +negated the permissions granted in the license. In the spirit of +permissive licensing, and of not having licensing issues being an +obstacle to adoption, that text has been removed. +----- END musl.COPYRIGHT ----- + ================================================================================ ajv-formats@3.0.1 License: MIT @@ -259,8 +1369,9 @@ THE SOFTWARE. ================================================================================ typescript@6.0.3 License: Apache-2.0 -Installed aliases: typescript-compiler-api (npm:typescript@^6.0.0) +Installed aliases: typescript-compiler-api (npm:typescript@6.0.3) Required by: +- @topo/languages -> typescript-compiler-api - @topo/scanner -> typescript-compiler-api - @topo/story -> typescript-compiler-api diff --git a/dependency-licenses.json b/dependency-licenses.json index 8932185..87ee734 100644 --- a/dependency-licenses.json +++ b/dependency-licenses.json @@ -1,5 +1,26 @@ { "dependencies": { + "@ast-grep/napi": { + "range": "0.45.3", + "license": "MIT", + "source": "https://github.com/ast-grep/ast-grep/blob/979c143639e3588c31f563091e69398683ed34f0/LICENSE" + }, + "@ast-grep/lang-rust": { + "range": "0.0.7", + "license": "ISC", + "source": "https://www.npmjs.com/package/@ast-grep/lang-rust/v/0.0.7" + }, + "@iarna/toml": { + "range": "2.2.5", + "license": "ISC", + "source": "https://www.npmjs.com/package/@iarna/toml/v/2.2.5" + }, + "@viz-js/viz": { + "range": "3.30.0", + "license": "MIT", + "source": "https://github.com/mdaines/viz-js/blob/99da545270e6e7b127a5c7ba65974b8a604a6358/LICENSE", + "embeddedLicenseException": "Graphviz 16.0.0 EPL-2.0; exact backend, provenance and complete notices checked by scripts/embedded-notices.mjs" + }, "@jdylanmc/topo-archify": { "range": "0.1.0", "license": "MIT", @@ -21,7 +42,7 @@ "source": "https://registry.npmjs.org/ignore/7.0.8" }, "typescript-compiler-api": { - "range": "npm:typescript@^6.0.0", + "range": "npm:typescript@6.0.3", "license": "Apache-2.0", "source": "https://github.com/microsoft/TypeScript/blob/main/LICENSE.txt" } diff --git a/distribution/README.md b/distribution/README.md index fb1d641..1bddb17 100644 --- a/distribution/README.md +++ b/distribution/README.md @@ -46,6 +46,15 @@ runtime behavior. Partial previews exit 2. `topo enrich` is a separate explicit provider-command surface, not part of scanning. Generated `.topo/cache` output is disposable; configuration and authored documents are not. +Explicit first-party Rust/Tauri selection, technical decision/data workflows +and hash-bound source evidence are supported by this unreleased candidate. +Read `docs/rust-tauri.md` and the synthetic `examples/rust-tauri/` before +configuring analysis or authoring technical stories. Rust/Tauri are parser-backed +and partial, not Cargo/rust-analyzer semantics. Graphviz is an explicit bounded +backend with its own receipts and complete EPL-2.0/source-availability notices, +not a native-renderer fallback. App-owned themes also govern native default +exports. None of these changes updates the already-published 0.1.0. + Bundles are plain static files with notices; hosting, deployment and access control are yours. Runtime rendering does not download Archify or call a model. Private bundled `@topo/*` modules are implementation details, not a public SDK. diff --git a/distribution/package.json b/distribution/package.json index debd9bf..bbc16e9 100644 --- a/distribution/package.json +++ b/distribution/package.json @@ -11,7 +11,7 @@ "./story.schema.json": "./story.schema.json", "./graph.schema.json": "./graph.schema.json" }, - "files": ["bin", "skills", "examples", "*.schema.json", "LICENSE", "THIRD_PARTY_NOTICES.txt", "README.md"], + "files": ["bin", "skills", "examples", "docs", "*.schema.json", "LICENSE", "THIRD_PARTY_NOTICES.txt", "README.md"], "dependencies": { "@jdylanmc/topo-archify": "0.1.0" }, "repository": { "type": "git", "url": "git+https://github.com/jdylanmc/topo-code.git" }, "publishConfig": { "access": "public" } diff --git a/docs/licenses.md b/docs/licenses.md index 7891ca2..577fe2a 100644 --- a/docs/licenses.md +++ b/docs/licenses.md @@ -69,7 +69,8 @@ its SHA-256 is Primary references: [SPDX](https://spdx.org/licenses/Unlicense.html) and [OSI](https://opensource.org/license/unlicense). This decision does not permit -other unlisted, complex, or copyleft license identifiers. +other unlisted, complex, or copyleft license identifiers. The component-specific +Graphviz exception below is independent and does not expand that allowlist. ## Reviewed license overrides @@ -79,9 +80,60 @@ package version, vendored license digest, immutable official source, and npm metadata page. Version drift, digest drift, unused overrides, and unpinned sources fail the gate. -There are currently no overrides. PixiJS and its retired WebGL explorer source -are no longer dependencies of any maintained package, so their transitive -license data is not part of the installed or shipped dependency closure. +Exact overrides retain the upstream MIT text for the Viz.js wrapper and nine +`@ast-grep/napi-@0.45.3` distributions that omit root license files. +The platform entries explicitly opt into portable optional attribution: the +exact version must still be declared as an optional dependency in the live +closure. Their notices are included on every build host, rather than making a +Linux build depend on a macOS-only inventory. Installed packages still have +their identity and license declaration checked. Unknown/unused entries and +version drift fail. This does not claim absent prebuilds were installed or tested. + +`@ast-grep/lang-rust@0.0.7` declares ISC in its package metadata but ships an MIT +LICENSE. The inventory retains the declaration and the generated notices retain +the actual complete shipped text; do not silently relabel or discard either. +The retired WebGL explorer's dependencies remain excluded. The generated file contains package/version ordering, alias information, and dependency-chain provenance, but never local absolute paths or credentials. + +## Exact embedded Graphviz exception + +The owner explicitly authorized **Graphviz 16.0.0 under EPL-2.0 only as embedded +in `@viz-js/viz@3.30.0`**. Viz.js's own MIT label does not cover Graphviz. +`scripts/embedded-notices.mjs` enforces the package version/license, byte-for-byte +backend digest, build provenance digest, source archive material digests and +vendored notice digests before build/check/pack: + +| Material | SHA-256 | +| --- | --- | +| `lib/backend.js` | `d2d18f488ffbf12fd3ae68d3899d6911051b9bfc3b4240eebe9883ca17d58903` | +| `lib/provenance.json` | `e0ae3025607c145c0e928be0b7d52e1b33e426da80615cef5772c7b5d9a261d1` | +| Graphviz 16.0.0 source archive | `36a1de1aaf5a2023b14f95170a5f8f0b12522d1c305b517fc261966597050749` | + +Build source is pinned at +https://github.com/mdaines/viz-js/tree/99da545270e6e7b127a5c7ba65974b8a604a6358/packages/viz/backend . +Corresponding Graphviz source is available at +https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/16.0.0/graphviz-16.0.0.tar.gz . +Topocode does not modify those embedded components. Recipients retain EPL-2.0 +rights to the Graphviz program and can obtain that source; Topocode's own code +remains MIT. Preserve notices and source-availability information in all packages +and static bundles. A future modified build must also provide its corresponding +source and undergo a new scoped decision, not reuse these hashes. + +The closure includes full Graphviz EPL-2.0 COPYING, Expat 2.8.4 COPYING, +Emscripten 5.0.7 LICENSE (MIT option selected, both upstream texts retained) and +bundled musl COPYRIGHT alongside the Viz.js MIT text. The generated notice embeds +component-specific source URLs and digests. Checked-in upstream files stay +byte-exact; generated notices alone normalize whitespace. Tests reject backend +tampering and version drift; EPL-2.0 remains absent from the global allowlist. +The vendored directory is explicitly `-text` in `.gitattributes`, preventing +Git checkout/EOL conversion even with Windows-style `core.autocrlf=true`. +Regression tests run real checkout filters for all six pinned license files, +verify their unchanged SHA-256 values and verify that an ordinary text control +does convert to CRLF. Raw-byte hash checks are not relaxed or normalized. + +To restore those exact upstream notice files, maintainers may explicitly run +`node scripts/embedded-notices.mjs --fetch`. It verifies each pinned digest +before writing. Normal build, check, scan, preview and bundle do not fetch +licenses, sources, renderers or models. diff --git a/docs/npm-release.md b/docs/npm-release.md index 4114bc8..964ec39 100644 --- a/docs/npm-release.md +++ b/docs/npm-release.md @@ -59,7 +59,7 @@ never change global settings or commit credentials. ## Package boundary `distribution/package.json` owns public identity and exports. `scripts/pack.mjs` -stages built modules/assets and npm-bundles the twelve private `@topo/*` packages +stages built modules/assets and npm-bundles the thirteen private `@topo/*` packages with concrete internal versions. Their original file-relative ESM/resource boundaries remain intact. No `workspace:*`, build hooks, source checkout, unpublished private-package lookup or absolute local dependency path is required. @@ -67,6 +67,13 @@ External runtime dependencies remain declared. Consumers receive schemas, three portable skills and project instructions, example source-change fixtures and composed legal notices. Debug source maps and tests do not ship. +The candidate includes optional native Rust parser dependencies, an explicitly +selected Tauri bridge and `@viz-js/viz@3.30.0` with the exact embedded Graphviz +license exception. Installed `docs/rust-tauri.md` and `examples/rust-tauri/` +cover mixed-language operation, technical authoring and cache-only recreation. +The package smoke exercises both the original JavaScript/TypeScript consumer and +a fresh mixed consumer; no development workspace imports are used after packing. + `topo init --skills` opts into `.agents/skills/topo*` and `.github/instructions/topo.instructions.md`. It does not overwrite existing agent instructions or authored files. Differing files/symlinks are explicit diff --git a/docs/rust-tauri.md b/docs/rust-tauri.md new file mode 100644 index 0000000..d0749de --- /dev/null +++ b/docs/rust-tauri.md @@ -0,0 +1,232 @@ +# Rust, Tauri and technical stories + +This is supported **unreleased candidate** behavior of normal `topo` commands, +not an experiment executable or a registry update. Node 22 and 24 are supported. +The installed package includes this document, the story JSON Schema and +`examples/rust-tauri/`; no development checkout or previous agent session is +required. + +## Select capabilities, not an arbitrary plugin loader + +Keep `.topo/config.json` and `stories/**/*.topo.json` as durable source-controlled +inputs. Preserve your existing repository ID and other configuration: + +```json +{ + "schemaVersion": "1.0", + "repositoryId": "my-application", + "modules": [], + "analysis": { + "languages": ["typescript", "rust"], + "frameworks": ["tauri"] + } +} +``` + +Omitting `analysis` retains the existing TypeScript/JavaScript scanner. Rust +alone uses `languages: ["rust"], frameworks: []`. Tauri requires **both** +languages explicitly; unknown IDs, duplicates and missing prerequisites fail. +Framework bridges and language adapters are distinct. Existing `modules` +configure graph overlays, not languages. + +The first-party implementation is `@topo/languages`: a core-owned manifest, +captured source inventory, adapter contributions, graph composition and +validation. Private bundled package imports are **not** a public SDK. +There is no marketplace, arbitrary package autoloading, hidden consumer adapter, +Cargo execution, compiler build, model call or network request in scanning. +An explicitly configured `topo enrich` command remains a separate workflow. + +## Coverage and evidence + +| Capability | Supported evidence | Deliberately not claimed | +| --- | --- | --- | +| TypeScript/JavaScript | Existing compiler declarations and static references | Runtime reachability, exhaustive impact | +| Rust | Tree-sitter declarations, lexical owners, signatures, attributes, explicit visibility, bounded direct local impl targets, Cargo manifest declarations | Type checking, full name resolution, compiler control-flow graph, Cargo dependency resolution, builds | +| Tauri | Imported invoke aliases, bounded static command values/helper call sites, captured Rust command declarations and unambiguous handler registrations | Macro validity, all callers, plugin installation, permission checks, runtime command reachability | + +`graph.extensions["dev.topo.languages"]` contains the source snapshot and +each plugin's manifest, entities, relationships, coverage, diagnostics and +unresolved observations. Rust/Tauri are explicitly partial; normal scan refuses +publication unless `--allow-partial` is supplied. That preview **exits 2** and +displays partial quality, not success. Unknown calls/imports and ambiguous +bindings remain unresolved instead of guessed edges. Repository exploration +shows Rust kinds, including impl/trait methods, and ownership plus supported +bridge relationships. The producer and persisted Repository reader share the +Rust declaration vocabulary; generation checks the reader contract before +publishing any viewers. + +Named Rust IDs are source-relative lexical identities, independent of absolute +checkout path and unrelated line insertion. Invocation relationships retain +their invocation-site identity even when multiple calls share one constant. +Locations are 1-based UTF-16 code-unit columns with exclusive ends. Conditional +duplicates and edited invocation sites can legitimately change IDs; this is not +a compiler-stable symbol identity guarantee across arbitrary refactoring. +Impl and extern owners use a comment/whitespace-independent tokenized header +and a source-order discriminator among identical headers, such as +`src/lib.rs::impl Engine#0::snapshot`. Anonymous nested scopes use structural +ordinals, not lines/columns. Named descendants, qualified anchors and Rust +ownership edges survive unrelated comments/blank lines; positions and hashes +still change as evidence. Adding or reordering structurally identical owners +can change their ordinals. Old unreleased candidate anchors containing +`@line:column` must be reconciled once against the corrected structural names. + +Tauri helper propagation requires an established scalar argument position. +Rest parameters/rest bindings are arrays, not scalar command names. A spread +at or before the selected argument or destructured element leaves that value +unresolved; later spreads do not invalidate earlier known scalar positions. +Dot writes and known literal/constant bracket keys invalidate the same helper +symbol. Unknown computed keys conservatively invalidate helper propagation for +the receiver type, including aliases; unrelated separately inferred receivers +remain usable. These are bounded static checks, not a general heap/alias model. + +`cfg`/`cfg_attr` are recorded, never evaluated. Derive, attribute/procedural +macros, `include!`, opaque macro-generated bindings, aliases, custom module +paths, generic impl resolution and external dependencies are not expanded or +resolved. Parser recovery, including unsupported modern grammar forms, is +visible. Rust requires compatible optional `@ast-grep/napi@0.45.3`, +`@ast-grep/lang-rust@0.0.7` and `@iarna/toml@2.2.5` packages/prebuilds. +No source compiler is started to repair a missing prebuild. An unavailable +explicit Rust selection fails with a diagnostic; JS/TS-only operation remains +available. Native platform availability follows those pinned distributions; +do not infer platform verification from their target list. + +## Author, validate, commit, preview + +```sh +npm exec --no -- topo init . --skills +npm exec --no -- topo serve . +npm exec --no -- topo scan . --allow-partial +npm exec --no -- topo story validate . stories/snapshot.topo.json +# Commit the source/config/story only with repository-owner authority. +npm exec --no -- topo story preview . stories/snapshot.topo.json +npm exec --no -- topo bundle . --output ./site-output --base-path /architecture/ +``` + +Init creates a functional empty Home without a scan, compiler or model, even +before the first Git commit. Validation accepts drafts; preview renders all +committed `stories/**/*.topo.json` documents, not just its selection argument. +Native source-grounded Architecture requires the actual Git origin; do not +invent a remote for a real application. A synthetic example may use its own +explicit test remote. + +For Rust anchors, set `language: "rust"` and a unique `symbol` (or the parser's +source-relative lexical qualified name). `pattern` is an exact excerpt within +that symbol; omit `symbol` for an exact unique file-scoped pattern. Other text +files can use `language: "text"`. Never author derived line numbers or excerpts. + +Technical branch stories explicitly select `renderer: "graphviz"` and +`diagramFamily: "workflow"`. Sections may use `kind: "step"`, `"decision"` or +`"data"`. Every anchor includes the **whole file's** lowercase SHA-256, obtained +locally, for example: + +```sh +node --input-type=module -e 'import {readFileSync} from "node:fs"; import {createHash} from "node:crypto"; console.log(createHash("sha256").update(readFileSync("src-tauri/src/lib.rs")).digest("hex"))' +``` + +Every technical connection declares `classification`, `rationale`, and +`anchorIds`. `source-traced` requires at least one snapshot-verified anchor; +it describes an author's source trace, **not scanner-derived control flow**. +`inferred` is visibly labelled/dashed and must explain its inference; it may +have no anchors. `source-derived` is rejected on authored connections rather +than granting an author's claim compiler authority. Source-grounded sections +always require evidence; capability-demo is not a stale-evidence bypass. + +Select a node to focus its narrative and exact excerpts. Select a technical +edge (mouse or Enter/Space) to open its own rationale and source evidence. +`?focus=` and `?edge=` survive refresh; connection +indices follow the authored ordering, not a stable identity across reordering. +Shared anchors produce cross-story links and explicit return navigation. +The same Home category/family inventory covers native and technical stories. + +## Stale repair and regeneration + +Any change to a hash-bound file, even outside the excerpt, produces +`stale-source`. Reread the code, reassess the explanation and refresh only the +affected hash/anchor/narrative. Never update a hash merely to hide disagreement. +Keep story, section and anchor IDs when their intent is unchanged. Validation +checks structure, snapshot and exact excerpts, **not semantic truth**. + +`.topo/cache` is disposable. Delete only that generated directory in a +repository you own, then run `topo scan . --allow-partial` to rebuild the Home, +Repository views, stories, evidence and runtime assets from persistent source. +Scan recreates a missing cache; init intentionally refuses to pretend a +remaining graph with a missing site is a fresh unscanned repository. If there +has never been a scan, init then preview suffices. Do not delete authored config, +stories, source or another worktree to regenerate output. Bundle revalidates +source and includes the renderer's `spec.dot`, `validation.json`, +`renderer.json` and `evidence.json` assets. + +Publication stages a complete generation before replacing files and rolls +back reported replacement failures, including deletions. This is not a +crash-atomic filesystem transaction. Static bundle replacement remains +separately staged. No stale cache edit is a durable product feature. + +## Theme, exports and renderer provenance + +Topocode owns one application theme (`topo.theme.v1`), default dark independent +of OS media or old `archify-theme` storage. Shell, evidence, authored native +viewers, Graphviz and generated Repository viewers follow it. Native theme +buttons, T shortcuts and command actions update the owner, not only the iframe. +Focus navigation cannot reset a child to its own OS preference. + +Default native SVG exports call the native explicit-theme seam and lock the +chosen application paint; PNG/JPEG/WebP retain native export behavior and the +current theme. Explicit light/dark SVG choices remain available. Graphviz +currently provides an SVG export with computed paint; it does not claim native +motion, raster, presentation or routing features. + +Archify's 104 packaged runtime files remain pristine. Core adapts generated +HTML using supported theme/export interfaces, not renderer source edits. +Receipts distinguish native pre-adaptation output from final adapted bytes; +shared Repository output additionally binds final viewer and content-addressed +runtime assets. A native delivery receipt never certifies later adaptations. + +Graphviz is an explicit backend, never a silent fallback when native routing +fails. Its receipt identifies Graphviz 16.0.0 / `@viz-js/viz@3.30.0`, verifies +node/edge preservation, finite bounds, node containment and nonoverlapping node +boxes. Browser tests additionally exercise visible branch shapes, readable +text, focus/evidence and exports. These are **not Archify checks** and do not +prove all splines avoid all labels or that an authored explanation is correct. +Existing five native diagram families and the Architecture default remain. +The narrow embedded EPL-2.0 exception and complete notices/source availability +are described in `docs/licenses.md` and shipped `THIRD_PARTY_NOTICES.txt`. + +## Transferable findings + +- Text spelling is not name resolution. Bare handler names must respect local + Rust shadowing; explicit crate paths and unrelated sibling scopes differ. +- Static values stop being authoritative after mutation, including + assertion-wrapped and destructured writes to TypeScript helper parameters. +- Syntactic argument indexes are not runtime positions across spreads, and rest + bindings are not strings. Compare inferred bindings with independent local + execution of synthetic inputs, preserving scalar positive controls. +- Equivalent dot and bracket writes must invalidate the same member. Unknown + computed writes require receiver-level conservatism, not stale known edges. +- Shared constants explain values, not invocation identity or source ownership. + Same-line declarations require full column containment, not line-only tests. +- Physical owner positions must not enter named descendant identities. Use + structural owner keys and deterministic duplicate handling; retain positions + solely as evidence. Exercise actual persisted method-bearing indexes, not + just parser output, before claiming scan/preview/bundle compatibility. +- Parser evidence is useful without pretending to be rust-analyzer. Keep + unresolved facts, per-plugin limitations and source fingerprints attached. +- A branch-capable engine must keep decisions and data semantics. Do not + flatten branches, weaken native route checks or borrow another engine's + receipts merely to obtain a picture. +- Theme query parameters alone do not own theme: focus reconstruction, + native commands, old storage, live media changes and default exports must + all be exercised. Fonts retained in ID-addressed inline styles are required + by native exports even when other runtime assets are shared. +- Prepare every story before publication; failures must not leave a mixture + of old and new generations. Verify nonempty/matched browser selections, + actual export pixels, fresh installs and cache recreation, not test counts. +- Exact upstream license digests require no-conversion Git attributes, not just + whitespace-warning suppression. Exercise real checkout filters under + `core.autocrlf=true` with an ordinary-text CRLF control. + +The synthetic fixture has four technical nodes/three source-traced edges, a +native overview, JavaScript/TypeScript source, Rust struct/command/registration, +three impl/trait methods, an extern declaration and two Rust branches. +Its qualified method anchors and ownership survive the installed comment-only +freshness repair and cache recreation. It is an executable small-boundary proof, not a +large-repository throughput benchmark or a verified platform matrix. diff --git a/docs/story-authoring.md b/docs/story-authoring.md index 3e83157..a3b146c 100644 --- a/docs/story-authoring.md +++ b/docs/story-authoring.md @@ -12,6 +12,9 @@ After validating and committing a story, `topo story preview` populates the same Home inventory with every supported committed story. `topo scan` is optional for generated Repository exploration; it is not a preview prerequisite. +For parser-backed Rust/Tauri anchors, hash-bound technical branches, independent +Graphviz receipts and cache regeneration, use the [supported technical workflow](./rust-tauri.md). + Source-grounded stories may select any native diagram family and must keep evidence on every section. Use `classification: "capability-demo"` only for an explicitly conceptual, anchor-free renderer demonstration; it is labelled as diff --git a/examples/rust-tauri/README.md b/examples/rust-tauri/README.md new file mode 100644 index 0000000..e598ddb --- /dev/null +++ b/examples/rust-tauri/README.md @@ -0,0 +1,21 @@ +# Synthetic Rust/Tauri source + +This fixture is for static evidence, not a buildable Tauri application. It +intentionally requires no Cargo build or installed application dependencies. +It contains no real application's source, diagrams or cached output. + +In a new disposable Git repository, run the installed `topo init . --skills`, +copy `src/`, `src-tauri/` and `stories/` here into that repository, and merge +`topo.config.json` into its persistent `.topo/config.json`. Keep an actual +repository ID; the fixture uses `synthetic-snapshot`. Give the synthetic Git +repository its own test origin and first commit. Follow installed +`docs/rust-tauri.md` for validation, committed preview, partial scan (exit 2), +serve, bundle and cache recreation. Do not copy this example over real source. + +The expected frontend-to-handler binding is `refresh -> snapshot`; `snapshot` +returns ready or pending based on the input. The author traces those branches +without claiming a compiler-derived control-flow graph. The second story is a +native Architecture view sharing the handler anchor and using distinct qualified +impl/trait method anchors. The fixture also includes a trait implementation and +an extern declaration so persisted readback and comment-only identity repair +exercise structural owners, not just free functions. diff --git a/examples/rust-tauri/src-tauri/Cargo.toml b/examples/rust-tauri/src-tauri/Cargo.toml new file mode 100644 index 0000000..3806d6b --- /dev/null +++ b/examples/rust-tauri/src-tauri/Cargo.toml @@ -0,0 +1,4 @@ +[package] +name = "synthetic-snapshot" +version = "0.1.0" +edition = "2021" diff --git a/examples/rust-tauri/src-tauri/src/lib.rs b/examples/rust-tauri/src-tauri/src/lib.rs new file mode 100644 index 0000000..ef87f46 --- /dev/null +++ b/examples/rust-tauri/src-tauri/src/lib.rs @@ -0,0 +1,32 @@ +pub struct Snapshot { + pub ready: bool, +} + +#[tauri::command] +pub fn snapshot(ready: bool) -> String { + if ready { + "ready".to_owned() + } else { + "pending".to_owned() + } +} + +pub fn run() { + tauri::Builder::default().invoke_handler(tauri::generate_handler![snapshot]); +} + +pub trait Readiness { + fn ready(&self) -> bool; +} + +impl Snapshot { + pub fn ready(&self) -> bool { self.ready } +} + +impl Readiness for Snapshot { + fn ready(&self) -> bool { self.ready } +} + +extern "C" { + fn external_ready() -> bool; +} diff --git a/examples/rust-tauri/src/label.js b/examples/rust-tauri/src/label.js new file mode 100644 index 0000000..d4971a1 --- /dev/null +++ b/examples/rust-tauri/src/label.js @@ -0,0 +1,3 @@ +export function label(value) { + return `Snapshot: ${value}`; +} diff --git a/examples/rust-tauri/src/main.ts b/examples/rust-tauri/src/main.ts new file mode 100644 index 0000000..ba1591e --- /dev/null +++ b/examples/rust-tauri/src/main.ts @@ -0,0 +1,6 @@ +import { invoke } from "@tauri-apps/api/core"; + +const SNAPSHOT_COMMAND = "snapshot"; +export async function refresh(ready: boolean) { + return invoke(SNAPSHOT_COMMAND, { ready }); +} diff --git a/examples/rust-tauri/stories/snapshot-overview.topo.json b/examples/rust-tauri/stories/snapshot-overview.topo.json new file mode 100644 index 0000000..ab89733 --- /dev/null +++ b/examples/rust-tauri/stories/snapshot-overview.topo.json @@ -0,0 +1,18 @@ +{ + "schemaVersion": "1.0", + "id": "snapshot-overview", + "title": "Snapshot boundary", + "summary": "A native Architecture view of the snapshot handler, trait contract and inherent method.", + "category": "Technical flows", + "anchors": [ + { "id": "command", "path": "src-tauri/src/lib.rs", "symbol": "snapshot", "language": "rust", "sha256": "10ae862a530842a58fa4bbd52a6054e18567d38436d8acf06912ac65d2084b1b" }, + { "id": "impl-ready", "path": "src-tauri/src/lib.rs", "symbol": "src-tauri/src/lib.rs::impl Snapshot#0::ready", "language": "rust", "sha256": "10ae862a530842a58fa4bbd52a6054e18567d38436d8acf06912ac65d2084b1b" }, + { "id": "trait-ready", "path": "src-tauri/src/lib.rs", "symbol": "src-tauri/src/lib.rs::Readiness::ready", "language": "rust", "sha256": "10ae862a530842a58fa4bbd52a6054e18567d38436d8acf06912ac65d2084b1b" } + ], + "sections": [ + { "id": "handler", "title": "Snapshot handler", "body": "The command returns a string based on its input. Open the technical workflow for individual branch evidence.", "anchorIds": ["command"] }, + { "id": "ready-method", "title": "Read readiness", "body": "The inherent Snapshot method reads its stored ready field. Its structural qualified anchor distinguishes it from the trait methods.", "anchorIds": ["impl-ready"] }, + { "id": "trait-method", "title": "Readiness contract", "body": "The trait declares a ready method without a body. This is syntax and ownership evidence, not a compiler dispatch claim.", "anchorIds": ["trait-ready"] } + ], + "connections": [] +} diff --git a/examples/rust-tauri/stories/snapshot.topo.json b/examples/rust-tauri/stories/snapshot.topo.json new file mode 100644 index 0000000..4007292 --- /dev/null +++ b/examples/rust-tauri/stories/snapshot.topo.json @@ -0,0 +1,25 @@ +{ + "schemaVersion": "1.0", + "id": "snapshot", + "title": "Snapshot readiness", + "summary": "An authored trace of a frontend invoke and two Rust return branches, not compiler control flow.", + "diagramFamily": "workflow", + "renderer": "graphviz", + "category": "Technical flows", + "anchors": [ + { "id": "frontend", "path": "src/main.ts", "symbol": "refresh", "language": "typescript", "sha256": "0cc239167a30f35b215257faf3468e54692be1785045684d1404888229df608f" }, + { "id": "command", "path": "src-tauri/src/lib.rs", "symbol": "snapshot", "language": "rust", "sha256": "10ae862a530842a58fa4bbd52a6054e18567d38436d8acf06912ac65d2084b1b" }, + { "id": "registration", "path": "src-tauri/src/lib.rs", "symbol": "run", "language": "rust", "sha256": "10ae862a530842a58fa4bbd52a6054e18567d38436d8acf06912ac65d2084b1b" } + ], + "sections": [ + { "id": "invoke", "title": "Request snapshot", "body": "refresh invokes the constant snapshot command with ready.", "anchorIds": ["frontend"] }, + { "id": "choose", "title": "Ready?", "body": "The handler tests the ready argument.", "kind": "decision", "anchorIds": ["command"] }, + { "id": "ready", "title": "Ready value", "body": "The true branch produces the owned ready string.", "kind": "data", "anchorIds": ["command"] }, + { "id": "pending", "title": "Pending value", "body": "The else branch produces the owned pending string.", "anchorIds": ["command"] } + ], + "connections": [ + { "from": "invoke", "to": "choose", "label": "snapshot", "classification": "source-traced", "rationale": "The frontend command literal matches the registered root handler. This is not proof of runtime invocation.", "anchorIds": ["frontend", "registration", "command"] }, + { "from": "choose", "to": "ready", "label": "true", "classification": "source-traced", "rationale": "The if ready branch returns the ready string.", "anchorIds": ["command"] }, + { "from": "choose", "to": "pending", "label": "false", "classification": "source-traced", "rationale": "The else branch returns the pending string.", "anchorIds": ["command"] } + ] +} diff --git a/examples/rust-tauri/topo.config.json b/examples/rust-tauri/topo.config.json new file mode 100644 index 0000000..cf040e7 --- /dev/null +++ b/examples/rust-tauri/topo.config.json @@ -0,0 +1,13 @@ +{ + "schemaVersion": "1.0", + "repositoryId": "synthetic-snapshot", + "modules": [], + "analysis": { + "languages": ["typescript", "rust"], + "frameworks": ["tauri"] + }, + "catalogue": { + "title": "Snapshot application", + "categoryOrder": ["Technical flows"] + } +} diff --git a/licenses/third-party/ast-grep.LICENSE b/licenses/third-party/ast-grep.LICENSE new file mode 100644 index 0000000..f15282f --- /dev/null +++ b/licenses/third-party/ast-grep.LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Herrington Darkholme + +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/licenses/third-party/emscripten.LICENSE b/licenses/third-party/emscripten.LICENSE new file mode 100644 index 0000000..70cabe3 --- /dev/null +++ b/licenses/third-party/emscripten.LICENSE @@ -0,0 +1,102 @@ +Emscripten is available under 2 licenses, the MIT license and the +University of Illinois/NCSA Open Source License. + +Both are permissive open source licenses, with little if any +practical difference between them. + +The reason for offering both is that (1) the MIT license is +well-known, while (2) the University of Illinois/NCSA Open Source +License allows Emscripten's code to be integrated upstream into +LLVM, which uses that license, should the opportunity arise. + +The full text of both licenses follows. + +============================================================================== + +Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file. + +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. + +============================================================================== + +Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal with 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: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimers. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimers + in the documentation and/or other materials provided with the + distribution. + + Neither the names of Mozilla, + nor the names of its contributors may be used to endorse + or promote products derived from this Software without specific prior + written permission. + +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 CONTRIBUTORS 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 WITH THE SOFTWARE. + +============================================================================== + +This program uses portions of Node.js source code located in src/library_path.js, +in accordance with the terms of the MIT license. Node's license follows: + + """ + Copyright Joyent, Inc. and other Node contributors. All rights reserved. + 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. + """ + +The musl libc project is bundled in this repo, and it has the MIT license, see +system/lib/libc/musl/COPYRIGHT + +The third_party/ subdirectory contains code with other licenses. None of it is +used by default, but certain options use it (e.g., the optional closure compiler +flag will run closure compiler from third_party/). + diff --git a/licenses/third-party/expat.COPYING b/licenses/third-party/expat.COPYING new file mode 100644 index 0000000..1fe8abb --- /dev/null +++ b/licenses/third-party/expat.COPYING @@ -0,0 +1,21 @@ +Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper +Copyright (c) 2001-2026 Expat maintainers + +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/licenses/third-party/graphviz.COPYING b/licenses/third-party/graphviz.COPYING new file mode 100644 index 0000000..e23ece2 --- /dev/null +++ b/licenses/third-party/graphviz.COPYING @@ -0,0 +1,277 @@ +Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. \ No newline at end of file diff --git a/licenses/third-party/musl.COPYRIGHT b/licenses/third-party/musl.COPYRIGHT new file mode 100644 index 0000000..c1628e9 --- /dev/null +++ b/licenses/third-party/musl.COPYRIGHT @@ -0,0 +1,193 @@ +musl as a whole is licensed under the following standard MIT license: + +---------------------------------------------------------------------- +Copyright © 2005-2020 Rich Felker, et al. + +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. +---------------------------------------------------------------------- + +Authors/contributors include: + +A. Wilcox +Ada Worcester +Alex Dowad +Alex Suykov +Alexander Monakov +Andre McCurdy +Andrew Kelley +Anthony G. Basile +Aric Belsito +Arvid Picciani +Bartosz Brachaczek +Benjamin Peterson +Bobby Bingham +Boris Brezillon +Brent Cook +Chris Spiegel +Clément Vasseur +Daniel Micay +Daniel Sabogal +Daurnimator +David Carlier +David Edelsohn +Denys Vlasenko +Dmitry Ivanov +Dmitry V. Levin +Drew DeVault +Emil Renner Berthing +Fangrui Song +Felix Fietkau +Felix Janda +Gianluca Anzolin +Hauke Mehrtens +He X +Hiltjo Posthuma +Isaac Dunham +Jaydeep Patil +Jens Gustedt +Jeremy Huntwork +Jo-Philipp Wich +Joakim Sindholt +John Spencer +Julien Ramseier +Justin Cormack +Kaarle Ritvanen +Khem Raj +Kylie McClain +Leah Neukirchen +Luca Barbato +Luka Perkov +M Farkas-Dyck (Strake) +Mahesh Bodapati +Markus Wichmann +Masanori Ogino +Michael Clark +Michael Forney +Mikhail Kremnyov +Natanael Copa +Nicholas J. Kain +orc +Pascal Cuoq +Patrick Oppenlander +Petr Hosek +Petr Skocik +Pierre Carrier +Reini Urban +Rich Felker +Richard Pennington +Ryan Fairfax +Samuel Holland +Segev Finer +Shiz +sin +Solar Designer +Stefan Kristiansson +Stefan O'Rear +Szabolcs Nagy +Timo Teräs +Trutz Behn +Valentin Ochs +Will Dietz +William Haddon +William Pitcock + +Portions of this software are derived from third-party works licensed +under terms compatible with the above MIT license: + +The TRE regular expression implementation (src/regex/reg* and +src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +under a 2-clause BSD license (license text in the source files). The +included version has been heavily modified by Rich Felker in 2012, in +the interests of size, simplicity, and namespace cleanliness. + +Much of the math library code (src/math/* and src/complex/*) is +Copyright © 1993,2004 Sun Microsystems or +Copyright © 2003-2011 David Schultz or +Copyright © 2003-2009 Steven G. Kargl or +Copyright © 2003-2009 Bruce D. Evans or +Copyright © 2008 Stephen L. Moshier or +Copyright © 2017-2018 Arm Limited +and labelled as such in comments in the individual source files. All +have been licensed under extremely permissive terms. + +The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +The Android Open Source Project and is licensed under a two-clause BSD +license. It was taken from Bionic libc, used on Android. + +The AArch64 memcpy and memset code (src/string/aarch64/*) are +Copyright © 1999-2019, Arm Limited. + +The implementation of DES for crypt (src/crypt/crypt_des.c) is +Copyright © 1994 David Burren. It is licensed under a BSD license. + +The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +originally written by Solar Designer and placed into the public +domain. The code also comes with a fallback permissive license for use +in jurisdictions that may not recognize the public domain. + +The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +Valentin Ochs and is licensed under an MIT-style license. + +The x86_64 port was written by Nicholas J. Kain and is licensed under +the standard MIT terms. + +The mips and microblaze ports were originally written by Richard +Pennington for use in the ellcc project. The original code was adapted +by Rich Felker for build system and code conventions during upstream +integration. It is licensed under the standard MIT terms. + +The mips64 port was contributed by Imagination Technologies and is +licensed under the standard MIT terms. + +The powerpc port was also originally written by Richard Pennington, +and later supplemented and integrated by John Spencer. It is licensed +under the standard MIT terms. + +All other files which have no copyright comments are original works +produced specifically for use as part of this library, written either +by Rich Felker, the main author of the library, or by one or more +contibutors listed above. Details on authorship of individual files +can be found in the git version control history of the project. The +omission of copyright and license comments in each file is in the +interest of source tree size. + +In addition, permission is hereby granted for all public header files +(include/* and arch/*/bits/*) and crt files intended to be linked into +applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +the copyright notice and permission notice otherwise required by the +license, and to use these files without any requirement of +attribution. These files include substantial contributions from: + +Bobby Bingham +John Spencer +Nicholas J. Kain +Rich Felker +Richard Pennington +Stefan Kristiansson +Szabolcs Nagy + +all of whom have explicitly granted such permission. + +This file previously contained text expressing a belief that most of +the files covered by the above exception were sufficiently trivial not +to be subject to copyright, resulting in confusion over whether it +negated the permissions granted in the license. In the spirit of +permissive licensing, and of not having licensing issues being an +obstacle to adoption, that text has been removed. diff --git a/licenses/third-party/overrides.json b/licenses/third-party/overrides.json index aaf105d..4fc21ca 100644 --- a/licenses/third-party/overrides.json +++ b/licenses/third-party/overrides.json @@ -1,4 +1,85 @@ { "version": 1, - "overrides": [] + "overrides": [ + { + "name": "@viz-js/viz", "version": "3.30.0", "spdx": "MIT", "licenseFile": "viz-js.LICENSE", + "sha256": "f1fb91bf7cbcb42b2af56949e4fa909e1979d5b57c2826cabacdb4b631457720", + "sourceRepository": "mdaines/viz-js", + "sourceCommitUrl": "https://github.com/mdaines/viz-js/commit/99da545270e6e7b127a5c7ba65974b8a604a6358", + "sourceLicenseUrl": "https://raw.githubusercontent.com/mdaines/viz-js/99da545270e6e7b127a5c7ba65974b8a604a6358/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@viz-js/viz/v/3.30.0" + }, + { + "name": "@ast-grep/napi-darwin-arm64", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-darwin-arm64/v/0.45.3" + }, + { + "name": "@ast-grep/napi-darwin-x64", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-darwin-x64/v/0.45.3" + }, + { + "name": "@ast-grep/napi-linux-x64-gnu", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-linux-x64-gnu/v/0.45.3" + }, + { + "name": "@ast-grep/napi-linux-x64-musl", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-linux-x64-musl/v/0.45.3" + }, + { + "name": "@ast-grep/napi-linux-arm64-gnu", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-linux-arm64-gnu/v/0.45.3" + }, + { + "name": "@ast-grep/napi-linux-arm64-musl", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-linux-arm64-musl/v/0.45.3" + }, + { + "name": "@ast-grep/napi-win32-x64-msvc", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-win32-x64-msvc/v/0.45.3" + }, + { + "name": "@ast-grep/napi-win32-ia32-msvc", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-win32-ia32-msvc/v/0.45.3" + }, + { + "name": "@ast-grep/napi-win32-arm64-msvc", "version": "0.45.3", "spdx": "MIT", "optionalDistribution": true, "licenseFile": "ast-grep.LICENSE", + "sha256": "81471889c77b2161a3e4dcdb1b2e6ca382e485766132d92d5fe1d7497e7dd2d9", + "sourceRepository": "ast-grep/ast-grep", + "sourceCommitUrl": "https://github.com/ast-grep/ast-grep/commit/979c143639e3588c31f563091e69398683ed34f0", + "sourceLicenseUrl": "https://raw.githubusercontent.com/ast-grep/ast-grep/979c143639e3588c31f563091e69398683ed34f0/LICENSE", + "packageMetadataUrl": "https://www.npmjs.com/package/@ast-grep/napi-win32-arm64-msvc/v/0.45.3" + } + ] } diff --git a/licenses/third-party/viz-js.LICENSE b/licenses/third-party/viz-js.LICENSE new file mode 100644 index 0000000..214cfc3 --- /dev/null +++ b/licenses/third-party/viz-js.LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Michael Daines + +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/packages/cli/package.json b/packages/cli/package.json index 4022862..6fb9d83 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -21,6 +21,7 @@ "@topo/diagram-core": "workspace:*", "@topo/enrichment": "workspace:*", "@topo/graph": "workspace:*", + "@topo/languages": "workspace:*", "@topo/modules": "workspace:*", "@topo/reports": "workspace:*", "@topo/scanner": "workspace:*", diff --git a/packages/cli/src/catalogue.ts b/packages/cli/src/catalogue.ts index 9c6065e..f2232f0 100644 --- a/packages/cli/src/catalogue.ts +++ b/packages/cli/src/catalogue.ts @@ -3,12 +3,14 @@ import { execFile } from "node:child_process"; import { readFile, readdir, rm, stat } from "node:fs/promises"; import { resolve } from "node:path"; import { promisify } from "node:util"; -import { renderStory } from "@topo/diagram-core"; +import { CORE_THEME_SCRIPT, renderStory } from "@topo/diagram-core"; import { parseStoryDocument, resolveStoryDocument, type StoryDocument, type StoryRenderer, + type ResolvedSourceAnchor, + type StoryArtifact, } from "@topo/story"; import { writeGenerated, @@ -16,6 +18,8 @@ import { isMissing, loadConfig, withWorkspaceLock, + withGeneratedTransaction, + removeGenerated, type WorkspaceCatalogueConfig, } from "@topo/workspace"; import { @@ -37,10 +41,9 @@ export interface CatalogueStory { readonly modified: number | null; }; readonly contents: string; - readonly renderer: { - readonly name: string; - readonly pin: string; - }; + readonly renderer: StoryArtifact["renderer"]; + readonly anchors?: readonly ResolvedSourceAnchor[]; + readonly assets?: Readonly>; } export interface BuiltCatalogue { @@ -89,6 +92,7 @@ export async function initializeSite(root: string, assets: string): Promise => [name, await readFile(resolve(assets, name))])), ["shell.js", SHELL_SCRIPT], + ["theme.js", CORE_THEME_SCRIPT], ["site-state.json", `${JSON.stringify({ schemaVersion: "1.0", kind: "unscanned", repositoryId: config.repositoryId, })}\n`], @@ -295,9 +299,12 @@ export async function buildCatalogue( documentPath, history, contents: artifact.contents, - renderer: { - name: artifact.renderer.name, - pin: artifact.renderer.pin, + renderer: artifact.renderer, + anchors: resolved.anchors, + assets: { + ...artifact.assets, + "evidence.json": `${JSON.stringify({ source: resolved.source, anchors: resolved.anchors, connections: document.connections }, null, 2)}\n`, + "renderer.json": `${JSON.stringify(artifact.renderer, null, 2)}\n`, }, }; })); @@ -362,6 +369,17 @@ const STORY_NAVIGATION_SCRIPT = `(() => { const crossLinks = [...document.querySelectorAll("[data-cross-story]")]; const params = new URLSearchParams(window.location.search); + function showEvidence(focus, edge) { + for (const evidence of document.querySelectorAll("[data-section-evidence]")) { + evidence.hidden = edge !== null || Boolean(focus) && evidence.dataset.sectionEvidence !== focus; + } + for (const evidence of document.querySelectorAll("[data-edge-evidence]")) { + evidence.hidden = edge !== null ? evidence.dataset.edgeEvidence !== edge : + Boolean(focus) && evidence.dataset.edgeFrom !== focus && evidence.dataset.edgeTo !== focus; + } + if (edge !== null) document.querySelector(".story-details").open = true; + } + function setFocus(nodeId) { for (const link of nodeLinks) { if (link.getAttribute("data-node-id") === nodeId) { @@ -375,6 +393,7 @@ const STORY_NAVIGATION_SCRIPT = `(() => { function rememberFocus(nodeId) { const url = new URL(window.location.href); + url.searchParams.delete("edge"); if (nodeId) url.searchParams.set("focus", nodeId); else url.searchParams.delete("focus"); window.history.replaceState(null, "", url); @@ -416,11 +435,27 @@ const STORY_NAVIGATION_SCRIPT = `(() => { const child = frame.contentWindow; const childDocument = frame.contentDocument; if (!child || !childDocument) return; + const currentParams = new URLSearchParams(window.location.search); + showEvidence(currentParams.get("focus") || "", currentParams.get("edge")); const syncSelectedNode = () => { - const focus = new URLSearchParams(child.location.hash.replace(/^#/, "")).get("focus"); + const selected = new URLSearchParams(child.location.hash.replace(/^#/, "")); + const edge = selected.get("edge"); + if (edge !== null && document.querySelector('[data-edge-evidence="' + CSS.escape(edge) + '"]')) { + const current = new URL(window.location.href); + current.searchParams.delete("focus"); + current.searchParams.set("edge", edge); + window.history.replaceState(null, "", current); + showEvidence("", edge); + return; + } + const focus = selected.get("focus"); if (!focus) return; const candidates = crossLinks.filter((link) => link.getAttribute("data-source-node") === focus); - rememberFocus(focus); + const current = new URL(window.location.href); + current.searchParams.delete("edge"); + current.searchParams.set("focus", focus); + window.history.replaceState(null, "", current); + showEvidence(focus, null); if (diagramFamily !== "sequence" && candidates.length === 1) { follow(candidates[0]); } @@ -430,6 +465,9 @@ const STORY_NAVIGATION_SCRIPT = `(() => { }); setFocus(params.get("focus") || ""); + if (params.has("edge") && document.querySelector('[data-edge-evidence="' + CSS.escape(params.get("edge")) + '"]')) { + frame.src = "viewer.html#edge=" + encodeURIComponent(params.get("edge")); + } })();\n`; async function retireLegacySiteEntries( @@ -438,18 +476,12 @@ async function retireLegacySiteEntries( retireLegacyAssets: boolean, ): Promise { await Promise.all([ - rm(await workspacePath(root, "cache/site/explorer"), { - recursive: true, - force: true, - }), + removeGenerated(root, "cache/site/explorer"), ...(retireLegacyAssets - ? [rm(await workspacePath(root, "cache/site/assets"), { - recursive: true, - force: true, - })] + ? [removeGenerated(root, "cache/site/assets")] : []), ...["favicon.svg", "main.js", "styles.css"].map(async (name) => - rm(await workspacePath(root, `cache/site/${name}`), { force: true })), + removeGenerated(root, `cache/site/${name}`)), ]); const storyRoot = await workspacePath(root, "cache/site/stories"); const expected = new Set(stories.map(({ document }) => document.id)); @@ -464,10 +496,15 @@ async function retireLegacySiteEntries( } await Promise.all(entries .filter((entry) => !expected.has(entry.name)) - .map(async (entry) => rm( - await workspacePath(root, `cache/site/stories/${entry.name}`), - { recursive: entry.isDirectory(), force: true }, - ))); + .map(async (entry) => removeGenerated(root, `cache/site/stories/${entry.name}`))); + for (const story of stories) { + if (!entries.some((entry) => entry.name === story.document.id && entry.isDirectory())) continue; + const files = await readdir(await workspacePath(root, `cache/site/stories/${story.document.id}`)); + const retained = new Set(["index.html", "viewer.html", ...Object.keys(story.assets ?? {})]); + for (const file of files) { + if (!retained.has(file)) await removeGenerated(root, `cache/site/stories/${story.document.id}/${file}`); + } + } } const SHELL_SCRIPT = `(() => { @@ -829,11 +866,20 @@ export function renderStoryWrapper( const crossLinks = (linksByNode.get(section.id) ?? []).map((link) => `Open ${escapeHtml(link.targetStoryTitle)}: ${escapeHtml(link.targetNodeTitle)}`, ).join(""); + const evidence = (story.anchors ?? []).filter((anchor) => section.anchorIds.includes(anchor.id)).map((anchor) => + `
${escapeHtml(anchor.path)}:${anchor.location.startLine}-${anchor.location.endLine}
${escapeHtml(anchor.excerpt)}
`).join(""); return `
  • ${escapeHtml(section.title)} ${crossLinks} +

    ${escapeHtml(section.body)}

    ${evidence}
  • `; }).join("\n"); + const edges = story.document.connections.map((edge, index) => { + if (!edge.classification) return ""; + const excerpts = (story.anchors ?? []).filter((anchor) => edge.anchorIds?.includes(anchor.id)).map((anchor) => + `
    ${escapeHtml(anchor.path)}:${anchor.location.startLine}-${anchor.location.endLine}
    ${escapeHtml(anchor.excerpt)}
    `).join(""); + return ``; + }).join(""); return renderShellPage(stories, config, historyIncomplete, story, `\
    @@ -843,7 +889,7 @@ export function renderStoryWrapper(

    ${escapeHtml(story.document.summary)}

    -
      ${nodes}
    +
      ${nodes}
    ${edges}
    `, repository); } @@ -923,6 +969,7 @@ function renderShellPage( ${escapeHtml(title)} | Topocode + @@ -1084,6 +1151,7 @@ function renderShellPage(