
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@webneat/ai-tools
Advanced tools
A library for creating AI agent tools with built-in Vercel AI SDK integration.
npm install @webneat/ai-tools
# or
pnpm add @webneat/ai-tools
import { z } from 'zod'
import { tool } from '@webneat/ai-tools'
// Define a simple tool
const greet = tool({
name: 'greet',
description: 'Greets a person by name',
input: z.object({ name: z.string() }),
output: z.object({ message: z.string() }),
execute: async (input) => ({ message: `Hello, ${input.name}!` }),
})
// Get AI SDK compatible tool
const ai_tool = greet.ai_sdk()
Tools can receive context for shared state or configuration:
import { z } from 'zod'
import { tool } from '@webneat/ai-tools'
type LogContext = { logs: string[] }
const log_message = tool<{ msg: string }, { logged: boolean }, LogContext>({
name: 'log',
description: 'Logs a message',
input: z.object({ msg: z.string() }),
output: z.object({ logged: z.boolean() }),
execute: async (input, context) => {
context.logs.push(input.msg)
return { logged: true }
},
})
// Create shared context
const context: LogContext = { logs: [] }
// Pass context when creating AI SDK tool
const ai_tool = log_message.ai_sdk(context)
Execute shell commands with permission control and process management:
import { shell, type ShellContext } from '@webneat/ai-tools'
const context: ShellContext = {
ask_permission: async (cmd) => true, // Implement your permission logic
processes: new Map(),
cwd: '/home/user',
env: { PATH: process.env.PATH },
}
const tools = {
start_process: shell.start_process.ai_sdk(context),
check_process: shell.check_process.ai_sdk(context),
kill_process: shell.kill_process.ai_sdk(context),
wait_for_process: shell.wait_for_process.ai_sdk(context),
list_processes: shell.list_processes.ai_sdk(context),
delete_process: shell.delete_process.ai_sdk(context),
write_stdin: shell.write_to_process_stdin.ai_sdk(context),
}
Get information about the execution environment:
import { context } from '@webneat/ai-tools'
const get_context_tool = context.get_context.ai_sdk()
tool(definition)Creates a tool factory from a definition.
Parameters:
name: Tool namedescription: Tool description for the AIinput: Zod schema for input validationoutput: Zod schema for output validationexecute: Async function (input, context) => Promise<Output>Returns:
ToolFactory with ai_sdk(context?) methodToolFactory.ai_sdk(context?)Returns an AI SDK compatible tool. Pass context if the tool requires it.
MIT
FAQs
Useful tools for AI agents.
The npm package @webneat/ai-tools receives a total of 25 weekly downloads. As such, @webneat/ai-tools popularity was classified as not popular.
We found that @webneat/ai-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.