diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fe33a9..5a05a98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,7 +77,7 @@ jobs: staging="clan-${{ github.ref_name }}-${{ matrix.target }}" mkdir "$staging" cp "target/${{ matrix.target }}/release/clan" "$staging/" - cp README.md LICENSE "$staging/" 2>/dev/null || true + cp README.md LICENSE NOTICE "$staging/" 2>/dev/null || true tar czf "$staging.tar.gz" "$staging" echo "ASSET=$staging.tar.gz" >> "$GITHUB_ENV" @@ -88,7 +88,7 @@ jobs: $staging = "clan-${{ github.ref_name }}-${{ matrix.target }}" New-Item -ItemType Directory -Path $staging | Out-Null Copy-Item "target/${{ matrix.target }}/release/clan.exe" $staging - Copy-Item README.md, LICENSE $staging -ErrorAction SilentlyContinue + Copy-Item README.md, LICENSE, NOTICE $staging -ErrorAction SilentlyContinue Compress-Archive -Path $staging -DestinationPath "$staging.zip" "ASSET=$staging.zip" | Out-File -FilePath $env:GITHUB_ENV -Append diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..4b33a2e --- /dev/null +++ b/NOTICE @@ -0,0 +1,165 @@ +NOTICE +====== + +CLAN — Context and Live Agent Notation +Copyright (c) 2026 Sai Eeshwar (https://github.com/saieeshward) +Copyright (c) 2026 Shreyansh Soni (https://github.com/batunii) + +This product is licensed under the Mozilla Public License 2.0 (see LICENSE). +The CLAN specification documents are licensed under CC BY 4.0 (see LICENSE-SPEC). + +This product includes the following third-party open-source components. +For each component the license family is noted; full license texts are +available at the URLs or in the dependency source trees. + +------------------------------------------------------------------------------- +Specifications +------------------------------------------------------------------------------- + +TOON — Token-Oriented Object Notation + Copyright (c) 2025-present Johann Schopplich + License: MIT + https://github.com/toon-format/spec + + The CLAN SDK implements the TOON serialisation format (spec §14) as defined + by the TOON specification. TOON is an independent open specification created + by Johann Schopplich. + +------------------------------------------------------------------------------- +Rust dependencies (CLI, SDK, and Desktop Viewer) +------------------------------------------------------------------------------- + +serde · serde_json · serde_derive + Copyright (c) 2014 Erick Tryzelaar + Copyright (c) 2014 David Tolnay + License: MIT OR Apache-2.0 + https://github.com/serde-rs/serde + +serde_yaml + Copyright (c) 2015 David Tolnay + License: MIT OR Apache-2.0 + https://github.com/dtolnay/serde-yaml + +sha2 (RustCrypto) + Copyright (c) 2006-present The RustCrypto Developers + License: MIT OR Apache-2.0 + https://github.com/RustCrypto/hashes + +uuid + Copyright (c) 2013-2014 The Rust Project Developers + Copyright (c) 2018 Contributors to the uuid crate + License: Apache-2.0 OR MIT + https://github.com/uuid-rs/uuid + +chrono + Copyright (c) 2014 Kang Seonghoon + Copyright (c) 2014 Brandon W Maister + License: MIT OR Apache-2.0 + https://github.com/chronotope/chrono + +zip + Copyright (c) 2014 Mathijs van de Nes + Copyright (c) 2020 Marli Frost + Copyright (c) 2022 Ryan Bleecker + License: MIT + https://github.com/zip-rs/zip2 + +jsonschema + Copyright (c) 2019 Dmitry Dygalo + License: MIT + https://github.com/Stranger6667/jsonschema-rs + +lol_html + Copyright (c) 2019 Cloudflare, Inc. + License: BSD-2-Clause + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + + https://github.com/cloudflare/lol-html + +thiserror · anyhow + Copyright (c) 2019 David Tolnay + License: MIT OR Apache-2.0 + https://github.com/dtolnay/thiserror + https://github.com/dtolnay/anyhow + +clap + Copyright (c) 2015-2022 Kevin K. + Copyright (c) 2022 The clap Developers + License: MIT OR Apache-2.0 + https://github.com/clap-rs/clap + +tempfile + Copyright (c) 2015 Steven Allen + Copyright (c) 2015 The Rust Project Developers + License: MIT OR Apache-2.0 + https://github.com/Stebalien/tempfile + +tokio + Copyright (c) 2023 Tokio Contributors + License: MIT + https://github.com/tokio-rs/tokio + +Tauri · tauri-build · tauri-plugin-dialog · tauri-plugin-single-instance +· wry · tao + Copyright (c) 2019-present The Tauri Programme within The Commons Conservancy + License: MIT OR Apache-2.0 + https://github.com/tauri-apps/tauri + +------------------------------------------------------------------------------- +JavaScript / frontend dependencies (Desktop Viewer only) +------------------------------------------------------------------------------- + +React · react-dom + Copyright (c) Meta Platforms, Inc. and affiliates + License: MIT + https://github.com/facebook/react + +@tauri-apps/api · @tauri-apps/plugin-dialog + Copyright (c) 2019-present The Tauri Programme within The Commons Conservancy + License: MIT OR Apache-2.0 + https://github.com/tauri-apps/tauri + +esbuild + Copyright (c) 2020 Evan Wallace + License: MIT + https://github.com/evanw/esbuild + +Vite + Copyright (c) 2019-present Evan You and Vite contributors + License: MIT + https://github.com/vitejs/vite + +------------------------------------------------------------------------------- +Complete transitive dependency list +------------------------------------------------------------------------------- + +To generate a full machine-readable license report for all transitive Rust +dependencies, install cargo-about and run: + + cargo install cargo-about + cargo about generate about.hbs > LICENSES-RUST.html + +For the JavaScript dependency tree (Desktop Viewer): + + cd app && npx license-checker --start . --out LICENSES-JS.csv diff --git a/README.md b/README.md index 7cea281..fe45574 100644 --- a/README.md +++ b/README.md @@ -287,6 +287,14 @@ A CLAN file is live: it carries its own specification, so any agent can understa Maintained by [Sai Eeshwar](https://github.com/saieeshward) and [Shreyansh Soni](https://github.com/batunii). +## Built With + +The CLI and SDK are written in [Rust](https://www.rust-lang.org/). Key libraries: [serde](https://github.com/serde-rs/serde), [clap](https://github.com/clap-rs/clap), [jsonschema-rs](https://github.com/Stranger6667/jsonschema-rs), [lol_html](https://github.com/cloudflare/lol-html) (BSD-2-Clause, © Cloudflare, Inc.), [chrono](https://github.com/chronotope/chrono), [zip](https://github.com/zip-rs/zip2), [tokio](https://github.com/tokio-rs/tokio). + +The Desktop Viewer is built with [Tauri](https://tauri.app/) (© The Tauri Programme within The Commons Conservancy, MIT/Apache-2.0) and [React](https://react.dev/) (© Meta Platforms, Inc., MIT). Full third-party credits: [NOTICE](NOTICE). + +The CLI and SDK use [TOON (Token-Oriented Object Notation)](https://github.com/toon-format/spec) for token-efficient agent context injection (spec §14). TOON is an open specification by [Johann Schopplich](https://github.com/johannschopplich) (MIT License © 2025-present Johann Schopplich). + ## License [MPL-2.0](LICENSE) — the spec is open; implementations in any language are welcome. diff --git a/app/public/mock-clan/spec/agent-guide.md b/app/public/mock-clan/spec/agent-guide.md index 7a31281..8589623 100644 --- a/app/public/mock-clan/spec/agent-guide.md +++ b/app/public/mock-clan/spec/agent-guide.md @@ -14,7 +14,7 @@ CLAN (Context and Live Agent Notation) is a file format for passing structured c | `agent/output-schema.json` | JSON Schema | Exactly what you must return | | `human/patches.yaml` | YAML | Text edits made by humans (if included) | -`shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** — same data as the source YAML files, ~40% fewer tokens. Read them as structured key-value data. +`shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** (spec: https://github.com/toon-format/spec, © Johann Schopplich, MIT) — same data as the source YAML files, ~40% fewer tokens. Read them as structured key-value data. **⚠ Token-saving rule**: `clan read agent` includes all data (TOON-encoded). Do NOT also run `clan read data` — it returns the same content in a different format and wastes tokens. diff --git a/app/public/mock-clan/spec/clan.md b/app/public/mock-clan/spec/clan.md index 4b0a1f4..c75204b 100644 --- a/app/public/mock-clan/spec/clan.md +++ b/app/public/mock-clan/spec/clan.md @@ -88,7 +88,7 @@ $schema: "spec/schemas/document-type.schema.json" ## Agent Injection Serialisation -When the SDK assembles context for an agent, `shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** — approximately 40% fewer tokens than equivalent JSON or YAML. Agent output is always returned as JSON and validated against `agent/output-schema.json` before packaging. +When the SDK assembles context for an agent, `shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** (open spec by Johann Schopplich — https://github.com/toon-format/spec) — approximately 40% fewer tokens than equivalent JSON or YAML. Agent output is always returned as JSON and validated against `agent/output-schema.json` before packaging. --- diff --git a/app/src-tauri/tauri.conf.json b/app/src-tauri/tauri.conf.json index 8641d02..9da8f4d 100644 --- a/app/src-tauri/tauri.conf.json +++ b/app/src-tauri/tauri.conf.json @@ -25,6 +25,10 @@ "bundle": { "active": true, "targets": "all", + "resources": { + "../../NOTICE": "NOTICE", + "../../LICENSE": "LICENSE" + }, "icon": [ "icons/32x32.png", "icons/128x128.png", diff --git a/crates/clan-sdk/src/toon.rs b/crates/clan-sdk/src/toon.rs index 536f9d2..f0b81c2 100644 --- a/crates/clan-sdk/src/toon.rs +++ b/crates/clan-sdk/src/toon.rs @@ -4,6 +4,9 @@ //! TOON — Token-Oriented Object Notation (spec §14). //! +//! TOON is a format specification by Johann Schopplich. +//! Specification: https://github.com/toon-format/spec (MIT License © 2025-present Johann Schopplich) +//! //! TOON encodes the same data model as JSON/YAML using indentation and //! explicit `[n]` length declarations instead of brackets, for roughly 40% //! fewer tokens on structured data. It is an **input-side** serialisation: diff --git a/spec/CLAN-SPEC.md b/spec/CLAN-SPEC.md index e4d394a..f3f78d2 100644 --- a/spec/CLAN-SPEC.md +++ b/spec/CLAN-SPEC.md @@ -802,7 +802,7 @@ This ensures the SDK's I/O footprint matches the operation being performed, not ### TOON Serialisation for Injected Context -The SDK serialises `shared/data.yaml` and `agent/decision-chain.yaml` as **TOON (Token-Oriented Object Notation)** before injection. TOON encodes the same data model as JSON using indentation and explicit length declarations instead of brackets, achieving approximately 40% fewer tokens on structured data. This reduction applies on every agent call across the entire pipeline. +The SDK serialises `shared/data.yaml` and `agent/decision-chain.yaml` as **TOON (Token-Oriented Object Notation)** before injection. TOON is an open format specification by Johann Schopplich (https://github.com/toon-format/spec, MIT License © 2025-present Johann Schopplich). TOON encodes the same data model as JSON using indentation and explicit length declarations instead of brackets, achieving approximately 40% fewer tokens on structured data. This reduction applies on every agent call across the entire pipeline. ``` # shared/data.yaml injected as TOON — not raw YAML diff --git a/spec/agent-guide.md b/spec/agent-guide.md index 8716a23..1b1a821 100644 --- a/spec/agent-guide.md +++ b/spec/agent-guide.md @@ -14,7 +14,7 @@ CLAN (Context and Live Agent Notation) is a file format for passing structured c | `agent/output-schema.json` | JSON Schema | Exactly what you must return | | `human/patches.yaml` | YAML | Text edits made by humans (if included) | -`shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** — same data as the source YAML files, ~40% fewer tokens. Read them as structured key-value data. +`shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** (spec: https://github.com/toon-format/spec, © Johann Schopplich, MIT) — same data as the source YAML files, ~40% fewer tokens. Read them as structured key-value data. **⚠ Token-saving rule**: `clan read agent` includes all data (TOON-encoded). Do NOT also run `clan read data` — it returns the same content in a different format and wastes tokens. diff --git a/spec/clan.md b/spec/clan.md index ea1b8d0..05dc869 100644 --- a/spec/clan.md +++ b/spec/clan.md @@ -88,7 +88,7 @@ $schema: "spec/schemas/document-type.schema.json" ## Agent Injection Serialisation -When the SDK assembles context for an agent, `shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** — approximately 40% fewer tokens than equivalent JSON or YAML. Agent output is always returned as JSON and validated against `agent/output-schema.json` before packaging. +When the SDK assembles context for an agent, `shared/data.yaml` and `agent/decision-chain.yaml` are serialised as **TOON (Token-Oriented Object Notation)** (open spec by Johann Schopplich — https://github.com/toon-format/spec) — approximately 40% fewer tokens than equivalent JSON or YAML. Agent output is always returned as JSON and validated against `agent/output-schema.json` before packaging. ---