anolisa-tokenless 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +770 -0
  3. package/adapters/tokenless/claude-code/.claude-plugin/marketplace.json +15 -0
  4. package/adapters/tokenless/claude-code/.claude-plugin/plugin.json +9 -0
  5. package/adapters/tokenless/claude-code/hooks/hooks.json +38 -0
  6. package/adapters/tokenless/claude-code/scripts/detect.sh +193 -0
  7. package/adapters/tokenless/claude-code/scripts/install.sh +92 -0
  8. package/adapters/tokenless/claude-code/scripts/uninstall.sh +50 -0
  9. package/adapters/tokenless/codex/.codex-plugin/plugin.json +20 -0
  10. package/adapters/tokenless/codex/README.md +160 -0
  11. package/adapters/tokenless/codex/hooks/hooks.json +52 -0
  12. package/adapters/tokenless/codex/scripts/_common.sh +25 -0
  13. package/adapters/tokenless/codex/scripts/check-tokenless +94 -0
  14. package/adapters/tokenless/codex/scripts/compress-response +441 -0
  15. package/adapters/tokenless/codex/scripts/detect.sh +61 -0
  16. package/adapters/tokenless/codex/scripts/install.sh +151 -0
  17. package/adapters/tokenless/codex/scripts/rewrite-hook +282 -0
  18. package/adapters/tokenless/codex/scripts/tool-ready +303 -0
  19. package/adapters/tokenless/codex/scripts/uninstall.sh +78 -0
  20. package/adapters/tokenless/common/commands/tokenless-stats.toml +2 -0
  21. package/adapters/tokenless/common/cosh-extension.json +65 -0
  22. package/adapters/tokenless/common/hooks/compress_response_hook.py +487 -0
  23. package/adapters/tokenless/common/hooks/compress_schema_hook.py +144 -0
  24. package/adapters/tokenless/common/hooks/compress_toon_hook.py +160 -0
  25. package/adapters/tokenless/common/hooks/hook_utils.py +584 -0
  26. package/adapters/tokenless/common/hooks/rewrite_hook.py +223 -0
  27. package/adapters/tokenless/common/hooks/run-hook.sh +62 -0
  28. package/adapters/tokenless/common/hooks/tool_categories.json +99 -0
  29. package/adapters/tokenless/common/hooks/tool_ready_hook.sh +571 -0
  30. package/adapters/tokenless/common/tokenless-env-fix.sh +730 -0
  31. package/adapters/tokenless/common/tool-ready-spec.json +113 -0
  32. package/adapters/tokenless/dsh/cordis.patch.yml +8 -0
  33. package/adapters/tokenless/dsh/dist/index.js +399 -0
  34. package/adapters/tokenless/dsh/package.json +26 -0
  35. package/adapters/tokenless/hermes/__init__.py +572 -0
  36. package/adapters/tokenless/hermes/plugin.yaml +9 -0
  37. package/adapters/tokenless/hermes/scripts/detect.sh +80 -0
  38. package/adapters/tokenless/hermes/scripts/install.sh +60 -0
  39. package/adapters/tokenless/hermes/scripts/uninstall.sh +45 -0
  40. package/adapters/tokenless/manifest.json +147 -0
  41. package/adapters/tokenless/openclaw/dist/index.d.ts +27 -0
  42. package/adapters/tokenless/openclaw/dist/index.js +598 -0
  43. package/adapters/tokenless/openclaw/dist/tool_categories.json +99 -0
  44. package/adapters/tokenless/openclaw/index.ts +720 -0
  45. package/adapters/tokenless/openclaw/openclaw.plugin.json +40 -0
  46. package/adapters/tokenless/openclaw/package.json +24 -0
  47. package/adapters/tokenless/openclaw/scripts/detect.sh +102 -0
  48. package/adapters/tokenless/openclaw/scripts/install.sh +75 -0
  49. package/adapters/tokenless/openclaw/scripts/uninstall.sh +46 -0
  50. package/adapters/tokenless/openclaw/tsconfig.json +13 -0
  51. package/adapters/tokenless/opencode/plugin.js +246 -0
  52. package/adapters/tokenless/opencode/scripts/detect.sh +38 -0
  53. package/adapters/tokenless/opencode/scripts/install.sh +56 -0
  54. package/adapters/tokenless/opencode/scripts/uninstall.sh +29 -0
  55. package/adapters/tokenless/qoder/.qoder-plugin/plugin.json +11 -0
  56. package/adapters/tokenless/qoder/commands/tokenless-stats.md +8 -0
  57. package/adapters/tokenless/qoder/hooks/hooks.json +36 -0
  58. package/adapters/tokenless/qoder/hooks/run-hook.sh +51 -0
  59. package/adapters/tokenless/qoder/scripts/detect.sh +35 -0
  60. package/adapters/tokenless/qoder/scripts/install.sh +136 -0
  61. package/adapters/tokenless/qoder/scripts/uninstall.sh +106 -0
  62. package/adapters/tokenless/qwencode/qwen-extension.json +69 -0
  63. package/adapters/tokenless/qwencode/scripts/detect.sh +125 -0
  64. package/adapters/tokenless/qwencode/scripts/install.sh +128 -0
  65. package/adapters/tokenless/qwencode/scripts/uninstall.sh +62 -0
  66. package/bin/rtk +6 -0
  67. package/bin/tokenless +6 -0
  68. package/bin/toon +6 -0
  69. package/package.json +57 -0
  70. package/scripts/postinstall.js +208 -0
@@ -0,0 +1,99 @@
1
+ {
2
+ "_meta": {
3
+ "version": "1.1",
4
+ "description": "Unified tool categorization for both tool-ready and compression strategies",
5
+ "purpose": "Single source of truth for tool classification and compression thresholds across all adapters",
6
+ "_aliases_note": "The '_aliases' section below is a reference mapping only — not consumed by code. It documents canonical tool name normalization for human readers."
7
+ },
8
+
9
+ "layer_1_skip": {
10
+ "_description": "Layer 1: Skip all compression (preserve integrity for content retrieval)",
11
+ "_tool_ready_category": "Read",
12
+ "_rationale": "These tools return file content or search results that should not be truncated",
13
+ "tools": [
14
+ "Read",
15
+ "read",
16
+ "read_file",
17
+ "read_many_files",
18
+ "Glob",
19
+ "glob",
20
+ "search_file",
21
+ "list_directory",
22
+ "list_dir",
23
+ "Grep",
24
+ "grep",
25
+ "grep_code",
26
+ "grep_search",
27
+ "search_files",
28
+ "Lsp",
29
+ "lsp",
30
+ "NotebookRead",
31
+ "notebook_read",
32
+ "notebookread"
33
+ ]
34
+ },
35
+
36
+ "layer_2_shell": {
37
+ "_description": "Layer 2: Moderate truncation for shell/exec tools",
38
+ "_tool_ready_category": "Shell",
39
+ "_rationale": "Shell commands produce text output that can be safely truncated if too long",
40
+ "tools": [
41
+ "Bash",
42
+ "bash",
43
+ "Shell",
44
+ "shell",
45
+ "exec",
46
+ "terminal",
47
+ "run_shell_command",
48
+ "run_in_terminal",
49
+ "get_terminal_output",
50
+ "execute_command",
51
+ "process"
52
+ ],
53
+ "thresholds": {
54
+ "truncate_strings_at": 65536,
55
+ "truncate_arrays_at": 128,
56
+ "max_depth": 8
57
+ }
58
+ },
59
+
60
+ "layer_3_api": {
61
+ "_description": "Layer 3: Zero-truncation for API/structured tools (default for tools not in layer_1 or layer_2)",
62
+ "_tool_ready_categories": ["WebFetch", "Write"],
63
+ "_rationale": "API responses and structured data should not be truncated; tools in this layer are implicit — any tool not in layer_1_skip or layer_2_shell falls here",
64
+ "thresholds": {
65
+ "truncate_strings_at": 1048576,
66
+ "truncate_arrays_at": 65536,
67
+ "max_depth": 32
68
+ }
69
+ },
70
+
71
+ "_aliases": {
72
+ "_description": "Canonical name mappings (reference only — not consumed by code)",
73
+ "bash": "Bash",
74
+ "shell": "Shell",
75
+ "grep": "Grep",
76
+ "grep_code": "Grep",
77
+ "grep_search": "Grep",
78
+ "search_files": "Grep",
79
+ "glob": "Glob",
80
+ "search_file": "Glob",
81
+ "list_dir": "Read",
82
+ "read": "Read",
83
+ "read_file": "Read",
84
+ "web_fetch": "WebFetch",
85
+ "fetch_content": "WebFetch",
86
+ "web_search": "WebSearch",
87
+ "search_web": "WebSearch",
88
+ "write": "Write",
89
+ "write_file": "Write",
90
+ "create_file": "Write",
91
+ "edit": "Edit",
92
+ "edit_file": "Edit",
93
+ "search_replace": "Edit",
94
+ "delete_file": "Write",
95
+ "run_in_terminal": "Bash",
96
+ "get_terminal_output": "Bash",
97
+ "notebook_read": "NotebookRead"
98
+ }
99
+ }