milaidy 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/README.md +538 -0
- package/dist/argv-CfSowvEA.js +63 -0
- package/dist/config-B-mboG4v.js +4 -0
- package/dist/eliza-CPJjgw-e.js +1491 -0
- package/dist/eliza.js +2192 -0
- package/dist/entry.js +232 -0
- package/dist/index.js +209 -0
- package/dist/links-BFKlWqSe.js +15 -0
- package/dist/paths-D_yh1DEJ.js +69 -0
- package/dist/plugins-cli-B7kSre2c.js +134 -0
- package/dist/program-6KwWwKKh.js +510 -0
- package/dist/register.agents-CPVmSjMG.js +17 -0
- package/dist/register.browser-B2ooXxNx.js +15 -0
- package/dist/register.channels-CMYQ6K6Y.js +42 -0
- package/dist/register.cron-D91lY1_Y.js +9 -0
- package/dist/register.devices-rU5I5L_y.js +13 -0
- package/dist/register.gateway-82SLAvw3.js +22 -0
- package/dist/register.hooks-B_XTBEkt.js +9 -0
- package/dist/register.logs-BgEGcPd8.js +10 -0
- package/dist/register.models-BJt9eVgZ.js +26 -0
- package/dist/register.nodes-B5xY1s8a.js +9 -0
- package/dist/register.skills-SFQqYIhg.js +10 -0
- package/dist/register.subclis-uF_AsbWR.js +187 -0
- package/dist/run-main-XODklzS-.js +56 -0
- package/dist/theme-DBvtuGeq.js +36 -0
- package/dist/utils-C1AUpp_V.js +42 -0
- package/dist/version-Cpn3yr5D.js +26 -0
- package/dist/workspace-Co3Wul2D.js +206 -0
- package/dist/workspace-DCA6MNVK.js +350 -0
- package/docs/.i18n/README.md +31 -0
- package/docs/.i18n/glossary.zh-CN.json +210 -0
- package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
- package/docs/CNAME +1 -0
- package/docs/automation/cron-jobs.md +468 -0
- package/docs/automation/cron-vs-heartbeat.md +254 -0
- package/docs/automation/gmail-pubsub.md +256 -0
- package/docs/automation/poll.md +69 -0
- package/docs/automation/webhook.md +163 -0
- package/docs/bedrock.md +176 -0
- package/docs/brave-search.md +41 -0
- package/docs/broadcast-groups.md +442 -0
- package/docs/cli/acp.md +170 -0
- package/docs/cli/agent.md +24 -0
- package/docs/cli/agents.md +75 -0
- package/docs/cli/approvals.md +50 -0
- package/docs/cli/browser.md +107 -0
- package/docs/cli/channels.md +79 -0
- package/docs/cli/config.md +50 -0
- package/docs/cli/configure.md +33 -0
- package/docs/cli/cron.md +42 -0
- package/docs/cli/dashboard.md +16 -0
- package/docs/cli/devices.md +67 -0
- package/docs/cli/directory.md +63 -0
- package/docs/cli/dns.md +23 -0
- package/docs/cli/docs.md +15 -0
- package/docs/cli/doctor.md +41 -0
- package/docs/cli/gateway.md +199 -0
- package/docs/cli/health.md +21 -0
- package/docs/cli/hooks.md +291 -0
- package/docs/cli/index.md +1029 -0
- package/docs/cli/logs.md +24 -0
- package/docs/cli/memory.md +45 -0
- package/docs/cli/message.md +239 -0
- package/docs/cli/models.md +79 -0
- package/docs/cli/node.md +112 -0
- package/docs/cli/nodes.md +73 -0
- package/docs/cli/onboard.md +29 -0
- package/docs/cli/pairing.md +21 -0
- package/docs/cli/plugins.md +62 -0
- package/docs/cli/reset.md +17 -0
- package/docs/cli/sandbox.md +152 -0
- package/docs/cli/security.md +26 -0
- package/docs/cli/sessions.md +16 -0
- package/docs/cli/setup.md +29 -0
- package/docs/cli/skills.md +26 -0
- package/docs/cli/status.md +26 -0
- package/docs/cli/system.md +60 -0
- package/docs/cli/tui.md +23 -0
- package/docs/cli/uninstall.md +17 -0
- package/docs/cli/update.md +98 -0
- package/docs/cli/voicecall.md +34 -0
- package/docs/cli/webhooks.md +25 -0
- package/docs/concepts/agent-loop.md +146 -0
- package/docs/concepts/agent-workspace.md +229 -0
- package/docs/concepts/agent.md +122 -0
- package/docs/concepts/architecture.md +129 -0
- package/docs/concepts/channel-routing.md +114 -0
- package/docs/concepts/compaction.md +61 -0
- package/docs/concepts/context.md +159 -0
- package/docs/concepts/features.md +53 -0
- package/docs/concepts/group-messages.md +84 -0
- package/docs/concepts/groups.md +373 -0
- package/docs/concepts/markdown-formatting.md +130 -0
- package/docs/concepts/memory.md +546 -0
- package/docs/concepts/messages.md +154 -0
- package/docs/concepts/model-failover.md +149 -0
- package/docs/concepts/model-providers.md +315 -0
- package/docs/concepts/models.md +208 -0
- package/docs/concepts/multi-agent.md +376 -0
- package/docs/concepts/oauth.md +145 -0
- package/docs/concepts/plugins.md +454 -0
- package/docs/concepts/presence.md +102 -0
- package/docs/concepts/queue.md +89 -0
- package/docs/concepts/retry.md +69 -0
- package/docs/concepts/secrets.md +300 -0
- package/docs/concepts/session-pruning.md +122 -0
- package/docs/concepts/session-tool.md +193 -0
- package/docs/concepts/session.md +188 -0
- package/docs/concepts/sessions.md +10 -0
- package/docs/concepts/skills.md +392 -0
- package/docs/concepts/streaming.md +135 -0
- package/docs/concepts/system-prompt.md +114 -0
- package/docs/concepts/timezone.md +91 -0
- package/docs/concepts/typebox.md +289 -0
- package/docs/concepts/typing-indicators.md +68 -0
- package/docs/concepts/usage-tracking.md +35 -0
- package/docs/custom.css +4 -0
- package/docs/date-time.md +128 -0
- package/docs/debugging.md +162 -0
- package/docs/docs.json +1599 -0
- package/docs/environment.md +81 -0
- package/docs/hooks.md +876 -0
- package/docs/index.md +179 -0
- package/docs/install/ansible.md +208 -0
- package/docs/install/bun.md +59 -0
- package/docs/install/development-channels.md +75 -0
- package/docs/install/docker.md +567 -0
- package/docs/install/index.md +185 -0
- package/docs/install/installer.md +123 -0
- package/docs/install/migrating.md +192 -0
- package/docs/install/nix.md +96 -0
- package/docs/install/node.md +78 -0
- package/docs/install/uninstall.md +128 -0
- package/docs/install/updating.md +228 -0
- package/docs/logging.md +350 -0
- package/docs/multi-agent-sandbox-tools.md +395 -0
- package/docs/network.md +54 -0
- package/docs/nodes/audio.md +114 -0
- package/docs/nodes/camera.md +156 -0
- package/docs/nodes/images.md +72 -0
- package/docs/nodes/index.md +341 -0
- package/docs/nodes/location-command.md +113 -0
- package/docs/nodes/media-understanding.md +379 -0
- package/docs/nodes/talk.md +90 -0
- package/docs/nodes/voicewake.md +65 -0
- package/docs/northflank.mdx +53 -0
- package/docs/perplexity.md +80 -0
- package/docs/platforms/android.md +129 -0
- package/docs/platforms/digitalocean.md +262 -0
- package/docs/platforms/exe-dev.md +125 -0
- package/docs/platforms/fly.md +486 -0
- package/docs/platforms/gcp.md +503 -0
- package/docs/platforms/hetzner.md +330 -0
- package/docs/platforms/index.md +53 -0
- package/docs/platforms/ios.md +106 -0
- package/docs/platforms/linux.md +94 -0
- package/docs/platforms/mac/bundled-gateway.md +73 -0
- package/docs/platforms/mac/canvas.md +125 -0
- package/docs/platforms/mac/child-process.md +69 -0
- package/docs/platforms/mac/dev-setup.md +102 -0
- package/docs/platforms/mac/health.md +34 -0
- package/docs/platforms/mac/icon.md +31 -0
- package/docs/platforms/mac/logging.md +57 -0
- package/docs/platforms/mac/menu-bar.md +81 -0
- package/docs/platforms/mac/peekaboo.md +65 -0
- package/docs/platforms/mac/permissions.md +44 -0
- package/docs/platforms/mac/release.md +85 -0
- package/docs/platforms/mac/remote.md +83 -0
- package/docs/platforms/mac/signing.md +47 -0
- package/docs/platforms/mac/skills.md +33 -0
- package/docs/platforms/mac/voice-overlay.md +60 -0
- package/docs/platforms/mac/voicewake.md +67 -0
- package/docs/platforms/mac/webchat.md +41 -0
- package/docs/platforms/mac/xpc.md +61 -0
- package/docs/platforms/macos-vm.md +281 -0
- package/docs/platforms/macos.md +203 -0
- package/docs/platforms/oracle.md +303 -0
- package/docs/platforms/raspberry-pi.md +358 -0
- package/docs/platforms/windows.md +159 -0
- package/docs/plugin.md +651 -0
- package/docs/plugins/agent-tools.md +99 -0
- package/docs/plugins/manifest.md +71 -0
- package/docs/plugins/voice-call.md +273 -0
- package/docs/plugins/zalouser.md +70 -0
- package/docs/providers/anthropic.md +152 -0
- package/docs/providers/claude-max-api-proxy.md +148 -0
- package/docs/providers/cloudflare-ai-gateway.md +71 -0
- package/docs/providers/deepgram.md +93 -0
- package/docs/providers/glm.md +33 -0
- package/docs/providers/index.md +63 -0
- package/docs/providers/minimax.md +208 -0
- package/docs/providers/models.md +51 -0
- package/docs/providers/moonshot.md +142 -0
- package/docs/providers/ollama.md +223 -0
- package/docs/providers/openai.md +62 -0
- package/docs/providers/opencode.md +36 -0
- package/docs/providers/openrouter.md +37 -0
- package/docs/providers/qwen.md +53 -0
- package/docs/providers/synthetic.md +99 -0
- package/docs/providers/venice.md +267 -0
- package/docs/providers/vercel-ai-gateway.md +50 -0
- package/docs/providers/xiaomi.md +64 -0
- package/docs/providers/zai.md +36 -0
- package/docs/railway.mdx +99 -0
- package/docs/reference/templates/AGENTS.md +9 -0
- package/docs/reference/templates/BOOTSTRAP.md +3 -0
- package/docs/reference/templates/HEARTBEAT.md +3 -0
- package/docs/reference/templates/IDENTITY.md +3 -0
- package/docs/reference/templates/TOOLS.md +3 -0
- package/docs/reference/templates/USER.md +3 -0
- package/docs/render.mdx +165 -0
- package/docs/start/docs-directory.md +63 -0
- package/docs/start/getting-started.md +212 -0
- package/docs/start/milaidy.md +247 -0
- package/docs/start/onboarding.md +258 -0
- package/docs/start/pairing.md +86 -0
- package/docs/start/quickstart.md +81 -0
- package/docs/start/setup.md +149 -0
- package/docs/start/showcase.md +416 -0
- package/docs/start/wizard.md +418 -0
- package/docs/testing.md +368 -0
- package/docs/token-use.md +112 -0
- package/docs/tools/agent-send.md +53 -0
- package/docs/tools/apply-patch.md +50 -0
- package/docs/tools/browser-linux-troubleshooting.md +139 -0
- package/docs/tools/browser-login.md +68 -0
- package/docs/tools/browser.md +576 -0
- package/docs/tools/chrome-extension.md +178 -0
- package/docs/tools/clawhub.md +257 -0
- package/docs/tools/creating-skills.md +54 -0
- package/docs/tools/elevated.md +57 -0
- package/docs/tools/exec-approvals.md +246 -0
- package/docs/tools/exec.md +179 -0
- package/docs/tools/firecrawl.md +61 -0
- package/docs/tools/index.md +508 -0
- package/docs/tools/llm-task.md +115 -0
- package/docs/tools/reactions.md +22 -0
- package/docs/tools/skills-config.md +76 -0
- package/docs/tools/skills.md +300 -0
- package/docs/tools/slash-commands.md +196 -0
- package/docs/tools/subagents.md +151 -0
- package/docs/tools/thinking.md +73 -0
- package/docs/tools/web.md +261 -0
- package/docs/tui.md +159 -0
- package/docs/vps.md +43 -0
- package/docs/web/control-ui.md +221 -0
- package/docs/web/dashboard.md +46 -0
- package/docs/web/index.md +116 -0
- package/docs/web/webchat.md +49 -0
- package/milaidy.mjs +14 -0
- package/package.json +271 -0
- package/skills/.cache/catalog.json +88519 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "ElizaOS plugin system: discovery, auto-enable, manifests, and configuration"
|
|
3
|
+
read_when:
|
|
4
|
+
- Installing or configuring plugins
|
|
5
|
+
- Building a custom plugin
|
|
6
|
+
- Understanding plugin auto-enable behavior
|
|
7
|
+
title: "Plugins"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Plugins
|
|
11
|
+
|
|
12
|
+
Milaidy uses the ElizaOS plugin system for extensibility. Plugins provide
|
|
13
|
+
channels, providers, actions, evaluators, and services that extend agent
|
|
14
|
+
capabilities.
|
|
15
|
+
|
|
16
|
+
## Plugin Discovery
|
|
17
|
+
|
|
18
|
+
Plugins are discovered from multiple locations:
|
|
19
|
+
|
|
20
|
+
| Origin | Location | Priority |
|
|
21
|
+
|--------|----------|----------|
|
|
22
|
+
| `bundled` | Shipped with ElizaOS | Lowest |
|
|
23
|
+
| `global` | `~/.milaidy/plugins/` | Medium |
|
|
24
|
+
| `workspace` | `<workspace>/plugins/` | High |
|
|
25
|
+
| `config` | Explicit in `character.json` | Highest |
|
|
26
|
+
| `npm` | Installed via npm | Varies |
|
|
27
|
+
|
|
28
|
+
Install plugins via CLI:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
milaidy plugins install @elizaos/plugin-discord
|
|
32
|
+
milaidy plugins install @elizaos/plugin-telegram
|
|
33
|
+
milaidy plugins install ./my-local-plugin
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Plugin Manifest (`elizaos.plugin.json`)
|
|
37
|
+
|
|
38
|
+
Every plugin must ship a manifest file in the plugin root:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"id": "my-plugin",
|
|
43
|
+
"name": "My Plugin",
|
|
44
|
+
"description": "A custom plugin",
|
|
45
|
+
"version": "1.0.0",
|
|
46
|
+
"configSchema": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"properties": {
|
|
50
|
+
"apiKey": { "type": "string" },
|
|
51
|
+
"endpoint": { "type": "string" }
|
|
52
|
+
},
|
|
53
|
+
"required": ["apiKey"]
|
|
54
|
+
},
|
|
55
|
+
"channels": ["my-channel"],
|
|
56
|
+
"providers": ["my-provider"],
|
|
57
|
+
"skills": ["skills/my-skill"],
|
|
58
|
+
"requiredSecrets": ["MY_PLUGIN_API_KEY"],
|
|
59
|
+
"optionalSecrets": ["MY_PLUGIN_OPTIONAL_KEY"]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Required Fields
|
|
64
|
+
|
|
65
|
+
| Field | Type | Description |
|
|
66
|
+
|-------|------|-------------|
|
|
67
|
+
| `id` | string | Unique plugin identifier |
|
|
68
|
+
| `configSchema` | object | JSON Schema for plugin config |
|
|
69
|
+
|
|
70
|
+
### Optional Fields
|
|
71
|
+
|
|
72
|
+
| Field | Type | Description |
|
|
73
|
+
|-------|------|-------------|
|
|
74
|
+
| `name` | string | Display name |
|
|
75
|
+
| `description` | string | Short summary |
|
|
76
|
+
| `version` | string | Semver version |
|
|
77
|
+
| `kind` | string | Plugin kind (`memory`, `channel`, `provider`, `skill`, `database`) |
|
|
78
|
+
| `channels` | string[] | Channel IDs provided |
|
|
79
|
+
| `providers` | string[] | Provider IDs provided |
|
|
80
|
+
| `skills` | string[] | Skill directories (relative paths) |
|
|
81
|
+
| `gatewayMethods` | string[] | Gateway RPC methods |
|
|
82
|
+
| `cliCommands` | string[] | CLI commands |
|
|
83
|
+
| `requiredSecrets` | string[] | Required API keys |
|
|
84
|
+
| `optionalSecrets` | string[] | Optional API keys |
|
|
85
|
+
| `dependencies` | string[] | Other plugin IDs required |
|
|
86
|
+
| `minElizaVersion` | string | Minimum ElizaOS version |
|
|
87
|
+
| `uiHints` | object | Config field UI hints |
|
|
88
|
+
|
|
89
|
+
## Auto-Enable Behavior
|
|
90
|
+
|
|
91
|
+
Plugins can auto-enable based on detected secrets:
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
// Plugin auto-enables when DISCORD_BOT_TOKEN is present
|
|
95
|
+
if (process.env.DISCORD_BOT_TOKEN) {
|
|
96
|
+
// Plugin is enabled
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Auto-Enable Rules
|
|
101
|
+
|
|
102
|
+
1. **Secret Detection** - If a plugin's `requiredSecrets` are all present, it auto-enables
|
|
103
|
+
2. **Character Config** - Explicit enable/disable in `character.json` overrides auto-enable
|
|
104
|
+
3. **Allow/Deny Lists** - Global plugin filtering via `plugins.allow` / `plugins.deny`
|
|
105
|
+
|
|
106
|
+
### Configuration Priority
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
character.json plugins → allow/deny lists → auto-enable → disabled
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Character Configuration
|
|
113
|
+
|
|
114
|
+
Configure plugins in your `character.json`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"name": "MyAgent",
|
|
119
|
+
"plugins": [
|
|
120
|
+
"@elizaos/plugin-discord",
|
|
121
|
+
"@elizaos/plugin-telegram",
|
|
122
|
+
"./my-local-plugin"
|
|
123
|
+
],
|
|
124
|
+
"settings": {
|
|
125
|
+
"plugins": {
|
|
126
|
+
"discord": {
|
|
127
|
+
"enabled": true,
|
|
128
|
+
"guildId": "123456789"
|
|
129
|
+
},
|
|
130
|
+
"telegram": {
|
|
131
|
+
"enabled": true,
|
|
132
|
+
"webhookMode": false
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Allow/Deny Lists
|
|
140
|
+
|
|
141
|
+
Control which plugins can load:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"settings": {
|
|
146
|
+
"plugins": {
|
|
147
|
+
"allow": ["@elizaos/plugin-discord", "@elizaos/plugin-telegram"],
|
|
148
|
+
"deny": ["@elizaos/plugin-dangerous"]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Rules:
|
|
155
|
+
- If `allow` is set, only listed plugins can load
|
|
156
|
+
- `deny` takes precedence over `allow`
|
|
157
|
+
- Patterns support glob matching
|
|
158
|
+
|
|
159
|
+
## Plugin Kinds
|
|
160
|
+
|
|
161
|
+
### Channel Plugins
|
|
162
|
+
|
|
163
|
+
Provide messaging channels:
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"id": "my-channel",
|
|
168
|
+
"kind": "channel",
|
|
169
|
+
"channels": ["my-channel"]
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Examples:
|
|
174
|
+
- `@elizaos/plugin-discord`
|
|
175
|
+
- `@elizaos/plugin-telegram`
|
|
176
|
+
- `@elizaos/plugin-slack`
|
|
177
|
+
- `@elizaos/plugin-whatsapp`
|
|
178
|
+
|
|
179
|
+
### Provider Plugins
|
|
180
|
+
|
|
181
|
+
Provide model or service providers:
|
|
182
|
+
|
|
183
|
+
```json
|
|
184
|
+
{
|
|
185
|
+
"id": "my-provider",
|
|
186
|
+
"kind": "provider",
|
|
187
|
+
"providers": ["my-provider"]
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Examples:
|
|
192
|
+
- `@elizaos/plugin-openai`
|
|
193
|
+
- `@elizaos/plugin-anthropic`
|
|
194
|
+
- `@elizaos/plugin-ollama`
|
|
195
|
+
|
|
196
|
+
### Memory Plugins
|
|
197
|
+
|
|
198
|
+
Provide memory/storage backends:
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"id": "my-memory",
|
|
203
|
+
"kind": "memory"
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Examples:
|
|
208
|
+
- `@elizaos/plugin-sqlite`
|
|
209
|
+
- `@elizaos/plugin-postgres`
|
|
210
|
+
|
|
211
|
+
### Skill Plugins
|
|
212
|
+
|
|
213
|
+
Provide agent skills:
|
|
214
|
+
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"id": "my-skills",
|
|
218
|
+
"kind": "skill",
|
|
219
|
+
"skills": ["skills/tool-a", "skills/tool-b"]
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Config Schema Validation
|
|
224
|
+
|
|
225
|
+
Plugin configuration is validated against the `configSchema`:
|
|
226
|
+
|
|
227
|
+
```json
|
|
228
|
+
{
|
|
229
|
+
"configSchema": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"additionalProperties": false,
|
|
232
|
+
"properties": {
|
|
233
|
+
"apiKey": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"description": "API key for the service"
|
|
236
|
+
},
|
|
237
|
+
"endpoint": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"format": "uri",
|
|
240
|
+
"default": "https://api.example.com"
|
|
241
|
+
},
|
|
242
|
+
"maxRetries": {
|
|
243
|
+
"type": "integer",
|
|
244
|
+
"minimum": 0,
|
|
245
|
+
"maximum": 10,
|
|
246
|
+
"default": 3
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"required": ["apiKey"]
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Validation Rules
|
|
255
|
+
|
|
256
|
+
- Unknown config keys are **errors** unless `additionalProperties: true`
|
|
257
|
+
- Missing required fields are **errors**
|
|
258
|
+
- Type mismatches are **errors**
|
|
259
|
+
- Invalid plugins block config validation
|
|
260
|
+
|
|
261
|
+
### Empty Schema
|
|
262
|
+
|
|
263
|
+
Plugins accepting no config must still provide a schema:
|
|
264
|
+
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"configSchema": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"additionalProperties": false
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## UI Hints
|
|
275
|
+
|
|
276
|
+
Provide hints for configuration UIs:
|
|
277
|
+
|
|
278
|
+
```json
|
|
279
|
+
{
|
|
280
|
+
"uiHints": {
|
|
281
|
+
"apiKey": {
|
|
282
|
+
"label": "API Key",
|
|
283
|
+
"help": "Get your API key from https://example.com/keys",
|
|
284
|
+
"sensitive": true,
|
|
285
|
+
"type": "password",
|
|
286
|
+
"placeholder": "sk-..."
|
|
287
|
+
},
|
|
288
|
+
"endpoint": {
|
|
289
|
+
"label": "API Endpoint",
|
|
290
|
+
"type": "text",
|
|
291
|
+
"advanced": true
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### UI Hint Fields
|
|
298
|
+
|
|
299
|
+
| Field | Type | Description |
|
|
300
|
+
|-------|------|-------------|
|
|
301
|
+
| `label` | string | Display label |
|
|
302
|
+
| `help` | string | Help text |
|
|
303
|
+
| `sensitive` | boolean | Mask in UI |
|
|
304
|
+
| `type` | string | `text`, `password`, `number`, `boolean`, `select`, `textarea` |
|
|
305
|
+
| `placeholder` | string | Placeholder text |
|
|
306
|
+
| `advanced` | boolean | Hide in basic view |
|
|
307
|
+
| `options` | array | Options for select fields |
|
|
308
|
+
|
|
309
|
+
## Plugin Development
|
|
310
|
+
|
|
311
|
+
### Basic Plugin Structure
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
my-plugin/
|
|
315
|
+
├── elizaos.plugin.json # Plugin manifest (required)
|
|
316
|
+
├── package.json # Node package config
|
|
317
|
+
├── src/
|
|
318
|
+
│ ├── index.ts # Main entry point
|
|
319
|
+
│ ├── actions/ # Plugin actions
|
|
320
|
+
│ ├── providers/ # Plugin providers
|
|
321
|
+
│ └── services/ # Plugin services
|
|
322
|
+
└── skills/ # Optional skill directories
|
|
323
|
+
└── my-skill/
|
|
324
|
+
└── SKILL.md
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Plugin Entry Point
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
// src/index.ts
|
|
331
|
+
import type { Plugin } from "@elizaos/core";
|
|
332
|
+
|
|
333
|
+
const myPlugin: Plugin = {
|
|
334
|
+
name: "my-plugin",
|
|
335
|
+
description: "My custom plugin",
|
|
336
|
+
actions: [
|
|
337
|
+
// ... action definitions
|
|
338
|
+
],
|
|
339
|
+
providers: [
|
|
340
|
+
// ... provider definitions
|
|
341
|
+
],
|
|
342
|
+
services: [
|
|
343
|
+
// ... service definitions
|
|
344
|
+
],
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
export default myPlugin;
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Registering Actions
|
|
351
|
+
|
|
352
|
+
```typescript
|
|
353
|
+
import { Action, ActionContext } from "@elizaos/core";
|
|
354
|
+
|
|
355
|
+
const myAction: Action = {
|
|
356
|
+
name: "my_action",
|
|
357
|
+
description: "Does something useful",
|
|
358
|
+
validate: async (runtime, message) => {
|
|
359
|
+
return true; // Validation logic
|
|
360
|
+
},
|
|
361
|
+
handler: async (runtime, message, state, options, callback) => {
|
|
362
|
+
// Action logic
|
|
363
|
+
callback({ text: "Done!" });
|
|
364
|
+
return true;
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
## Gateway Plugin
|
|
370
|
+
|
|
371
|
+
The Gateway plugin provides HTTP API endpoints:
|
|
372
|
+
|
|
373
|
+
```json
|
|
374
|
+
{
|
|
375
|
+
"id": "gateway",
|
|
376
|
+
"gatewayMethods": [
|
|
377
|
+
"gateway.status",
|
|
378
|
+
"gateway.restart",
|
|
379
|
+
"gateway.config"
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Configure via character settings:
|
|
385
|
+
|
|
386
|
+
```json
|
|
387
|
+
{
|
|
388
|
+
"settings": {
|
|
389
|
+
"gateway": {
|
|
390
|
+
"port": 18789,
|
|
391
|
+
"bind": "loopback",
|
|
392
|
+
"auth": { "mode": "token" }
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## CLI Commands
|
|
399
|
+
|
|
400
|
+
Manage plugins via CLI:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
# List installed plugins
|
|
404
|
+
milaidy plugins list
|
|
405
|
+
|
|
406
|
+
# Install a plugin
|
|
407
|
+
milaidy plugins install @elizaos/plugin-discord
|
|
408
|
+
|
|
409
|
+
# Remove a plugin
|
|
410
|
+
milaidy plugins remove @elizaos/plugin-discord
|
|
411
|
+
|
|
412
|
+
# Update plugins
|
|
413
|
+
milaidy plugins update
|
|
414
|
+
|
|
415
|
+
# Check plugin health
|
|
416
|
+
milaidy doctor --plugins
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
## Migration from `milaidy.plugin.json`
|
|
420
|
+
|
|
421
|
+
If migrating from legacy Milaidy plugins:
|
|
422
|
+
|
|
423
|
+
| Old | New |
|
|
424
|
+
|-----|-----|
|
|
425
|
+
| `milaidy.plugin.json` | `elizaos.plugin.json` |
|
|
426
|
+
| `channels.*.config` | `character.settings.plugins.*` |
|
|
427
|
+
| Plugin-specific config | Unified schema validation |
|
|
428
|
+
|
|
429
|
+
See [Migration: Plugins](/migration/plugins) for detailed steps.
|
|
430
|
+
|
|
431
|
+
## Troubleshooting
|
|
432
|
+
|
|
433
|
+
### "Plugin manifest not found"
|
|
434
|
+
|
|
435
|
+
Ensure `elizaos.plugin.json` exists in plugin root with required fields.
|
|
436
|
+
|
|
437
|
+
### "Config validation failed"
|
|
438
|
+
|
|
439
|
+
Check plugin config against the manifest's `configSchema`.
|
|
440
|
+
|
|
441
|
+
### "Plugin disabled despite secrets present"
|
|
442
|
+
|
|
443
|
+
Check `plugins.deny` list and explicit `enabled: false` in config.
|
|
444
|
+
|
|
445
|
+
### "Unknown channel"
|
|
446
|
+
|
|
447
|
+
The channel ID isn't declared in any loaded plugin manifest.
|
|
448
|
+
|
|
449
|
+
## Related Docs
|
|
450
|
+
|
|
451
|
+
- [Plugin Manifest](/plugins/manifest) - Detailed manifest reference
|
|
452
|
+
- [Migration: Plugins](/migration/plugins) - Migration guide
|
|
453
|
+
- [Skills](/concepts/skills) - Plugin-provided skills
|
|
454
|
+
- [Tools](/tools) - Available tools and actions
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "How Milaidy presence entries are produced, merged, and displayed"
|
|
3
|
+
read_when:
|
|
4
|
+
- Debugging the Instances tab
|
|
5
|
+
- Investigating duplicate or stale instance rows
|
|
6
|
+
- Changing gateway WS connect or system-event beacons
|
|
7
|
+
title: "Presence"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Presence
|
|
11
|
+
|
|
12
|
+
Milaidy “presence” is a lightweight, best‑effort view of:
|
|
13
|
+
|
|
14
|
+
- the **Gateway** itself, and
|
|
15
|
+
- **clients connected to the Gateway** (mac app, WebChat, CLI, etc.)
|
|
16
|
+
|
|
17
|
+
Presence is used primarily to render the macOS app’s **Instances** tab and to
|
|
18
|
+
provide quick operator visibility.
|
|
19
|
+
|
|
20
|
+
## Presence fields (what shows up)
|
|
21
|
+
|
|
22
|
+
Presence entries are structured objects with fields like:
|
|
23
|
+
|
|
24
|
+
- `instanceId` (optional but strongly recommended): stable client identity (usually `connect.client.instanceId`)
|
|
25
|
+
- `host`: human‑friendly host name
|
|
26
|
+
- `ip`: best‑effort IP address
|
|
27
|
+
- `version`: client version string
|
|
28
|
+
- `deviceFamily` / `modelIdentifier`: hardware hints
|
|
29
|
+
- `mode`: `ui`, `webchat`, `cli`, `backend`, `probe`, `test`, `node`, ...
|
|
30
|
+
- `lastInputSeconds`: “seconds since last user input” (if known)
|
|
31
|
+
- `reason`: `self`, `connect`, `node-connected`, `periodic`, ...
|
|
32
|
+
- `ts`: last update timestamp (ms since epoch)
|
|
33
|
+
|
|
34
|
+
## Producers (where presence comes from)
|
|
35
|
+
|
|
36
|
+
Presence entries are produced by multiple sources and **merged**.
|
|
37
|
+
|
|
38
|
+
### 1) Gateway self entry
|
|
39
|
+
|
|
40
|
+
The Gateway always seeds a “self” entry at startup so UIs show the gateway host
|
|
41
|
+
even before any clients connect.
|
|
42
|
+
|
|
43
|
+
### 2) WebSocket connect
|
|
44
|
+
|
|
45
|
+
Every WS client begins with a `connect` request. On successful handshake the
|
|
46
|
+
Gateway upserts a presence entry for that connection.
|
|
47
|
+
|
|
48
|
+
#### Why one‑off CLI commands don’t show up
|
|
49
|
+
|
|
50
|
+
The CLI often connects for short, one‑off commands. To avoid spamming the
|
|
51
|
+
Instances list, `client.mode === "cli"` is **not** turned into a presence entry.
|
|
52
|
+
|
|
53
|
+
### 3) `system-event` beacons
|
|
54
|
+
|
|
55
|
+
Clients can send richer periodic beacons via the `system-event` method. The mac
|
|
56
|
+
app uses this to report host name, IP, and `lastInputSeconds`.
|
|
57
|
+
|
|
58
|
+
### 4) Node connects (role: node)
|
|
59
|
+
|
|
60
|
+
When a node connects over the Gateway WebSocket with `role: node`, the Gateway
|
|
61
|
+
upserts a presence entry for that node (same flow as other WS clients).
|
|
62
|
+
|
|
63
|
+
## Merge + dedupe rules (why `instanceId` matters)
|
|
64
|
+
|
|
65
|
+
Presence entries are stored in a single in‑memory map:
|
|
66
|
+
|
|
67
|
+
- Entries are keyed by a **presence key**.
|
|
68
|
+
- The best key is a stable `instanceId` (from `connect.client.instanceId`) that survives restarts.
|
|
69
|
+
- Keys are case‑insensitive.
|
|
70
|
+
|
|
71
|
+
If a client reconnects without a stable `instanceId`, it may show up as a
|
|
72
|
+
**duplicate** row.
|
|
73
|
+
|
|
74
|
+
## TTL and bounded size
|
|
75
|
+
|
|
76
|
+
Presence is intentionally ephemeral:
|
|
77
|
+
|
|
78
|
+
- **TTL:** entries older than 5 minutes are pruned
|
|
79
|
+
- **Max entries:** 200 (oldest dropped first)
|
|
80
|
+
|
|
81
|
+
This keeps the list fresh and avoids unbounded memory growth.
|
|
82
|
+
|
|
83
|
+
## Remote/tunnel caveat (loopback IPs)
|
|
84
|
+
|
|
85
|
+
When a client connects over an SSH tunnel / local port forward, the Gateway may
|
|
86
|
+
see the remote address as `127.0.0.1`. To avoid overwriting a good client‑reported
|
|
87
|
+
IP, loopback remote addresses are ignored.
|
|
88
|
+
|
|
89
|
+
## Consumers
|
|
90
|
+
|
|
91
|
+
### macOS Instances tab
|
|
92
|
+
|
|
93
|
+
The macOS app renders the output of `system-presence` and applies a small status
|
|
94
|
+
indicator (Active/Idle/Stale) based on the age of the last update.
|
|
95
|
+
|
|
96
|
+
## Debugging tips
|
|
97
|
+
|
|
98
|
+
- To see the raw list, call `system-presence` against the Gateway.
|
|
99
|
+
- If you see duplicates:
|
|
100
|
+
- confirm clients send a stable `client.instanceId` in the handshake
|
|
101
|
+
- confirm periodic beacons use the same `instanceId`
|
|
102
|
+
- check whether the connection‑derived entry is missing `instanceId` (duplicates are expected)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Command queue design that serializes inbound auto-reply runs"
|
|
3
|
+
read_when:
|
|
4
|
+
- Changing auto-reply execution or concurrency
|
|
5
|
+
title: "Command Queue"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Command Queue (2026-01-16)
|
|
9
|
+
|
|
10
|
+
We serialize inbound auto-reply runs (all channels) through a tiny in-process queue to prevent multiple agent runs from colliding, while still allowing safe parallelism across sessions.
|
|
11
|
+
|
|
12
|
+
## Why
|
|
13
|
+
|
|
14
|
+
- Auto-reply runs can be expensive (LLM calls) and can collide when multiple inbound messages arrive close together.
|
|
15
|
+
- Serializing avoids competing for shared resources (session files, logs, CLI stdin) and reduces the chance of upstream rate limits.
|
|
16
|
+
|
|
17
|
+
## How it works
|
|
18
|
+
|
|
19
|
+
- A lane-aware FIFO queue drains each lane with a configurable concurrency cap (default 1 for unconfigured lanes; main defaults to 4, subagent to 8).
|
|
20
|
+
- `runEmbeddedElizaAgent` enqueues by **session key** (lane `session:<key>`) to guarantee only one active run per session.
|
|
21
|
+
- Each session run is then queued into a **global lane** (`main` by default) so overall parallelism is capped by `agents.defaults.maxConcurrent`.
|
|
22
|
+
- When verbose logging is enabled, queued runs emit a short notice if they waited more than ~2s before starting.
|
|
23
|
+
- Typing indicators still fire immediately on enqueue (when supported by the channel) so user experience is unchanged while we wait our turn.
|
|
24
|
+
|
|
25
|
+
## Queue modes (per channel)
|
|
26
|
+
|
|
27
|
+
Inbound messages can steer the current run, wait for a followup turn, or do both:
|
|
28
|
+
|
|
29
|
+
- `steer`: inject immediately into the current run (cancels pending tool calls after the next tool boundary). If not streaming, falls back to followup.
|
|
30
|
+
- `followup`: enqueue for the next agent turn after the current run ends.
|
|
31
|
+
- `collect`: coalesce all queued messages into a **single** followup turn (default). If messages target different channels/threads, they drain individually to preserve routing.
|
|
32
|
+
- `steer-backlog` (aka `steer+backlog`): steer now **and** preserve the message for a followup turn.
|
|
33
|
+
- `interrupt` (legacy): abort the active run for that session, then run the newest message.
|
|
34
|
+
- `queue` (legacy alias): same as `steer`.
|
|
35
|
+
|
|
36
|
+
Steer-backlog means you can get a followup response after the steered run, so
|
|
37
|
+
streaming surfaces can look like duplicates. Prefer `collect`/`steer` if you want
|
|
38
|
+
one response per inbound message.
|
|
39
|
+
Send `/queue collect` as a standalone command (per-session) or set `messages.queue.byChannel.discord: "collect"`.
|
|
40
|
+
|
|
41
|
+
Defaults (when unset in config):
|
|
42
|
+
|
|
43
|
+
- All surfaces → `collect`
|
|
44
|
+
|
|
45
|
+
Configure globally or per channel via `messages.queue`:
|
|
46
|
+
|
|
47
|
+
```json5
|
|
48
|
+
{
|
|
49
|
+
messages: {
|
|
50
|
+
queue: {
|
|
51
|
+
mode: "collect",
|
|
52
|
+
debounceMs: 1000,
|
|
53
|
+
cap: 20,
|
|
54
|
+
drop: "summarize",
|
|
55
|
+
byChannel: { discord: "collect" },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Queue options
|
|
62
|
+
|
|
63
|
+
Options apply to `followup`, `collect`, and `steer-backlog` (and to `steer` when it falls back to followup):
|
|
64
|
+
|
|
65
|
+
- `debounceMs`: wait for quiet before starting a followup turn (prevents “continue, continue”).
|
|
66
|
+
- `cap`: max queued messages per session.
|
|
67
|
+
- `drop`: overflow policy (`old`, `new`, `summarize`).
|
|
68
|
+
|
|
69
|
+
Summarize keeps a short bullet list of dropped messages and injects it as a synthetic followup prompt.
|
|
70
|
+
Defaults: `debounceMs: 1000`, `cap: 20`, `drop: summarize`.
|
|
71
|
+
|
|
72
|
+
## Per-session overrides
|
|
73
|
+
|
|
74
|
+
- Send `/queue <mode>` as a standalone command to store the mode for the current session.
|
|
75
|
+
- Options can be combined: `/queue collect debounce:2s cap:25 drop:summarize`
|
|
76
|
+
- `/queue default` or `/queue reset` clears the session override.
|
|
77
|
+
|
|
78
|
+
## Scope and guarantees
|
|
79
|
+
|
|
80
|
+
- Applies to auto-reply agent runs across all inbound channels that use the gateway reply pipeline (WhatsApp web, Telegram, Slack, Discord, Signal, iMessage, webchat, etc.).
|
|
81
|
+
- Default lane (`main`) is process-wide for inbound + main heartbeats; set `agents.defaults.maxConcurrent` to allow multiple sessions in parallel.
|
|
82
|
+
- Additional lanes may exist (e.g. `cron`, `subagent`) so background jobs can run in parallel without blocking inbound replies.
|
|
83
|
+
- Per-session lanes guarantee that only one agent run touches a given session at a time.
|
|
84
|
+
- No external dependencies or background worker threads; pure TypeScript + promises.
|
|
85
|
+
|
|
86
|
+
## Troubleshooting
|
|
87
|
+
|
|
88
|
+
- If commands seem stuck, enable verbose logs and look for “queued for …ms” lines to confirm the queue is draining.
|
|
89
|
+
- If you need queue depth, enable verbose logs and watch for queue timing lines.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Retry policy for outbound provider calls"
|
|
3
|
+
read_when:
|
|
4
|
+
- Updating provider retry behavior or defaults
|
|
5
|
+
- Debugging provider send errors or rate limits
|
|
6
|
+
title: "Retry Policy"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Retry policy
|
|
10
|
+
|
|
11
|
+
## Goals
|
|
12
|
+
|
|
13
|
+
- Retry per HTTP request, not per multi-step flow.
|
|
14
|
+
- Preserve ordering by retrying only the current step.
|
|
15
|
+
- Avoid duplicating non-idempotent operations.
|
|
16
|
+
|
|
17
|
+
## Defaults
|
|
18
|
+
|
|
19
|
+
- Attempts: 3
|
|
20
|
+
- Max delay cap: 30000 ms
|
|
21
|
+
- Jitter: 0.1 (10 percent)
|
|
22
|
+
- Provider defaults:
|
|
23
|
+
- Telegram min delay: 400 ms
|
|
24
|
+
- Discord min delay: 500 ms
|
|
25
|
+
|
|
26
|
+
## Behavior
|
|
27
|
+
|
|
28
|
+
### Discord
|
|
29
|
+
|
|
30
|
+
- Retries only on rate-limit errors (HTTP 429).
|
|
31
|
+
- Uses Discord `retry_after` when available, otherwise exponential backoff.
|
|
32
|
+
|
|
33
|
+
### Telegram
|
|
34
|
+
|
|
35
|
+
- Retries on transient errors (429, timeout, connect/reset/closed, temporarily unavailable).
|
|
36
|
+
- Uses `retry_after` when available, otherwise exponential backoff.
|
|
37
|
+
- Markdown parse errors are not retried; they fall back to plain text.
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
Set retry policy per provider in `~/.milaidy/milaidy.json`:
|
|
42
|
+
|
|
43
|
+
```json5
|
|
44
|
+
{
|
|
45
|
+
channels: {
|
|
46
|
+
telegram: {
|
|
47
|
+
retry: {
|
|
48
|
+
attempts: 3,
|
|
49
|
+
minDelayMs: 400,
|
|
50
|
+
maxDelayMs: 30000,
|
|
51
|
+
jitter: 0.1,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
discord: {
|
|
55
|
+
retry: {
|
|
56
|
+
attempts: 3,
|
|
57
|
+
minDelayMs: 500,
|
|
58
|
+
maxDelayMs: 30000,
|
|
59
|
+
jitter: 0.1,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
|
|
68
|
+
- Retries apply per request (message send, media upload, reaction, poll, sticker).
|
|
69
|
+
- Composite flows do not retry completed steps.
|