Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

shell-tool.ts

21 lines676 Bytes

1import { shellTool as baseShellTool } from '@tanstack/openai-base'
2import type { ProviderTool } from '@tanstack/ai'
3import type { ShellToolFactoryConfig } from '@tanstack/openai-base'
4​
5export {
6 type ShellToolConfig,
7 type ShellToolFactoryConfig,
8 convertShellToolToAdapterFormat,
9} from '@tanstack/openai-base'
10​
11export type OpenAIShellTool = ProviderTool<'openai', 'shell'>
12​
13/**
14 * Creates a standard Tool from ShellToolConfig parameters, branded as an OpenAI
15 * provider tool. Pass `environment` to attach a container + skills.
16 */
17export function shellTool(
18 config: ShellToolFactoryConfig = {},
19): OpenAIShellTool {
20 return baseShellTool(config) as OpenAIShellTool