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,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure agent types — zero I/O framework dependencies.
|
|
3
|
+
*
|
|
4
|
+
* These types define the contract between:
|
|
5
|
+
* - CLI stdio layer ↔ Agent class
|
|
6
|
+
* - Agent class ↔ LLM Provider
|
|
7
|
+
* - Agent class ↔ Tool loop
|
|
8
|
+
*
|
|
9
|
+
* Ported from Hub semantic-turn-shared.ts / semantic-turn-tools.ts,
|
|
10
|
+
* with Hub infrastructure (WS/PG/Redis) replaced by DI interfaces.
|
|
11
|
+
*
|
|
12
|
+
* No imports from express/pg/ioredis/ws.
|
|
13
|
+
*/
|
|
14
|
+
import type { SkillInstruction } from "../orchestration/index.js";
|
|
15
|
+
import type { HookRegistry } from "../contracts/hooks.js";
|
|
16
|
+
export type ChatMessageRole = "system" | "user" | "assistant" | "tool";
|
|
17
|
+
export interface ChatMessage {
|
|
18
|
+
role: ChatMessageRole;
|
|
19
|
+
content: string | null;
|
|
20
|
+
/** For assistant messages with tool calls */
|
|
21
|
+
tool_calls?: ToolCallMessage[];
|
|
22
|
+
/** For tool result messages */
|
|
23
|
+
tool_call_id?: string;
|
|
24
|
+
/** For tool result messages — tool name */
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ToolCallMessage {
|
|
28
|
+
id: string;
|
|
29
|
+
type: "function";
|
|
30
|
+
function: {
|
|
31
|
+
name: string;
|
|
32
|
+
arguments: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface ToolDefinition {
|
|
36
|
+
type: "function";
|
|
37
|
+
function: {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
parameters?: Record<string, unknown>;
|
|
41
|
+
};
|
|
42
|
+
/** Tool scheduling metadata from host manifest (optional) */
|
|
43
|
+
meta?: {
|
|
44
|
+
serialOnly?: boolean;
|
|
45
|
+
parallelSafe?: boolean;
|
|
46
|
+
/** If true, host should request user approval before execution (CC PreToolUse parity) */
|
|
47
|
+
requiresApproval?: boolean;
|
|
48
|
+
/** Tool is read-only / safe — skip approval even in strict mode */
|
|
49
|
+
isReadOnly?: boolean;
|
|
50
|
+
/** Tool can cause irreversible side-effects — force approval in default mode */
|
|
51
|
+
isDangerous?: boolean;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface TokenUsage {
|
|
55
|
+
prompt: number;
|
|
56
|
+
completion: number;
|
|
57
|
+
/** Reasoning tokens (for models like o1/DeepSeek-R1) */
|
|
58
|
+
reasoning?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface TurnRequest {
|
|
61
|
+
turnId: string;
|
|
62
|
+
sessionId: string;
|
|
63
|
+
messages: ChatMessage[];
|
|
64
|
+
tools: ToolDefinition[];
|
|
65
|
+
systemPrompt?: string;
|
|
66
|
+
config?: TurnConfig;
|
|
67
|
+
}
|
|
68
|
+
export interface TurnConfig {
|
|
69
|
+
/** LLM provider id, e.g. "deepseek" */
|
|
70
|
+
provider?: string;
|
|
71
|
+
/** Model id, e.g. "deepseek-chat" */
|
|
72
|
+
model?: string;
|
|
73
|
+
/** User API key */
|
|
74
|
+
apiKey?: string;
|
|
75
|
+
/** Optional base URL override */
|
|
76
|
+
baseUrl?: string;
|
|
77
|
+
/** Max tool-call rounds per turn (default 25, max 100) */
|
|
78
|
+
maxRounds?: number;
|
|
79
|
+
/** Temperature override */
|
|
80
|
+
temperature?: number;
|
|
81
|
+
/** Context window size in tokens (for turn-loop-guard budget checks) */
|
|
82
|
+
contextWindowTokens?: number;
|
|
83
|
+
/** Max output tokens for current model */
|
|
84
|
+
maxOutputTokens?: number;
|
|
85
|
+
/** Model's absolute max output tokens (for escalation ceiling) */
|
|
86
|
+
modelMaxOutputTokens?: number;
|
|
87
|
+
/** Tool choice strategy: "auto" (default), "none", "required" */
|
|
88
|
+
toolChoice?: "auto" | "none" | "required";
|
|
89
|
+
/** Parent sidechain depth (0 = top-level, default 0) */
|
|
90
|
+
parentDepth?: number;
|
|
91
|
+
}
|
|
92
|
+
export type TurnEvent = {
|
|
93
|
+
type: "start";
|
|
94
|
+
turnId: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: "delta";
|
|
97
|
+
turnId: string;
|
|
98
|
+
text: string;
|
|
99
|
+
} | {
|
|
100
|
+
type: "tool_call";
|
|
101
|
+
turnId: string;
|
|
102
|
+
callId: string;
|
|
103
|
+
name: string;
|
|
104
|
+
arguments: string;
|
|
105
|
+
} | {
|
|
106
|
+
type: "end";
|
|
107
|
+
turnId: string;
|
|
108
|
+
content: string;
|
|
109
|
+
usage?: TokenUsage;
|
|
110
|
+
model?: string;
|
|
111
|
+
provider?: string;
|
|
112
|
+
} | {
|
|
113
|
+
type: "error";
|
|
114
|
+
turnId: string;
|
|
115
|
+
error: string;
|
|
116
|
+
code?: string;
|
|
117
|
+
} | {
|
|
118
|
+
type: "skill_instruction";
|
|
119
|
+
turnId: string;
|
|
120
|
+
instruction: SkillInstruction;
|
|
121
|
+
} | {
|
|
122
|
+
type: "tool_result";
|
|
123
|
+
turnId: string;
|
|
124
|
+
callId: string;
|
|
125
|
+
name: string;
|
|
126
|
+
ok: boolean;
|
|
127
|
+
error?: string;
|
|
128
|
+
} | {
|
|
129
|
+
type: "sidechain_started";
|
|
130
|
+
turnId: string;
|
|
131
|
+
depth: number;
|
|
132
|
+
role: "orchestrator" | "leaf";
|
|
133
|
+
} | {
|
|
134
|
+
type: "sidechain_completed";
|
|
135
|
+
turnId: string;
|
|
136
|
+
depth: number;
|
|
137
|
+
toolCallCount: number;
|
|
138
|
+
} | {
|
|
139
|
+
type: "tool_blocked";
|
|
140
|
+
turnId: string;
|
|
141
|
+
callId: string;
|
|
142
|
+
name: string;
|
|
143
|
+
reason: string;
|
|
144
|
+
} | {
|
|
145
|
+
type: "recovery";
|
|
146
|
+
turnId: string;
|
|
147
|
+
action: string;
|
|
148
|
+
detail?: string;
|
|
149
|
+
} | {
|
|
150
|
+
type: "plan_update";
|
|
151
|
+
turnId: string;
|
|
152
|
+
slug: string;
|
|
153
|
+
content: string;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* ToolInvoker: request tool execution from the host process (Gateway).
|
|
157
|
+
* In CLI mode this sends a JSON-RPC notification over stdio and waits for result.
|
|
158
|
+
*/
|
|
159
|
+
export interface ToolInvoker {
|
|
160
|
+
invoke(turnId: string, name: string, args: string, signal?: AbortSignal): Promise<{
|
|
161
|
+
result: string;
|
|
162
|
+
error?: string;
|
|
163
|
+
}>;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* AgentLogger: structured logging interface.
|
|
167
|
+
* In CLI mode this writes to stderr; in Hub mode this uses pino.
|
|
168
|
+
*/
|
|
169
|
+
export interface AgentLogger {
|
|
170
|
+
info(message: string): void;
|
|
171
|
+
warn(message: string): void;
|
|
172
|
+
error(message: string): void;
|
|
173
|
+
debug(message: string): void;
|
|
174
|
+
}
|
|
175
|
+
export type { HookRegistry };
|
|
176
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAEvE,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAID,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,Q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
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure agent types — zero I/O framework dependencies.
|
|
3
|
+
*
|
|
4
|
+
* These types define the contract between:
|
|
5
|
+
* - CLI stdio layer ↔ Agent class
|
|
6
|
+
* - Agent class ↔ LLM Provider
|
|
7
|
+
* - Agent class ↔ Tool loop
|
|
8
|
+
*
|
|
9
|
+
* Ported from Hub semantic-turn-shared.ts / semantic-turn-tools.ts,
|
|
10
|
+
* with Hub infrastructure (WS/PG/Redis) replaced by DI interfaces.
|
|
11
|
+
*
|
|
12
|
+
* No imports from express/pg/ioredis/ws.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* qlogicagent CLI — Agent subprocess entry point.
|
|
4
|
+
*
|
|
5
|
+
* Communicates with openclaw Gateway via JSON-RPC over stdio.
|
|
6
|
+
* All log/debug output goes to stderr (never pollutes the stdio protocol).
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* qlogicagent [--verbose]
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG"}
|
package/dist/cli/main.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* qlogicagent CLI — Agent subprocess entry point.
|
|
4
|
+
*
|
|
5
|
+
* Communicates with openclaw Gateway via JSON-RPC over stdio.
|
|
6
|
+
* All log/debug output goes to stderr (never pollutes the stdio protocol).
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* qlogicagent [--verbose]
|
|
10
|
+
*/
|
|
11
|
+
import { StdioServer } from "./stdio-server.js";
|
|
12
|
+
import { parseCliArgs } from "../config/config.js";
|
|
13
|
+
const config = parseCliArgs(process.argv);
|
|
14
|
+
const server = new StdioServer({ verbose: config.verbose });
|
|
15
|
+
// Graceful shutdown
|
|
16
|
+
const shutdown = () => {
|
|
17
|
+
server.stop();
|
|
18
|
+
process.exit(0);
|
|
19
|
+
};
|
|
20
|
+
process.on("SIGTERM", shutdown);
|
|
21
|
+
process.on("SIGINT", shutdown);
|
|
22
|
+
// Start the JSON-RPC stdio server
|
|
23
|
+
server.start();
|
|
24
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1C,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;AAE5D,oBAAoB;AACpB,MAAM,QAAQ,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,IAAI,EAAE,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAChC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE/B,kCAAkC;AAClC,MAAM,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StdioServer — JSON-RPC 2.0 over stdio protocol handler.
|
|
3
|
+
*
|
|
4
|
+
* Reads line-delimited JSON from stdin, dispatches to handlers,
|
|
5
|
+
* writes JSON-RPC responses/notifications to stdout.
|
|
6
|
+
* All log output goes to stderr.
|
|
7
|
+
*
|
|
8
|
+
* Protocol: each line on stdin/stdout is a single JSON-RPC 2.0 message.
|
|
9
|
+
*/
|
|
10
|
+
export interface StdioServerConfig {
|
|
11
|
+
verbose: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class StdioServer {
|
|
14
|
+
private running;
|
|
15
|
+
private activeTurn;
|
|
16
|
+
private pendingToolResults;
|
|
17
|
+
private verbose;
|
|
18
|
+
private registry;
|
|
19
|
+
private agent;
|
|
20
|
+
private lastLlmConfigKey;
|
|
21
|
+
private currentSessionId;
|
|
22
|
+
private currentHooks;
|
|
23
|
+
constructor(config: StdioServerConfig);
|
|
24
|
+
start(): void;
|
|
25
|
+
stop(): void;
|
|
26
|
+
private handleMessage;
|
|
27
|
+
private handleHello;
|
|
28
|
+
private handlePing;
|
|
29
|
+
private handleAbort;
|
|
30
|
+
private handleToolResult;
|
|
31
|
+
private handleTurn;
|
|
32
|
+
private resolveAgent;
|
|
33
|
+
/**
|
|
34
|
+
* Request tool execution from the Gateway host.
|
|
35
|
+
* Sends a turn.tool_call notification and waits for tool.result.
|
|
36
|
+
*/
|
|
37
|
+
requestToolExecution(turnId: string, name: string, args: string, signal?: AbortSignal): Promise<{
|
|
38
|
+
result: string;
|
|
39
|
+
error?: string;
|
|
40
|
+
}>;
|
|
41
|
+
private sendResponse;
|
|
42
|
+
private sendNotification;
|
|
43
|
+
private writeStdout;
|
|
44
|
+
private log;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=stdio-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio-server.d.ts","sourceRoot":"","sources":["../../src/cli/stdio-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyCH,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,WAAW;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,kBAAkB,CAAwC;IAClE,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,YAAY,CAA6D;gBAErE,MAAM,EAAE,iBAAiB;IAKrC,KAAK,IAAI,IAAI;IA8Bb,IAAI,IAAI,IAAI;IA0BZ,OAAO,CAAC,aAAa;IAmCrB,OAAO,CAAC,WAAW;IA0BnB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,gBAAgB;YAmBV,UAAU;IAkLxB,OAAO,CAAC,YAAY;IAkGpB;;;OAGG;IACG,oBAAoB,CACzB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAgC9C,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,GAAG;CAKX"}
|