Skip to content

feat(tokenless): add tokenless component#199

Open
shiloong wants to merge 2 commits intoalibaba:mainfrom
shiloong:main
Open

feat(tokenless): add tokenless component#199
shiloong wants to merge 2 commits intoalibaba:mainfrom
shiloong:main

Conversation

@shiloong
Copy link
Copy Markdown
Contributor

@shiloong shiloong commented Apr 13, 2026

Description

Token-Less is an LLM token optimization toolkit that reduces token consumption
through Schema/Response Compression and Command Rewriting strategies.

Core Features:
- Schema Compression: Compresses OpenAI Function Calling tool
  definitions (~57% savings)
- Response Compression: 7-rule JSON compressor (~26-78% savings)
- Command Rewriting: RTK integration for CLI output filtering (60-90%
  savings)

Components:
- crates/tokenless-schema: Core library (SchemaCompressor +
  ResponseCompressor)
- crates/tokenless-cli: CLI binary for manual compression
- openclaw/: OpenClaw plugin (TypeScript)
- hooks/copilot-shell/: Copilot Shell hook scripts
- third_party/rtk/: RTK submodule for command rewriting

Integrations:
- OpenClaw Plugin: Command rewriting, response compression, schema
  compression
- Copilot Shell Hook: Command rewriting, response compression

Installation:
- RPM package for Alinux 4 (recommended)
- Source build via 'make setup'

Testing: 41 tests (22 unit + 19 integration)
License: MIT
Documentation: src/tokenless/docs/tokenless-user-manual-en.md,tokenless-user-manual-zh.md

Related Issue

no-issue: new feature

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional change)
  • Performance improvement
  • CI/CD or build changes

Scope

  • cosh (copilot-shell)
  • sec-core (agent-sec-core)
  • skill (os-skills)
  • sight (agentsight)
  • tokenless (tokenless)
  • Multiple / Project-wide

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly
  • For cosh: Lint passes, type check passes, and tests pass
  • For sec-core (Rust): cargo clippy -- -D warnings and cargo fmt --check pass
  • For sec-core (Python): Ruff format and pytest pass
  • For skill: Skill directory structure is valid and shell scripts pass syntax check
  • For sight: cargo clippy -- -D warnings and cargo fmt --check pass
  • For tokenless: Cargo test passes, clippy warnings resolved
  • Lock files are up to date (package-lock.json / Cargo.lock)

Testing

cd src/tokenless
make test

@github-actions github-actions bot added the scope:scripts ./scripts/ label Apr 13, 2026
@shiloong shiloong force-pushed the main branch 3 times, most recently from 5a6d363 to b63e6d2 Compare April 14, 2026 11:02
@shiloong shiloong requested a review from Ziqi002 as a code owner April 14, 2026 11:02
…w efficiency

Token-Less is an LLM token optimization toolkit that reduces token consumption
through Schema/Response Compression and Command Rewriting strategies.

Core Features:
- Schema Compression: Compresses OpenAI Function Calling tool
  definitions (~57% savings)
- Response Compression: 7-rule JSON compressor (~26-78% savings)
- Command Rewriting: RTK integration for CLI output filtering (60-90%
  savings)

Components:
- crates/tokenless-schema: Core library (SchemaCompressor +
  ResponseCompressor)
- crates/tokenless-cli: CLI binary for manual compression
- openclaw/: OpenClaw plugin (TypeScript)
- hooks/copilot-shell/: Copilot Shell hook scripts
- third_party/rtk/: RTK submodule for command rewriting

Integrations:
- OpenClaw Plugin: Command rewriting, response compression, schema
  compression
- Copilot Shell Hook: Command rewriting, response compression

Installation:
- RPM package for Alinux 4 (recommended)
- Source build via 'make setup'

Testing: 41 tests (22 unit + 19 integration)
License: MIT
Documentation: src/tokenless/docs/tokenless-user-manual-en.md

Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
…a project

Add tokenless component as a default build target for reducing LLM token
consumption through schema/response compression and command rewriting.

Changes:
- AGENT.md: Add tokenless to component list and build instructions
- NOTICE: Add tokenless copyright and Rust dependency attributions
- README.md/README_CN.md: Add tokenless to project overview
- .gitmodules: Add rtk submodule (https://github.com/rtk-ai/rtk.git)
- scripts/build-all.sh: Add build_tokenless and install_tokenless functions
- scripts/rpm-build.sh: Add build_tokenless for RPM package generation
- tests/run-all-tests.sh: Add run_tokenless for test integration

Build Integration:
- Default component in build-all.sh (cosh, skills, sec-core, tokenless)
- RPM package target in rpm-build.sh
- Test target in run-all-tests.sh (--filter tokenless)
- Submodule: third_party/rtk for command rewriting engine

Features:
- Schema Compression: ~57% savings on OpenAI Function Calling definitions
- Response Compression: ~26-78% savings with 7-rule JSON compressor
- Command Rewriting: 60-90% savings via RTK integration (70+ commands)

Integrations:
- OpenClaw Plugin: Command rewriting, response/schema compression
- Copilot Shell Hook: Command rewriting, response compression

Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:scripts ./scripts/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant