Download packages/agent-core-v2/src/agent/toolSelect/toolSelect.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/toolSelect/toolSelect.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/agent/toolSelect/toolSelect.ts
-
curl -L -o toolSelect.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/toolSelect/toolSelect.ts
1.15 kB
| import { createDecorator, type ServiceIdentifier } from '#/_base/di/instantiation'; | |
| import type { ContextMessage } from '#/agent/contextMemory/types'; | |
| import type { ToolDescription as Tool } from '#human/llm/message'; | |
| import type { ToolInfo } from '#/tool/toolContract'; | |
| export const SELECT_TOOLS_TOOL_NAME = 'select_tools'; | |
| export interface ShapedToolEntry extends ToolInfo { | |
| readonly deferred?: true; | |
| } | |
| export interface LoadToolsResult { | |
| readonly toLoad: readonly string[]; | |
| readonly alreadyAvailable: readonly string[]; | |
| readonly unknown: readonly string[]; | |
| } | |
| export interface IAgentToolSelectService { | |
| readonly _serviceBrand: undefined; | |
| enabled(): boolean; | |
| shapeTools(entries: readonly ToolInfo[]): readonly ShapedToolEntry[]; | |
| shapeHistory(messages: readonly ContextMessage[]): readonly ContextMessage[]; | |
| load(names: readonly string[]): LoadToolsResult; | |
| drainPendingToolSchemas(): readonly Tool[] | undefined; | |
| loadableToolsAnnouncement(): string | undefined; | |
| } | |
| export const IAgentToolSelectService: ServiceIdentifier<IAgentToolSelectService> = | |
| createDecorator<IAgentToolSelectService>('agentToolSelectService'); | |