Plugin Development
Extend Telnety with custom plugins. Plugins run in a sandboxed JavaScript runtime (Boa engine) with declarative permissions and manifest validation.
Plugin Structure
├─ manifest.json
├─ index.js
└─ README.md
Manifest
{
"name": "my-plugin",
"version": "1.0.0",
"description": "A custom plugin",
"author": "Your Name",
"permissions": [
"host:read",
"host:write",
"session:create",
"session:read"
],
"entry": "index.js",
"sandbox": true,
"min_version": "0.1.0"
}Permissions
host:read— Read host configurationshost:write— Create/modify hostssession:create— Open new connectionssession:read— Read session datavault:read— Access vault entries (requires user approval)
API
Plugins access Telnety functionality through the telnety global object:
// List all hosts
const hosts = telnety.hosts.list();
// Open a connection
telnety.sessions.connect(hostId);
// Log output
console.log("Plugin loaded successfully");