@openclaw/tokenjuice 2026.5.28
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.
- package/README.md +35 -0
- package/dist/index.js +13 -0
- package/dist/runtime-api.js +2 -0
- package/dist/tool-result-middleware.js +34 -0
- package/node_modules/tokenjuice/LICENSE +21 -0
- package/node_modules/tokenjuice/README.md +311 -0
- package/node_modules/tokenjuice/SECURITY.md +50 -0
- package/node_modules/tokenjuice/dist/cli/doctor-output.d.ts +2 -0
- package/node_modules/tokenjuice/dist/cli/doctor-output.js +92 -0
- package/node_modules/tokenjuice/dist/cli/install-output.d.ts +5 -0
- package/node_modules/tokenjuice/dist/cli/install-output.js +11 -0
- package/node_modules/tokenjuice/dist/cli/main.d.ts +34 -0
- package/node_modules/tokenjuice/dist/cli/main.js +6614 -0
- package/node_modules/tokenjuice/dist/core/analysis.d.ts +88 -0
- package/node_modules/tokenjuice/dist/core/analysis.js +313 -0
- package/node_modules/tokenjuice/dist/core/artifacts.d.ts +9 -0
- package/node_modules/tokenjuice/dist/core/artifacts.js +210 -0
- package/node_modules/tokenjuice/dist/core/builtin-rules.generated.d.ts +2 -0
- package/node_modules/tokenjuice/dist/core/builtin-rules.generated.js +262 -0
- package/node_modules/tokenjuice/dist/core/classify.d.ts +18 -0
- package/node_modules/tokenjuice/dist/core/classify.js +181 -0
- package/node_modules/tokenjuice/dist/core/cli-client.d.ts +2 -0
- package/node_modules/tokenjuice/dist/core/cli-client.js +127 -0
- package/node_modules/tokenjuice/dist/core/command-identity.d.ts +9 -0
- package/node_modules/tokenjuice/dist/core/command-identity.js +201 -0
- package/node_modules/tokenjuice/dist/core/command-match.d.ts +16 -0
- package/node_modules/tokenjuice/dist/core/command-match.js +443 -0
- package/node_modules/tokenjuice/dist/core/command-shell.d.ts +18 -0
- package/node_modules/tokenjuice/dist/core/command-shell.js +291 -0
- package/node_modules/tokenjuice/dist/core/command.d.ts +5 -0
- package/node_modules/tokenjuice/dist/core/command.js +4 -0
- package/node_modules/tokenjuice/dist/core/compaction-metadata.d.ts +10 -0
- package/node_modules/tokenjuice/dist/core/compaction-metadata.js +28 -0
- package/node_modules/tokenjuice/dist/core/env.d.ts +1 -0
- package/node_modules/tokenjuice/dist/core/env.js +5 -0
- package/node_modules/tokenjuice/dist/core/execution-input.d.ts +2 -0
- package/node_modules/tokenjuice/dist/core/execution-input.js +51 -0
- package/node_modules/tokenjuice/dist/core/fixtures.d.ts +14 -0
- package/node_modules/tokenjuice/dist/core/fixtures.js +190 -0
- package/node_modules/tokenjuice/dist/core/github-actions-summary.d.ts +6 -0
- package/node_modules/tokenjuice/dist/core/github-actions-summary.js +105 -0
- package/node_modules/tokenjuice/dist/core/integrations/compact-bash-result.d.ts +33 -0
- package/node_modules/tokenjuice/dist/core/integrations/compact-bash-result.js +85 -0
- package/node_modules/tokenjuice/dist/core/integrations/rewrite-policy.d.ts +8 -0
- package/node_modules/tokenjuice/dist/core/integrations/rewrite-policy.js +25 -0
- package/node_modules/tokenjuice/dist/core/inventory-safety.d.ts +11 -0
- package/node_modules/tokenjuice/dist/core/inventory-safety.js +347 -0
- package/node_modules/tokenjuice/dist/core/json-protocol.d.ts +2 -0
- package/node_modules/tokenjuice/dist/core/json-protocol.js +131 -0
- package/node_modules/tokenjuice/dist/core/reduce-formatters.d.ts +15 -0
- package/node_modules/tokenjuice/dist/core/reduce-formatters.js +611 -0
- package/node_modules/tokenjuice/dist/core/reduce-inspection-summary.d.ts +9 -0
- package/node_modules/tokenjuice/dist/core/reduce-inspection-summary.js +125 -0
- package/node_modules/tokenjuice/dist/core/reduce-utils.d.ts +12 -0
- package/node_modules/tokenjuice/dist/core/reduce-utils.js +117 -0
- package/node_modules/tokenjuice/dist/core/reduce.d.ts +5 -0
- package/node_modules/tokenjuice/dist/core/reduce.js +511 -0
- package/node_modules/tokenjuice/dist/core/rules.d.ts +22 -0
- package/node_modules/tokenjuice/dist/core/rules.js +265 -0
- package/node_modules/tokenjuice/dist/core/source.d.ts +6 -0
- package/node_modules/tokenjuice/dist/core/source.js +113 -0
- package/node_modules/tokenjuice/dist/core/text.d.ts +23 -0
- package/node_modules/tokenjuice/dist/core/text.js +204 -0
- package/node_modules/tokenjuice/dist/core/time.d.ts +2 -0
- package/node_modules/tokenjuice/dist/core/time.js +82 -0
- package/node_modules/tokenjuice/dist/core/validate-rules.d.ts +10 -0
- package/node_modules/tokenjuice/dist/core/validate-rules.js +198 -0
- package/node_modules/tokenjuice/dist/core/wrap.d.ts +2 -0
- package/node_modules/tokenjuice/dist/core/wrap.js +104 -0
- package/node_modules/tokenjuice/dist/hosts/adal/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/adal/index.js +157 -0
- package/node_modules/tokenjuice/dist/hosts/aether/index.d.ts +30 -0
- package/node_modules/tokenjuice/dist/hosts/aether/index.js +671 -0
- package/node_modules/tokenjuice/dist/hosts/agent-layer/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/agent-layer/index.js +173 -0
- package/node_modules/tokenjuice/dist/hosts/agentinit/index.d.ts +27 -0
- package/node_modules/tokenjuice/dist/hosts/agentinit/index.js +252 -0
- package/node_modules/tokenjuice/dist/hosts/agentlink/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/agentlink/index.js +310 -0
- package/node_modules/tokenjuice/dist/hosts/agentloom/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/agentloom/index.js +161 -0
- package/node_modules/tokenjuice/dist/hosts/agents-cli/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/agents-cli/index.js +136 -0
- package/node_modules/tokenjuice/dist/hosts/agents-md/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/agents-md/index.js +240 -0
- package/node_modules/tokenjuice/dist/hosts/agentsge/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/agentsge/index.js +119 -0
- package/node_modules/tokenjuice/dist/hosts/agentsmesh/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/agentsmesh/index.js +337 -0
- package/node_modules/tokenjuice/dist/hosts/ai-memory-protocol/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/ai-memory-protocol/index.js +392 -0
- package/node_modules/tokenjuice/dist/hosts/aictl/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/aictl/index.js +271 -0
- package/node_modules/tokenjuice/dist/hosts/aider/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/aider/index.js +79 -0
- package/node_modules/tokenjuice/dist/hosts/amazon-q/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/amazon-q/index.js +169 -0
- package/node_modules/tokenjuice/dist/hosts/amp/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/amp/index.js +306 -0
- package/node_modules/tokenjuice/dist/hosts/antigravity/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/antigravity/index.js +172 -0
- package/node_modules/tokenjuice/dist/hosts/anywhere-agents/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/anywhere-agents/index.js +260 -0
- package/node_modules/tokenjuice/dist/hosts/augment/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/augment/index.js +171 -0
- package/node_modules/tokenjuice/dist/hosts/avante/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/avante/index.js +68 -0
- package/node_modules/tokenjuice/dist/hosts/baz/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/baz/index.js +286 -0
- package/node_modules/tokenjuice/dist/hosts/bito/index.d.ts +28 -0
- package/node_modules/tokenjuice/dist/hosts/bito/index.js +363 -0
- package/node_modules/tokenjuice/dist/hosts/blackbox/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/blackbox/index.js +305 -0
- package/node_modules/tokenjuice/dist/hosts/blocks/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/blocks/index.js +317 -0
- package/node_modules/tokenjuice/dist/hosts/bob/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/bob/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/builder/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/builder/index.js +177 -0
- package/node_modules/tokenjuice/dist/hosts/charlie/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/charlie/index.js +275 -0
- package/node_modules/tokenjuice/dist/hosts/claude-code/index.d.ts +30 -0
- package/node_modules/tokenjuice/dist/hosts/claude-code/index.js +364 -0
- package/node_modules/tokenjuice/dist/hosts/clawdbot/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/clawdbot/index.js +320 -0
- package/node_modules/tokenjuice/dist/hosts/cline/index.d.ts +27 -0
- package/node_modules/tokenjuice/dist/hosts/cline/index.js +156 -0
- package/node_modules/tokenjuice/dist/hosts/codeant/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/codeant/index.js +370 -0
- package/node_modules/tokenjuice/dist/hosts/codebuddy/index.d.ts +29 -0
- package/node_modules/tokenjuice/dist/hosts/codebuddy/index.js +379 -0
- package/node_modules/tokenjuice/dist/hosts/codebuff/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/codebuff/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/codegen/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/codegen/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/coder-agents/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/coder-agents/index.js +339 -0
- package/node_modules/tokenjuice/dist/hosts/coderabbit/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/coderabbit/index.js +599 -0
- package/node_modules/tokenjuice/dist/hosts/codex/index.d.ts +93 -0
- package/node_modules/tokenjuice/dist/hosts/codex/index.js +945 -0
- package/node_modules/tokenjuice/dist/hosts/command-code/index.d.ts +29 -0
- package/node_modules/tokenjuice/dist/hosts/command-code/index.js +366 -0
- package/node_modules/tokenjuice/dist/hosts/continue/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/continue/index.js +81 -0
- package/node_modules/tokenjuice/dist/hosts/copilot-agent/index.d.ts +29 -0
- package/node_modules/tokenjuice/dist/hosts/copilot-agent/index.js +497 -0
- package/node_modules/tokenjuice/dist/hosts/copilot-cli/index.d.ts +31 -0
- package/node_modules/tokenjuice/dist/hosts/copilot-cli/index.js +428 -0
- package/node_modules/tokenjuice/dist/hosts/crush/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/crush/index.js +135 -0
- package/node_modules/tokenjuice/dist/hosts/cursor/index.d.ts +30 -0
- package/node_modules/tokenjuice/dist/hosts/cursor/index.js +293 -0
- package/node_modules/tokenjuice/dist/hosts/deepagents/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/deepagents/index.js +157 -0
- package/node_modules/tokenjuice/dist/hosts/devin/index.d.ts +31 -0
- package/node_modules/tokenjuice/dist/hosts/devin/index.js +283 -0
- package/node_modules/tokenjuice/dist/hosts/docker-agent/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/docker-agent/index.js +206 -0
- package/node_modules/tokenjuice/dist/hosts/dot-agents/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/dot-agents/index.js +171 -0
- package/node_modules/tokenjuice/dist/hosts/droid/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/droid/index.js +313 -0
- package/node_modules/tokenjuice/dist/hosts/eca/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/eca/index.js +347 -0
- package/node_modules/tokenjuice/dist/hosts/elyra/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/elyra/index.js +382 -0
- package/node_modules/tokenjuice/dist/hosts/firebase-studio/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/firebase-studio/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/forgecode/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/forgecode/index.js +273 -0
- package/node_modules/tokenjuice/dist/hosts/gemini-cli/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/gemini-cli/index.js +234 -0
- package/node_modules/tokenjuice/dist/hosts/gitlab-duo/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/gitlab-duo/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/goose/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/goose/index.js +288 -0
- package/node_modules/tokenjuice/dist/hosts/gptme/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/gptme/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/greptile/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/greptile/index.js +299 -0
- package/node_modules/tokenjuice/dist/hosts/grok-build/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/grok-build/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/grok-cli/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/grok-cli/index.js +262 -0
- package/node_modules/tokenjuice/dist/hosts/jean2/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/jean2/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/jetbrains-ai/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/jetbrains-ai/index.js +202 -0
- package/node_modules/tokenjuice/dist/hosts/jules/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/jules/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/junie/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/junie/index.js +68 -0
- package/node_modules/tokenjuice/dist/hosts/kilo/index.d.ts +30 -0
- package/node_modules/tokenjuice/dist/hosts/kilo/index.js +497 -0
- package/node_modules/tokenjuice/dist/hosts/kimi/index.d.ts +29 -0
- package/node_modules/tokenjuice/dist/hosts/kimi/index.js +255 -0
- package/node_modules/tokenjuice/dist/hosts/kiro/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/kiro/index.js +116 -0
- package/node_modules/tokenjuice/dist/hosts/knowns/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/knowns/index.js +273 -0
- package/node_modules/tokenjuice/dist/hosts/leanctl/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/leanctl/index.js +317 -0
- package/node_modules/tokenjuice/dist/hosts/localcode/index.d.ts +31 -0
- package/node_modules/tokenjuice/dist/hosts/localcode/index.js +539 -0
- package/node_modules/tokenjuice/dist/hosts/mcp-agent/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/mcp-agent/index.js +302 -0
- package/node_modules/tokenjuice/dist/hosts/mini-swe-agent/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/mini-swe-agent/index.js +226 -0
- package/node_modules/tokenjuice/dist/hosts/mistral-vibe/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/mistral-vibe/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/mux/index.d.ts +28 -0
- package/node_modules/tokenjuice/dist/hosts/mux/index.js +411 -0
- package/node_modules/tokenjuice/dist/hosts/novakit/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/novakit/index.js +273 -0
- package/node_modules/tokenjuice/dist/hosts/ona/index.d.ts +41 -0
- package/node_modules/tokenjuice/dist/hosts/ona/index.js +596 -0
- package/node_modules/tokenjuice/dist/hosts/open-interpreter/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/open-interpreter/index.js +348 -0
- package/node_modules/tokenjuice/dist/hosts/openclaw/extension.d.ts +8 -0
- package/node_modules/tokenjuice/dist/hosts/openclaw/extension.js +104 -0
- package/node_modules/tokenjuice/dist/hosts/openclaw/index.d.ts +1 -0
- package/node_modules/tokenjuice/dist/hosts/openclaw/index.js +1 -0
- package/node_modules/tokenjuice/dist/hosts/opencode/extension/runtime.d.ts +17 -0
- package/node_modules/tokenjuice/dist/hosts/opencode/extension/runtime.js +9094 -0
- package/node_modules/tokenjuice/dist/hosts/opencode/index.d.ts +21 -0
- package/node_modules/tokenjuice/dist/hosts/opencode/index.js +163 -0
- package/node_modules/tokenjuice/dist/hosts/openhands/index.d.ts +28 -0
- package/node_modules/tokenjuice/dist/hosts/openhands/index.js +211 -0
- package/node_modules/tokenjuice/dist/hosts/openwebui/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/openwebui/index.js +245 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/pi-types.d.ts +79 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/pi-types.js +3 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/runtime.d.ts +5 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/runtime.js +9372 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/settings.d.ts +1 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/settings.js +26 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/status-panel.d.ts +3 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/status-panel.js +72 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/status.d.ts +20 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/status.js +58 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/tool-result.d.ts +4 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/tool-result.js +24 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/utils.d.ts +1 -0
- package/node_modules/tokenjuice/dist/hosts/pi/extension/utils.js +6 -0
- package/node_modules/tokenjuice/dist/hosts/pi/index.d.ts +26 -0
- package/node_modules/tokenjuice/dist/hosts/pi/index.js +228 -0
- package/node_modules/tokenjuice/dist/hosts/pi-go/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/pi-go/index.js +352 -0
- package/node_modules/tokenjuice/dist/hosts/plandex/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/plandex/index.js +164 -0
- package/node_modules/tokenjuice/dist/hosts/qoder/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/qoder/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/qodo/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/qodo/index.js +584 -0
- package/node_modules/tokenjuice/dist/hosts/qwen-code/index.d.ts +28 -0
- package/node_modules/tokenjuice/dist/hosts/qwen-code/index.js +276 -0
- package/node_modules/tokenjuice/dist/hosts/replit/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/replit/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/roo/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/roo/index.js +101 -0
- package/node_modules/tokenjuice/dist/hosts/rovo/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/rovo/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/ruler/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/ruler/index.js +157 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-command-doctor.d.ts +19 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-command-doctor.js +32 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-command.d.ts +5 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-command.js +94 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-doctor.d.ts +212 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-doctor.js +270 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-output.d.ts +4 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hook-output.js +15 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hooks-json-file.d.ts +18 -0
- package/node_modules/tokenjuice/dist/hosts/shared/hooks-json-file.js +108 -0
- package/node_modules/tokenjuice/dist/hosts/shared/host-command.d.ts +10 -0
- package/node_modules/tokenjuice/dist/hosts/shared/host-command.js +70 -0
- package/node_modules/tokenjuice/dist/hosts/shared/instruction-doctor.d.ts +16 -0
- package/node_modules/tokenjuice/dist/hosts/shared/instruction-doctor.js +13 -0
- package/node_modules/tokenjuice/dist/hosts/shared/instruction-file.d.ts +29 -0
- package/node_modules/tokenjuice/dist/hosts/shared/instruction-file.js +121 -0
- package/node_modules/tokenjuice/dist/hosts/shared/instruction-guidance.d.ts +7 -0
- package/node_modules/tokenjuice/dist/hosts/shared/instruction-guidance.js +12 -0
- package/node_modules/tokenjuice/dist/hosts/shared/marker-instructions.d.ts +32 -0
- package/node_modules/tokenjuice/dist/hosts/shared/marker-instructions.js +100 -0
- package/node_modules/tokenjuice/dist/hosts/shared/pre-tool-wrap.d.ts +91 -0
- package/node_modules/tokenjuice/dist/hosts/shared/pre-tool-wrap.js +186 -0
- package/node_modules/tokenjuice/dist/hosts/shared/tool-result.d.ts +15 -0
- package/node_modules/tokenjuice/dist/hosts/shared/tool-result.js +52 -0
- package/node_modules/tokenjuice/dist/hosts/stagewise/index.d.ts +25 -0
- package/node_modules/tokenjuice/dist/hosts/stagewise/index.js +468 -0
- package/node_modules/tokenjuice/dist/hosts/swe-agent/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/swe-agent/index.js +223 -0
- package/node_modules/tokenjuice/dist/hosts/tabby/index.d.ts +24 -0
- package/node_modules/tokenjuice/dist/hosts/tabby/index.js +469 -0
- package/node_modules/tokenjuice/dist/hosts/tabnine/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/tabnine/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/trae/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/trae/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/uipath/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/uipath/index.js +155 -0
- package/node_modules/tokenjuice/dist/hosts/vscode-copilot/index.d.ts +32 -0
- package/node_modules/tokenjuice/dist/hosts/vscode-copilot/index.js +416 -0
- package/node_modules/tokenjuice/dist/hosts/warp/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/warp/index.js +181 -0
- package/node_modules/tokenjuice/dist/hosts/windsurf/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/windsurf/index.js +99 -0
- package/node_modules/tokenjuice/dist/hosts/zed/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/zed/index.js +68 -0
- package/node_modules/tokenjuice/dist/hosts/zencoder/index.d.ts +23 -0
- package/node_modules/tokenjuice/dist/hosts/zencoder/index.js +227 -0
- package/node_modules/tokenjuice/dist/index.d.ts +214 -0
- package/node_modules/tokenjuice/dist/index.js +113 -0
- package/node_modules/tokenjuice/dist/rules/archive/tar.json +30 -0
- package/node_modules/tokenjuice/dist/rules/archive/unzip.json +30 -0
- package/node_modules/tokenjuice/dist/rules/archive/zip.json +30 -0
- package/node_modules/tokenjuice/dist/rules/build/cmake.json +35 -0
- package/node_modules/tokenjuice/dist/rules/build/dotnet.json +36 -0
- package/node_modules/tokenjuice/dist/rules/build/esbuild.json +35 -0
- package/node_modules/tokenjuice/dist/rules/build/go-build.json +31 -0
- package/node_modules/tokenjuice/dist/rules/build/gradle.json +35 -0
- package/node_modules/tokenjuice/dist/rules/build/maven.json +35 -0
- package/node_modules/tokenjuice/dist/rules/build/msbuild.json +35 -0
- package/node_modules/tokenjuice/dist/rules/build/pnpm-build.json +44 -0
- package/node_modules/tokenjuice/dist/rules/build/swift-build.json +56 -0
- package/node_modules/tokenjuice/dist/rules/build/tsc.json +74 -0
- package/node_modules/tokenjuice/dist/rules/build/tsdown.json +35 -0
- package/node_modules/tokenjuice/dist/rules/build/vite.json +42 -0
- package/node_modules/tokenjuice/dist/rules/build/webpack.json +51 -0
- package/node_modules/tokenjuice/dist/rules/build/xcodebuild.json +80 -0
- package/node_modules/tokenjuice/dist/rules/cloud/aws.json +30 -0
- package/node_modules/tokenjuice/dist/rules/cloud/az.json +30 -0
- package/node_modules/tokenjuice/dist/rules/cloud/flyctl.json +30 -0
- package/node_modules/tokenjuice/dist/rules/cloud/gcloud.json +30 -0
- package/node_modules/tokenjuice/dist/rules/cloud/gh.json +30 -0
- package/node_modules/tokenjuice/dist/rules/cloud/vercel.json +30 -0
- package/node_modules/tokenjuice/dist/rules/database/mongosh.json +30 -0
- package/node_modules/tokenjuice/dist/rules/database/mysql.json +30 -0
- package/node_modules/tokenjuice/dist/rules/database/psql.json +30 -0
- package/node_modules/tokenjuice/dist/rules/database/redis-cli.json +30 -0
- package/node_modules/tokenjuice/dist/rules/database/sqlite3.json +30 -0
- package/node_modules/tokenjuice/dist/rules/devops/docker-build.json +53 -0
- package/node_modules/tokenjuice/dist/rules/devops/docker-compose.json +44 -0
- package/node_modules/tokenjuice/dist/rules/devops/docker-images.json +30 -0
- package/node_modules/tokenjuice/dist/rules/devops/docker-logs.json +43 -0
- package/node_modules/tokenjuice/dist/rules/devops/docker-ps.json +30 -0
- package/node_modules/tokenjuice/dist/rules/devops/helm.json +35 -0
- package/node_modules/tokenjuice/dist/rules/devops/kubectl-describe.json +45 -0
- package/node_modules/tokenjuice/dist/rules/devops/kubectl-get.json +35 -0
- package/node_modules/tokenjuice/dist/rules/devops/kubectl-logs.json +43 -0
- package/node_modules/tokenjuice/dist/rules/devops/pulumi.json +35 -0
- package/node_modules/tokenjuice/dist/rules/devops/terraform.json +35 -0
- package/node_modules/tokenjuice/dist/rules/devops/terragrunt.json +35 -0
- package/node_modules/tokenjuice/dist/rules/filesystem/fd.json +33 -0
- package/node_modules/tokenjuice/dist/rules/filesystem/find.json +42 -0
- package/node_modules/tokenjuice/dist/rules/filesystem/git-ls-files.json +35 -0
- package/node_modules/tokenjuice/dist/rules/filesystem/ls.json +29 -0
- package/node_modules/tokenjuice/dist/rules/filesystem/rg-files.json +34 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/archive/tar.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/archive/unzip.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/archive/zip.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/cmake.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/dotnet.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/esbuild.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/go-build.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/gradle.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/maven.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/msbuild.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/pnpm-build-failure.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/pnpm-build.fixture.json +18 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/swift-build.fixture.json +29 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/tsc.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/tsdown.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/vite.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/webpack.fixture.json +20 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/build/xcodebuild.fixture.json +27 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/cloud/aws.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/cloud/az.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/cloud/flyctl.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/cloud/gcloud.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/cloud/gh.fixture.json +17 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/cloud/vercel.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/database/mongosh.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/database/mysql.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/database/psql.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/database/redis-cli.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/database/sqlite3.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/docker-build.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/docker-compose.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/docker-images.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/docker-logs.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/docker-ps.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/helm.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/kubectl-describe.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/kubectl-get.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/kubectl-logs.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/pulumi.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/terraform.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/devops/terragrunt.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/filesystem/fd.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/filesystem/find.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/filesystem/git-ls-files.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/filesystem/ls.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/filesystem/rg-files.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/generic/fallback.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/generic/help.fixture.json +17 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/branch.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/diff-name-only.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/diff-stat.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/diff.fixture.json +26 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/log-oneline.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/remote-v.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/show.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/stash-list.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/status.fixture.json +17 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/git/worktree-list.fixture.json +17 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/bun-install-up-to-date.fixture.json +19 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/bun-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/npm-ci-up-to-date.fixture.json +19 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/npm-ci.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/npm-install-up-to-date.fixture.json +19 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/npm-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/pnpm-install-up-to-date.fixture.json +19 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/pnpm-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/yarn-install-up-to-date.fixture.json +19 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/install/yarn-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/lint/biome.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/lint/eslint.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/lint/oxlint.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/lint/prettier-check.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/media/ffmpeg.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/media/mediainfo.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/network/curl.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/network/dig.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/network/nslookup.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/network/ping.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/network/ssh.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/network/traceroute.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/network/wget.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/observability/free.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/observability/htop.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/observability/iostat.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/observability/top.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/observability/vmstat.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/openclaw/sessions-history.fixture.json +33 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/apt-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/apt-upgrade.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/brew-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/brew-upgrade.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/composer.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/dnf-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/fnm.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/npm-ls.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/package/yum-install.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/search/git-grep.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/search/grep.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/search/rg.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/journalctl.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/launchctl.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/lsof.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/netstat.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/pm2.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/service.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/ss.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/service/systemctl-status.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/system/df.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/system/du.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/system/file.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/system/ps.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/env.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/just.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/make.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/mise.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/node.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/php.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/python.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/ruby.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/task/uv.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/bun-test.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/cargo-test.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/go-test.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/jest.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/mocha.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/npm-test.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/playwright.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/pnpm-test.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/pytest.fixture.json +19 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/rspec.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/swift-test.fixture.json +30 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/vitest.fixture.json +15 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/tests/yarn-test.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/text/wc.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/transfer/rsync.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/fixtures/transfer/scp.fixture.json +16 -0
- package/node_modules/tokenjuice/dist/rules/generic/fallback.json +32 -0
- package/node_modules/tokenjuice/dist/rules/generic/help.json +25 -0
- package/node_modules/tokenjuice/dist/rules/git/branch.json +29 -0
- package/node_modules/tokenjuice/dist/rules/git/diff-name-only.json +29 -0
- package/node_modules/tokenjuice/dist/rules/git/diff-stat.json +37 -0
- package/node_modules/tokenjuice/dist/rules/git/diff.json +65 -0
- package/node_modules/tokenjuice/dist/rules/git/log-oneline.json +30 -0
- package/node_modules/tokenjuice/dist/rules/git/remote-v.json +29 -0
- package/node_modules/tokenjuice/dist/rules/git/show.json +50 -0
- package/node_modules/tokenjuice/dist/rules/git/stash-list.json +30 -0
- package/node_modules/tokenjuice/dist/rules/git/status.json +54 -0
- package/node_modules/tokenjuice/dist/rules/git/worktree-list.json +31 -0
- package/node_modules/tokenjuice/dist/rules/install/bun-install.json +43 -0
- package/node_modules/tokenjuice/dist/rules/install/npm-ci.json +49 -0
- package/node_modules/tokenjuice/dist/rules/install/npm-install.json +49 -0
- package/node_modules/tokenjuice/dist/rules/install/pnpm-install.json +43 -0
- package/node_modules/tokenjuice/dist/rules/install/yarn-install.json +42 -0
- package/node_modules/tokenjuice/dist/rules/lint/biome.json +35 -0
- package/node_modules/tokenjuice/dist/rules/lint/eslint.json +45 -0
- package/node_modules/tokenjuice/dist/rules/lint/oxlint.json +35 -0
- package/node_modules/tokenjuice/dist/rules/lint/prettier-check.json +34 -0
- package/node_modules/tokenjuice/dist/rules/media/ffmpeg.json +30 -0
- package/node_modules/tokenjuice/dist/rules/media/mediainfo.json +30 -0
- package/node_modules/tokenjuice/dist/rules/network/curl.json +30 -0
- package/node_modules/tokenjuice/dist/rules/network/dig.json +30 -0
- package/node_modules/tokenjuice/dist/rules/network/nslookup.json +30 -0
- package/node_modules/tokenjuice/dist/rules/network/ping.json +35 -0
- package/node_modules/tokenjuice/dist/rules/network/ssh.json +30 -0
- package/node_modules/tokenjuice/dist/rules/network/traceroute.json +30 -0
- package/node_modules/tokenjuice/dist/rules/network/wget.json +30 -0
- package/node_modules/tokenjuice/dist/rules/observability/free.json +30 -0
- package/node_modules/tokenjuice/dist/rules/observability/htop.json +30 -0
- package/node_modules/tokenjuice/dist/rules/observability/iostat.json +30 -0
- package/node_modules/tokenjuice/dist/rules/observability/top.json +30 -0
- package/node_modules/tokenjuice/dist/rules/observability/vmstat.json +30 -0
- package/node_modules/tokenjuice/dist/rules/openclaw/sessions-history.json +59 -0
- package/node_modules/tokenjuice/dist/rules/package/apt-install.json +36 -0
- package/node_modules/tokenjuice/dist/rules/package/apt-upgrade.json +36 -0
- package/node_modules/tokenjuice/dist/rules/package/brew-install.json +31 -0
- package/node_modules/tokenjuice/dist/rules/package/brew-upgrade.json +31 -0
- package/node_modules/tokenjuice/dist/rules/package/composer.json +35 -0
- package/node_modules/tokenjuice/dist/rules/package/dnf-install.json +31 -0
- package/node_modules/tokenjuice/dist/rules/package/fnm.json +35 -0
- package/node_modules/tokenjuice/dist/rules/package/npm-ls.json +31 -0
- package/node_modules/tokenjuice/dist/rules/package/yum-install.json +31 -0
- package/node_modules/tokenjuice/dist/rules/search/git-grep.json +30 -0
- package/node_modules/tokenjuice/dist/rules/search/grep.json +38 -0
- package/node_modules/tokenjuice/dist/rules/search/rg.json +38 -0
- package/node_modules/tokenjuice/dist/rules/service/journalctl.json +42 -0
- package/node_modules/tokenjuice/dist/rules/service/launchctl.json +41 -0
- package/node_modules/tokenjuice/dist/rules/service/lsof.json +29 -0
- package/node_modules/tokenjuice/dist/rules/service/netstat.json +29 -0
- package/node_modules/tokenjuice/dist/rules/service/pm2.json +35 -0
- package/node_modules/tokenjuice/dist/rules/service/service.json +46 -0
- package/node_modules/tokenjuice/dist/rules/service/ss.json +29 -0
- package/node_modules/tokenjuice/dist/rules/service/systemctl-status.json +45 -0
- package/node_modules/tokenjuice/dist/rules/system/df.json +29 -0
- package/node_modules/tokenjuice/dist/rules/system/du.json +29 -0
- package/node_modules/tokenjuice/dist/rules/system/file.json +30 -0
- package/node_modules/tokenjuice/dist/rules/system/ps.json +29 -0
- package/node_modules/tokenjuice/dist/rules/task/env.json +31 -0
- package/node_modules/tokenjuice/dist/rules/task/just.json +30 -0
- package/node_modules/tokenjuice/dist/rules/task/make.json +30 -0
- package/node_modules/tokenjuice/dist/rules/task/mise.json +35 -0
- package/node_modules/tokenjuice/dist/rules/task/node.json +30 -0
- package/node_modules/tokenjuice/dist/rules/task/php.json +30 -0
- package/node_modules/tokenjuice/dist/rules/task/python.json +30 -0
- package/node_modules/tokenjuice/dist/rules/task/ruby.json +30 -0
- package/node_modules/tokenjuice/dist/rules/task/uv.json +35 -0
- package/node_modules/tokenjuice/dist/rules/tests/bun-test.json +56 -0
- package/node_modules/tokenjuice/dist/rules/tests/cargo-test.json +41 -0
- package/node_modules/tokenjuice/dist/rules/tests/go-test.json +49 -0
- package/node_modules/tokenjuice/dist/rules/tests/jest.json +41 -0
- package/node_modules/tokenjuice/dist/rules/tests/mocha.json +35 -0
- package/node_modules/tokenjuice/dist/rules/tests/npm-test.json +56 -0
- package/node_modules/tokenjuice/dist/rules/tests/playwright.json +37 -0
- package/node_modules/tokenjuice/dist/rules/tests/pnpm-test.json +56 -0
- package/node_modules/tokenjuice/dist/rules/tests/pytest.json +54 -0
- package/node_modules/tokenjuice/dist/rules/tests/rspec.json +31 -0
- package/node_modules/tokenjuice/dist/rules/tests/swift-test.json +66 -0
- package/node_modules/tokenjuice/dist/rules/tests/vitest.json +56 -0
- package/node_modules/tokenjuice/dist/rules/tests/yarn-test.json +56 -0
- package/node_modules/tokenjuice/dist/rules/text/wc.json +35 -0
- package/node_modules/tokenjuice/dist/rules/tokenjuice-rule.schema.json +155 -0
- package/node_modules/tokenjuice/dist/rules/transfer/rsync.json +30 -0
- package/node_modules/tokenjuice/dist/rules/transfer/scp.json +30 -0
- package/node_modules/tokenjuice/dist/types.d.ts +212 -0
- package/node_modules/tokenjuice/dist/types.js +1 -0
- package/node_modules/tokenjuice/package.json +80 -0
- package/npm-shrinkwrap.json +39 -0
- package/openclaw.plugin.json +16 -0
- package/package.json +55 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import rule0 from "../rules/archive/tar.json" with { type: "json" };
|
|
2
|
+
import rule1 from "../rules/archive/unzip.json" with { type: "json" };
|
|
3
|
+
import rule2 from "../rules/archive/zip.json" with { type: "json" };
|
|
4
|
+
import rule3 from "../rules/build/cmake.json" with { type: "json" };
|
|
5
|
+
import rule4 from "../rules/build/dotnet.json" with { type: "json" };
|
|
6
|
+
import rule5 from "../rules/build/esbuild.json" with { type: "json" };
|
|
7
|
+
import rule6 from "../rules/build/go-build.json" with { type: "json" };
|
|
8
|
+
import rule7 from "../rules/build/gradle.json" with { type: "json" };
|
|
9
|
+
import rule8 from "../rules/build/maven.json" with { type: "json" };
|
|
10
|
+
import rule9 from "../rules/build/msbuild.json" with { type: "json" };
|
|
11
|
+
import rule10 from "../rules/build/pnpm-build.json" with { type: "json" };
|
|
12
|
+
import rule11 from "../rules/build/swift-build.json" with { type: "json" };
|
|
13
|
+
import rule12 from "../rules/build/tsc.json" with { type: "json" };
|
|
14
|
+
import rule13 from "../rules/build/tsdown.json" with { type: "json" };
|
|
15
|
+
import rule14 from "../rules/build/vite.json" with { type: "json" };
|
|
16
|
+
import rule15 from "../rules/build/webpack.json" with { type: "json" };
|
|
17
|
+
import rule16 from "../rules/build/xcodebuild.json" with { type: "json" };
|
|
18
|
+
import rule17 from "../rules/cloud/aws.json" with { type: "json" };
|
|
19
|
+
import rule18 from "../rules/cloud/az.json" with { type: "json" };
|
|
20
|
+
import rule19 from "../rules/cloud/flyctl.json" with { type: "json" };
|
|
21
|
+
import rule20 from "../rules/cloud/gcloud.json" with { type: "json" };
|
|
22
|
+
import rule21 from "../rules/cloud/gh.json" with { type: "json" };
|
|
23
|
+
import rule22 from "../rules/cloud/vercel.json" with { type: "json" };
|
|
24
|
+
import rule23 from "../rules/database/mongosh.json" with { type: "json" };
|
|
25
|
+
import rule24 from "../rules/database/mysql.json" with { type: "json" };
|
|
26
|
+
import rule25 from "../rules/database/psql.json" with { type: "json" };
|
|
27
|
+
import rule26 from "../rules/database/redis-cli.json" with { type: "json" };
|
|
28
|
+
import rule27 from "../rules/database/sqlite3.json" with { type: "json" };
|
|
29
|
+
import rule28 from "../rules/devops/docker-build.json" with { type: "json" };
|
|
30
|
+
import rule29 from "../rules/devops/docker-compose.json" with { type: "json" };
|
|
31
|
+
import rule30 from "../rules/devops/docker-images.json" with { type: "json" };
|
|
32
|
+
import rule31 from "../rules/devops/docker-logs.json" with { type: "json" };
|
|
33
|
+
import rule32 from "../rules/devops/docker-ps.json" with { type: "json" };
|
|
34
|
+
import rule33 from "../rules/devops/helm.json" with { type: "json" };
|
|
35
|
+
import rule34 from "../rules/devops/kubectl-describe.json" with { type: "json" };
|
|
36
|
+
import rule35 from "../rules/devops/kubectl-get.json" with { type: "json" };
|
|
37
|
+
import rule36 from "../rules/devops/kubectl-logs.json" with { type: "json" };
|
|
38
|
+
import rule37 from "../rules/devops/pulumi.json" with { type: "json" };
|
|
39
|
+
import rule38 from "../rules/devops/terraform.json" with { type: "json" };
|
|
40
|
+
import rule39 from "../rules/devops/terragrunt.json" with { type: "json" };
|
|
41
|
+
import rule40 from "../rules/filesystem/fd.json" with { type: "json" };
|
|
42
|
+
import rule41 from "../rules/filesystem/find.json" with { type: "json" };
|
|
43
|
+
import rule42 from "../rules/filesystem/git-ls-files.json" with { type: "json" };
|
|
44
|
+
import rule43 from "../rules/filesystem/ls.json" with { type: "json" };
|
|
45
|
+
import rule44 from "../rules/filesystem/rg-files.json" with { type: "json" };
|
|
46
|
+
import rule45 from "../rules/generic/fallback.json" with { type: "json" };
|
|
47
|
+
import rule46 from "../rules/generic/help.json" with { type: "json" };
|
|
48
|
+
import rule47 from "../rules/git/branch.json" with { type: "json" };
|
|
49
|
+
import rule48 from "../rules/git/diff-name-only.json" with { type: "json" };
|
|
50
|
+
import rule49 from "../rules/git/diff-stat.json" with { type: "json" };
|
|
51
|
+
import rule50 from "../rules/git/diff.json" with { type: "json" };
|
|
52
|
+
import rule51 from "../rules/git/log-oneline.json" with { type: "json" };
|
|
53
|
+
import rule52 from "../rules/git/remote-v.json" with { type: "json" };
|
|
54
|
+
import rule53 from "../rules/git/show.json" with { type: "json" };
|
|
55
|
+
import rule54 from "../rules/git/stash-list.json" with { type: "json" };
|
|
56
|
+
import rule55 from "../rules/git/status.json" with { type: "json" };
|
|
57
|
+
import rule56 from "../rules/git/worktree-list.json" with { type: "json" };
|
|
58
|
+
import rule57 from "../rules/install/bun-install.json" with { type: "json" };
|
|
59
|
+
import rule58 from "../rules/install/npm-ci.json" with { type: "json" };
|
|
60
|
+
import rule59 from "../rules/install/npm-install.json" with { type: "json" };
|
|
61
|
+
import rule60 from "../rules/install/pnpm-install.json" with { type: "json" };
|
|
62
|
+
import rule61 from "../rules/install/yarn-install.json" with { type: "json" };
|
|
63
|
+
import rule62 from "../rules/lint/biome.json" with { type: "json" };
|
|
64
|
+
import rule63 from "../rules/lint/eslint.json" with { type: "json" };
|
|
65
|
+
import rule64 from "../rules/lint/oxlint.json" with { type: "json" };
|
|
66
|
+
import rule65 from "../rules/lint/prettier-check.json" with { type: "json" };
|
|
67
|
+
import rule66 from "../rules/media/ffmpeg.json" with { type: "json" };
|
|
68
|
+
import rule67 from "../rules/media/mediainfo.json" with { type: "json" };
|
|
69
|
+
import rule68 from "../rules/network/curl.json" with { type: "json" };
|
|
70
|
+
import rule69 from "../rules/network/dig.json" with { type: "json" };
|
|
71
|
+
import rule70 from "../rules/network/nslookup.json" with { type: "json" };
|
|
72
|
+
import rule71 from "../rules/network/ping.json" with { type: "json" };
|
|
73
|
+
import rule72 from "../rules/network/ssh.json" with { type: "json" };
|
|
74
|
+
import rule73 from "../rules/network/traceroute.json" with { type: "json" };
|
|
75
|
+
import rule74 from "../rules/network/wget.json" with { type: "json" };
|
|
76
|
+
import rule75 from "../rules/observability/free.json" with { type: "json" };
|
|
77
|
+
import rule76 from "../rules/observability/htop.json" with { type: "json" };
|
|
78
|
+
import rule77 from "../rules/observability/iostat.json" with { type: "json" };
|
|
79
|
+
import rule78 from "../rules/observability/top.json" with { type: "json" };
|
|
80
|
+
import rule79 from "../rules/observability/vmstat.json" with { type: "json" };
|
|
81
|
+
import rule80 from "../rules/openclaw/sessions-history.json" with { type: "json" };
|
|
82
|
+
import rule81 from "../rules/package/apt-install.json" with { type: "json" };
|
|
83
|
+
import rule82 from "../rules/package/apt-upgrade.json" with { type: "json" };
|
|
84
|
+
import rule83 from "../rules/package/brew-install.json" with { type: "json" };
|
|
85
|
+
import rule84 from "../rules/package/brew-upgrade.json" with { type: "json" };
|
|
86
|
+
import rule85 from "../rules/package/composer.json" with { type: "json" };
|
|
87
|
+
import rule86 from "../rules/package/dnf-install.json" with { type: "json" };
|
|
88
|
+
import rule87 from "../rules/package/fnm.json" with { type: "json" };
|
|
89
|
+
import rule88 from "../rules/package/npm-ls.json" with { type: "json" };
|
|
90
|
+
import rule89 from "../rules/package/yum-install.json" with { type: "json" };
|
|
91
|
+
import rule90 from "../rules/search/git-grep.json" with { type: "json" };
|
|
92
|
+
import rule91 from "../rules/search/grep.json" with { type: "json" };
|
|
93
|
+
import rule92 from "../rules/search/rg.json" with { type: "json" };
|
|
94
|
+
import rule93 from "../rules/service/journalctl.json" with { type: "json" };
|
|
95
|
+
import rule94 from "../rules/service/launchctl.json" with { type: "json" };
|
|
96
|
+
import rule95 from "../rules/service/lsof.json" with { type: "json" };
|
|
97
|
+
import rule96 from "../rules/service/netstat.json" with { type: "json" };
|
|
98
|
+
import rule97 from "../rules/service/pm2.json" with { type: "json" };
|
|
99
|
+
import rule98 from "../rules/service/service.json" with { type: "json" };
|
|
100
|
+
import rule99 from "../rules/service/ss.json" with { type: "json" };
|
|
101
|
+
import rule100 from "../rules/service/systemctl-status.json" with { type: "json" };
|
|
102
|
+
import rule101 from "../rules/system/df.json" with { type: "json" };
|
|
103
|
+
import rule102 from "../rules/system/du.json" with { type: "json" };
|
|
104
|
+
import rule103 from "../rules/system/file.json" with { type: "json" };
|
|
105
|
+
import rule104 from "../rules/system/ps.json" with { type: "json" };
|
|
106
|
+
import rule105 from "../rules/task/env.json" with { type: "json" };
|
|
107
|
+
import rule106 from "../rules/task/just.json" with { type: "json" };
|
|
108
|
+
import rule107 from "../rules/task/make.json" with { type: "json" };
|
|
109
|
+
import rule108 from "../rules/task/mise.json" with { type: "json" };
|
|
110
|
+
import rule109 from "../rules/task/node.json" with { type: "json" };
|
|
111
|
+
import rule110 from "../rules/task/php.json" with { type: "json" };
|
|
112
|
+
import rule111 from "../rules/task/python.json" with { type: "json" };
|
|
113
|
+
import rule112 from "../rules/task/ruby.json" with { type: "json" };
|
|
114
|
+
import rule113 from "../rules/task/uv.json" with { type: "json" };
|
|
115
|
+
import rule114 from "../rules/tests/bun-test.json" with { type: "json" };
|
|
116
|
+
import rule115 from "../rules/tests/cargo-test.json" with { type: "json" };
|
|
117
|
+
import rule116 from "../rules/tests/go-test.json" with { type: "json" };
|
|
118
|
+
import rule117 from "../rules/tests/jest.json" with { type: "json" };
|
|
119
|
+
import rule118 from "../rules/tests/mocha.json" with { type: "json" };
|
|
120
|
+
import rule119 from "../rules/tests/npm-test.json" with { type: "json" };
|
|
121
|
+
import rule120 from "../rules/tests/playwright.json" with { type: "json" };
|
|
122
|
+
import rule121 from "../rules/tests/pnpm-test.json" with { type: "json" };
|
|
123
|
+
import rule122 from "../rules/tests/pytest.json" with { type: "json" };
|
|
124
|
+
import rule123 from "../rules/tests/rspec.json" with { type: "json" };
|
|
125
|
+
import rule124 from "../rules/tests/swift-test.json" with { type: "json" };
|
|
126
|
+
import rule125 from "../rules/tests/vitest.json" with { type: "json" };
|
|
127
|
+
import rule126 from "../rules/tests/yarn-test.json" with { type: "json" };
|
|
128
|
+
import rule127 from "../rules/text/wc.json" with { type: "json" };
|
|
129
|
+
import rule128 from "../rules/transfer/rsync.json" with { type: "json" };
|
|
130
|
+
import rule129 from "../rules/transfer/scp.json" with { type: "json" };
|
|
131
|
+
export const BUNDLED_BUILTIN_RULES = [
|
|
132
|
+
rule0, // rules/archive/tar.json
|
|
133
|
+
rule1, // rules/archive/unzip.json
|
|
134
|
+
rule2, // rules/archive/zip.json
|
|
135
|
+
rule3, // rules/build/cmake.json
|
|
136
|
+
rule4, // rules/build/dotnet.json
|
|
137
|
+
rule5, // rules/build/esbuild.json
|
|
138
|
+
rule6, // rules/build/go-build.json
|
|
139
|
+
rule7, // rules/build/gradle.json
|
|
140
|
+
rule8, // rules/build/maven.json
|
|
141
|
+
rule9, // rules/build/msbuild.json
|
|
142
|
+
rule10, // rules/build/pnpm-build.json
|
|
143
|
+
rule11, // rules/build/swift-build.json
|
|
144
|
+
rule12, // rules/build/tsc.json
|
|
145
|
+
rule13, // rules/build/tsdown.json
|
|
146
|
+
rule14, // rules/build/vite.json
|
|
147
|
+
rule15, // rules/build/webpack.json
|
|
148
|
+
rule16, // rules/build/xcodebuild.json
|
|
149
|
+
rule17, // rules/cloud/aws.json
|
|
150
|
+
rule18, // rules/cloud/az.json
|
|
151
|
+
rule19, // rules/cloud/flyctl.json
|
|
152
|
+
rule20, // rules/cloud/gcloud.json
|
|
153
|
+
rule21, // rules/cloud/gh.json
|
|
154
|
+
rule22, // rules/cloud/vercel.json
|
|
155
|
+
rule23, // rules/database/mongosh.json
|
|
156
|
+
rule24, // rules/database/mysql.json
|
|
157
|
+
rule25, // rules/database/psql.json
|
|
158
|
+
rule26, // rules/database/redis-cli.json
|
|
159
|
+
rule27, // rules/database/sqlite3.json
|
|
160
|
+
rule28, // rules/devops/docker-build.json
|
|
161
|
+
rule29, // rules/devops/docker-compose.json
|
|
162
|
+
rule30, // rules/devops/docker-images.json
|
|
163
|
+
rule31, // rules/devops/docker-logs.json
|
|
164
|
+
rule32, // rules/devops/docker-ps.json
|
|
165
|
+
rule33, // rules/devops/helm.json
|
|
166
|
+
rule34, // rules/devops/kubectl-describe.json
|
|
167
|
+
rule35, // rules/devops/kubectl-get.json
|
|
168
|
+
rule36, // rules/devops/kubectl-logs.json
|
|
169
|
+
rule37, // rules/devops/pulumi.json
|
|
170
|
+
rule38, // rules/devops/terraform.json
|
|
171
|
+
rule39, // rules/devops/terragrunt.json
|
|
172
|
+
rule40, // rules/filesystem/fd.json
|
|
173
|
+
rule41, // rules/filesystem/find.json
|
|
174
|
+
rule42, // rules/filesystem/git-ls-files.json
|
|
175
|
+
rule43, // rules/filesystem/ls.json
|
|
176
|
+
rule44, // rules/filesystem/rg-files.json
|
|
177
|
+
rule45, // rules/generic/fallback.json
|
|
178
|
+
rule46, // rules/generic/help.json
|
|
179
|
+
rule47, // rules/git/branch.json
|
|
180
|
+
rule48, // rules/git/diff-name-only.json
|
|
181
|
+
rule49, // rules/git/diff-stat.json
|
|
182
|
+
rule50, // rules/git/diff.json
|
|
183
|
+
rule51, // rules/git/log-oneline.json
|
|
184
|
+
rule52, // rules/git/remote-v.json
|
|
185
|
+
rule53, // rules/git/show.json
|
|
186
|
+
rule54, // rules/git/stash-list.json
|
|
187
|
+
rule55, // rules/git/status.json
|
|
188
|
+
rule56, // rules/git/worktree-list.json
|
|
189
|
+
rule57, // rules/install/bun-install.json
|
|
190
|
+
rule58, // rules/install/npm-ci.json
|
|
191
|
+
rule59, // rules/install/npm-install.json
|
|
192
|
+
rule60, // rules/install/pnpm-install.json
|
|
193
|
+
rule61, // rules/install/yarn-install.json
|
|
194
|
+
rule62, // rules/lint/biome.json
|
|
195
|
+
rule63, // rules/lint/eslint.json
|
|
196
|
+
rule64, // rules/lint/oxlint.json
|
|
197
|
+
rule65, // rules/lint/prettier-check.json
|
|
198
|
+
rule66, // rules/media/ffmpeg.json
|
|
199
|
+
rule67, // rules/media/mediainfo.json
|
|
200
|
+
rule68, // rules/network/curl.json
|
|
201
|
+
rule69, // rules/network/dig.json
|
|
202
|
+
rule70, // rules/network/nslookup.json
|
|
203
|
+
rule71, // rules/network/ping.json
|
|
204
|
+
rule72, // rules/network/ssh.json
|
|
205
|
+
rule73, // rules/network/traceroute.json
|
|
206
|
+
rule74, // rules/network/wget.json
|
|
207
|
+
rule75, // rules/observability/free.json
|
|
208
|
+
rule76, // rules/observability/htop.json
|
|
209
|
+
rule77, // rules/observability/iostat.json
|
|
210
|
+
rule78, // rules/observability/top.json
|
|
211
|
+
rule79, // rules/observability/vmstat.json
|
|
212
|
+
rule80, // rules/openclaw/sessions-history.json
|
|
213
|
+
rule81, // rules/package/apt-install.json
|
|
214
|
+
rule82, // rules/package/apt-upgrade.json
|
|
215
|
+
rule83, // rules/package/brew-install.json
|
|
216
|
+
rule84, // rules/package/brew-upgrade.json
|
|
217
|
+
rule85, // rules/package/composer.json
|
|
218
|
+
rule86, // rules/package/dnf-install.json
|
|
219
|
+
rule87, // rules/package/fnm.json
|
|
220
|
+
rule88, // rules/package/npm-ls.json
|
|
221
|
+
rule89, // rules/package/yum-install.json
|
|
222
|
+
rule90, // rules/search/git-grep.json
|
|
223
|
+
rule91, // rules/search/grep.json
|
|
224
|
+
rule92, // rules/search/rg.json
|
|
225
|
+
rule93, // rules/service/journalctl.json
|
|
226
|
+
rule94, // rules/service/launchctl.json
|
|
227
|
+
rule95, // rules/service/lsof.json
|
|
228
|
+
rule96, // rules/service/netstat.json
|
|
229
|
+
rule97, // rules/service/pm2.json
|
|
230
|
+
rule98, // rules/service/service.json
|
|
231
|
+
rule99, // rules/service/ss.json
|
|
232
|
+
rule100, // rules/service/systemctl-status.json
|
|
233
|
+
rule101, // rules/system/df.json
|
|
234
|
+
rule102, // rules/system/du.json
|
|
235
|
+
rule103, // rules/system/file.json
|
|
236
|
+
rule104, // rules/system/ps.json
|
|
237
|
+
rule105, // rules/task/env.json
|
|
238
|
+
rule106, // rules/task/just.json
|
|
239
|
+
rule107, // rules/task/make.json
|
|
240
|
+
rule108, // rules/task/mise.json
|
|
241
|
+
rule109, // rules/task/node.json
|
|
242
|
+
rule110, // rules/task/php.json
|
|
243
|
+
rule111, // rules/task/python.json
|
|
244
|
+
rule112, // rules/task/ruby.json
|
|
245
|
+
rule113, // rules/task/uv.json
|
|
246
|
+
rule114, // rules/tests/bun-test.json
|
|
247
|
+
rule115, // rules/tests/cargo-test.json
|
|
248
|
+
rule116, // rules/tests/go-test.json
|
|
249
|
+
rule117, // rules/tests/jest.json
|
|
250
|
+
rule118, // rules/tests/mocha.json
|
|
251
|
+
rule119, // rules/tests/npm-test.json
|
|
252
|
+
rule120, // rules/tests/playwright.json
|
|
253
|
+
rule121, // rules/tests/pnpm-test.json
|
|
254
|
+
rule122, // rules/tests/pytest.json
|
|
255
|
+
rule123, // rules/tests/rspec.json
|
|
256
|
+
rule124, // rules/tests/swift-test.json
|
|
257
|
+
rule125, // rules/tests/vitest.json
|
|
258
|
+
rule126, // rules/tests/yarn-test.json
|
|
259
|
+
rule127, // rules/text/wc.json
|
|
260
|
+
rule128, // rules/transfer/rsync.json
|
|
261
|
+
rule129,
|
|
262
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ClassificationResult, CompiledRule, JsonRule, ToolExecutionInput } from "../types.js";
|
|
2
|
+
import { type CommandMatchCandidate } from "./command-match.js";
|
|
3
|
+
type RuleLike = JsonRule | CompiledRule;
|
|
4
|
+
type RuleMatchSelection<T extends RuleLike> = {
|
|
5
|
+
rule: T;
|
|
6
|
+
candidate: CommandMatchCandidate;
|
|
7
|
+
};
|
|
8
|
+
export type ResolvedRuleMatch<T extends RuleLike = RuleLike> = {
|
|
9
|
+
rule: T;
|
|
10
|
+
candidate: CommandMatchCandidate;
|
|
11
|
+
candidateInput: ToolExecutionInput;
|
|
12
|
+
classification: ClassificationResult;
|
|
13
|
+
};
|
|
14
|
+
export declare function matchesRule(ruleLike: RuleLike, input: ToolExecutionInput): boolean;
|
|
15
|
+
export declare function findBestRuleMatch<T extends RuleLike>(input: ToolExecutionInput, rules: T[]): RuleMatchSelection<T> | undefined;
|
|
16
|
+
export declare function resolveRuleMatch<T extends RuleLike>(input: ToolExecutionInput, rules: T[]): ResolvedRuleMatch<T> | undefined;
|
|
17
|
+
export declare function classifyExecution(input: ToolExecutionInput, rules: RuleLike[], forcedRuleId?: string): ClassificationResult;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { getGitSubcommand } from "./command-identity.js";
|
|
2
|
+
import { deriveCommandMatchCandidates } from "./command-match.js";
|
|
3
|
+
function includesAll(argv, expected) {
|
|
4
|
+
return expected.every((part) => argv.includes(part));
|
|
5
|
+
}
|
|
6
|
+
function isWordLikeChar(char) {
|
|
7
|
+
return typeof char === "string" && /[A-Za-z0-9_]/u.test(char);
|
|
8
|
+
}
|
|
9
|
+
function includesCommandPart(command, part) {
|
|
10
|
+
if (!part) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
let fromIndex = 0;
|
|
14
|
+
while (fromIndex <= command.length) {
|
|
15
|
+
const index = command.indexOf(part, fromIndex);
|
|
16
|
+
if (index === -1) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
const end = index + part.length;
|
|
20
|
+
const partStartsWord = isWordLikeChar(part[0]);
|
|
21
|
+
const partEndsWord = isWordLikeChar(part.at(-1));
|
|
22
|
+
const prev = index > 0 ? command[index - 1] : undefined;
|
|
23
|
+
const next = end < command.length ? command[end] : undefined;
|
|
24
|
+
const leftBoundaryOk = !partStartsWord || !isWordLikeChar(prev);
|
|
25
|
+
const rightBoundaryOk = !partEndsWord || !isWordLikeChar(next);
|
|
26
|
+
if (leftBoundaryOk && rightBoundaryOk) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
fromIndex = index + 1;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
function getJsonRule(rule) {
|
|
34
|
+
return "rule" in rule ? rule.rule : rule;
|
|
35
|
+
}
|
|
36
|
+
function usesCommandTextMatcher(ruleLike) {
|
|
37
|
+
const rule = getJsonRule(ruleLike);
|
|
38
|
+
return Boolean(rule.match.commandIncludes || rule.match.commandIncludesAny);
|
|
39
|
+
}
|
|
40
|
+
function isBuiltinRule(ruleLike) {
|
|
41
|
+
return "source" in ruleLike && ruleLike.source === "builtin";
|
|
42
|
+
}
|
|
43
|
+
function getCandidatePriority(candidate) {
|
|
44
|
+
switch (candidate.source) {
|
|
45
|
+
case "effective":
|
|
46
|
+
return 2;
|
|
47
|
+
case "shell-body":
|
|
48
|
+
return 1;
|
|
49
|
+
case "original":
|
|
50
|
+
default:
|
|
51
|
+
return 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function applyCommandMatchCandidate(input, candidate) {
|
|
55
|
+
const { command: _command, ...rest } = input;
|
|
56
|
+
return {
|
|
57
|
+
...rest,
|
|
58
|
+
...(candidate.command ? { command: candidate.command } : {}),
|
|
59
|
+
argv: candidate.argv,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export function matchesRule(ruleLike, input) {
|
|
63
|
+
const rule = getJsonRule(ruleLike);
|
|
64
|
+
const argv = input.argv ?? [];
|
|
65
|
+
const command = input.command ?? "";
|
|
66
|
+
const toolName = input.toolName;
|
|
67
|
+
if (rule.match.toolNames && !rule.match.toolNames.includes(toolName)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (rule.match.argv0 && !rule.match.argv0.includes(argv[0] ?? "")) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
if (rule.match.gitSubcommands && !rule.match.gitSubcommands.includes(getGitSubcommand(argv) ?? "")) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
if (rule.match.argvIncludes && !rule.match.argvIncludes.every((parts) => includesAll(argv, parts))) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
if (rule.match.argvIncludesAny && !rule.match.argvIncludesAny.some((parts) => includesAll(argv, parts))) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
if (rule.match.commandIncludes && !rule.match.commandIncludes.every((part) => includesCommandPart(command, part))) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
if (rule.match.commandIncludesAny && !rule.match.commandIncludesAny.some((part) => includesCommandPart(command, part))) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
function scoreRule(ruleLike) {
|
|
91
|
+
const rule = getJsonRule(ruleLike);
|
|
92
|
+
return ((rule.priority ?? 0) * 1000
|
|
93
|
+
+ (rule.match.argv0?.length ?? 0) * 100
|
|
94
|
+
+ (rule.match.gitSubcommands?.length ?? 0) * 60
|
|
95
|
+
+ (rule.match.argvIncludes?.reduce((sum, parts) => sum + parts.length, 0) ?? 0) * 40
|
|
96
|
+
+ (rule.match.argvIncludesAny?.reduce((sum, parts) => sum + parts.length, 0) ?? 0) * 35
|
|
97
|
+
+ (rule.match.commandIncludes?.length ?? 0) * 25
|
|
98
|
+
+ (rule.match.commandIncludesAny?.length ?? 0) * 20
|
|
99
|
+
+ (rule.match.toolNames?.length ?? 0) * 10);
|
|
100
|
+
}
|
|
101
|
+
function compareSelections(left, right) {
|
|
102
|
+
const scoreDiff = scoreRule(right.rule) - scoreRule(left.rule);
|
|
103
|
+
if (scoreDiff !== 0) {
|
|
104
|
+
return scoreDiff;
|
|
105
|
+
}
|
|
106
|
+
const candidateDiff = getCandidatePriority(right.candidate) - getCandidatePriority(left.candidate);
|
|
107
|
+
if (candidateDiff !== 0) {
|
|
108
|
+
return candidateDiff;
|
|
109
|
+
}
|
|
110
|
+
return getJsonRule(left.rule).id.localeCompare(getJsonRule(right.rule).id);
|
|
111
|
+
}
|
|
112
|
+
export function findBestRuleMatch(input, rules) {
|
|
113
|
+
const candidates = deriveCommandMatchCandidates(input);
|
|
114
|
+
const highestCandidatePriority = Math.max(...candidates.map(getCandidatePriority));
|
|
115
|
+
const specificMatches = [];
|
|
116
|
+
let fallbackSelection;
|
|
117
|
+
for (const candidate of candidates) {
|
|
118
|
+
const candidateInput = applyCommandMatchCandidate(input, candidate);
|
|
119
|
+
for (const rule of rules) {
|
|
120
|
+
if (!matchesRule(rule, candidateInput)) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (getJsonRule(rule).id === "generic/fallback") {
|
|
124
|
+
fallbackSelection ??= { rule, candidate };
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
if (isBuiltinRule(rule) && usesCommandTextMatcher(rule) && getCandidatePriority(candidate) < highestCandidatePriority) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
specificMatches.push({ rule, candidate });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (specificMatches.length > 0) {
|
|
134
|
+
return [...specificMatches].sort(compareSelections)[0];
|
|
135
|
+
}
|
|
136
|
+
return fallbackSelection;
|
|
137
|
+
}
|
|
138
|
+
function buildClassificationResult(ruleLike, candidate) {
|
|
139
|
+
const rule = getJsonRule(ruleLike);
|
|
140
|
+
return {
|
|
141
|
+
family: rule.family,
|
|
142
|
+
confidence: rule.id === "generic/fallback" ? 0.2 : 0.9,
|
|
143
|
+
matchedReducer: rule.id,
|
|
144
|
+
matchedVia: candidate.source,
|
|
145
|
+
matchedCommand: candidate.command ?? candidate.argv.join(" "),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export function resolveRuleMatch(input, rules) {
|
|
149
|
+
const match = findBestRuleMatch(input, rules);
|
|
150
|
+
if (!match) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
const candidateInput = applyCommandMatchCandidate(input, match.candidate);
|
|
154
|
+
return {
|
|
155
|
+
rule: match.rule,
|
|
156
|
+
candidate: match.candidate,
|
|
157
|
+
candidateInput,
|
|
158
|
+
classification: buildClassificationResult(match.rule, match.candidate),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export function classifyExecution(input, rules, forcedRuleId) {
|
|
162
|
+
if (forcedRuleId) {
|
|
163
|
+
const forcedRule = rules.find((rule) => getJsonRule(rule).id === forcedRuleId);
|
|
164
|
+
if (forcedRule) {
|
|
165
|
+
const forced = getJsonRule(forcedRule);
|
|
166
|
+
return {
|
|
167
|
+
family: forced.family,
|
|
168
|
+
confidence: 1,
|
|
169
|
+
matchedReducer: forced.id,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const resolved = resolveRuleMatch(input, rules);
|
|
174
|
+
if (!resolved) {
|
|
175
|
+
return {
|
|
176
|
+
family: "generic",
|
|
177
|
+
confidence: 0.2,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
return resolved.classification;
|
|
181
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
const DEFAULT_REDUCE_JSON_COMMAND = ["tokenjuice", "reduce-json"];
|
|
3
|
+
const DEFAULT_MAX_OUTPUT_BYTES = 8 * 1024 * 1024;
|
|
4
|
+
function resolveCommand(command) {
|
|
5
|
+
const resolved = command ?? DEFAULT_REDUCE_JSON_COMMAND;
|
|
6
|
+
if (resolved.length === 0 || !resolved[0]) {
|
|
7
|
+
throw new Error("reduce-json client requires a command");
|
|
8
|
+
}
|
|
9
|
+
return resolved;
|
|
10
|
+
}
|
|
11
|
+
function buildExitError(command, code, stderr) {
|
|
12
|
+
const suffix = stderr.trim() ? `\n${stderr.trim()}` : "";
|
|
13
|
+
return new Error(`reduce-json command failed (${command.join(" ")}) with exit ${code ?? "unknown"}${suffix}`);
|
|
14
|
+
}
|
|
15
|
+
function buildParseError(stdout) {
|
|
16
|
+
const preview = stdout.trim().slice(0, 400);
|
|
17
|
+
return new Error(`reduce-json command returned invalid JSON${preview ? `\n${preview}` : ""}`);
|
|
18
|
+
}
|
|
19
|
+
export async function runReduceJsonCli(request, options = {}) {
|
|
20
|
+
const command = resolveCommand(options.command);
|
|
21
|
+
const maxOutputBytes = typeof options.maxOutputBytes === "number" && options.maxOutputBytes > 0
|
|
22
|
+
? options.maxOutputBytes
|
|
23
|
+
: DEFAULT_MAX_OUTPUT_BYTES;
|
|
24
|
+
return await new Promise((resolve, reject) => {
|
|
25
|
+
const child = spawn(command[0], command.slice(1), {
|
|
26
|
+
cwd: options.cwd,
|
|
27
|
+
env: {
|
|
28
|
+
...process.env,
|
|
29
|
+
...options.env,
|
|
30
|
+
},
|
|
31
|
+
shell: false,
|
|
32
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
33
|
+
});
|
|
34
|
+
let stdout = "";
|
|
35
|
+
let stderr = "";
|
|
36
|
+
let settled = false;
|
|
37
|
+
let stdinError = null;
|
|
38
|
+
const timeout = typeof options.timeoutMs === "number" && options.timeoutMs > 0
|
|
39
|
+
? setTimeout(() => {
|
|
40
|
+
if (settled) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
settled = true;
|
|
44
|
+
child.kill("SIGKILL");
|
|
45
|
+
reject(new Error(`reduce-json command timed out after ${options.timeoutMs}ms`));
|
|
46
|
+
}, options.timeoutMs)
|
|
47
|
+
: null;
|
|
48
|
+
child.stdout.on("data", (chunk) => {
|
|
49
|
+
if (stdout.length + chunk.length > maxOutputBytes) {
|
|
50
|
+
if (timeout) {
|
|
51
|
+
clearTimeout(timeout);
|
|
52
|
+
}
|
|
53
|
+
if (settled) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
settled = true;
|
|
57
|
+
child.kill("SIGKILL");
|
|
58
|
+
reject(new Error(`reduce-json command exceeded max output size of ${maxOutputBytes} bytes`));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
stdout += chunk.toString("utf8");
|
|
62
|
+
});
|
|
63
|
+
child.stderr.on("data", (chunk) => {
|
|
64
|
+
if (stderr.length + chunk.length > maxOutputBytes) {
|
|
65
|
+
if (timeout) {
|
|
66
|
+
clearTimeout(timeout);
|
|
67
|
+
}
|
|
68
|
+
if (settled) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
settled = true;
|
|
72
|
+
child.kill("SIGKILL");
|
|
73
|
+
reject(new Error(`reduce-json command exceeded max output size of ${maxOutputBytes} bytes`));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
stderr += chunk.toString("utf8");
|
|
77
|
+
});
|
|
78
|
+
child.on("error", (error) => {
|
|
79
|
+
if (timeout) {
|
|
80
|
+
clearTimeout(timeout);
|
|
81
|
+
}
|
|
82
|
+
if (settled) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
settled = true;
|
|
86
|
+
reject(error);
|
|
87
|
+
});
|
|
88
|
+
child.stdin.on("error", (error) => {
|
|
89
|
+
const streamError = error;
|
|
90
|
+
stdinError = error;
|
|
91
|
+
if (settled) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (streamError.code !== "EPIPE" && streamError.code !== "ERR_STREAM_DESTROYED") {
|
|
95
|
+
if (timeout) {
|
|
96
|
+
clearTimeout(timeout);
|
|
97
|
+
}
|
|
98
|
+
settled = true;
|
|
99
|
+
reject(error);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
child.on("close", (code) => {
|
|
103
|
+
if (timeout) {
|
|
104
|
+
clearTimeout(timeout);
|
|
105
|
+
}
|
|
106
|
+
if (settled) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
settled = true;
|
|
110
|
+
if (code !== 0) {
|
|
111
|
+
reject(buildExitError(command, code, stderr));
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (stdinError) {
|
|
115
|
+
reject(stdinError);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
resolve(JSON.parse(stdout));
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
reject(buildParseError(stdout));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
child.stdin.end(JSON.stringify(request));
|
|
126
|
+
});
|
|
127
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToolExecutionInput } from "../types.js";
|
|
2
|
+
export declare function getCommandName(argv: string[]): string | null;
|
|
3
|
+
export declare function getGitSubcommand(argv: string[]): string | null;
|
|
4
|
+
export declare function isFileContentInspectionArgv(argv: string[]): boolean;
|
|
5
|
+
export declare function isRepositoryInspectionArgv(argv: string[]): boolean;
|
|
6
|
+
export declare function isFileContentInspectionCommand(input: Pick<ToolExecutionInput, "argv" | "command">): boolean;
|
|
7
|
+
export declare function isRepositoryInspectionCommand(input: Pick<ToolExecutionInput, "argv" | "command">): boolean;
|
|
8
|
+
export declare function normalizeCommandSignature(command?: string): string | null;
|
|
9
|
+
export declare function normalizeEffectiveCommandSignature(command?: string): string | null;
|