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,298 @@
|
|
|
1
|
+
function extractEnumValues(schema) {
|
|
2
|
+
if (!schema || typeof schema !== "object") {
|
|
3
|
+
return undefined;
|
|
4
|
+
}
|
|
5
|
+
const record = schema;
|
|
6
|
+
if (Array.isArray(record.enum)) {
|
|
7
|
+
return record.enum;
|
|
8
|
+
}
|
|
9
|
+
if ("const" in record) {
|
|
10
|
+
return [record.const];
|
|
11
|
+
}
|
|
12
|
+
const variants = Array.isArray(record.anyOf)
|
|
13
|
+
? record.anyOf
|
|
14
|
+
: Array.isArray(record.oneOf)
|
|
15
|
+
? record.oneOf
|
|
16
|
+
: null;
|
|
17
|
+
if (!variants) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const values = variants.flatMap((variant) => extractEnumValues(variant) ?? []);
|
|
21
|
+
return values.length > 0 ? values : undefined;
|
|
22
|
+
}
|
|
23
|
+
function mergePropertySchemas(existing, incoming) {
|
|
24
|
+
if (!existing)
|
|
25
|
+
return incoming;
|
|
26
|
+
if (!incoming)
|
|
27
|
+
return existing;
|
|
28
|
+
const existingEnum = extractEnumValues(existing);
|
|
29
|
+
const incomingEnum = extractEnumValues(incoming);
|
|
30
|
+
if (!existingEnum && !incomingEnum) {
|
|
31
|
+
return existing;
|
|
32
|
+
}
|
|
33
|
+
const values = Array.from(new Set([...(existingEnum ?? []), ...(incomingEnum ?? [])]));
|
|
34
|
+
const merged = {};
|
|
35
|
+
for (const source of [existing, incoming]) {
|
|
36
|
+
if (!source || typeof source !== "object") {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
const record = source;
|
|
40
|
+
for (const key of ["title", "description", "default"]) {
|
|
41
|
+
if (!(key in merged) && key in record) {
|
|
42
|
+
merged[key] = record[key];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const types = new Set(values.map((value) => typeof value));
|
|
47
|
+
if (types.size === 1) {
|
|
48
|
+
merged.type = Array.from(types)[0];
|
|
49
|
+
}
|
|
50
|
+
merged.enum = values;
|
|
51
|
+
return merged;
|
|
52
|
+
}
|
|
53
|
+
const GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS = new Set([
|
|
54
|
+
"patternProperties",
|
|
55
|
+
"additionalProperties",
|
|
56
|
+
"$schema",
|
|
57
|
+
"$id",
|
|
58
|
+
"$ref",
|
|
59
|
+
"$defs",
|
|
60
|
+
"definitions",
|
|
61
|
+
"examples",
|
|
62
|
+
"minLength",
|
|
63
|
+
"maxLength",
|
|
64
|
+
"minimum",
|
|
65
|
+
"maximum",
|
|
66
|
+
"multipleOf",
|
|
67
|
+
"pattern",
|
|
68
|
+
"format",
|
|
69
|
+
"minItems",
|
|
70
|
+
"maxItems",
|
|
71
|
+
"uniqueItems",
|
|
72
|
+
"minProperties",
|
|
73
|
+
"maxProperties",
|
|
74
|
+
]);
|
|
75
|
+
const XAI_UNSUPPORTED_SCHEMA_KEYWORDS = new Set([
|
|
76
|
+
"minLength",
|
|
77
|
+
"maxLength",
|
|
78
|
+
"minItems",
|
|
79
|
+
"maxItems",
|
|
80
|
+
"minContains",
|
|
81
|
+
"maxContains",
|
|
82
|
+
]);
|
|
83
|
+
function cleanSchemaForGemini(schema) {
|
|
84
|
+
if (!schema || typeof schema !== "object") {
|
|
85
|
+
return schema;
|
|
86
|
+
}
|
|
87
|
+
if (Array.isArray(schema)) {
|
|
88
|
+
return schema.map((item) => cleanSchemaForGemini(item));
|
|
89
|
+
}
|
|
90
|
+
const record = schema;
|
|
91
|
+
const cleaned = {};
|
|
92
|
+
for (const [key, value] of Object.entries(record)) {
|
|
93
|
+
if (GEMINI_UNSUPPORTED_SCHEMA_KEYWORDS.has(key)) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (key === "properties" && value && typeof value === "object" && !Array.isArray(value)) {
|
|
97
|
+
cleaned[key] = Object.fromEntries(Object.entries(value).map(([nestedKey, nestedValue]) => [nestedKey, cleanSchemaForGemini(nestedValue)]));
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if ((key === "items" || key === "additionalProperties") && value && typeof value === "object") {
|
|
101
|
+
cleaned[key] = Array.isArray(value) ? value.map((item) => cleanSchemaForGemini(item)) : cleanSchemaForGemini(value);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if ((key === "anyOf" || key === "oneOf" || key === "allOf") && Array.isArray(value)) {
|
|
105
|
+
cleaned[key] = value.map((item) => cleanSchemaForGemini(item));
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
cleaned[key] = value;
|
|
109
|
+
}
|
|
110
|
+
return cleaned;
|
|
111
|
+
}
|
|
112
|
+
function stripXaiUnsupportedKeywords(schema) {
|
|
113
|
+
if (!schema || typeof schema !== "object") {
|
|
114
|
+
return schema;
|
|
115
|
+
}
|
|
116
|
+
if (Array.isArray(schema)) {
|
|
117
|
+
return schema.map((item) => stripXaiUnsupportedKeywords(item));
|
|
118
|
+
}
|
|
119
|
+
const record = schema;
|
|
120
|
+
const cleaned = {};
|
|
121
|
+
for (const [key, value] of Object.entries(record)) {
|
|
122
|
+
if (XAI_UNSUPPORTED_SCHEMA_KEYWORDS.has(key)) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (key === "properties" && value && typeof value === "object" && !Array.isArray(value)) {
|
|
126
|
+
cleaned[key] = Object.fromEntries(Object.entries(value).map(([nestedKey, nestedValue]) => [nestedKey, stripXaiUnsupportedKeywords(nestedValue)]));
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if ((key === "items") && value && typeof value === "object") {
|
|
130
|
+
cleaned[key] = Array.isArray(value) ? value.map((item) => stripXaiUnsupportedKeywords(item)) : stripXaiUnsupportedKeywords(value);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if ((key === "anyOf" || key === "oneOf" || key === "allOf") && Array.isArray(value)) {
|
|
134
|
+
cleaned[key] = value.map((item) => stripXaiUnsupportedKeywords(item));
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
cleaned[key] = value;
|
|
138
|
+
}
|
|
139
|
+
return cleaned;
|
|
140
|
+
}
|
|
141
|
+
export function isXaiProvider(modelProvider, modelId) {
|
|
142
|
+
const provider = modelProvider?.toLowerCase() ?? "";
|
|
143
|
+
if (provider.includes("xai") || provider.includes("x-ai")) {
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
const lowerModelId = modelId?.toLowerCase() ?? "";
|
|
147
|
+
if (provider === "openrouter" && lowerModelId.startsWith("x-ai/")) {
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
if (provider === "venice" && lowerModelId.includes("grok")) {
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
export function normalizeFunctionToolParameters(parameters, options) {
|
|
156
|
+
const schema = parameters && typeof parameters === "object" ? parameters : { type: "object", properties: {}, additionalProperties: true };
|
|
157
|
+
const isGeminiProvider = options?.modelProvider?.toLowerCase().includes("google") || options?.modelProvider?.toLowerCase().includes("gemini");
|
|
158
|
+
const isAnthropicProvider = options?.modelProvider?.toLowerCase().includes("anthropic");
|
|
159
|
+
const isXai = isXaiProvider(options?.modelProvider, options?.modelId);
|
|
160
|
+
const applyProviderCleaning = (nextSchema) => {
|
|
161
|
+
if (isGeminiProvider && !isAnthropicProvider) {
|
|
162
|
+
return cleanSchemaForGemini(nextSchema);
|
|
163
|
+
}
|
|
164
|
+
if (isXai) {
|
|
165
|
+
return stripXaiUnsupportedKeywords(nextSchema);
|
|
166
|
+
}
|
|
167
|
+
return nextSchema;
|
|
168
|
+
};
|
|
169
|
+
if ("type" in schema && "properties" in schema && !Array.isArray(schema.anyOf)) {
|
|
170
|
+
return applyProviderCleaning(schema);
|
|
171
|
+
}
|
|
172
|
+
if (!("type" in schema)
|
|
173
|
+
&& (typeof schema.properties === "object" || Array.isArray(schema.required))
|
|
174
|
+
&& !Array.isArray(schema.anyOf)
|
|
175
|
+
&& !Array.isArray(schema.oneOf)) {
|
|
176
|
+
return applyProviderCleaning({ ...schema, type: "object" });
|
|
177
|
+
}
|
|
178
|
+
const variantKey = Array.isArray(schema.anyOf)
|
|
179
|
+
? "anyOf"
|
|
180
|
+
: Array.isArray(schema.oneOf)
|
|
181
|
+
? "oneOf"
|
|
182
|
+
: null;
|
|
183
|
+
if (!variantKey) {
|
|
184
|
+
return applyProviderCleaning(schema);
|
|
185
|
+
}
|
|
186
|
+
const variants = schema[variantKey];
|
|
187
|
+
const mergedProperties = {};
|
|
188
|
+
const requiredCounts = new Map();
|
|
189
|
+
let objectVariants = 0;
|
|
190
|
+
for (const entry of variants) {
|
|
191
|
+
if (!entry || typeof entry !== "object") {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const props = entry.properties;
|
|
195
|
+
if (!props || typeof props !== "object") {
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
objectVariants += 1;
|
|
199
|
+
for (const [key, value] of Object.entries(props)) {
|
|
200
|
+
mergedProperties[key] = key in mergedProperties ? mergePropertySchemas(mergedProperties[key], value) : value;
|
|
201
|
+
}
|
|
202
|
+
const required = Array.isArray(entry.required)
|
|
203
|
+
? entry.required
|
|
204
|
+
: [];
|
|
205
|
+
for (const key of required) {
|
|
206
|
+
if (typeof key === "string") {
|
|
207
|
+
requiredCounts.set(key, (requiredCounts.get(key) ?? 0) + 1);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const baseRequired = Array.isArray(schema.required) ? schema.required.filter((key) => typeof key === "string") : undefined;
|
|
212
|
+
const mergedRequired = baseRequired && baseRequired.length > 0
|
|
213
|
+
? baseRequired
|
|
214
|
+
: objectVariants > 0
|
|
215
|
+
? Array.from(requiredCounts.entries()).filter(([, count]) => count === objectVariants).map(([key]) => key)
|
|
216
|
+
: undefined;
|
|
217
|
+
return applyProviderCleaning({
|
|
218
|
+
type: "object",
|
|
219
|
+
...(typeof schema.title === "string" ? { title: schema.title } : {}),
|
|
220
|
+
...(typeof schema.description === "string" ? { description: schema.description } : {}),
|
|
221
|
+
properties: Object.keys(mergedProperties).length > 0 ? mergedProperties : (schema.properties ?? {}),
|
|
222
|
+
...(mergedRequired && mergedRequired.length > 0 ? { required: mergedRequired } : {}),
|
|
223
|
+
additionalProperties: "additionalProperties" in schema ? schema.additionalProperties : true,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
export function convertFunctionTools(tools, options) {
|
|
227
|
+
return tools.map((tool) => ({
|
|
228
|
+
type: "function",
|
|
229
|
+
function: {
|
|
230
|
+
name: tool.name,
|
|
231
|
+
...(typeof tool.description === "string" ? { description: tool.description } : {}),
|
|
232
|
+
parameters: normalizeFunctionToolParameters(tool.parameters, options),
|
|
233
|
+
},
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
export function convertCapabilityToolManifestsToFunctionTools(tools) {
|
|
237
|
+
return convertFunctionTools(tools.map((tool) => ({
|
|
238
|
+
name: tool.name,
|
|
239
|
+
description: tool.description,
|
|
240
|
+
parameters: {
|
|
241
|
+
type: "object",
|
|
242
|
+
properties: Object.fromEntries((tool.requiredParameters ?? []).map((name) => [name, { type: "string" }])),
|
|
243
|
+
additionalProperties: true,
|
|
244
|
+
...((tool.requiredParameters?.length ?? 0) > 0 ? { required: tool.requiredParameters } : {}),
|
|
245
|
+
},
|
|
246
|
+
})));
|
|
247
|
+
}
|
|
248
|
+
export function normalizeMessageTextContent(content) {
|
|
249
|
+
if (typeof content === "string") {
|
|
250
|
+
return content;
|
|
251
|
+
}
|
|
252
|
+
if (!Array.isArray(content)) {
|
|
253
|
+
return "";
|
|
254
|
+
}
|
|
255
|
+
return content.map((entry) => {
|
|
256
|
+
if (typeof entry === "string") {
|
|
257
|
+
return entry;
|
|
258
|
+
}
|
|
259
|
+
if (entry && typeof entry === "object" && "text" in entry && typeof entry.text === "string") {
|
|
260
|
+
return entry.text;
|
|
261
|
+
}
|
|
262
|
+
return "";
|
|
263
|
+
}).filter(Boolean).join("\n");
|
|
264
|
+
}
|
|
265
|
+
export function parseOpenAiToolCallsFromChatResponse(responseBody) {
|
|
266
|
+
try {
|
|
267
|
+
const parsed = JSON.parse(responseBody);
|
|
268
|
+
const firstChoice = parsed.choices?.[0]?.message;
|
|
269
|
+
const toolCalls = Array.isArray(firstChoice?.tool_calls)
|
|
270
|
+
? firstChoice.tool_calls.filter((entry) => entry?.type === "function" && typeof entry.function?.name === "string")
|
|
271
|
+
: [];
|
|
272
|
+
return {
|
|
273
|
+
toolCalls,
|
|
274
|
+
responseText: normalizeMessageTextContent(firstChoice?.content),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
catch {
|
|
278
|
+
return { toolCalls: [], responseText: "" };
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
export function buildAssistantToolCallMessage(toolCalls) {
|
|
282
|
+
return {
|
|
283
|
+
role: "assistant",
|
|
284
|
+
content: "",
|
|
285
|
+
tool_calls: toolCalls,
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
export function buildToolResultMessage(callId, result) {
|
|
289
|
+
return {
|
|
290
|
+
role: "tool",
|
|
291
|
+
tool_call_id: callId,
|
|
292
|
+
content: JSON.stringify(result.ok ? { ok: true, payload: result.payload } : { ok: false, error: result.error ?? "Tool invoke failed" }),
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
export function cleanToolSchemaForGemini(schema) {
|
|
296
|
+
return cleanSchemaForGemini(schema);
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=tool-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-schema.js","sourceRoot":"","sources":["../../src/orchestration/tool-schema.ts"],"names":[],"mappings":"AA4BA,SAAS,iBAAiB,CAAC,MAAe;IACxC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,MAAM,GAAG,MAAiC,CAAC;IACjD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IACD,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;QACtB,OAAO,CAAC,MA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O;QACL,IAAI,EAAE,MAAM;QACZ,YAAY,EAAE,MAAM;QACpB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,oBAAoB,EAAE,CAAC;KACxI,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,MAA+B;IACtE,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type TranscriptMessageLike = {
|
|
2
|
+
role?: unknown;
|
|
3
|
+
content?: unknown;
|
|
4
|
+
stopReason?: unknown;
|
|
5
|
+
toolCallId?: unknown;
|
|
6
|
+
toolUseId?: unknown;
|
|
7
|
+
toolName?: unknown;
|
|
8
|
+
details?: unknown;
|
|
9
|
+
isError?: unknown;
|
|
10
|
+
timestamp?: unknown;
|
|
11
|
+
};
|
|
12
|
+
export type TranscriptToolCallLike = {
|
|
13
|
+
id: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ToolCallInputRepairReport<TMessage extends TranscriptMessageLike> = {
|
|
17
|
+
messages: TMessage[];
|
|
18
|
+
droppedToolCalls: number;
|
|
19
|
+
droppedAssistantMessages: number;
|
|
20
|
+
};
|
|
21
|
+
export type ToolUseRepairReport<TMessage extends TranscriptMessageLike> = {
|
|
22
|
+
messages: TMessage[];
|
|
23
|
+
added: TMessage[];
|
|
24
|
+
droppedDuplicateCount: number;
|
|
25
|
+
droppedOrphanCount: number;
|
|
26
|
+
moved: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type ToolCallInputRepairOptions = {
|
|
29
|
+
allowedToolNames?: Iterable<string>;
|
|
30
|
+
};
|
|
31
|
+
export type ToolUseRepairOptions<TMessage extends TranscriptMessageLike> = {
|
|
32
|
+
createMissingToolResult?: (params: {
|
|
33
|
+
toolCallId: string;
|
|
34
|
+
toolName?: string;
|
|
35
|
+
}) => TMessage;
|
|
36
|
+
};
|
|
37
|
+
export declare function stripToolResultDetails<TMessage extends TranscriptMessageLike>(messages: readonly TMessage[]): TMessage[];
|
|
38
|
+
export declare function repairToolCallInputs<TMessage extends TranscriptMessageLike>(messages: readonly TMessage[], options?: ToolCallInputRepairOptions): ToolCallInputRepairReport<TMessage>;
|
|
39
|
+
export declare function sanitizeToolCallInputs<TMessage extends TranscriptMessageLike>(messages: readonly TMessage[], options?: ToolCallInputRepairOptions): TMessage[];
|
|
40
|
+
export declare function repairToolUseResultPairing<TMessage extends TranscriptMessageLike>(messages: readonly TMessage[], options?: ToolUseRepairOptions<TMessage>): ToolUseRepairReport<TMessage>;
|
|
41
|
+
export declare function sanitizeToolUseResultPairing<TMessage extends TranscriptMessageLike>(messages: readonly TMessage[], options?: ToolUseRepairOptions<TMessage>): TMessage[];
|
|
42
|
+
export declare function stripTransientErrorMessages<TMessage extends TranscriptMessageLike>(messages: readonly TMessage[]): TMessage[];
|
|
43
|
+
//# sourceMappingURL=transcript-repair.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-repair.d.ts","sourceRoot":"","sources":["../../src/orchestration/transcript-repair.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CA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