feat(tokenless): add tokenless component#199
Open
shiloong wants to merge 2 commits intoalibaba:mainfrom
Open
Conversation
5a6d363 to
b63e6d2
Compare
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue
no-issue: new feature
Type of Change
Scope
cosh(copilot-shell)sec-core(agent-sec-core)skill(os-skills)sight(agentsight)tokenless(tokenless)Checklist
cosh: Lint passes, type check passes, and tests passsec-core(Rust):cargo clippy -- -D warningsandcargo fmt --checkpasssec-core(Python): Ruff format and pytest passskill: Skill directory structure is valid and shell scripts pass syntax checksight:cargo clippy -- -D warningsandcargo fmt --checkpasstokenless: Cargo test passes, clippy warnings resolvedpackage-lock.json/Cargo.lock)Testing
cd src/tokenless
make test