@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,212 @@
|
|
|
1
|
+
import type { AdalDoctorReport, AdalInstructionsOptions } from "../adal/index.js";
|
|
2
|
+
import type { AetherDoctorReport, AetherPromptOptions } from "../aether/index.js";
|
|
3
|
+
import type { AiderDoctorReport } from "../aider/index.js";
|
|
4
|
+
import type { AictlDoctorReport, AictlInstructionsOptions } from "../aictl/index.js";
|
|
5
|
+
import type { AiMemoryProtocolDoctorReport, AiMemoryProtocolOptions } from "../ai-memory-protocol/index.js";
|
|
6
|
+
import type { AgentLayerDoctorReport, AgentLayerInstructionsOptions } from "../agent-layer/index.js";
|
|
7
|
+
import type { AgentInitDoctorReport, AgentInitInstructionsOptions } from "../agentinit/index.js";
|
|
8
|
+
import type { AgentlinkDoctorReport, AgentlinkInstructionsOptions } from "../agentlink/index.js";
|
|
9
|
+
import type { AgentloomDoctorReport, AgentloomRuleOptions } from "../agentloom/index.js";
|
|
10
|
+
import type { AgentsCliDoctorReport, AgentsCliMemoryOptions } from "../agents-cli/index.js";
|
|
11
|
+
import type { AgentsMdDoctorReport, AgentsMdInstructionsOptions } from "../agents-md/index.js";
|
|
12
|
+
import type { AgentsGeDoctorReport, AgentsGeRuleOptions } from "../agentsge/index.js";
|
|
13
|
+
import type { AgentsMeshDoctorReport, AgentsMeshRuleOptions } from "../agentsmesh/index.js";
|
|
14
|
+
import type { AmazonQDoctorReport, AmazonQRuleOptions } from "../amazon-q/index.js";
|
|
15
|
+
import type { AmpDoctorReport, AmpInstructionsOptions } from "../amp/index.js";
|
|
16
|
+
import type { AntigravityDoctorReport, AntigravityRuleOptions } from "../antigravity/index.js";
|
|
17
|
+
import type { AnywhereAgentsDoctorReport, AnywhereAgentsInstructionsOptions } from "../anywhere-agents/index.js";
|
|
18
|
+
import type { AugmentDoctorReport, AugmentRuleOptions } from "../augment/index.js";
|
|
19
|
+
import type { AvanteDoctorReport } from "../avante/index.js";
|
|
20
|
+
import type { BazDoctorReport, BazSkillOptions } from "../baz/index.js";
|
|
21
|
+
import type { BitoDoctorReport, BitoGuidelinesOptions } from "../bito/index.js";
|
|
22
|
+
import type { BlackboxDoctorReport, BlackboxSkillOptions } from "../blackbox/index.js";
|
|
23
|
+
import type { BlocksDoctorReport, BlocksSkillOptions } from "../blocks/index.js";
|
|
24
|
+
import type { ClawdbotDoctorReport, ClawdbotSkillOptions } from "../clawdbot/index.js";
|
|
25
|
+
import type { BobDoctorReport, BobInstructionsOptions } from "../bob/index.js";
|
|
26
|
+
import type { BuilderDoctorReport, BuilderRuleOptions } from "../builder/index.js";
|
|
27
|
+
import type { CharlieDoctorReport, CharlieInstructionsOptions } from "../charlie/index.js";
|
|
28
|
+
import type { ClaudeCodeDoctorReport, ClaudeCodeHookCommandOptions } from "../claude-code/index.js";
|
|
29
|
+
import type { ClineDoctorReport } from "../cline/index.js";
|
|
30
|
+
import type { CodeAntDoctorReport, CodeAntInstructionsOptions } from "../codeant/index.js";
|
|
31
|
+
import type { CodebuffDoctorReport, CodebuffInstructionsOptions } from "../codebuff/index.js";
|
|
32
|
+
import type { CodegenDoctorReport, CodegenInstructionsOptions } from "../codegen/index.js";
|
|
33
|
+
import type { CoderAgentsDoctorReport, CoderAgentsSkillOptions } from "../coder-agents/index.js";
|
|
34
|
+
import type { CodeRabbitConfigOptions, CodeRabbitDoctorReport } from "../coderabbit/index.js";
|
|
35
|
+
import type { CodeBuddyDoctorReport, CodeBuddyHookCommandOptions } from "../codebuddy/index.js";
|
|
36
|
+
import type { CommandCodeDoctorReport, CommandCodeHookCommandOptions } from "../command-code/index.js";
|
|
37
|
+
import type { ContinueDoctorReport } from "../continue/index.js";
|
|
38
|
+
import type { CodexDoctorReport, CodexHookCommandOptions } from "../codex/index.js";
|
|
39
|
+
import type { CopilotAgentDoctorReport, CopilotAgentHookCommandOptions } from "../copilot-agent/index.js";
|
|
40
|
+
import type { CopilotCliDoctorReport } from "../copilot-cli/index.js";
|
|
41
|
+
import type { CrushDoctorReport, CrushSkillOptions } from "../crush/index.js";
|
|
42
|
+
import type { CursorDoctorReport } from "../cursor/index.js";
|
|
43
|
+
import type { DeepAgentsDoctorReport, DeepAgentsInstructionsOptions } from "../deepagents/index.js";
|
|
44
|
+
import type { DevinDoctorReport, DevinHookCommandOptions } from "../devin/index.js";
|
|
45
|
+
import type { DotAgentsDoctorReport, DotAgentsRuleOptions } from "../dot-agents/index.js";
|
|
46
|
+
import type { DockerAgentDoctorReport, DockerAgentPromptOptions } from "../docker-agent/index.js";
|
|
47
|
+
import type { DroidDoctorReport, DroidHookCommandOptions } from "../droid/index.js";
|
|
48
|
+
import type { EcaDoctorReport, EcaSkillOptions } from "../eca/index.js";
|
|
49
|
+
import type { ElyraDoctorReport, ElyraSkillOptions } from "../elyra/index.js";
|
|
50
|
+
import type { FirebaseStudioDoctorReport, FirebaseStudioRuleOptions } from "../firebase-studio/index.js";
|
|
51
|
+
import type { ForgeCodeDoctorReport, ForgeCodeInstructionsOptions } from "../forgecode/index.js";
|
|
52
|
+
import type { GeminiCliDoctorReport } from "../gemini-cli/index.js";
|
|
53
|
+
import type { GitLabDuoDoctorReport, GitLabDuoRuleOptions } from "../gitlab-duo/index.js";
|
|
54
|
+
import type { GooseDoctorReport, GooseHintsOptions } from "../goose/index.js";
|
|
55
|
+
import type { GreptileDoctorReport, GreptileRuleOptions } from "../greptile/index.js";
|
|
56
|
+
import type { GrokBuildDoctorReport, GrokBuildInstructionsOptions } from "../grok-build/index.js";
|
|
57
|
+
import type { GrokCliDoctorReport, GrokCliHookCommandOptions } from "../grok-cli/index.js";
|
|
58
|
+
import type { GptmeDoctorReport, GptmeInstructionsOptions } from "../gptme/index.js";
|
|
59
|
+
import type { Jean2DoctorReport, Jean2InstructionsOptions } from "../jean2/index.js";
|
|
60
|
+
import type { JetBrainsAiDoctorReport, JetBrainsAiRuleOptions } from "../jetbrains-ai/index.js";
|
|
61
|
+
import type { JunieDoctorReport } from "../junie/index.js";
|
|
62
|
+
import type { JulesDoctorReport, JulesInstructionsOptions } from "../jules/index.js";
|
|
63
|
+
import type { LeanCtlDoctorReport, LeanCtlInstructionsOptions } from "../leanctl/index.js";
|
|
64
|
+
import type { KimiDoctorReport, KimiHookCommandOptions } from "../kimi/index.js";
|
|
65
|
+
import type { KiroDoctorReport } from "../kiro/index.js";
|
|
66
|
+
import type { KiloDoctorReport } from "../kilo/index.js";
|
|
67
|
+
import type { KnownsDoctorReport, KnownsInstructionsOptions } from "../knowns/index.js";
|
|
68
|
+
import type { LocalCodeDoctorReport, LocalCodePluginOptions } from "../localcode/index.js";
|
|
69
|
+
import type { McpAgentDefinitionOptions, McpAgentDoctorReport } from "../mcp-agent/index.js";
|
|
70
|
+
import type { MiniSweAgentConfigOptions, MiniSweAgentDoctorReport } from "../mini-swe-agent/index.js";
|
|
71
|
+
import type { SweAgentConfigOptions, SweAgentDoctorReport } from "../swe-agent/index.js";
|
|
72
|
+
import type { StagewiseDoctorReport, StagewiseSkillOptions } from "../stagewise/index.js";
|
|
73
|
+
import type { MistralVibeDoctorReport, MistralVibeInstructionsOptions } from "../mistral-vibe/index.js";
|
|
74
|
+
import type { MuxDoctorReport, MuxHookCommandOptions } from "../mux/index.js";
|
|
75
|
+
import type { NovaKitDoctorReport, NovaKitInstructionsOptions } from "../novakit/index.js";
|
|
76
|
+
import type { OnaDoctorReport, OnaSkillOptions } from "../ona/index.js";
|
|
77
|
+
import type { OpenInterpreterDoctorReport, OpenInterpreterInstructionsOptions } from "../open-interpreter/index.js";
|
|
78
|
+
import type { OpenHandsDoctorReport } from "../openhands/index.js";
|
|
79
|
+
import type { OpenWebUIDoctorReport, OpenWebUIToolOptions } from "../openwebui/index.js";
|
|
80
|
+
import type { PiDoctorReport } from "../pi/index.js";
|
|
81
|
+
import type { PiGoDoctorReport, PiGoSkillOptions } from "../pi-go/index.js";
|
|
82
|
+
import type { PlandexConventionOptions, PlandexDoctorReport } from "../plandex/index.js";
|
|
83
|
+
import type { QodoDoctorReport, QodoReviewConfigOptions } from "../qodo/index.js";
|
|
84
|
+
import type { QoderDoctorReport, QoderInstructionsOptions } from "../qoder/index.js";
|
|
85
|
+
import type { QwenCodeDoctorReport, QwenCodeHookCommandOptions } from "../qwen-code/index.js";
|
|
86
|
+
import type { ReplitDoctorReport, ReplitInstructionsOptions } from "../replit/index.js";
|
|
87
|
+
import type { RooDoctorReport } from "../roo/index.js";
|
|
88
|
+
import type { RovoDoctorReport, RovoInstructionsOptions } from "../rovo/index.js";
|
|
89
|
+
import type { TabbyDoctorReport, TabbySystemPromptOptions } from "../tabby/index.js";
|
|
90
|
+
import type { TabnineDoctorReport, TabnineInstructionsOptions } from "../tabnine/index.js";
|
|
91
|
+
import type { RulerDoctorReport, RulerRuleOptions } from "../ruler/index.js";
|
|
92
|
+
import type { TraeDoctorReport, TraeRuleOptions } from "../trae/index.js";
|
|
93
|
+
import type { UiPathDoctorReport, UiPathInstructionsOptions } from "../uipath/index.js";
|
|
94
|
+
import type { VscodeCopilotDoctorReport } from "../vscode-copilot/index.js";
|
|
95
|
+
import type { WarpDoctorReport, WarpInstructionsOptions } from "../warp/index.js";
|
|
96
|
+
import type { WindsurfDoctorReport } from "../windsurf/index.js";
|
|
97
|
+
import type { ZedDoctorReport } from "../zed/index.js";
|
|
98
|
+
import type { ZencoderDoctorReport, ZencoderRuleOptions } from "../zencoder/index.js";
|
|
99
|
+
export type HookHealthStatus = "ok" | "warn" | "broken" | "disabled";
|
|
100
|
+
export type HookIntegrationDoctorReport = {
|
|
101
|
+
adal: AdalDoctorReport;
|
|
102
|
+
aether: AetherDoctorReport;
|
|
103
|
+
aictl: AictlDoctorReport;
|
|
104
|
+
"ai-memory-protocol": AiMemoryProtocolDoctorReport;
|
|
105
|
+
aider: AiderDoctorReport;
|
|
106
|
+
"agent-layer": AgentLayerDoctorReport;
|
|
107
|
+
agentinit: AgentInitDoctorReport;
|
|
108
|
+
agentlink: AgentlinkDoctorReport;
|
|
109
|
+
agentloom: AgentloomDoctorReport;
|
|
110
|
+
"agents-cli": AgentsCliDoctorReport;
|
|
111
|
+
"agents-md": AgentsMdDoctorReport;
|
|
112
|
+
agentsge: AgentsGeDoctorReport;
|
|
113
|
+
agentsmesh: AgentsMeshDoctorReport;
|
|
114
|
+
"amazon-q": AmazonQDoctorReport;
|
|
115
|
+
amp: AmpDoctorReport;
|
|
116
|
+
antigravity: AntigravityDoctorReport;
|
|
117
|
+
"anywhere-agents": AnywhereAgentsDoctorReport;
|
|
118
|
+
augment: AugmentDoctorReport;
|
|
119
|
+
avante: AvanteDoctorReport;
|
|
120
|
+
baz: BazDoctorReport;
|
|
121
|
+
bito: BitoDoctorReport;
|
|
122
|
+
blackbox: BlackboxDoctorReport;
|
|
123
|
+
blocks: BlocksDoctorReport;
|
|
124
|
+
clawdbot: ClawdbotDoctorReport;
|
|
125
|
+
bob: BobDoctorReport;
|
|
126
|
+
builder: BuilderDoctorReport;
|
|
127
|
+
charlie: CharlieDoctorReport;
|
|
128
|
+
codex: CodexDoctorReport;
|
|
129
|
+
"copilot-agent": CopilotAgentDoctorReport;
|
|
130
|
+
"claude-code": ClaudeCodeDoctorReport;
|
|
131
|
+
cline: ClineDoctorReport;
|
|
132
|
+
codeant: CodeAntDoctorReport;
|
|
133
|
+
codebuff: CodebuffDoctorReport;
|
|
134
|
+
codegen: CodegenDoctorReport;
|
|
135
|
+
"coder-agents": CoderAgentsDoctorReport;
|
|
136
|
+
coderabbit: CodeRabbitDoctorReport;
|
|
137
|
+
codebuddy: CodeBuddyDoctorReport;
|
|
138
|
+
"command-code": CommandCodeDoctorReport;
|
|
139
|
+
continue: ContinueDoctorReport;
|
|
140
|
+
crush: CrushDoctorReport;
|
|
141
|
+
cursor: CursorDoctorReport;
|
|
142
|
+
deepagents: DeepAgentsDoctorReport;
|
|
143
|
+
devin: DevinDoctorReport;
|
|
144
|
+
"dot-agents": DotAgentsDoctorReport;
|
|
145
|
+
"docker-agent": DockerAgentDoctorReport;
|
|
146
|
+
droid: DroidDoctorReport;
|
|
147
|
+
eca: EcaDoctorReport;
|
|
148
|
+
elyra: ElyraDoctorReport;
|
|
149
|
+
"firebase-studio": FirebaseStudioDoctorReport;
|
|
150
|
+
forgecode: ForgeCodeDoctorReport;
|
|
151
|
+
"gemini-cli": GeminiCliDoctorReport;
|
|
152
|
+
"gitlab-duo": GitLabDuoDoctorReport;
|
|
153
|
+
goose: GooseDoctorReport;
|
|
154
|
+
greptile: GreptileDoctorReport;
|
|
155
|
+
"grok-build": GrokBuildDoctorReport;
|
|
156
|
+
"grok-cli": GrokCliDoctorReport;
|
|
157
|
+
gptme: GptmeDoctorReport;
|
|
158
|
+
jean2: Jean2DoctorReport;
|
|
159
|
+
"jetbrains-ai": JetBrainsAiDoctorReport;
|
|
160
|
+
junie: JunieDoctorReport;
|
|
161
|
+
jules: JulesDoctorReport;
|
|
162
|
+
leanctl: LeanCtlDoctorReport;
|
|
163
|
+
kimi: KimiDoctorReport;
|
|
164
|
+
kiro: KiroDoctorReport;
|
|
165
|
+
kilo: KiloDoctorReport;
|
|
166
|
+
knowns: KnownsDoctorReport;
|
|
167
|
+
localcode: LocalCodeDoctorReport;
|
|
168
|
+
"mcp-agent": McpAgentDoctorReport;
|
|
169
|
+
"mini-swe-agent": MiniSweAgentDoctorReport;
|
|
170
|
+
"swe-agent": SweAgentDoctorReport;
|
|
171
|
+
stagewise: StagewiseDoctorReport;
|
|
172
|
+
"mistral-vibe": MistralVibeDoctorReport;
|
|
173
|
+
mux: MuxDoctorReport;
|
|
174
|
+
novakit: NovaKitDoctorReport;
|
|
175
|
+
ona: OnaDoctorReport;
|
|
176
|
+
openhands: OpenHandsDoctorReport;
|
|
177
|
+
"open-interpreter": OpenInterpreterDoctorReport;
|
|
178
|
+
openwebui: OpenWebUIDoctorReport;
|
|
179
|
+
pi: PiDoctorReport;
|
|
180
|
+
"pi-go": PiGoDoctorReport;
|
|
181
|
+
plandex: PlandexDoctorReport;
|
|
182
|
+
qodo: QodoDoctorReport;
|
|
183
|
+
qoder: QoderDoctorReport;
|
|
184
|
+
"qwen-code": QwenCodeDoctorReport;
|
|
185
|
+
replit: ReplitDoctorReport;
|
|
186
|
+
roo: RooDoctorReport;
|
|
187
|
+
rovo: RovoDoctorReport;
|
|
188
|
+
ruler: RulerDoctorReport;
|
|
189
|
+
tabby: TabbyDoctorReport;
|
|
190
|
+
tabnine: TabnineDoctorReport;
|
|
191
|
+
trae: TraeDoctorReport;
|
|
192
|
+
uipath: UiPathDoctorReport;
|
|
193
|
+
"vscode-copilot": VscodeCopilotDoctorReport;
|
|
194
|
+
warp: WarpDoctorReport;
|
|
195
|
+
windsurf: WindsurfDoctorReport;
|
|
196
|
+
zed: ZedDoctorReport;
|
|
197
|
+
zencoder: ZencoderDoctorReport;
|
|
198
|
+
"copilot-cli": CopilotCliDoctorReport;
|
|
199
|
+
};
|
|
200
|
+
export type HookDoctorReport = {
|
|
201
|
+
status: HookHealthStatus;
|
|
202
|
+
integrations: HookIntegrationDoctorReport;
|
|
203
|
+
};
|
|
204
|
+
export type HookDoctorCommandOptions = AdalInstructionsOptions & AetherPromptOptions & AictlInstructionsOptions & AiMemoryProtocolOptions & AgentLayerInstructionsOptions & AgentInitInstructionsOptions & AgentlinkInstructionsOptions & AgentloomRuleOptions & AgentsCliMemoryOptions & AgentsMdInstructionsOptions & AgentsGeRuleOptions & AgentsMeshRuleOptions & AmazonQRuleOptions & AmpInstructionsOptions & AntigravityRuleOptions & AnywhereAgentsInstructionsOptions & AugmentRuleOptions & BazSkillOptions & BitoGuidelinesOptions & BlackboxSkillOptions & BlocksSkillOptions & ClawdbotSkillOptions & BobInstructionsOptions & BuilderRuleOptions & CharlieInstructionsOptions & CodeAntInstructionsOptions & CodebuffInstructionsOptions & CodegenInstructionsOptions & CommandCodeHookCommandOptions & CoderAgentsSkillOptions & CodeRabbitConfigOptions & DeepAgentsInstructionsOptions & DockerAgentPromptOptions & DotAgentsRuleOptions & EcaSkillOptions & ElyraSkillOptions & LocalCodePluginOptions & MiniSweAgentConfigOptions & SweAgentConfigOptions & StagewiseSkillOptions & PiGoSkillOptions & CodexHookCommandOptions & ClaudeCodeHookCommandOptions & CodeBuddyHookCommandOptions & CopilotAgentHookCommandOptions & CrushSkillOptions & DevinHookCommandOptions & DroidHookCommandOptions & FirebaseStudioRuleOptions & ForgeCodeInstructionsOptions & GitLabDuoRuleOptions & GooseHintsOptions & GreptileRuleOptions & GrokBuildInstructionsOptions & GrokCliHookCommandOptions & GptmeInstructionsOptions & Jean2InstructionsOptions & JetBrainsAiRuleOptions & JulesInstructionsOptions & KimiHookCommandOptions & KnownsInstructionsOptions & LeanCtlInstructionsOptions & McpAgentDefinitionOptions & MistralVibeInstructionsOptions & MuxHookCommandOptions & NovaKitInstructionsOptions & OnaSkillOptions & OpenInterpreterInstructionsOptions & OpenWebUIToolOptions & PlandexConventionOptions & QodoReviewConfigOptions & QoderInstructionsOptions & QwenCodeHookCommandOptions & ReplitInstructionsOptions & RovoInstructionsOptions & RulerRuleOptions & TabbySystemPromptOptions & TabnineInstructionsOptions & TraeRuleOptions & UiPathInstructionsOptions & WarpInstructionsOptions & ZencoderRuleOptions;
|
|
205
|
+
export type HookIntegrationDoctorEntry = [
|
|
206
|
+
keyof HookIntegrationDoctorReport,
|
|
207
|
+
HookIntegrationDoctorReport[keyof HookIntegrationDoctorReport]
|
|
208
|
+
];
|
|
209
|
+
export declare function getAvailableHookIntegrationNames(): Array<keyof HookIntegrationDoctorReport>;
|
|
210
|
+
export declare function isInstalledHookIntegration(report: HookIntegrationDoctorReport[keyof HookIntegrationDoctorReport]): boolean;
|
|
211
|
+
export declare function getInstalledHookIntegrations(report: HookDoctorReport): HookIntegrationDoctorEntry[];
|
|
212
|
+
export declare function doctorInstalledHooks(options?: HookDoctorCommandOptions): Promise<HookDoctorReport>;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { doctorAdalInstructions } from "../adal/index.js";
|
|
2
|
+
import { doctorAetherPrompt } from "../aether/index.js";
|
|
3
|
+
import { doctorAiderConvention } from "../aider/index.js";
|
|
4
|
+
import { doctorAictlInstructions } from "../aictl/index.js";
|
|
5
|
+
import { doctorAiMemoryProtocolMemory } from "../ai-memory-protocol/index.js";
|
|
6
|
+
import { doctorAgentLayerInstructions } from "../agent-layer/index.js";
|
|
7
|
+
import { doctorAgentInitInstructions } from "../agentinit/index.js";
|
|
8
|
+
import { doctorAgentlinkInstructions } from "../agentlink/index.js";
|
|
9
|
+
import { doctorAgentloomRule } from "../agentloom/index.js";
|
|
10
|
+
import { doctorAgentsCliMemory } from "../agents-cli/index.js";
|
|
11
|
+
import { doctorAgentsMdInstructions } from "../agents-md/index.js";
|
|
12
|
+
import { doctorAgentsGeRule } from "../agentsge/index.js";
|
|
13
|
+
import { doctorAgentsMeshRule } from "../agentsmesh/index.js";
|
|
14
|
+
import { doctorAmazonQRule } from "../amazon-q/index.js";
|
|
15
|
+
import { doctorAmpInstructions } from "../amp/index.js";
|
|
16
|
+
import { doctorAntigravityRule } from "../antigravity/index.js";
|
|
17
|
+
import { doctorAnywhereAgentsInstructions } from "../anywhere-agents/index.js";
|
|
18
|
+
import { doctorAugmentRule } from "../augment/index.js";
|
|
19
|
+
import { doctorAvanteInstructions } from "../avante/index.js";
|
|
20
|
+
import { doctorBazSkill } from "../baz/index.js";
|
|
21
|
+
import { doctorBitoGuidelines } from "../bito/index.js";
|
|
22
|
+
import { doctorBlackboxSkill } from "../blackbox/index.js";
|
|
23
|
+
import { doctorBlocksSkill } from "../blocks/index.js";
|
|
24
|
+
import { doctorClawdbotSkill } from "../clawdbot/index.js";
|
|
25
|
+
import { doctorBobInstructions } from "../bob/index.js";
|
|
26
|
+
import { doctorBuilderRule } from "../builder/index.js";
|
|
27
|
+
import { doctorCharlieInstructions } from "../charlie/index.js";
|
|
28
|
+
import { doctorClaudeCodeHook } from "../claude-code/index.js";
|
|
29
|
+
import { doctorClineHook } from "../cline/index.js";
|
|
30
|
+
import { doctorCodeAntInstructions } from "../codeant/index.js";
|
|
31
|
+
import { doctorCodebuffInstructions } from "../codebuff/index.js";
|
|
32
|
+
import { doctorCodegenInstructions } from "../codegen/index.js";
|
|
33
|
+
import { doctorCoderAgentsSkill } from "../coder-agents/index.js";
|
|
34
|
+
import { doctorCodeRabbitConfig } from "../coderabbit/index.js";
|
|
35
|
+
import { doctorCodeBuddyHook } from "../codebuddy/index.js";
|
|
36
|
+
import { doctorCommandCodeHook } from "../command-code/index.js";
|
|
37
|
+
import { doctorContinueRule } from "../continue/index.js";
|
|
38
|
+
import { doctorCodexHook } from "../codex/index.js";
|
|
39
|
+
import { doctorCopilotAgentHook } from "../copilot-agent/index.js";
|
|
40
|
+
import { doctorCopilotCliHook } from "../copilot-cli/index.js";
|
|
41
|
+
import { doctorCrushSkill } from "../crush/index.js";
|
|
42
|
+
import { doctorCursorHook } from "../cursor/index.js";
|
|
43
|
+
import { doctorDeepAgentsInstructions } from "../deepagents/index.js";
|
|
44
|
+
import { doctorDevinHook } from "../devin/index.js";
|
|
45
|
+
import { doctorDotAgentsRule } from "../dot-agents/index.js";
|
|
46
|
+
import { doctorDockerAgentPrompt } from "../docker-agent/index.js";
|
|
47
|
+
import { doctorDroidHook } from "../droid/index.js";
|
|
48
|
+
import { doctorEcaSkill } from "../eca/index.js";
|
|
49
|
+
import { doctorElyraSkill } from "../elyra/index.js";
|
|
50
|
+
import { doctorFirebaseStudioRule } from "../firebase-studio/index.js";
|
|
51
|
+
import { doctorForgeCodeInstructions } from "../forgecode/index.js";
|
|
52
|
+
import { doctorGeminiCliHook } from "../gemini-cli/index.js";
|
|
53
|
+
import { doctorGitLabDuoRule } from "../gitlab-duo/index.js";
|
|
54
|
+
import { doctorGooseHints } from "../goose/index.js";
|
|
55
|
+
import { doctorGreptileRule } from "../greptile/index.js";
|
|
56
|
+
import { doctorGrokBuildInstructions } from "../grok-build/index.js";
|
|
57
|
+
import { doctorGrokCliHook } from "../grok-cli/index.js";
|
|
58
|
+
import { doctorGptmeInstructions } from "../gptme/index.js";
|
|
59
|
+
import { doctorJean2Instructions } from "../jean2/index.js";
|
|
60
|
+
import { doctorJetBrainsAiRule } from "../jetbrains-ai/index.js";
|
|
61
|
+
import { doctorJunieInstructions } from "../junie/index.js";
|
|
62
|
+
import { doctorJulesInstructions } from "../jules/index.js";
|
|
63
|
+
import { doctorLeanCtlInstructions } from "../leanctl/index.js";
|
|
64
|
+
import { doctorKimiHook } from "../kimi/index.js";
|
|
65
|
+
import { doctorKiroSteering } from "../kiro/index.js";
|
|
66
|
+
import { doctorKiloRule } from "../kilo/index.js";
|
|
67
|
+
import { doctorKnownsInstructions } from "../knowns/index.js";
|
|
68
|
+
import { doctorLocalCodePlugin } from "../localcode/index.js";
|
|
69
|
+
import { doctorMcpAgentDefinition } from "../mcp-agent/index.js";
|
|
70
|
+
import { doctorMiniSweAgentConfig } from "../mini-swe-agent/index.js";
|
|
71
|
+
import { doctorSweAgentConfig } from "../swe-agent/index.js";
|
|
72
|
+
import { doctorStagewiseSkill } from "../stagewise/index.js";
|
|
73
|
+
import { doctorMistralVibeInstructions } from "../mistral-vibe/index.js";
|
|
74
|
+
import { doctorMuxHook } from "../mux/index.js";
|
|
75
|
+
import { doctorNovaKitInstructions } from "../novakit/index.js";
|
|
76
|
+
import { doctorOnaSkill } from "../ona/index.js";
|
|
77
|
+
import { doctorOpenHandsHook } from "../openhands/index.js";
|
|
78
|
+
import { doctorOpenInterpreterInstructions } from "../open-interpreter/index.js";
|
|
79
|
+
import { doctorOpenWebUITool } from "../openwebui/index.js";
|
|
80
|
+
import { doctorPiExtension } from "../pi/index.js";
|
|
81
|
+
import { doctorPiGoSkill } from "../pi-go/index.js";
|
|
82
|
+
import { doctorPlandexConvention } from "../plandex/index.js";
|
|
83
|
+
import { doctorQodoReviewConfig } from "../qodo/index.js";
|
|
84
|
+
import { doctorQoderInstructions } from "../qoder/index.js";
|
|
85
|
+
import { doctorQwenCodeHook } from "../qwen-code/index.js";
|
|
86
|
+
import { doctorReplitInstructions } from "../replit/index.js";
|
|
87
|
+
import { doctorRooInstructions } from "../roo/index.js";
|
|
88
|
+
import { doctorRovoInstructions } from "../rovo/index.js";
|
|
89
|
+
import { doctorRulerRule } from "../ruler/index.js";
|
|
90
|
+
import { doctorTabbySystemPrompt } from "../tabby/index.js";
|
|
91
|
+
import { doctorTabnineInstructions } from "../tabnine/index.js";
|
|
92
|
+
import { doctorTraeRule } from "../trae/index.js";
|
|
93
|
+
import { doctorUiPathInstructions } from "../uipath/index.js";
|
|
94
|
+
import { doctorVscodeCopilotHook } from "../vscode-copilot/index.js";
|
|
95
|
+
import { doctorWarpInstructions } from "../warp/index.js";
|
|
96
|
+
import { doctorWindsurfRule } from "../windsurf/index.js";
|
|
97
|
+
import { doctorZedInstructions } from "../zed/index.js";
|
|
98
|
+
import { doctorZencoderRule } from "../zencoder/index.js";
|
|
99
|
+
const hookDoctorIntegrationDoctors = {
|
|
100
|
+
adal: (options) => doctorAdalInstructions(undefined, getHookCommandOptions(options)),
|
|
101
|
+
aether: (options) => doctorAetherPrompt(undefined, getHookCommandOptions(options)),
|
|
102
|
+
aictl: (options) => doctorAictlInstructions(undefined, getHookCommandOptions(options)),
|
|
103
|
+
"ai-memory-protocol": (options) => doctorAiMemoryProtocolMemory(undefined, getHookCommandOptions(options)),
|
|
104
|
+
aider: () => doctorAiderConvention(),
|
|
105
|
+
"agent-layer": (options) => doctorAgentLayerInstructions(undefined, getHookCommandOptions(options)),
|
|
106
|
+
agentinit: (options) => doctorAgentInitInstructions(undefined, getHookCommandOptions(options)),
|
|
107
|
+
agentlink: (options) => doctorAgentlinkInstructions(undefined, getHookCommandOptions(options)),
|
|
108
|
+
agentloom: (options) => doctorAgentloomRule(undefined, getHookCommandOptions(options)),
|
|
109
|
+
"agents-cli": (options) => doctorAgentsCliMemory(undefined, getHookCommandOptions(options)),
|
|
110
|
+
"agents-md": (options) => doctorAgentsMdInstructions(undefined, getHookCommandOptions(options)),
|
|
111
|
+
agentsge: (options) => doctorAgentsGeRule(undefined, getHookCommandOptions(options)),
|
|
112
|
+
agentsmesh: (options) => doctorAgentsMeshRule(undefined, getHookCommandOptions(options)),
|
|
113
|
+
"amazon-q": (options) => doctorAmazonQRule(undefined, getHookCommandOptions(options)),
|
|
114
|
+
amp: (options) => doctorAmpInstructions(undefined, { ...getHookCommandOptions(options), scanProjectTree: false }),
|
|
115
|
+
antigravity: (options) => doctorAntigravityRule(undefined, getHookCommandOptions(options)),
|
|
116
|
+
"anywhere-agents": (options) => doctorAnywhereAgentsInstructions(undefined, getHookCommandOptions(options)),
|
|
117
|
+
augment: (options) => doctorAugmentRule(undefined, getHookCommandOptions(options)),
|
|
118
|
+
avante: () => doctorAvanteInstructions(),
|
|
119
|
+
baz: (options) => doctorBazSkill(undefined, getHookCommandOptions(options)),
|
|
120
|
+
bito: (options) => doctorBitoGuidelines(getHookCommandOptions(options)),
|
|
121
|
+
blackbox: (options) => doctorBlackboxSkill(undefined, getHookCommandOptions(options)),
|
|
122
|
+
blocks: (options) => doctorBlocksSkill(undefined, getHookCommandOptions(options)),
|
|
123
|
+
clawdbot: (options) => doctorClawdbotSkill(undefined, getHookCommandOptions(options)),
|
|
124
|
+
bob: (options) => doctorBobInstructions(undefined, getHookCommandOptions(options)),
|
|
125
|
+
builder: (options) => doctorBuilderRule(undefined, getHookCommandOptions(options)),
|
|
126
|
+
charlie: (options) => doctorCharlieInstructions(undefined, getHookCommandOptions(options)),
|
|
127
|
+
codex: (options) => doctorCodexHook(undefined, options),
|
|
128
|
+
"claude-code": (options) => doctorClaudeCodeHook(undefined, getHookCommandOptions(options)),
|
|
129
|
+
cline: (options) => doctorClineHook(undefined, getHookCommandOptions(options)),
|
|
130
|
+
codeant: (options) => doctorCodeAntInstructions(undefined, getHookCommandOptions(options)),
|
|
131
|
+
codebuff: (options) => doctorCodebuffInstructions(undefined, getHookCommandOptions(options)),
|
|
132
|
+
codegen: (options) => doctorCodegenInstructions(undefined, getHookCommandOptions(options)),
|
|
133
|
+
"coder-agents": (options) => doctorCoderAgentsSkill(undefined, getHookCommandOptions(options)),
|
|
134
|
+
coderabbit: (options) => doctorCodeRabbitConfig(undefined, getHookCommandOptions(options)),
|
|
135
|
+
codebuddy: (options) => doctorCodeBuddyHook(undefined, getHookCommandOptions(options)),
|
|
136
|
+
"command-code": (options) => doctorCommandCodeHook(undefined, getHookCommandOptions(options)),
|
|
137
|
+
continue: () => doctorContinueRule(),
|
|
138
|
+
"copilot-agent": (options) => doctorCopilotAgentHook(undefined, getHookCommandOptions(options)),
|
|
139
|
+
crush: (options) => doctorCrushSkill(undefined, getHookCommandOptions(options)),
|
|
140
|
+
cursor: (options) => doctorCursorHook(undefined, getHookCommandOptions(options)),
|
|
141
|
+
deepagents: (options) => doctorDeepAgentsInstructions(undefined, getHookCommandOptions(options)),
|
|
142
|
+
devin: (options) => doctorDevinHook(undefined, getHookCommandOptions(options)),
|
|
143
|
+
"dot-agents": (options) => doctorDotAgentsRule(undefined, getHookCommandOptions(options)),
|
|
144
|
+
"docker-agent": (options) => doctorDockerAgentPrompt(undefined, getHookCommandOptions(options)),
|
|
145
|
+
droid: (options) => doctorDroidHook(undefined, getHookCommandOptions(options)),
|
|
146
|
+
eca: (options) => doctorEcaSkill(undefined, getHookCommandOptions(options)),
|
|
147
|
+
elyra: (options) => doctorElyraSkill(undefined, getHookCommandOptions(options)),
|
|
148
|
+
"firebase-studio": (options) => doctorFirebaseStudioRule(undefined, getHookCommandOptions(options)),
|
|
149
|
+
forgecode: (options) => doctorForgeCodeInstructions(undefined, getHookCommandOptions(options)),
|
|
150
|
+
"gemini-cli": (options) => doctorGeminiCliHook(undefined, getHookCommandOptions(options)),
|
|
151
|
+
"gitlab-duo": (options) => doctorGitLabDuoRule(undefined, getHookCommandOptions(options)),
|
|
152
|
+
goose: (options) => doctorGooseHints(undefined, { ...getHookCommandOptions(options), scanProjectTree: false }),
|
|
153
|
+
greptile: (options) => doctorGreptileRule(undefined, getHookCommandOptions(options)),
|
|
154
|
+
"grok-build": (options) => doctorGrokBuildInstructions(undefined, getHookCommandOptions(options)),
|
|
155
|
+
"grok-cli": (options) => doctorGrokCliHook(undefined, getHookCommandOptions(options)),
|
|
156
|
+
gptme: (options) => doctorGptmeInstructions(undefined, getHookCommandOptions(options)),
|
|
157
|
+
jean2: (options) => doctorJean2Instructions(undefined, getHookCommandOptions(options)),
|
|
158
|
+
"jetbrains-ai": (options) => doctorJetBrainsAiRule(undefined, getHookCommandOptions(options)),
|
|
159
|
+
junie: () => doctorJunieInstructions(),
|
|
160
|
+
jules: (options) => doctorJulesInstructions(undefined, getHookCommandOptions(options)),
|
|
161
|
+
leanctl: (options) => doctorLeanCtlInstructions(undefined, getHookCommandOptions(options)),
|
|
162
|
+
kimi: (options) => doctorKimiHook(undefined, getHookCommandOptions(options)),
|
|
163
|
+
kiro: () => doctorKiroSteering(),
|
|
164
|
+
kilo: () => doctorKiloRule(),
|
|
165
|
+
knowns: (options) => doctorKnownsInstructions(undefined, getHookCommandOptions(options)),
|
|
166
|
+
localcode: (options) => doctorLocalCodePlugin(getHookCommandOptions(options)),
|
|
167
|
+
"mcp-agent": (options) => doctorMcpAgentDefinition(undefined, getHookCommandOptions(options)),
|
|
168
|
+
"mini-swe-agent": (options) => doctorMiniSweAgentConfig(undefined, getHookCommandOptions(options)),
|
|
169
|
+
"swe-agent": (options) => doctorSweAgentConfig(undefined, getHookCommandOptions(options)),
|
|
170
|
+
stagewise: (options) => doctorStagewiseSkill(undefined, getHookCommandOptions(options)),
|
|
171
|
+
"mistral-vibe": (options) => doctorMistralVibeInstructions(undefined, getHookCommandOptions(options)),
|
|
172
|
+
mux: (options) => doctorMuxHook(undefined, getHookCommandOptions(options)),
|
|
173
|
+
novakit: (options) => doctorNovaKitInstructions(undefined, getHookCommandOptions(options)),
|
|
174
|
+
ona: (options) => doctorOnaSkill(undefined, getHookCommandOptions(options)),
|
|
175
|
+
openhands: (options) => doctorOpenHandsHook(undefined, getHookCommandOptions(options)),
|
|
176
|
+
"open-interpreter": (options) => doctorOpenInterpreterInstructions(undefined, { ...getHookCommandOptions(options), scanProjectTree: false }),
|
|
177
|
+
openwebui: (options) => doctorOpenWebUITool(undefined, getHookCommandOptions(options)),
|
|
178
|
+
pi: () => doctorPiExtension(),
|
|
179
|
+
"pi-go": (options) => doctorPiGoSkill(undefined, getHookCommandOptions(options)),
|
|
180
|
+
plandex: (options) => doctorPlandexConvention(undefined, getHookCommandOptions(options)),
|
|
181
|
+
qodo: (options) => doctorQodoReviewConfig(undefined, getHookCommandOptions(options)),
|
|
182
|
+
qoder: (options) => doctorQoderInstructions(undefined, getHookCommandOptions(options)),
|
|
183
|
+
"qwen-code": (options) => doctorQwenCodeHook(undefined, options),
|
|
184
|
+
replit: (options) => doctorReplitInstructions(undefined, getHookCommandOptions(options)),
|
|
185
|
+
roo: () => doctorRooInstructions(),
|
|
186
|
+
rovo: (options) => doctorRovoInstructions(undefined, getHookCommandOptions(options)),
|
|
187
|
+
ruler: (options) => doctorRulerRule(undefined, getHookCommandOptions(options)),
|
|
188
|
+
tabby: (options) => doctorTabbySystemPrompt(undefined, getHookCommandOptions(options)),
|
|
189
|
+
tabnine: (options) => doctorTabnineInstructions(undefined, getHookCommandOptions(options)),
|
|
190
|
+
trae: (options) => doctorTraeRule(undefined, getHookCommandOptions(options)),
|
|
191
|
+
uipath: (options) => doctorUiPathInstructions(undefined, getHookCommandOptions(options)),
|
|
192
|
+
"vscode-copilot": (options) => doctorVscodeCopilotHook(undefined, getHookCommandOptions(options)),
|
|
193
|
+
warp: (options) => doctorWarpInstructions(undefined, getHookCommandOptions(options)),
|
|
194
|
+
windsurf: () => doctorWindsurfRule(),
|
|
195
|
+
zed: () => doctorZedInstructions(),
|
|
196
|
+
zencoder: (options) => doctorZencoderRule(undefined, getHookCommandOptions(options)),
|
|
197
|
+
"copilot-cli": (options) => doctorCopilotCliHook(undefined, getHookCommandOptions(options)),
|
|
198
|
+
};
|
|
199
|
+
export function getAvailableHookIntegrationNames() {
|
|
200
|
+
return Object.keys(hookDoctorIntegrationDoctors);
|
|
201
|
+
}
|
|
202
|
+
function mergeStatus(left, right) {
|
|
203
|
+
if (left === "broken" || right === "broken") {
|
|
204
|
+
return "broken";
|
|
205
|
+
}
|
|
206
|
+
if (left === "warn" || right === "warn") {
|
|
207
|
+
return "warn";
|
|
208
|
+
}
|
|
209
|
+
if (left === "ok" || right === "ok") {
|
|
210
|
+
return "ok";
|
|
211
|
+
}
|
|
212
|
+
if (left === "disabled" || right === "disabled") {
|
|
213
|
+
return "disabled";
|
|
214
|
+
}
|
|
215
|
+
return "ok";
|
|
216
|
+
}
|
|
217
|
+
function mergeStatuses(statuses) {
|
|
218
|
+
return statuses.reduce(mergeStatus, "disabled");
|
|
219
|
+
}
|
|
220
|
+
function getHookCommandOptions(options) {
|
|
221
|
+
return {
|
|
222
|
+
...(typeof options.local === "boolean" ? { local: options.local } : {}),
|
|
223
|
+
...(typeof options.binaryPath === "string" ? { binaryPath: options.binaryPath } : {}),
|
|
224
|
+
...(typeof options.nodePath === "string" ? { nodePath: options.nodePath } : {}),
|
|
225
|
+
...(typeof options.memoryDir === "string" ? { memoryDir: options.memoryDir } : {}),
|
|
226
|
+
...(typeof options.projectDir === "string" ? { projectDir: options.projectDir } : {}),
|
|
227
|
+
...(typeof options.scanProjectTree === "boolean" ? { scanProjectTree: options.scanProjectTree } : {}),
|
|
228
|
+
...(typeof options.configDir === "string" ? { configDir: options.configDir } : {}),
|
|
229
|
+
...(typeof options.homeDir === "string" ? { homeDir: options.homeDir } : {}),
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function hasDetectedCommand(report) {
|
|
233
|
+
return "detectedCommand" in report && typeof report.detectedCommand === "string" && report.detectedCommand.length > 0;
|
|
234
|
+
}
|
|
235
|
+
export function isInstalledHookIntegration(report) {
|
|
236
|
+
if (hasDetectedCommand(report)) {
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
239
|
+
if ("hasUnsafePathIssue" in report && report.hasUnsafePathIssue === true && report.status === "broken") {
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
if ("hasTokenjuiceMarker" in report) {
|
|
243
|
+
// Marker-aware instruction hosts may share paths with user-owned files.
|
|
244
|
+
// Without the marker, aggregate doctor should not treat the file as a tokenjuice install.
|
|
245
|
+
return report.hasTokenjuiceMarker === true;
|
|
246
|
+
}
|
|
247
|
+
// Command-backed hosts can warn about missing config even when tokenjuice is
|
|
248
|
+
// not installed. Instruction/extension hosts have no expected command, so a
|
|
249
|
+
// non-disabled status means their tokenjuice artifact exists.
|
|
250
|
+
return report.status !== "disabled" && !("expectedCommand" in report);
|
|
251
|
+
}
|
|
252
|
+
export function getInstalledHookIntegrations(report) {
|
|
253
|
+
return Object.entries(report.integrations)
|
|
254
|
+
.filter(([name, integrationReport]) => {
|
|
255
|
+
if (name === "charlie" && "hasTokenjuiceMarker" in integrationReport && integrationReport.hasTokenjuiceMarker === false) {
|
|
256
|
+
// Charlie shares AGENTS.md with other tools, so unsafe unmarked files are not tokenjuice installs.
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
return isInstalledHookIntegration(integrationReport);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
export async function doctorInstalledHooks(options = {}) {
|
|
263
|
+
const integrationEntries = await Promise.all(Object.entries(hookDoctorIntegrationDoctors).map(async ([name, doctor]) => [name, await doctor(options)]));
|
|
264
|
+
const integrations = Object.fromEntries(integrationEntries);
|
|
265
|
+
const installedIntegrations = getInstalledHookIntegrations({ status: "disabled", integrations });
|
|
266
|
+
return {
|
|
267
|
+
status: mergeStatuses(installedIntegrations.map(([, integrationReport]) => integrationReport.status)),
|
|
268
|
+
integrations,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function buildCompactionHint(rawRefId?: string): string;
|
|
2
|
+
export declare function buildCompactedOutputContext(inlineText: string): string;
|
|
3
|
+
export declare function writeHookJsonLine(payload: Record<string, unknown>): void;
|
|
4
|
+
export declare function writeEmptyHookJsonLine(): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function buildCompactionHint(rawRefId) {
|
|
2
|
+
if (rawRefId) {
|
|
3
|
+
return `raw saved: \`tokenjuice cat ${rawRefId}\`.`;
|
|
4
|
+
}
|
|
5
|
+
return "need raw? `tokenjuice wrap --raw -- <command>`.";
|
|
6
|
+
}
|
|
7
|
+
export function buildCompactedOutputContext(inlineText) {
|
|
8
|
+
return `${inlineText}\n\n${buildCompactionHint()}`;
|
|
9
|
+
}
|
|
10
|
+
export function writeHookJsonLine(payload) {
|
|
11
|
+
process.stdout.write(`${JSON.stringify(payload)}\n`);
|
|
12
|
+
}
|
|
13
|
+
export function writeEmptyHookJsonLine() {
|
|
14
|
+
writeHookJsonLine({});
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type CopilotHooksConfig = Record<string, unknown> & {
|
|
2
|
+
version?: number;
|
|
3
|
+
disableAllHooks?: boolean;
|
|
4
|
+
hooks: Record<string, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
7
|
+
export declare function sanitizeCopilotHooksConfig(raw: unknown): CopilotHooksConfig;
|
|
8
|
+
export declare function readCopilotHooksConfig(hooksPath: string, hostLabel: string): Promise<{
|
|
9
|
+
config: CopilotHooksConfig;
|
|
10
|
+
exists: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function loadCopilotHooksConfigWithBackup(hooksPath: string, hostLabel: string): Promise<{
|
|
13
|
+
config: CopilotHooksConfig;
|
|
14
|
+
backupPath?: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function writeCopilotHooksConfigAtomic(hooksPath: string, config: CopilotHooksConfig): Promise<void>;
|
|
17
|
+
export declare function ensureHooksDir(hooksDir: string): Promise<void>;
|
|
18
|
+
export declare function findStrayTokenjuiceHookFiles(hooksDir: string, canonicalPath: string, isTokenjuiceCommand: (command: string) => boolean): Promise<string[]>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { mkdir, readFile, readdir, rename, writeFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
export function isRecord(value) {
|
|
4
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5
|
+
}
|
|
6
|
+
export function sanitizeCopilotHooksConfig(raw) {
|
|
7
|
+
if (!isRecord(raw)) {
|
|
8
|
+
return { version: 1, hooks: {} };
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
...raw,
|
|
12
|
+
version: typeof raw.version === "number" ? raw.version : 1,
|
|
13
|
+
hooks: isRecord(raw.hooks) ? { ...raw.hooks } : {},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export async function readCopilotHooksConfig(hooksPath, hostLabel) {
|
|
17
|
+
try {
|
|
18
|
+
const rawText = await readFile(hooksPath, "utf8");
|
|
19
|
+
const parsed = JSON.parse(rawText);
|
|
20
|
+
return { config: sanitizeCopilotHooksConfig(parsed), exists: true };
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
if (error.code === "ENOENT") {
|
|
24
|
+
return { config: { version: 1, hooks: {} }, exists: false };
|
|
25
|
+
}
|
|
26
|
+
throw new Error(`failed to read ${hostLabel} hooks from ${hooksPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export async function loadCopilotHooksConfigWithBackup(hooksPath, hostLabel) {
|
|
30
|
+
try {
|
|
31
|
+
const rawText = await readFile(hooksPath, "utf8");
|
|
32
|
+
const parsed = JSON.parse(rawText);
|
|
33
|
+
const config = sanitizeCopilotHooksConfig(parsed);
|
|
34
|
+
const backupPath = `${hooksPath}.bak`;
|
|
35
|
+
await writeFile(backupPath, rawText, "utf8");
|
|
36
|
+
return { config, backupPath };
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
if (error.code === "ENOENT") {
|
|
40
|
+
return { config: { version: 1, hooks: {} } };
|
|
41
|
+
}
|
|
42
|
+
throw new Error(`failed to load ${hostLabel} hooks from ${hooksPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export async function writeCopilotHooksConfigAtomic(hooksPath, config) {
|
|
46
|
+
const tempPath = `${hooksPath}.tmp`;
|
|
47
|
+
await writeFile(tempPath, `${JSON.stringify(config, null, 2)}\n`, "utf8");
|
|
48
|
+
await rename(tempPath, hooksPath);
|
|
49
|
+
}
|
|
50
|
+
export async function ensureHooksDir(hooksDir) {
|
|
51
|
+
await mkdir(hooksDir, { recursive: true });
|
|
52
|
+
}
|
|
53
|
+
// Scan every sibling `*.json` in `hooksDir`, skipping the canonical
|
|
54
|
+
// install path, and return those that contain a tokenjuice entry
|
|
55
|
+
// matching `isTokenjuiceCommand`. Used by doctor to surface stray
|
|
56
|
+
// installs that would otherwise be silently double-loaded by the
|
|
57
|
+
// host's hook scanner.
|
|
58
|
+
export async function findStrayTokenjuiceHookFiles(hooksDir, canonicalPath, isTokenjuiceCommand) {
|
|
59
|
+
let entries;
|
|
60
|
+
try {
|
|
61
|
+
entries = await readdir(hooksDir);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
const stray = [];
|
|
67
|
+
for (const entry of entries) {
|
|
68
|
+
if (!entry.endsWith(".json")) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const candidate = join(hooksDir, entry);
|
|
72
|
+
if (candidate === canonicalPath) {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
const rawText = await readFile(candidate, "utf8");
|
|
77
|
+
const parsed = JSON.parse(rawText);
|
|
78
|
+
const config = sanitizeCopilotHooksConfig(parsed);
|
|
79
|
+
if (hasTokenjuiceCommand(config, isTokenjuiceCommand)) {
|
|
80
|
+
stray.push(candidate);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// ignore unreadable/invalid files
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return stray;
|
|
88
|
+
}
|
|
89
|
+
function hasTokenjuiceCommand(config, isTokenjuiceCommand) {
|
|
90
|
+
const commandFields = ["command", "bash", "powershell"];
|
|
91
|
+
for (const bucket of Object.values(config.hooks)) {
|
|
92
|
+
if (!Array.isArray(bucket)) {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
for (const entry of bucket) {
|
|
96
|
+
if (!isRecord(entry)) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
for (const field of commandFields) {
|
|
100
|
+
const command = entry[field];
|
|
101
|
+
if (typeof command === "string" && isTokenjuiceCommand(command)) {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type TokenjuiceHookCommandOptions = {
|
|
2
|
+
local?: boolean;
|
|
3
|
+
binaryPath?: string;
|
|
4
|
+
nodePath?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function isExecutableFile(path: string): Promise<boolean>;
|
|
7
|
+
export declare function pathExists(path: string): Promise<boolean>;
|
|
8
|
+
export declare function resolveInstalledTokenjuicePath(): Promise<string | undefined>;
|
|
9
|
+
export declare function buildTokenjuiceHookCommand(subcommand: string, hostLabel: string, options?: TokenjuiceHookCommandOptions): Promise<string>;
|
|
10
|
+
export declare function findMissingHookCommandPaths(command: string): Promise<string[]>;
|