Download packages/agent-core-v2/src/agent/tools/mainAgentOnly.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 614 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/tools/mainAgentOnly.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/agent/tools/mainAgentOnly.ts
-
curl -L -o mainAgentOnly.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/tools/mainAgentOnly.ts
614 Bytes
| import type { ToolExecution } from '#/tool/toolContract'; | |
| import type { IAgentScopeContext } from '#/agent/scopeContext/scopeContext'; | |
| import { MAIN_AGENT_ID } from '#/session/agentLifecycle/agentLifecycle'; | |
| export const CRON_MAIN_AGENT_ONLY = 'Cron tools are only supported by the main agent.'; | |
| export const GOAL_MAIN_AGENT_ONLY = 'Goal tools are only supported by the main agent.'; | |
| export function mainAgentOnlyExecution( | |
| scopeContext: IAgentScopeContext, | |
| output: string, | |
| ): ToolExecution | undefined { | |
| if (scopeContext.agentId === MAIN_AGENT_ID) return undefined; | |
| return { isError: true, output }; | |
| } | |