diff options
| author | Adam Malczewski <[email protected]> | 2026-05-28 22:51:47 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-05-28 22:51:47 +0900 |
| commit | d6609efd4e14101e77fb35a98ce597a32816862d (patch) | |
| tree | 09ea404ce0a780ca6b8c380fdd93ad1ae9960986 /packages/core/src/index.ts | |
| parent | 2eeabc95b78f6624c187e1e3892f9413266b4b9a (diff) | |
| download | dispatch-d6609efd4e14101e77fb35a98ce597a32816862d.tar.gz dispatch-d6609efd4e14101e77fb35a98ce597a32816862d.zip | |
fix(core): normalize tool schemas for Anthropic, add toolChoice=auto; feat(summon): agent definition support; docs: cc/ research findings
- registry.ts: add normalizeForAnthropic() to strip , additionalProperties, default, nullable from zodToJsonSchema output so Anthropic doesn't silently reject tool definitions
- agent.ts: add toolChoice=auto for Claude OAuth to prevent Opus thinking forever without calling tools
- summon.ts: add agentSlug parameter, build agents catalog in description, add toAvailableAgents helper
- agent-manager.ts: wire agent definition loading into spawnChildAgent, agent model fallback
- loader.ts: export loadAgent, expandAgentToolNames, getAgentDirPaths; add getAgentDirPaths for permission gate
- agent.ts: auto-allow read-only tools in agent definition directories
- packaging/PKGBUILD: exclude ARM64 prebuilds from x86_64 package
- cc/: research findings on Claude Opus tool calling issues
- tests: loader tests, summon tool tests
Diffstat (limited to 'packages/core/src/index.ts')
| -rw-r--r-- | packages/core/src/index.ts | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 1453a01..74cb159 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -2,7 +2,17 @@ // Agent & LLM export { Agent } from "./agent/agent.js"; -export { deleteAgent, getAgentDirs, loadAgents, saveAgent } from "./agents/index.js"; +export { + deleteAgent, + expandAgentToolNames, + GLOBAL_AGENTS_DIR, + getAgentDirPaths, + getAgentDirs, + getProjectAgentsDir, + loadAgent, + loadAgents, + saveAgent, +} from "./agents/index.js"; // Chunk helpers export { appendEventToChunks, @@ -61,7 +71,12 @@ export { createToolRegistry } from "./tools/registry.js"; export { createRetrieveTool, type RetrieveCallbacks } from "./tools/retrieve.js"; export { BackgroundShellStore, createRunShellTool } from "./tools/run-shell.js"; export { analyzeCommand } from "./tools/shell-analyze.js"; -export { createSummonTool, type SummonCallbacks } from "./tools/summon.js"; +export { + type AvailableAgent, + createSummonTool, + type SummonCallbacks, + toAvailableAgents, +} from "./tools/summon.js"; export { createTaskListTool, TaskList } from "./tools/task-list.js"; export { clearSpillForTab } from "./tools/truncate.js"; export { createWebSearchTool } from "./tools/web-search.js"; |
