Skip to content

Tokless v0.4.0 — Cross-Agent Code Skeleton, Blind-Read Guard & Token Auditor

Choose a tag to compare

@daoif daoif released this 21 Nov 18:29
· 17 commits to main since this release

Tokless v0.4.0 — 跨 Agent 代码骨架提取、防盲读硬护栏与账单审计套件

agy-tokless 正式升级并更名为 tokless(daoif/tokless),零外部依赖(Node.js >=18),面向主流 AI 编程助手提供统一的省流工具链。

快速启用 / Quick Install

npx tokless install

支持按需指定目标宿主:npx tokless install --target antigravity,claude-code,codex

v0.4.0 核心更新 / Highlights

  1. 统一品牌与多宿主一键挂载 (npx tokless install)
    • 原生适配 Google Antigravity(插件、PreToolUse 防盲读钩子、inheritMcp: false 净身子角色)、Claude Code(Read PreToolUse 钩子与 Skills)与 Codex CLI(Skills),开放 targets/ 插件目录便于社区扩展更多工具。
  2. 双端 PreToolUse 防盲读硬刹车 (scripts/read-guard-hook.js)
    • 拦截未传行号盲读大文件及 1~全文末尾 假切片,自动返回紧凑 AST 行号骨架指引精准读取,不设死板单次行数跨度限制。
  3. 跨端代码骨架与账单/缓存断层审计 (tokless skeleton & tokless audit)
    • tokless skeleton 毫秒级提取函数/类 [L起-L止] 行号骨架(普遍节省 85%~97% 探索 Token);
    • tokless audit 支持通用的 audit project 规则/底座税体检,以及面向 Antigravity 的会话账单、Prefix Cache 断层与自动压缩节点透视。
  4. 标准 Node.js 编程接口 (exports)
    • 导出 .、./skeleton、./read-guard、./audit,支持外部工具零子进程直接集成调用。
  5. 跨平台健壮性与安全加固
    • 钩子自动解析写入绝对路径 Node 可执行文件(兼容 GUI 宿主无 PATH 场景)、补齐 Unix / Windows PowerShell 双端 Skill 指引、强化审计会话 ID 路径穿越防护与回归单测。

English Summary

agy-tokless is now tokless (daoif/tokless) — a zero-dependency Node.js (>=18) toolkit to stop blind full-file reads and compounding Cache Read token burn across AI coding agents.

  • One-Command Multi-Agent Setup: npx tokless install auto-detects and configures Google Antigravity, Claude Code (Read PreToolUse hook + skills), and Codex CLI (skills), with an extensible targets/ architecture.
  • Universal AST Skeleton & Blind-Read Brake: tokless skeleton maps [Lstart-Lend] signatures in milliseconds; read-guard-hook.js blocks unsliced full-file reads and fake 1..EOF slices while allowing legitimate large targeted ranges.
  • Token Bill, Prefix Cache Cliff & MCP Base-Tax Auditor: tokless audit project works across projects; tokless audit session / compare inspects Antigravity token bills, cache cliffs, and compaction checkpoints.
  • Clean Programmatic API: Standard package exports (., ./skeleton, ./read-guard, ./audit).

致谢 / Acknowledgments

特别感谢 @PXY000 在 PR #1 中贡献的跨平台绝对路径 Node 解析、Unix/PowerShell 双端 Skill 文档修复、沙箱安全路径穿越防护及回归测试!
Special thanks to @PXY000 (PR #1) for contributing cross-platform Node binary resolution in hooks, Unix/PowerShell skill path instructions, sandbox-safe path traversal guards, and regression tests!