
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@kuuzuki/plugin
Advanced tools
Plugin system for kuuzuki - AI-powered terminal assistant.
Version: 0.1.34
The @kuuzuki/plugin package provides the core interfaces and types for developing kuuzuki plugins. Plugins can extend kuuzuki's functionality by hooking into various system events and operations.
npm install @kuuzuki/plugin
Create a simple plugin:
import { definePlugin } from '@kuuzuki/plugin';
export const MyPlugin = definePlugin(
{
name: 'my-plugin',
version: '1.0.0',
description: 'My awesome kuuzuki plugin',
author: 'Your Name',
},
async ({ app, client, $ }) => {
console.log(`Plugin initialized for ${app.path.root}`);
return {
// Hook into chat messages
'chat.message': async (_input, output) => {
console.log(`New message: ${output.message.content}`);
},
// Hook into tool executions
'tool.execute.after': async (input, output) => {
console.log(`Tool ${input.tool} completed: ${output.title}`);
},
};
}
);
event - Global event hook, receives all system eventschat.message - Called when new chat messages are receivedchat.params - Modify LLM parameters before generationpermission.ask - Custom permission logictool.execute.before - Modify tool arguments before executiontool.execute.after - Process tool results after execution'chat.params': async (input, output) => {
// Increase temperature for creative tasks
if (input.message.content.includes('creative')) {
output.temperature = 0.9;
}
}
'permission.ask': async (input, output) => {
// Auto-deny dangerous commands
if (input.pattern?.includes('rm -rf')) {
output.status = 'deny';
}
}
'tool.execute.after': async (input, output) => {
// Log all bash commands
if (input.tool === 'bash') {
console.log(`Executed: ${output.title}`);
}
}
When your plugin is initialized, it receives:
interface PluginInput {
client: KuuzukiClient; // API client for kuuzuki server
app: App; // App context and paths
$: typeof $; // Bun shell utility
}
interface App {
hostname: string;
git: boolean;
path: {
config: string; // Config directory
data: string; // Data directory
root: string; // Project root
cwd: string; // Current working directory
state: string; // State directory
};
time: {
initialized?: number;
};
}
interface UserMessage {
id: string;
role: "user";
content: string;
sessionID: string;
time: {
created: number;
};
}
interface Permission {
id: string;
type: string;
pattern?: string;
status: "ask" | "allow" | "deny";
metadata?: Record<string, any>;
}
The package includes several example plugins:
Logs all system events and tool executions:
import { ExamplePlugins } from '@kuuzuki/plugin/src/example';
const { LoggerPlugin } = ExamplePlugins;
Tracks and audits all permission requests:
const { PermissionAuditPlugin } = ExamplePlugins;
Dynamically adjusts chat parameters based on content:
const { ChatEnhancementPlugin } = ExamplePlugins;
The plugin system provides specific error types:
import { PluginError, PluginLoadError, PluginExecutionError } from '@kuuzuki/plugin';
try {
// Plugin code
} catch (error) {
if (error instanceof PluginError) {
console.error(`Plugin ${error.pluginName} failed: ${error.message}`);
}
}
Always provide comprehensive metadata:
definePlugin({
name: 'my-plugin',
version: '1.0.0',
description: 'Clear description of what your plugin does',
author: 'Your Name',
homepage: 'https://github.com/yourname/kuuzuki-plugin-name',
keywords: ['kuuzuki', 'plugin', 'your-domain'],
}, /* ... */);
'tool.execute.after': async (input, output) => {
try {
// Your plugin logic
} catch (error) {
console.error(`Plugin error in ${input.tool}:`, error);
// Don't throw - let kuuzuki continue
}
}
Only implement hooks you actually need:
// Good - only hooks you use
return {
'chat.message': async (input, output) => { /* ... */ },
};
// Avoid - empty hooks add overhead
return {
'chat.message': async (input, output) => { /* ... */ },
'tool.execute.before': async () => {}, // Empty hook
};
Avoid heavy operations in frequently called hooks:
// Good - lightweight logging
'chat.message': async (input, output) => {
console.log(`Message: ${output.message.id}`);
}
// Avoid - heavy processing on every message
'chat.message': async (input, output) => {
await heavyDatabaseOperation(output.message);
}
packages/kuuzuki-pluginnpm run buildnpm publishPlugins are loaded by kuuzuki automatically when:
kuuzuki-plugin- prefixSee the main kuuzuki documentation for plugin installation and configuration.
We welcome plugin contributions! Whether it's:
See the main kuuzuki repository for contribution guidelines.
MIT
Part of the kuuzuki ecosystem - AI-powered terminal assistant.
FAQs
Plugin system for kuuzuki - AI-powered terminal assistant
We found that @kuuzuki/plugin 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.