qlogicagent 0.1.0
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 +45 -0
- package/dist/agent/agent.d.ts +44 -0
- package/dist/agent/agent.d.ts.map +1 -0
- package/dist/agent/agent.js +114 -0
- package/dist/agent/agent.js.map +1 -0
- package/dist/agent/tool-loop.d.ts +65 -0
- package/dist/agent/tool-loop.d.ts.map +1 -0
- package/dist/agent/tool-loop.js +576 -0
- package/dist/agent/tool-loop.js.map +1 -0
- package/dist/agent/types.d.ts +176 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +15 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/cli/main.d.ts +12 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +24 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/stdio-server.d.ts +46 -0
- package/dist/cli/stdio-server.d.ts.map +1 -0
- package/dist/cli/stdio-server.js +464 -0
- package/dist/cli/stdio-server.js.map +1 -0
- package/dist/config/config.d.ts +18 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +22 -0
- package/dist/config/config.js.map +1 -0
- package/dist/contracts/hooks.d.ts +121 -0
- package/dist/contracts/hooks.d.ts.map +1 -0
- package/dist/contracts/hooks.js +8 -0
- package/dist/contracts/hooks.js.map +1 -0
- package/dist/contracts/index.d.ts +11 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +11 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/planner.d.ts +36 -0
- package/dist/contracts/planner.d.ts.map +1 -0
- package/dist/contracts/planner.js +3 -0
- package/dist/contracts/planner.js.map +1 -0
- package/dist/contracts/skill-candidate.d.ts +64 -0
- package/dist/contracts/skill-candidate.d.ts.map +1 -0
- package/dist/contracts/skill-candidate.js +196 -0
- package/dist/contracts/skill-candidate.js.map +1 -0
- package/dist/contracts/todo.d.ts +15 -0
- package/dist/contracts/todo.d.ts.map +1 -0
- package/dist/contracts/todo.js +10 -0
- package/dist/contracts/todo.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/builtin-providers.d.ts +11 -0
- package/dist/llm/builtin-providers.d.ts.map +1 -0
- package/dist/llm/builtin-providers.js +532 -0
- package/dist/llm/builtin-providers.js.map +1 -0
- package/dist/llm/index.d.ts +16 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +15 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/llm-client.d.ts +44 -0
- package/dist/llm/llm-client.d.ts.map +1 -0
- package/dist/llm/llm-client.js +68 -0
- package/dist/llm/llm-client.js.map +1 -0
- package/dist/llm/model-catalog.d.ts +54 -0
- package/dist/llm/model-catalog.d.ts.map +1 -0
- package/dist/llm/model-catalog.js +192 -0
- package/dist/llm/model-catalog.js.map +1 -0
- package/dist/llm/provider-def.d.ts +60 -0
- package/dist/llm/provider-def.d.ts.map +1 -0
- package/dist/llm/provider-def.js +13 -0
- package/dist/llm/provider-def.js.map +1 -0
- package/dist/llm/provider-registry.d.ts +55 -0
- package/dist/llm/provider-registry.d.ts.map +1 -0
- package/dist/llm/provider-registry.js +148 -0
- package/dist/llm/provider-registry.js.map +1 -0
- package/dist/llm/transport.d.ts +63 -0
- package/dist/llm/transport.d.ts.map +1 -0
- package/dist/llm/transport.js +28 -0
- package/dist/llm/transport.js.map +1 -0
- package/dist/llm/transports/anthropic-messages.d.ts +32 -0
- package/dist/llm/transports/anthropic-messages.d.ts.map +1 -0
- package/dist/llm/transports/anthropic-messages.js +294 -0
- package/dist/llm/transports/anthropic-messages.js.map +1 -0
- package/dist/llm/transports/openai-chat.d.ts +37 -0
- package/dist/llm/transports/openai-chat.d.ts.map +1 -0
- package/dist/llm/transports/openai-chat.js +166 -0
- package/dist/llm/transports/openai-chat.js.map +1 -0
- package/dist/orchestration/agent-registry.d.ts +42 -0
- package/dist/orchestration/agent-registry.d.ts.map +1 -0
- package/dist/orchestration/agent-registry.js +117 -0
- package/dist/orchestration/agent-registry.js.map +1 -0
- package/dist/orchestration/approval-aware-tool-plan.d.ts +33 -0
- package/dist/orchestration/approval-aware-tool-plan.d.ts.map +1 -0
- package/dist/orchestration/approval-aware-tool-plan.js +88 -0
- package/dist/orchestration/approval-aware-tool-plan.js.map +1 -0
- package/dist/orchestration/context-compression.d.ts +221 -0
- package/dist/orchestration/context-compression.d.ts.map +1 -0
- package/dist/orchestration/context-compression.js +584 -0
- package/dist/orchestration/context-compression.js.map +1 -0
- package/dist/orchestration/conversation-repair.d.ts +62 -0
- package/dist/orchestration/conversation-repair.d.ts.map +1 -0
- package/dist/orchestration/conversation-repair.js +430 -0
- package/dist/orchestration/conversation-repair.js.map +1 -0
- package/dist/orchestration/curator-scheduler.d.ts +120 -0
- package/dist/orchestration/curator-scheduler.d.ts.map +1 -0
- package/dist/orchestration/curator-scheduler.js +136 -0
- package/dist/orchestration/curator-scheduler.js.map +1 -0
- package/dist/orchestration/embedded-failover-policy.d.ts +111 -0
- package/dist/orchestration/embedded-failover-policy.d.ts.map +1 -0
- package/dist/orchestration/embedded-failover-policy.js +169 -0
- package/dist/orchestration/embedded-failover-policy.js.map +1 -0
- package/dist/orchestration/error-classification.d.ts +13 -0
- package/dist/orchestration/error-classification.d.ts.map +1 -0
- package/dist/orchestration/error-classification.js +78 -0
- package/dist/orchestration/error-classification.js.map +1 -0
- package/dist/orchestration/failover-classification.d.ts +9 -0
- package/dist/orchestration/failover-classification.d.ts.map +1 -0
- package/dist/orchestration/failover-classification.js +382 -0
- package/dist/orchestration/failover-classification.js.map +1 -0
- package/dist/orchestration/failover-error.d.ts +34 -0
- package/dist/orchestration/failover-error.d.ts.map +1 -0
- package/dist/orchestration/failover-error.js +199 -0
- package/dist/orchestration/failover-error.js.map +1 -0
- package/dist/orchestration/fork-subagent.d.ts +101 -0
- package/dist/orchestration/fork-subagent.d.ts.map +1 -0
- package/dist/orchestration/fork-subagent.js +99 -0
- package/dist/orchestration/fork-subagent.js.map +1 -0
- package/dist/orchestration/index.d.ts +121 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +268 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/memory-flush-policy.d.ts +58 -0
- package/dist/orchestration/memory-flush-policy.d.ts.map +1 -0
- package/dist/orchestration/memory-flush-policy.js +86 -0
- package/dist/orchestration/memory-flush-policy.js.map +1 -0
- package/dist/orchestration/memory-provider.d.ts +15 -0
- package/dist/orchestration/memory-provider.d.ts.map +1 -0
- package/dist/orchestration/memory-provider.js +3 -0
- package/dist/orchestration/memory-provider.js.map +1 -0
- package/dist/orchestration/parallel-tool-calls.d.ts +42 -0
- package/dist/orchestration/parallel-tool-calls.d.ts.map +1 -0
- package/dist/orchestration/parallel-tool-calls.js +60 -0
- package/dist/orchestration/parallel-tool-calls.js.map +1 -0
- package/dist/orchestration/prompt-cache-strategy.d.ts +127 -0
- package/dist/orchestration/prompt-cache-strategy.d.ts.map +1 -0
- package/dist/orchestration/prompt-cache-strategy.js +229 -0
- package/dist/orchestration/prompt-cache-strategy.js.map +1 -0
- package/dist/orchestration/reactive-compact.d.ts +74 -0
- package/dist/orchestration/reactive-compact.d.ts.map +1 -0
- package/dist/orchestration/reactive-compact.js +79 -0
- package/dist/orchestration/reactive-compact.js.map +1 -0
- package/dist/orchestration/retry-loop.d.ts +23 -0
- package/dist/orchestration/retry-loop.d.ts.map +1 -0
- package/dist/orchestration/retry-loop.js +25 -0
- package/dist/orchestration/retry-loop.js.map +1 -0
- package/dist/orchestration/skill-candidate.d.ts +53 -0
- package/dist/orchestration/skill-candidate.d.ts.map +1 -0
- package/dist/orchestration/skill-candidate.js +142 -0
- package/dist/orchestration/skill-candidate.js.map +1 -0
- package/dist/orchestration/skill-consolidation.d.ts +124 -0
- package/dist/orchestration/skill-consolidation.d.ts.map +1 -0
- package/dist/orchestration/skill-consolidation.js +221 -0
- package/dist/orchestration/skill-consolidation.js.map +1 -0
- package/dist/orchestration/skill-improvement.d.ts +60 -0
- package/dist/orchestration/skill-improvement.d.ts.map +1 -0
- package/dist/orchestration/skill-improvement.js +67 -0
- package/dist/orchestration/skill-improvement.js.map +1 -0
- package/dist/orchestration/skill-similarity.d.ts +99 -0
- package/dist/orchestration/skill-similarity.d.ts.map +1 -0
- package/dist/orchestration/skill-similarity.js +132 -0
- package/dist/orchestration/skill-similarity.js.map +1 -0
- package/dist/orchestration/streaming-tool-executor.d.ts +74 -0
- package/dist/orchestration/streaming-tool-executor.d.ts.map +1 -0
- package/dist/orchestration/streaming-tool-executor.js +97 -0
- package/dist/orchestration/streaming-tool-executor.js.map +1 -0
- package/dist/orchestration/team-orchestration.d.ts +196 -0
- package/dist/orchestration/team-orchestration.d.ts.map +1 -0
- package/dist/orchestration/team-orchestration.js +370 -0
- package/dist/orchestration/team-orchestration.js.map +1 -0
- package/dist/orchestration/team-tool-loop-wiring.d.ts +93 -0
- package/dist/orchestration/team-tool-loop-wiring.d.ts.map +1 -0
- package/dist/orchestration/team-tool-loop-wiring.js +148 -0
- package/dist/orchestration/team-tool-loop-wiring.js.map +1 -0
- package/dist/orchestration/tool-choice-policy.d.ts +55 -0
- package/dist/orchestration/tool-choice-policy.d.ts.map +1 -0
- package/dist/orchestration/tool-choice-policy.js +165 -0
- package/dist/orchestration/tool-choice-policy.js.map +1 -0
- package/dist/orchestration/tool-loop-state.d.ts +51 -0
- package/dist/orchestration/tool-loop-state.d.ts.map +1 -0
- package/dist/orchestration/tool-loop-state.js +134 -0
- package/dist/orchestration/tool-loop-state.js.map +1 -0
- package/dist/orchestration/tool-schema.d.ts +40 -0
- package/dist/orchestration/tool-schema.d.ts.map +1 -0
- package/dist/orchestration/tool-schema.js +298 -0
- package/dist/orchestration/tool-schema.js.map +1 -0
- package/dist/orchestration/transcript-repair.d.ts +43 -0
- package/dist/orchestration/transcript-repair.d.ts.map +1 -0
- package/dist/orchestration/transcript-repair.js +427 -0
- package/dist/orchestration/transcript-repair.js.map +1 -0
- package/dist/orchestration/turn-loop-guard.d.ts +87 -0
- package/dist/orchestration/turn-loop-guard.d.ts.map +1 -0
- package/dist/orchestration/turn-loop-guard.js +93 -0
- package/dist/orchestration/turn-loop-guard.js.map +1 -0
- package/dist/orchestration/web-browser-policy.d.ts +18 -0
- package/dist/orchestration/web-browser-policy.d.ts.map +1 -0
- package/dist/orchestration/web-browser-policy.js +40 -0
- package/dist/orchestration/web-browser-policy.js.map +1 -0
- package/dist/runtime/context-compression.d.ts +62 -0
- package/dist/runtime/context-compression.d.ts.map +1 -0
- package/dist/runtime/context-compression.js +275 -0
- package/dist/runtime/context-compression.js.map +1 -0
- package/dist/runtime/hook-registry.d.ts +13 -0
- package/dist/runtime/hook-registry.d.ts.map +1 -0
- package/dist/runtime/hook-registry.js +54 -0
- package/dist/runtime/hook-registry.js.map +1 -0
- package/dist/runtime/memory-hooks.d.ts +24 -0
- package/dist/runtime/memory-hooks.d.ts.map +1 -0
- package/dist/runtime/memory-hooks.js +66 -0
- package/dist/runtime/memory-hooks.js.map +1 -0
- package/dist/runtime/tool-eligibility.d.ts +60 -0
- package/dist/runtime/tool-eligibility.d.ts.map +1 -0
- package/dist/runtime/tool-eligibility.js +112 -0
- package/dist/runtime/tool-eligibility.js.map +1 -0
- package/dist/skills/index.d.ts +109 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +83 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/memory-extractor.d.ts +65 -0
- package/dist/skills/memory-extractor.d.ts.map +1 -0
- package/dist/skills/memory-extractor.js +174 -0
- package/dist/skills/memory-extractor.js.map +1 -0
- package/dist/skills/memory-query-tool.d.ts +44 -0
- package/dist/skills/memory-query-tool.d.ts.map +1 -0
- package/dist/skills/memory-query-tool.js +128 -0
- package/dist/skills/memory-query-tool.js.map +1 -0
- package/dist/skills/memory-store.d.ts +67 -0
- package/dist/skills/memory-store.d.ts.map +1 -0
- package/dist/skills/memory-store.js +229 -0
- package/dist/skills/memory-store.js.map +1 -0
- package/dist/skills/memory-tool.d.ts +68 -0
- package/dist/skills/memory-tool.d.ts.map +1 -0
- package/dist/skills/memory-tool.js +193 -0
- package/dist/skills/memory-tool.js.map +1 -0
- package/dist/skills/portable-tool.d.ts +72 -0
- package/dist/skills/portable-tool.d.ts.map +1 -0
- package/dist/skills/portable-tool.js +15 -0
- package/dist/skills/portable-tool.js.map +1 -0
- package/dist/skills/qmemory-adapter.d.ts +53 -0
- package/dist/skills/qmemory-adapter.d.ts.map +1 -0
- package/dist/skills/qmemory-adapter.js +166 -0
- package/dist/skills/qmemory-adapter.js.map +1 -0
- package/dist/skills/skill-frontmatter.d.ts +20 -0
- package/dist/skills/skill-frontmatter.d.ts.map +1 -0
- package/dist/skills/skill-frontmatter.js +345 -0
- package/dist/skills/skill-frontmatter.js.map +1 -0
- package/dist/skills/skill-guard.d.ts +24 -0
- package/dist/skills/skill-guard.d.ts.map +1 -0
- package/dist/skills/skill-guard.js +230 -0
- package/dist/skills/skill-guard.js.map +1 -0
- package/dist/skills/skill-loader.d.ts +17 -0
- package/dist/skills/skill-loader.d.ts.map +1 -0
- package/dist/skills/skill-loader.js +304 -0
- package/dist/skills/skill-loader.js.map +1 -0
- package/dist/skills/skill-source.d.ts +120 -0
- package/dist/skills/skill-source.d.ts.map +1 -0
- package/dist/skills/skill-source.js +127 -0
- package/dist/skills/skill-source.js.map +1 -0
- package/dist/skills/skill-types.d.ts +200 -0
- package/dist/skills/skill-types.d.ts.map +1 -0
- package/dist/skills/skill-types.js +7 -0
- package/dist/skills/skill-types.js.map +1 -0
- package/dist/skills/think-tool.d.ts +17 -0
- package/dist/skills/think-tool.d.ts.map +1 -0
- package/dist/skills/think-tool.js +60 -0
- package/dist/skills/think-tool.js.map +1 -0
- package/dist/skills/todo-tool.d.ts +64 -0
- package/dist/skills/todo-tool.d.ts.map +1 -0
- package/dist/skills/todo-tool.js +115 -0
- package/dist/skills/todo-tool.js.map +1 -0
- package/dist/skills/tools/agent-tool.d.ts +92 -0
- package/dist/skills/tools/agent-tool.d.ts.map +1 -0
- package/dist/skills/tools/agent-tool.js +143 -0
- package/dist/skills/tools/agent-tool.js.map +1 -0
- package/dist/skills/tools/apply-patch-tool.d.ts +30 -0
- package/dist/skills/tools/apply-patch-tool.d.ts.map +1 -0
- package/dist/skills/tools/apply-patch-tool.js +185 -0
- package/dist/skills/tools/apply-patch-tool.js.map +1 -0
- package/dist/skills/tools/ask-user-tool.d.ts +81 -0
- package/dist/skills/tools/ask-user-tool.d.ts.map +1 -0
- package/dist/skills/tools/ask-user-tool.js +122 -0
- package/dist/skills/tools/ask-user-tool.js.map +1 -0
- package/dist/skills/tools/brief-tool.d.ts +75 -0
- package/dist/skills/tools/brief-tool.d.ts.map +1 -0
- package/dist/skills/tools/brief-tool.js +96 -0
- package/dist/skills/tools/brief-tool.js.map +1 -0
- package/dist/skills/tools/browser-tool.d.ts +115 -0
- package/dist/skills/tools/browser-tool.d.ts.map +1 -0
- package/dist/skills/tools/browser-tool.js +156 -0
- package/dist/skills/tools/browser-tool.js.map +1 -0
- package/dist/skills/tools/checkpoint-tool.d.ts +67 -0
- package/dist/skills/tools/checkpoint-tool.d.ts.map +1 -0
- package/dist/skills/tools/checkpoint-tool.js +103 -0
- package/dist/skills/tools/checkpoint-tool.js.map +1 -0
- package/dist/skills/tools/config-tool.d.ts +64 -0
- package/dist/skills/tools/config-tool.d.ts.map +1 -0
- package/dist/skills/tools/config-tool.js +144 -0
- package/dist/skills/tools/config-tool.js.map +1 -0
- package/dist/skills/tools/cron-tool.d.ts +117 -0
- package/dist/skills/tools/cron-tool.d.ts.map +1 -0
- package/dist/skills/tools/cron-tool.js +176 -0
- package/dist/skills/tools/cron-tool.js.map +1 -0
- package/dist/skills/tools/edit-tool.d.ts +44 -0
- package/dist/skills/tools/edit-tool.d.ts.map +1 -0
- package/dist/skills/tools/edit-tool.js +71 -0
- package/dist/skills/tools/edit-tool.js.map +1 -0
- package/dist/skills/tools/exec-tool.d.ts +103 -0
- package/dist/skills/tools/exec-tool.d.ts.map +1 -0
- package/dist/skills/tools/exec-tool.js +134 -0
- package/dist/skills/tools/exec-tool.js.map +1 -0
- package/dist/skills/tools/image-generate-tool.d.ts +63 -0
- package/dist/skills/tools/image-generate-tool.d.ts.map +1 -0
- package/dist/skills/tools/image-generate-tool.js +68 -0
- package/dist/skills/tools/image-generate-tool.js.map +1 -0
- package/dist/skills/tools/instructions-tool.d.ts +104 -0
- package/dist/skills/tools/instructions-tool.d.ts.map +1 -0
- package/dist/skills/tools/instructions-tool.js +188 -0
- package/dist/skills/tools/instructions-tool.js.map +1 -0
- package/dist/skills/tools/lsp-tool.d.ts +154 -0
- package/dist/skills/tools/lsp-tool.d.ts.map +1 -0
- package/dist/skills/tools/lsp-tool.js +228 -0
- package/dist/skills/tools/lsp-tool.js.map +1 -0
- package/dist/skills/tools/mcp-client-types.d.ts +270 -0
- package/dist/skills/tools/mcp-client-types.d.ts.map +1 -0
- package/dist/skills/tools/mcp-client-types.js +54 -0
- package/dist/skills/tools/mcp-client-types.js.map +1 -0
- package/dist/skills/tools/mcp-tool.d.ts +250 -0
- package/dist/skills/tools/mcp-tool.d.ts.map +1 -0
- package/dist/skills/tools/mcp-tool.js +504 -0
- package/dist/skills/tools/mcp-tool.js.map +1 -0
- package/dist/skills/tools/memory-tool.d.ts +75 -0
- package/dist/skills/tools/memory-tool.d.ts.map +1 -0
- package/dist/skills/tools/memory-tool.js +89 -0
- package/dist/skills/tools/memory-tool.js.map +1 -0
- package/dist/skills/tools/monitor-tool.d.ts +114 -0
- package/dist/skills/tools/monitor-tool.d.ts.map +1 -0
- package/dist/skills/tools/monitor-tool.js +132 -0
- package/dist/skills/tools/monitor-tool.js.map +1 -0
- package/dist/skills/tools/music-generate-tool.d.ts +56 -0
- package/dist/skills/tools/music-generate-tool.d.ts.map +1 -0
- package/dist/skills/tools/music-generate-tool.js +63 -0
- package/dist/skills/tools/music-generate-tool.js.map +1 -0
- package/dist/skills/tools/notify-tool.d.ts +54 -0
- package/dist/skills/tools/notify-tool.d.ts.map +1 -0
- package/dist/skills/tools/notify-tool.js +63 -0
- package/dist/skills/tools/notify-tool.js.map +1 -0
- package/dist/skills/tools/patch-tool.d.ts +46 -0
- package/dist/skills/tools/patch-tool.d.ts.map +1 -0
- package/dist/skills/tools/patch-tool.js +506 -0
- package/dist/skills/tools/patch-tool.js.map +1 -0
- package/dist/skills/tools/pdf-tool.d.ts +67 -0
- package/dist/skills/tools/pdf-tool.d.ts.map +1 -0
- package/dist/skills/tools/pdf-tool.js +89 -0
- package/dist/skills/tools/pdf-tool.js.map +1 -0
- package/dist/skills/tools/plan-mode-tool.d.ts +60 -0
- package/dist/skills/tools/plan-mode-tool.d.ts.map +1 -0
- package/dist/skills/tools/plan-mode-tool.js +123 -0
- package/dist/skills/tools/plan-mode-tool.js.map +1 -0
- package/dist/skills/tools/read-tool.d.ts +52 -0
- package/dist/skills/tools/read-tool.d.ts.map +1 -0
- package/dist/skills/tools/read-tool.js +85 -0
- package/dist/skills/tools/read-tool.js.map +1 -0
- package/dist/skills/tools/repl-tool.d.ts +71 -0
- package/dist/skills/tools/repl-tool.d.ts.map +1 -0
- package/dist/skills/tools/repl-tool.js +70 -0
- package/dist/skills/tools/repl-tool.js.map +1 -0
- package/dist/skills/tools/search-tool.d.ts +113 -0
- package/dist/skills/tools/search-tool.d.ts.map +1 -0
- package/dist/skills/tools/search-tool.js +226 -0
- package/dist/skills/tools/search-tool.js.map +1 -0
- package/dist/skills/tools/send-message-tool.d.ts +52 -0
- package/dist/skills/tools/send-message-tool.d.ts.map +1 -0
- package/dist/skills/tools/send-message-tool.js +77 -0
- package/dist/skills/tools/send-message-tool.js.map +1 -0
- package/dist/skills/tools/skill-list-tool.d.ts +34 -0
- package/dist/skills/tools/skill-list-tool.d.ts.map +1 -0
- package/dist/skills/tools/skill-list-tool.js +55 -0
- package/dist/skills/tools/skill-list-tool.js.map +1 -0
- package/dist/skills/tools/skill-manage-tool.d.ts +74 -0
- package/dist/skills/tools/skill-manage-tool.d.ts.map +1 -0
- package/dist/skills/tools/skill-manage-tool.js +154 -0
- package/dist/skills/tools/skill-manage-tool.js.map +1 -0
- package/dist/skills/tools/skill-view-tool.d.ts +38 -0
- package/dist/skills/tools/skill-view-tool.d.ts.map +1 -0
- package/dist/skills/tools/skill-view-tool.js +73 -0
- package/dist/skills/tools/skill-view-tool.js.map +1 -0
- package/dist/skills/tools/sleep-tool.d.ts +50 -0
- package/dist/skills/tools/sleep-tool.d.ts.map +1 -0
- package/dist/skills/tools/sleep-tool.js +82 -0
- package/dist/skills/tools/sleep-tool.js.map +1 -0
- package/dist/skills/tools/structured-output-tool.d.ts +117 -0
- package/dist/skills/tools/structured-output-tool.d.ts.map +1 -0
- package/dist/skills/tools/structured-output-tool.js +177 -0
- package/dist/skills/tools/structured-output-tool.js.map +1 -0
- package/dist/skills/tools/task-tool.d.ts +105 -0
- package/dist/skills/tools/task-tool.d.ts.map +1 -0
- package/dist/skills/tools/task-tool.js +162 -0
- package/dist/skills/tools/task-tool.js.map +1 -0
- package/dist/skills/tools/team-tool.d.ts +90 -0
- package/dist/skills/tools/team-tool.d.ts.map +1 -0
- package/dist/skills/tools/team-tool.js +106 -0
- package/dist/skills/tools/team-tool.js.map +1 -0
- package/dist/skills/tools/tool-search-tool.d.ts +52 -0
- package/dist/skills/tools/tool-search-tool.d.ts.map +1 -0
- package/dist/skills/tools/tool-search-tool.js +111 -0
- package/dist/skills/tools/tool-search-tool.js.map +1 -0
- package/dist/skills/tools/tts-tool.d.ts +39 -0
- package/dist/skills/tools/tts-tool.d.ts.map +1 -0
- package/dist/skills/tools/tts-tool.js +46 -0
- package/dist/skills/tools/tts-tool.js.map +1 -0
- package/dist/skills/tools/video-edit-tool.d.ts +70 -0
- package/dist/skills/tools/video-edit-tool.d.ts.map +1 -0
- package/dist/skills/tools/video-edit-tool.js +75 -0
- package/dist/skills/tools/video-edit-tool.js.map +1 -0
- package/dist/skills/tools/video-generate-tool.d.ts +63 -0
- package/dist/skills/tools/video-generate-tool.d.ts.map +1 -0
- package/dist/skills/tools/video-generate-tool.js +67 -0
- package/dist/skills/tools/video-generate-tool.js.map +1 -0
- package/dist/skills/tools/video-merge-tool.d.ts +106 -0
- package/dist/skills/tools/video-merge-tool.d.ts.map +1 -0
- package/dist/skills/tools/video-merge-tool.js +93 -0
- package/dist/skills/tools/video-merge-tool.js.map +1 -0
- package/dist/skills/tools/video-upscale-tool.d.ts +46 -0
- package/dist/skills/tools/video-upscale-tool.d.ts.map +1 -0
- package/dist/skills/tools/video-upscale-tool.js +53 -0
- package/dist/skills/tools/video-upscale-tool.js.map +1 -0
- package/dist/skills/tools/web-fetch-tool.d.ts +79 -0
- package/dist/skills/tools/web-fetch-tool.d.ts.map +1 -0
- package/dist/skills/tools/web-fetch-tool.js +93 -0
- package/dist/skills/tools/web-fetch-tool.js.map +1 -0
- package/dist/skills/tools/web-search-tool.d.ts +58 -0
- package/dist/skills/tools/web-search-tool.d.ts.map +1 -0
- package/dist/skills/tools/web-search-tool.js +87 -0
- package/dist/skills/tools/web-search-tool.js.map +1 -0
- package/dist/skills/tools/worktree-tool.d.ts +70 -0
- package/dist/skills/tools/worktree-tool.d.ts.map +1 -0
- package/dist/skills/tools/worktree-tool.js +148 -0
- package/dist/skills/tools/worktree-tool.js.map +1 -0
- package/dist/skills/tools/write-tool.d.ts +46 -0
- package/dist/skills/tools/write-tool.d.ts.map +1 -0
- package/dist/skills/tools/write-tool.js +82 -0
- package/dist/skills/tools/write-tool.js.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/instructions-tool.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,qBAAqB,CAAC;AAI5E,uCAAuC;AACvC,MAAM,WAAW,mBAAmB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AA6B,CAAC;AAE1E,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;CAkB5B,CAAC;AAEX,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAkC7G;AAID,eAAO,MAAM,6BAA6B,EAAG,qBAA8B,CAAC;AAE5E,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CAa7B,CAAC;AAEX,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,oBAAoB,GAAG,YAAY,CAAC,wBAAwB,CAAC,CA+B/G"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Instructions Tool — CRUD for project instruction files (.md).
|
|
3
|
+
//
|
|
4
|
+
// Runtime-agnostic: the actual file I/O is injected via deps.
|
|
5
|
+
// Gateway provides InstructionsModule; Hub provides HTTP client;
|
|
6
|
+
// Electron provides IPC bridge.
|
|
7
|
+
//
|
|
8
|
+
// Category: project-management
|
|
9
|
+
// ============================================================
|
|
10
|
+
// ── instructions_list ───────────────────────────────────────
|
|
11
|
+
export const INSTRUCTIONS_LIST_TOOL_NAME = "instructions_list";
|
|
12
|
+
export const INSTRUCTIONS_LIST_SCHEMA = {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
project_id: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: 'Project ID to list instructions for. Use "default" for the default project.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
required: ["project_id"],
|
|
21
|
+
};
|
|
22
|
+
export function createInstructionsListTool(deps) {
|
|
23
|
+
return {
|
|
24
|
+
name: INSTRUCTIONS_LIST_TOOL_NAME,
|
|
25
|
+
label: "List Instructions",
|
|
26
|
+
description: "List all instruction files (.md) in a project's .instructions/ directory. " +
|
|
27
|
+
"Instructions define agent behavior rules, coding standards, and project context. " +
|
|
28
|
+
"Returns filename, path, size, and last modified time for each file.",
|
|
29
|
+
parameters: INSTRUCTIONS_LIST_SCHEMA,
|
|
30
|
+
isReadOnly: true,
|
|
31
|
+
isConcurrencySafe: true,
|
|
32
|
+
searchHint: "list project instructions rules coding standards behavior guidelines",
|
|
33
|
+
execute: async (_toolCallId, params) => {
|
|
34
|
+
const files = deps.list(params.project_id);
|
|
35
|
+
if (files.length === 0) {
|
|
36
|
+
return {
|
|
37
|
+
content: [{ type: "text", text: "No instruction files found for this project." }],
|
|
38
|
+
details: { projectId: params.project_id, count: 0 },
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const listing = files
|
|
42
|
+
.map((f) => `- ${f.filename} (${f.size} bytes, updated ${f.updatedAt})`)
|
|
43
|
+
.join("\n");
|
|
44
|
+
return {
|
|
45
|
+
content: [{ type: "text", text: `Found ${files.length} instruction file(s):\n${listing}` }],
|
|
46
|
+
details: { projectId: params.project_id, count: files.length, files },
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// ── instructions_read ───────────────────────────────────────
|
|
52
|
+
export const INSTRUCTIONS_READ_TOOL_NAME = "instructions_read";
|
|
53
|
+
export const INSTRUCTIONS_READ_SCHEMA = {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
project_id: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: 'Project ID. Use "default" for the default project.',
|
|
59
|
+
},
|
|
60
|
+
filename: {
|
|
61
|
+
type: "string",
|
|
62
|
+
description: 'Instruction file name (e.g. "code-style.md"). Supports sub-paths like "testing/unit-test.md".',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
required: ["project_id", "filename"],
|
|
66
|
+
};
|
|
67
|
+
export function createInstructionsReadTool(deps) {
|
|
68
|
+
return {
|
|
69
|
+
name: INSTRUCTIONS_READ_TOOL_NAME,
|
|
70
|
+
label: "Read Instruction",
|
|
71
|
+
description: "Read the content of a specific instruction file (.md) from a project. " +
|
|
72
|
+
"Use instructions_list first to discover available files.",
|
|
73
|
+
parameters: INSTRUCTIONS_READ_SCHEMA,
|
|
74
|
+
isReadOnly: true,
|
|
75
|
+
isConcurrencySafe: true,
|
|
76
|
+
searchHint: "read instruction file content rules coding standard",
|
|
77
|
+
execute: async (_toolCallId, params) => {
|
|
78
|
+
const file = deps.read(params.project_id, params.filename);
|
|
79
|
+
if (!file) {
|
|
80
|
+
return {
|
|
81
|
+
content: [{ type: "text", text: `Instruction file not found: ${params.filename}` }],
|
|
82
|
+
details: { projectId: params.project_id, filename: params.filename, error: "not_found" },
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
content: [{ type: "text", text: file.content }],
|
|
87
|
+
details: { projectId: params.project_id, filename: file.filename, size: file.size },
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
// ── instructions_write ──────────────────────────────────────
|
|
93
|
+
export const INSTRUCTIONS_WRITE_TOOL_NAME = "instructions_write";
|
|
94
|
+
export const INSTRUCTIONS_WRITE_SCHEMA = {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {
|
|
97
|
+
project_id: {
|
|
98
|
+
type: "string",
|
|
99
|
+
description: 'Project ID. Use "default" for the default project.',
|
|
100
|
+
},
|
|
101
|
+
filename: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: 'Instruction file name ending in .md (e.g. "code-style.md"). Sub-paths like "testing/unit-test.md" are supported.',
|
|
104
|
+
},
|
|
105
|
+
content: {
|
|
106
|
+
type: "string",
|
|
107
|
+
description: "Markdown content for the instruction file.",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
required: ["project_id", "filename", "content"],
|
|
111
|
+
};
|
|
112
|
+
export function createInstructionsWriteTool(deps) {
|
|
113
|
+
return {
|
|
114
|
+
name: INSTRUCTIONS_WRITE_TOOL_NAME,
|
|
115
|
+
label: "Write Instruction",
|
|
116
|
+
description: "Create or overwrite an instruction file (.md) in a project. " +
|
|
117
|
+
"Instructions define agent behavior rules, coding standards, and project context. " +
|
|
118
|
+
"The file must end in .md. Sub-directories are created automatically.",
|
|
119
|
+
parameters: INSTRUCTIONS_WRITE_SCHEMA,
|
|
120
|
+
searchHint: "write create instruction file rules coding standard",
|
|
121
|
+
execute: async (_toolCallId, params) => {
|
|
122
|
+
if (!params.filename.endsWith(".md")) {
|
|
123
|
+
return {
|
|
124
|
+
content: [{ type: "text", text: "Filename must end with .md" }],
|
|
125
|
+
details: { error: "invalid_filename" },
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (params.filename.includes("..")) {
|
|
129
|
+
return {
|
|
130
|
+
content: [{ type: "text", text: "Path traversal not allowed" }],
|
|
131
|
+
details: { error: "path_traversal" },
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const file = deps.write(params.project_id, params.filename, params.content);
|
|
135
|
+
return {
|
|
136
|
+
content: [
|
|
137
|
+
{ type: "text", text: `Instruction file written: ${file.filename} (${file.size} bytes)` },
|
|
138
|
+
],
|
|
139
|
+
details: { projectId: params.project_id, filename: file.filename, size: file.size },
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
// ── instructions_delete ─────────────────────────────────────
|
|
145
|
+
export const INSTRUCTIONS_DELETE_TOOL_NAME = "instructions_delete";
|
|
146
|
+
export const INSTRUCTIONS_DELETE_SCHEMA = {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
project_id: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: 'Project ID. Use "default" for the default project.',
|
|
152
|
+
},
|
|
153
|
+
filename: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "Instruction file name to delete (e.g. \"code-style.md\").",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ["project_id", "filename"],
|
|
159
|
+
};
|
|
160
|
+
export function createInstructionsDeleteTool(deps) {
|
|
161
|
+
return {
|
|
162
|
+
name: INSTRUCTIONS_DELETE_TOOL_NAME,
|
|
163
|
+
label: "Delete Instruction",
|
|
164
|
+
description: "Delete an instruction file (.md) from a project. This cannot be undone.",
|
|
165
|
+
parameters: INSTRUCTIONS_DELETE_SCHEMA,
|
|
166
|
+
searchHint: "delete remove instruction file",
|
|
167
|
+
execute: async (_toolCallId, params) => {
|
|
168
|
+
if (params.filename.includes("..")) {
|
|
169
|
+
return {
|
|
170
|
+
content: [{ type: "text", text: "Path traversal not allowed" }],
|
|
171
|
+
details: { error: "path_traversal" },
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
const ok = deps.remove(params.project_id, params.filename);
|
|
175
|
+
if (!ok) {
|
|
176
|
+
return {
|
|
177
|
+
content: [{ type: "text", text: `Instruction file not found: ${params.filename}` }],
|
|
178
|
+
details: { projectId: params.project_id, filename: params.filename, error: "not_found" },
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
content: [{ type: "text", text: `Instruction file deleted: ${params.filename}` }],
|
|
183
|
+
details: { projectId: params.project_id, filename: params.filename },
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=instructions-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/instructions-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,EAAE;AACF,8DAA8D;AAC9D,iEAAiE;AACjE,gCAAgC;AAChC,EAAE;AACF,+BAA+B;AAC/B,+DAA+D;AAiC/D,+DAA+D;AAE/D,MAAM,CAAC,MAAM,2BAA2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,oBAAoB;QAC3B,WAAW,EACT,yEAAyE;QAC3E,UAAU,EAAE,0BAA0B;QACtC,UAAU,EAAE,gCAAgC;QAE5C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAA+B,EAAE;YAClE,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnC,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,EAAE,CAAC;oBAC/D,OAAO,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE;iBACrC,CAAC;YACJ,CAAC;YAED,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC3D,IAAI,CAAC,EAAE,EAAE,CAAC;gBACR,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,+BAA+B,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;oBACnF,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE;iBACzF,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;gBACjF,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;aACrE,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
+
export declare const LSP_TOOL_NAME: "lsp";
|
|
3
|
+
export type LspOperation = "goToDefinition" | "findReferences" | "hover" | "documentSymbol" | "diagnostics" | "completion" | "signatureHelp" | "rename" | "codeAction";
|
|
4
|
+
export interface LspToolParams {
|
|
5
|
+
/** LSP operation to perform */
|
|
6
|
+
operation: LspOperation;
|
|
7
|
+
/** File path (absolute or relative to workspace root) */
|
|
8
|
+
filePath: string;
|
|
9
|
+
/** Line number (1-indexed) */
|
|
10
|
+
line?: number;
|
|
11
|
+
/** Character position (1-indexed) */
|
|
12
|
+
character?: number;
|
|
13
|
+
/** New name (for rename operation) */
|
|
14
|
+
newName?: string;
|
|
15
|
+
/** Include context lines around results */
|
|
16
|
+
includeContext?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const LSP_TOOL_SCHEMA: {
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly properties: {
|
|
21
|
+
readonly operation: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
readonly enum: readonly ["goToDefinition", "findReferences", "hover", "documentSymbol", "diagnostics", "completion", "signatureHelp", "rename", "codeAction"];
|
|
24
|
+
readonly description: string;
|
|
25
|
+
};
|
|
26
|
+
readonly filePath: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly description: "File path. Absolute or relative to workspace root.";
|
|
29
|
+
};
|
|
30
|
+
readonly line: {
|
|
31
|
+
readonly type: "number";
|
|
32
|
+
readonly description: "Line number (1-indexed). Required for positional operations.";
|
|
33
|
+
};
|
|
34
|
+
readonly character: {
|
|
35
|
+
readonly type: "number";
|
|
36
|
+
readonly description: "Character position (1-indexed). Required for positional operations.";
|
|
37
|
+
};
|
|
38
|
+
readonly newName: {
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
readonly description: "New name for rename operation.";
|
|
41
|
+
};
|
|
42
|
+
readonly includeContext: {
|
|
43
|
+
readonly type: "boolean";
|
|
44
|
+
readonly description: "Include surrounding code context in results (default: true).";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly required: readonly ["operation", "filePath"];
|
|
48
|
+
};
|
|
49
|
+
export interface LspLocation {
|
|
50
|
+
filePath: string;
|
|
51
|
+
line: number;
|
|
52
|
+
character: number;
|
|
53
|
+
endLine?: number;
|
|
54
|
+
endCharacter?: number;
|
|
55
|
+
context?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface LspSymbol {
|
|
58
|
+
name: string;
|
|
59
|
+
kind: string;
|
|
60
|
+
range: {
|
|
61
|
+
startLine: number;
|
|
62
|
+
endLine: number;
|
|
63
|
+
};
|
|
64
|
+
children?: LspSymbol[];
|
|
65
|
+
}
|
|
66
|
+
export interface LspDiagnostic {
|
|
67
|
+
message: string;
|
|
68
|
+
severity: "error" | "warning" | "info" | "hint";
|
|
69
|
+
line: number;
|
|
70
|
+
character: number;
|
|
71
|
+
source?: string;
|
|
72
|
+
code?: string | number;
|
|
73
|
+
}
|
|
74
|
+
export interface LspHoverInfo {
|
|
75
|
+
contents: string;
|
|
76
|
+
range?: {
|
|
77
|
+
startLine: number;
|
|
78
|
+
startCharacter: number;
|
|
79
|
+
endLine: number;
|
|
80
|
+
endCharacter: number;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export interface LspCompletion {
|
|
84
|
+
label: string;
|
|
85
|
+
kind: string;
|
|
86
|
+
detail?: string;
|
|
87
|
+
insertText?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface LspRenameEdit {
|
|
90
|
+
filePath: string;
|
|
91
|
+
edits: Array<{
|
|
92
|
+
line: number;
|
|
93
|
+
character: number;
|
|
94
|
+
endLine: number;
|
|
95
|
+
endCharacter: number;
|
|
96
|
+
newText: string;
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
export interface LspCodeAction {
|
|
100
|
+
title: string;
|
|
101
|
+
kind?: string;
|
|
102
|
+
isPreferred?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export type LspResult = {
|
|
105
|
+
type: "locations";
|
|
106
|
+
locations: LspLocation[];
|
|
107
|
+
} | {
|
|
108
|
+
type: "symbols";
|
|
109
|
+
symbols: LspSymbol[];
|
|
110
|
+
} | {
|
|
111
|
+
type: "diagnostics";
|
|
112
|
+
diagnostics: LspDiagnostic[];
|
|
113
|
+
} | {
|
|
114
|
+
type: "hover";
|
|
115
|
+
hover: LspHoverInfo | null;
|
|
116
|
+
} | {
|
|
117
|
+
type: "completions";
|
|
118
|
+
completions: LspCompletion[];
|
|
119
|
+
} | {
|
|
120
|
+
type: "rename";
|
|
121
|
+
edits: LspRenameEdit[];
|
|
122
|
+
} | {
|
|
123
|
+
type: "codeActions";
|
|
124
|
+
actions: LspCodeAction[];
|
|
125
|
+
} | {
|
|
126
|
+
type: "signatureHelp";
|
|
127
|
+
signatures: string[];
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Host-provided LSP backend.
|
|
131
|
+
* The host manages language server lifecycle and connections.
|
|
132
|
+
*/
|
|
133
|
+
export interface LspToolDeps {
|
|
134
|
+
/** Execute an LSP operation. Host dispatches to appropriate language server. */
|
|
135
|
+
executeOperation(params: {
|
|
136
|
+
operation: LspOperation;
|
|
137
|
+
filePath: string;
|
|
138
|
+
line?: number;
|
|
139
|
+
character?: number;
|
|
140
|
+
newName?: string;
|
|
141
|
+
includeContext?: boolean;
|
|
142
|
+
}): Promise<LspResult>;
|
|
143
|
+
/** Check if file exists and get its size */
|
|
144
|
+
statFile?(filePath: string): Promise<{
|
|
145
|
+
exists: boolean;
|
|
146
|
+
size: number;
|
|
147
|
+
} | null>;
|
|
148
|
+
/** Resolve relative path to absolute */
|
|
149
|
+
resolvePath(filePath: string): string;
|
|
150
|
+
/** List supported language IDs (e.g. ['typescript', 'python', 'rust']) */
|
|
151
|
+
supportedLanguages?(): string[];
|
|
152
|
+
}
|
|
153
|
+
export declare function createLspTool(deps: LspToolDeps): PortableTool<LspToolParams>;
|
|
154
|
+
//# sourceMappingURL=lsp-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsp-tool.d.ts","sourceRoot":"","sources":["../../../src/skills/tools/lsp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K,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,aAAa,EAAE,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,aAAa,EAAE,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAMpD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,gFAAgF;IAChF,gBAAgB,CAAC,MAAM,EAAE;QACvB,SAAS,EAAE,YAAY,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAEvB,4CAA4C;IAC5C,QAAQ,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAE/E,wCAAwC;IACxC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC,0EAA0E;IAC1E,kBAAkB,CAAC,IAAI,MAAM,EAAE,CAAC;CACjC;AAaD,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,CAAC,aAAa,CAAC,CAiF5E"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// LSP Tool — Language Server Protocol code intelligence.
|
|
3
|
+
// Reference: claude-code-haha/src/tools/LSPTool/LSPTool.ts
|
|
4
|
+
// Category: coding (read-only)
|
|
5
|
+
// ============================================================
|
|
6
|
+
export const LSP_TOOL_NAME = "lsp";
|
|
7
|
+
export const LSP_TOOL_SCHEMA = {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
operation: {
|
|
11
|
+
type: "string",
|
|
12
|
+
enum: [
|
|
13
|
+
"goToDefinition",
|
|
14
|
+
"findReferences",
|
|
15
|
+
"hover",
|
|
16
|
+
"documentSymbol",
|
|
17
|
+
"diagnostics",
|
|
18
|
+
"completion",
|
|
19
|
+
"signatureHelp",
|
|
20
|
+
"rename",
|
|
21
|
+
"codeAction",
|
|
22
|
+
],
|
|
23
|
+
description: "LSP operation:\n" +
|
|
24
|
+
"- goToDefinition: jump to symbol definition\n" +
|
|
25
|
+
"- findReferences: find all usages of a symbol\n" +
|
|
26
|
+
"- hover: get type/docs for symbol at position\n" +
|
|
27
|
+
"- documentSymbol: list all symbols in file (classes, functions, etc)\n" +
|
|
28
|
+
"- diagnostics: get errors/warnings for a file\n" +
|
|
29
|
+
"- completion: get completions at position\n" +
|
|
30
|
+
"- signatureHelp: get function signature at call site\n" +
|
|
31
|
+
"- rename: preview rename of symbol\n" +
|
|
32
|
+
"- codeAction: get available quick-fixes/refactorings",
|
|
33
|
+
},
|
|
34
|
+
filePath: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "File path. Absolute or relative to workspace root.",
|
|
37
|
+
},
|
|
38
|
+
line: {
|
|
39
|
+
type: "number",
|
|
40
|
+
description: "Line number (1-indexed). Required for positional operations.",
|
|
41
|
+
},
|
|
42
|
+
character: {
|
|
43
|
+
type: "number",
|
|
44
|
+
description: "Character position (1-indexed). Required for positional operations.",
|
|
45
|
+
},
|
|
46
|
+
newName: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "New name for rename operation.",
|
|
49
|
+
},
|
|
50
|
+
includeContext: {
|
|
51
|
+
type: "boolean",
|
|
52
|
+
description: "Include surrounding code context in results (default: true).",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
required: ["operation", "filePath"],
|
|
56
|
+
};
|
|
57
|
+
// ── Dependencies ────────────────────────────────────────────
|
|
58
|
+
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MB
|
|
59
|
+
// Positional operations require line and character
|
|
60
|
+
const POSITIONAL_OPS = [
|
|
61
|
+
"goToDefinition",
|
|
62
|
+
"findReferences",
|
|
63
|
+
"hover",
|
|
64
|
+
"completion",
|
|
65
|
+
"signatureHelp",
|
|
66
|
+
"rename",
|
|
67
|
+
"codeAction",
|
|
68
|
+
];
|
|
69
|
+
export function createLspTool(deps) {
|
|
70
|
+
return {
|
|
71
|
+
name: LSP_TOOL_NAME,
|
|
72
|
+
label: "LSP",
|
|
73
|
+
description: "Query language servers for code intelligence. Supports go-to-definition, find-references, " +
|
|
74
|
+
"hover (type info), document symbols, diagnostics (errors/warnings), completions, " +
|
|
75
|
+
"signature help, rename preview, and code actions. Read-only — does not modify files.",
|
|
76
|
+
parameters: LSP_TOOL_SCHEMA,
|
|
77
|
+
execute: async (_toolCallId, params) => {
|
|
78
|
+
if (!params.filePath || params.filePath.trim().length === 0) {
|
|
79
|
+
return {
|
|
80
|
+
content: [{ type: "text", text: "Error: filePath is required." }],
|
|
81
|
+
details: { type: "lsp", error: "missing_filePath" },
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// Block UNC paths (NTLM credential leak risk on Windows)
|
|
85
|
+
if (params.filePath.startsWith("\\\\") || params.filePath.startsWith("//")) {
|
|
86
|
+
return {
|
|
87
|
+
content: [{ type: "text", text: "Error: UNC paths are not allowed." }],
|
|
88
|
+
details: { type: "lsp", error: "unc_blocked" },
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// Validate positional params
|
|
92
|
+
if (POSITIONAL_OPS.includes(params.operation)) {
|
|
93
|
+
if (params.line == null || params.character == null) {
|
|
94
|
+
return {
|
|
95
|
+
content: [{ type: "text", text: `Error: line and character are required for ${params.operation}.` }],
|
|
96
|
+
details: { type: "lsp", error: "missing_position" },
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (params.line < 1 || params.character < 1) {
|
|
100
|
+
return {
|
|
101
|
+
content: [{ type: "text", text: "Error: line and character must be ≥ 1." }],
|
|
102
|
+
details: { type: "lsp", error: "invalid_position" },
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// Rename requires newName
|
|
107
|
+
if (params.operation === "rename" && !params.newName) {
|
|
108
|
+
return {
|
|
109
|
+
content: [{ type: "text", text: "Error: newName is required for rename operation." }],
|
|
110
|
+
details: { type: "lsp", error: "missing_newName" },
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const resolved = deps.resolvePath(params.filePath);
|
|
114
|
+
// File size check
|
|
115
|
+
if (deps.statFile) {
|
|
116
|
+
const stat = await deps.statFile(resolved);
|
|
117
|
+
if (!stat || !stat.exists) {
|
|
118
|
+
return {
|
|
119
|
+
content: [{ type: "text", text: `Error: file not found: ${params.filePath}` }],
|
|
120
|
+
details: { type: "lsp", error: "file_not_found" },
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (stat.size > MAX_FILE_SIZE) {
|
|
124
|
+
return {
|
|
125
|
+
content: [{ type: "text", text: `Error: file too large (${(stat.size / 1024 / 1024).toFixed(1)}MB, max 10MB).` }],
|
|
126
|
+
details: { type: "lsp", error: "file_too_large" },
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const result = await deps.executeOperation({
|
|
131
|
+
operation: params.operation,
|
|
132
|
+
filePath: resolved,
|
|
133
|
+
line: params.line,
|
|
134
|
+
character: params.character,
|
|
135
|
+
newName: params.newName,
|
|
136
|
+
includeContext: params.includeContext ?? true,
|
|
137
|
+
});
|
|
138
|
+
return { content: [{ type: "text", text: formatLspResult(params.operation, result) }], details: { type: "lsp", operation: params.operation } };
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// ── Output formatting ───────────────────────────────────────
|
|
143
|
+
function formatLspResult(operation, result) {
|
|
144
|
+
switch (result.type) {
|
|
145
|
+
case "locations": {
|
|
146
|
+
if (result.locations.length === 0)
|
|
147
|
+
return "No results found.";
|
|
148
|
+
const lines = [`Found ${result.locations.length} location(s):`, ""];
|
|
149
|
+
for (const loc of result.locations.slice(0, 50)) {
|
|
150
|
+
lines.push(` ${loc.filePath}:${loc.line}:${loc.character}`);
|
|
151
|
+
if (loc.context)
|
|
152
|
+
lines.push(` ${loc.context.trim()}`);
|
|
153
|
+
}
|
|
154
|
+
if (result.locations.length > 50)
|
|
155
|
+
lines.push(` ... and ${result.locations.length - 50} more`);
|
|
156
|
+
return lines.join("\n");
|
|
157
|
+
}
|
|
158
|
+
case "symbols": {
|
|
159
|
+
if (result.symbols.length === 0)
|
|
160
|
+
return "No symbols found.";
|
|
161
|
+
const lines = [`Document symbols (${result.symbols.length}):`, ""];
|
|
162
|
+
for (const sym of result.symbols) {
|
|
163
|
+
lines.push(` ${sym.kind} ${sym.name} (L${sym.range.startLine}-${sym.range.endLine})`);
|
|
164
|
+
if (sym.children) {
|
|
165
|
+
for (const child of sym.children.slice(0, 10)) {
|
|
166
|
+
lines.push(` ${child.kind} ${child.name} (L${child.range.startLine})`);
|
|
167
|
+
}
|
|
168
|
+
if (sym.children.length > 10)
|
|
169
|
+
lines.push(` ... and ${sym.children.length - 10} more`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return lines.join("\n");
|
|
173
|
+
}
|
|
174
|
+
case "diagnostics": {
|
|
175
|
+
if (result.diagnostics.length === 0)
|
|
176
|
+
return "No diagnostics (clean file).";
|
|
177
|
+
const lines = [`Diagnostics (${result.diagnostics.length}):`, ""];
|
|
178
|
+
for (const d of result.diagnostics) {
|
|
179
|
+
const icon = d.severity === "error" ? "❌" : d.severity === "warning" ? "⚠️" : "ℹ️";
|
|
180
|
+
lines.push(` ${icon} L${d.line}:${d.character} [${d.source || ""}${d.code ? `:${d.code}` : ""}] ${d.message}`);
|
|
181
|
+
}
|
|
182
|
+
return lines.join("\n");
|
|
183
|
+
}
|
|
184
|
+
case "hover": {
|
|
185
|
+
if (!result.hover)
|
|
186
|
+
return "No hover information available.";
|
|
187
|
+
return result.hover.contents;
|
|
188
|
+
}
|
|
189
|
+
case "completions": {
|
|
190
|
+
if (result.completions.length === 0)
|
|
191
|
+
return "No completions available.";
|
|
192
|
+
const lines = [`Completions (${result.completions.length}):`, ""];
|
|
193
|
+
for (const c of result.completions.slice(0, 20)) {
|
|
194
|
+
lines.push(` [${c.kind}] ${c.label}${c.detail ? ` — ${c.detail}` : ""}`);
|
|
195
|
+
}
|
|
196
|
+
if (result.completions.length > 20)
|
|
197
|
+
lines.push(` ... and ${result.completions.length - 20} more`);
|
|
198
|
+
return lines.join("\n");
|
|
199
|
+
}
|
|
200
|
+
case "signatureHelp": {
|
|
201
|
+
if (result.signatures.length === 0)
|
|
202
|
+
return "No signature information available.";
|
|
203
|
+
return result.signatures.join("\n");
|
|
204
|
+
}
|
|
205
|
+
case "rename": {
|
|
206
|
+
if (result.edits.length === 0)
|
|
207
|
+
return "No edits generated for rename.";
|
|
208
|
+
const total = result.edits.reduce((sum, f) => sum + f.edits.length, 0);
|
|
209
|
+
const lines = [`Rename would affect ${total} location(s) in ${result.edits.length} file(s):`, ""];
|
|
210
|
+
for (const file of result.edits) {
|
|
211
|
+
lines.push(` ${file.filePath} (${file.edits.length} edits)`);
|
|
212
|
+
}
|
|
213
|
+
return lines.join("\n");
|
|
214
|
+
}
|
|
215
|
+
case "codeActions": {
|
|
216
|
+
if (result.actions.length === 0)
|
|
217
|
+
return "No code actions available.";
|
|
218
|
+
const lines = [`Available code actions (${result.actions.length}):`, ""];
|
|
219
|
+
for (const a of result.actions) {
|
|
220
|
+
lines.push(` ${a.isPreferred ? "★" : "-"} ${a.title}${a.kind ? ` [${a.kind}]` : ""}`);
|
|
221
|
+
}
|
|
222
|
+
return lines.join("\n");
|
|
223
|
+
}
|
|
224
|
+
default:
|
|
225
|
+
return "Unknown result type.";
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=lsp-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsp-tool.js","sourceRoot":"","sources":["../../../src/skills/tools/lsp-tool.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,yDAAyD;AACzD,2DAA2D;AAC3D,+BAA+B;AAC/B,+DAA+D;AAI/D,MAAM,CAAC,MAAM,aAAa,GAAG,KAAc,CAAC;AA4B5C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,QAAiB;YACvB,IAAI,EAAE;gBACJ,gBAAgB;gBAChB,gBAAgB;gBAChB,OAAO;gBACP,gBAAgB;gBAChB,aAAa;gBACb,YAAY;gBACZ,eAAe;gBACf,QAAQ;gBACR,YAAY;aACb;YACD,WAAW,EACT,kBAAkB;gBAClB,+CAA+C;gBAC/C,iDAAiD;gBACjD,iDAAiD;gBACjD,wEAAwE;gBACxE,iDAAiD;gBACjD,6CAA6C;gBAC7C,wDAAwD;gBACxD,sCAAsC;gBACtC,sDAAsD;SACzD;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,oDAAoD;SAClE;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,8DAA8D;SAC5E;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,qEAAqE;SACnF;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAiB;YACvB,WAAW,EAAE,gCAAgC;SAC9C;QACD,cAAc,EAAE;YACd,IAAI,EAAE,SAAkB;YACxB,WAAW,EAAE,8DAA8D;SAC5E;KACF;IACD,QAAQ,EAAE,CAAC,WAAW,EAAE,UAAU,CAAU;CACpC,CAA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