mirror of
https://github.com/domfelipe/pokebuddy.git
synced 2026-08-07 05:56:50 +00:00
Initial commit: pokebuddy_cli
This commit is contained in:
commit
d58df9bd10
47 changed files with 1684 additions and 0 deletions
34
docs/PLUGIN_API.md
Normal file
34
docs/PLUGIN_API.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Plugin API Draft
|
||||
|
||||
The plugin API is planned for a future release. This document is a draft.
|
||||
|
||||
## Goals
|
||||
|
||||
Plugins should be able to:
|
||||
|
||||
- listen to PokeBuddy events;
|
||||
- add reactions;
|
||||
- add custom commands;
|
||||
- create companion packs;
|
||||
- integrate with Git hooks, CI, editors and terminals.
|
||||
|
||||
## Draft shape
|
||||
|
||||
```js
|
||||
export default {
|
||||
name: 'my-plugin',
|
||||
version: '0.1.0',
|
||||
onEvent(event, context) {
|
||||
if (event.type === 'commit') {
|
||||
return context.say('Nice commit. Tiny goblin approved.');
|
||||
}
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## Safety rules
|
||||
|
||||
- Plugins must be explicit.
|
||||
- No hidden network calls.
|
||||
- No arbitrary shell execution by default.
|
||||
- Plugin permissions should be visible to users.
|
||||
Loading…
Add table
Add a link
Reference in a new issue