Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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

Expand Down
165 changes: 165 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -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 <dtolnay@gmail.com>
License: MIT OR Apache-2.0
https://github.com/serde-rs/serde

serde_yaml
Copyright (c) 2015 David Tolnay <dtolnay@gmail.com>
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 <dadygalo@gmail.com>
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 <dtolnay@gmail.com>
License: MIT OR Apache-2.0
https://github.com/dtolnay/thiserror
https://github.com/dtolnay/anyhow

clap
Copyright (c) 2015-2022 Kevin K. <kbknapp@gmail.com>
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion app/public/mock-clan/spec/agent-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion app/public/mock-clan/spec/clan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down
4 changes: 4 additions & 0 deletions app/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"bundle": {
"active": true,
"targets": "all",
"resources": {
"../../NOTICE": "NOTICE",
"../../LICENSE": "LICENSE"
},
"icon": [
"icons/32x32.png",
"icons/128x128.png",
Expand Down
3 changes: 3 additions & 0 deletions crates/clan-sdk/src/toon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion spec/CLAN-SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/agent-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion spec/clan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down
Loading