
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@openpets/beeper
Advanced tools
Access and search messages across all your messaging platforms (WhatsApp, Telegram, Discord, Slack, etc.) through Beeper Desktop
A minimal template for creating OpenCode plugins. Copy this folder and customize it to build your own plugin.
# From pets directory
cp -r _TEMPLATE_ my-plugin
cd my-plugin
Edit these files:
package.json:
name to openpets/my-plugindescriptionenvVariablesqueriesindex.ts:
TemplatePlugin to MyPlugintools arrayexecute functionsopencode.json:
npm install
npm run quickstart
export const MyPlugin = async () => {
const tools: ToolDefinition[] = [
{
name: "my-tool",
description: "What this tool does",
schema: z.object({
param: z.string().describe("Parameter description")
}),
execute: async (args) => {
// Your logic here
return JSON.stringify({
success: true,
data: "result"
})
}
}
]
return createPlugin(tools)
}
Just add more tool definitions to the array:
const tools: ToolDefinition[] = [
{
name: "tool-one",
description: "First tool",
schema: z.object({ /* ... */ }),
execute: async (args) => { /* ... */ }
},
{
name: "tool-two",
description: "Second tool",
schema: z.object({ /* ... */ }),
execute: async (args) => { /* ... */ }
}
]
Import utilities from @/utils/:
// Example: Using Google Maps
const { GoogleMapsAPI } = await import("@/utils/google-maps")
const maps = new GoogleMapsAPI({ apiKey: process.env.GOOGLE_MAPS_API_KEY })
const result = await maps.geocode("New York")
// Example: Using FAL AI
const { createFalClient } = await import("@/utils/fal")
const fal = createFalClient()
Add to package.json:
{
"envVariables": {
"required": [
{
"name": "MY_API_KEY",
"description": "API key for my service",
"provider": "My Service",
"priority": 1
}
],
"optional": [
{
"name": "MY_CONFIG",
"description": "Optional configuration",
"provider": "Configuration",
"priority": 2
}
]
}
}
Access in code:
const apiKey = process.env.MY_API_KEY
Define your parameters with type safety:
schema: z.object({
// String
name: z.string().describe("User name"),
// Optional string with default
greeting: z.string().optional().default("Hello").describe("Greeting"),
// Number
age: z.number().describe("User age"),
// Enum
type: z.enum(["user", "admin"]).describe("User type"),
// Boolean
active: z.boolean().describe("Is active"),
// Array
tags: z.array(z.string()).describe("Tags list")
})
Always return JSON string:
// Success
return JSON.stringify({
success: true,
data: yourData,
message: "Operation completed"
})
// Error
return JSON.stringify({
success: false,
error: "Error message"
})
You now have everything you need to build your own plugin. Keep it simple and add complexity as needed.
For more examples, check out other plugins in the pets/ directory.
FAQs
Access and search messages across all your messaging platforms (WhatsApp, Telegram, Discord, Slack, etc.) through Beeper Desktop
The npm package @openpets/beeper receives a total of 0 weekly downloads. As such, @openpets/beeper popularity was classified as not popular.
We found that @openpets/beeper 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.