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.
Files changed (253) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +538 -0
  3. package/dist/argv-CfSowvEA.js +63 -0
  4. package/dist/config-B-mboG4v.js +4 -0
  5. package/dist/eliza-CPJjgw-e.js +1491 -0
  6. package/dist/eliza.js +2192 -0
  7. package/dist/entry.js +232 -0
  8. package/dist/index.js +209 -0
  9. package/dist/links-BFKlWqSe.js +15 -0
  10. package/dist/paths-D_yh1DEJ.js +69 -0
  11. package/dist/plugins-cli-B7kSre2c.js +134 -0
  12. package/dist/program-6KwWwKKh.js +510 -0
  13. package/dist/register.agents-CPVmSjMG.js +17 -0
  14. package/dist/register.browser-B2ooXxNx.js +15 -0
  15. package/dist/register.channels-CMYQ6K6Y.js +42 -0
  16. package/dist/register.cron-D91lY1_Y.js +9 -0
  17. package/dist/register.devices-rU5I5L_y.js +13 -0
  18. package/dist/register.gateway-82SLAvw3.js +22 -0
  19. package/dist/register.hooks-B_XTBEkt.js +9 -0
  20. package/dist/register.logs-BgEGcPd8.js +10 -0
  21. package/dist/register.models-BJt9eVgZ.js +26 -0
  22. package/dist/register.nodes-B5xY1s8a.js +9 -0
  23. package/dist/register.skills-SFQqYIhg.js +10 -0
  24. package/dist/register.subclis-uF_AsbWR.js +187 -0
  25. package/dist/run-main-XODklzS-.js +56 -0
  26. package/dist/theme-DBvtuGeq.js +36 -0
  27. package/dist/utils-C1AUpp_V.js +42 -0
  28. package/dist/version-Cpn3yr5D.js +26 -0
  29. package/dist/workspace-Co3Wul2D.js +206 -0
  30. package/dist/workspace-DCA6MNVK.js +350 -0
  31. package/docs/.i18n/README.md +31 -0
  32. package/docs/.i18n/glossary.zh-CN.json +210 -0
  33. package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
  34. package/docs/CNAME +1 -0
  35. package/docs/automation/cron-jobs.md +468 -0
  36. package/docs/automation/cron-vs-heartbeat.md +254 -0
  37. package/docs/automation/gmail-pubsub.md +256 -0
  38. package/docs/automation/poll.md +69 -0
  39. package/docs/automation/webhook.md +163 -0
  40. package/docs/bedrock.md +176 -0
  41. package/docs/brave-search.md +41 -0
  42. package/docs/broadcast-groups.md +442 -0
  43. package/docs/cli/acp.md +170 -0
  44. package/docs/cli/agent.md +24 -0
  45. package/docs/cli/agents.md +75 -0
  46. package/docs/cli/approvals.md +50 -0
  47. package/docs/cli/browser.md +107 -0
  48. package/docs/cli/channels.md +79 -0
  49. package/docs/cli/config.md +50 -0
  50. package/docs/cli/configure.md +33 -0
  51. package/docs/cli/cron.md +42 -0
  52. package/docs/cli/dashboard.md +16 -0
  53. package/docs/cli/devices.md +67 -0
  54. package/docs/cli/directory.md +63 -0
  55. package/docs/cli/dns.md +23 -0
  56. package/docs/cli/docs.md +15 -0
  57. package/docs/cli/doctor.md +41 -0
  58. package/docs/cli/gateway.md +199 -0
  59. package/docs/cli/health.md +21 -0
  60. package/docs/cli/hooks.md +291 -0
  61. package/docs/cli/index.md +1029 -0
  62. package/docs/cli/logs.md +24 -0
  63. package/docs/cli/memory.md +45 -0
  64. package/docs/cli/message.md +239 -0
  65. package/docs/cli/models.md +79 -0
  66. package/docs/cli/node.md +112 -0
  67. package/docs/cli/nodes.md +73 -0
  68. package/docs/cli/onboard.md +29 -0
  69. package/docs/cli/pairing.md +21 -0
  70. package/docs/cli/plugins.md +62 -0
  71. package/docs/cli/reset.md +17 -0
  72. package/docs/cli/sandbox.md +152 -0
  73. package/docs/cli/security.md +26 -0
  74. package/docs/cli/sessions.md +16 -0
  75. package/docs/cli/setup.md +29 -0
  76. package/docs/cli/skills.md +26 -0
  77. package/docs/cli/status.md +26 -0
  78. package/docs/cli/system.md +60 -0
  79. package/docs/cli/tui.md +23 -0
  80. package/docs/cli/uninstall.md +17 -0
  81. package/docs/cli/update.md +98 -0
  82. package/docs/cli/voicecall.md +34 -0
  83. package/docs/cli/webhooks.md +25 -0
  84. package/docs/concepts/agent-loop.md +146 -0
  85. package/docs/concepts/agent-workspace.md +229 -0
  86. package/docs/concepts/agent.md +122 -0
  87. package/docs/concepts/architecture.md +129 -0
  88. package/docs/concepts/channel-routing.md +114 -0
  89. package/docs/concepts/compaction.md +61 -0
  90. package/docs/concepts/context.md +159 -0
  91. package/docs/concepts/features.md +53 -0
  92. package/docs/concepts/group-messages.md +84 -0
  93. package/docs/concepts/groups.md +373 -0
  94. package/docs/concepts/markdown-formatting.md +130 -0
  95. package/docs/concepts/memory.md +546 -0
  96. package/docs/concepts/messages.md +154 -0
  97. package/docs/concepts/model-failover.md +149 -0
  98. package/docs/concepts/model-providers.md +315 -0
  99. package/docs/concepts/models.md +208 -0
  100. package/docs/concepts/multi-agent.md +376 -0
  101. package/docs/concepts/oauth.md +145 -0
  102. package/docs/concepts/plugins.md +454 -0
  103. package/docs/concepts/presence.md +102 -0
  104. package/docs/concepts/queue.md +89 -0
  105. package/docs/concepts/retry.md +69 -0
  106. package/docs/concepts/secrets.md +300 -0
  107. package/docs/concepts/session-pruning.md +122 -0
  108. package/docs/concepts/session-tool.md +193 -0
  109. package/docs/concepts/session.md +188 -0
  110. package/docs/concepts/sessions.md +10 -0
  111. package/docs/concepts/skills.md +392 -0
  112. package/docs/concepts/streaming.md +135 -0
  113. package/docs/concepts/system-prompt.md +114 -0
  114. package/docs/concepts/timezone.md +91 -0
  115. package/docs/concepts/typebox.md +289 -0
  116. package/docs/concepts/typing-indicators.md +68 -0
  117. package/docs/concepts/usage-tracking.md +35 -0
  118. package/docs/custom.css +4 -0
  119. package/docs/date-time.md +128 -0
  120. package/docs/debugging.md +162 -0
  121. package/docs/docs.json +1599 -0
  122. package/docs/environment.md +81 -0
  123. package/docs/hooks.md +876 -0
  124. package/docs/index.md +179 -0
  125. package/docs/install/ansible.md +208 -0
  126. package/docs/install/bun.md +59 -0
  127. package/docs/install/development-channels.md +75 -0
  128. package/docs/install/docker.md +567 -0
  129. package/docs/install/index.md +185 -0
  130. package/docs/install/installer.md +123 -0
  131. package/docs/install/migrating.md +192 -0
  132. package/docs/install/nix.md +96 -0
  133. package/docs/install/node.md +78 -0
  134. package/docs/install/uninstall.md +128 -0
  135. package/docs/install/updating.md +228 -0
  136. package/docs/logging.md +350 -0
  137. package/docs/multi-agent-sandbox-tools.md +395 -0
  138. package/docs/network.md +54 -0
  139. package/docs/nodes/audio.md +114 -0
  140. package/docs/nodes/camera.md +156 -0
  141. package/docs/nodes/images.md +72 -0
  142. package/docs/nodes/index.md +341 -0
  143. package/docs/nodes/location-command.md +113 -0
  144. package/docs/nodes/media-understanding.md +379 -0
  145. package/docs/nodes/talk.md +90 -0
  146. package/docs/nodes/voicewake.md +65 -0
  147. package/docs/northflank.mdx +53 -0
  148. package/docs/perplexity.md +80 -0
  149. package/docs/platforms/android.md +129 -0
  150. package/docs/platforms/digitalocean.md +262 -0
  151. package/docs/platforms/exe-dev.md +125 -0
  152. package/docs/platforms/fly.md +486 -0
  153. package/docs/platforms/gcp.md +503 -0
  154. package/docs/platforms/hetzner.md +330 -0
  155. package/docs/platforms/index.md +53 -0
  156. package/docs/platforms/ios.md +106 -0
  157. package/docs/platforms/linux.md +94 -0
  158. package/docs/platforms/mac/bundled-gateway.md +73 -0
  159. package/docs/platforms/mac/canvas.md +125 -0
  160. package/docs/platforms/mac/child-process.md +69 -0
  161. package/docs/platforms/mac/dev-setup.md +102 -0
  162. package/docs/platforms/mac/health.md +34 -0
  163. package/docs/platforms/mac/icon.md +31 -0
  164. package/docs/platforms/mac/logging.md +57 -0
  165. package/docs/platforms/mac/menu-bar.md +81 -0
  166. package/docs/platforms/mac/peekaboo.md +65 -0
  167. package/docs/platforms/mac/permissions.md +44 -0
  168. package/docs/platforms/mac/release.md +85 -0
  169. package/docs/platforms/mac/remote.md +83 -0
  170. package/docs/platforms/mac/signing.md +47 -0
  171. package/docs/platforms/mac/skills.md +33 -0
  172. package/docs/platforms/mac/voice-overlay.md +60 -0
  173. package/docs/platforms/mac/voicewake.md +67 -0
  174. package/docs/platforms/mac/webchat.md +41 -0
  175. package/docs/platforms/mac/xpc.md +61 -0
  176. package/docs/platforms/macos-vm.md +281 -0
  177. package/docs/platforms/macos.md +203 -0
  178. package/docs/platforms/oracle.md +303 -0
  179. package/docs/platforms/raspberry-pi.md +358 -0
  180. package/docs/platforms/windows.md +159 -0
  181. package/docs/plugin.md +651 -0
  182. package/docs/plugins/agent-tools.md +99 -0
  183. package/docs/plugins/manifest.md +71 -0
  184. package/docs/plugins/voice-call.md +273 -0
  185. package/docs/plugins/zalouser.md +70 -0
  186. package/docs/providers/anthropic.md +152 -0
  187. package/docs/providers/claude-max-api-proxy.md +148 -0
  188. package/docs/providers/cloudflare-ai-gateway.md +71 -0
  189. package/docs/providers/deepgram.md +93 -0
  190. package/docs/providers/glm.md +33 -0
  191. package/docs/providers/index.md +63 -0
  192. package/docs/providers/minimax.md +208 -0
  193. package/docs/providers/models.md +51 -0
  194. package/docs/providers/moonshot.md +142 -0
  195. package/docs/providers/ollama.md +223 -0
  196. package/docs/providers/openai.md +62 -0
  197. package/docs/providers/opencode.md +36 -0
  198. package/docs/providers/openrouter.md +37 -0
  199. package/docs/providers/qwen.md +53 -0
  200. package/docs/providers/synthetic.md +99 -0
  201. package/docs/providers/venice.md +267 -0
  202. package/docs/providers/vercel-ai-gateway.md +50 -0
  203. package/docs/providers/xiaomi.md +64 -0
  204. package/docs/providers/zai.md +36 -0
  205. package/docs/railway.mdx +99 -0
  206. package/docs/reference/templates/AGENTS.md +9 -0
  207. package/docs/reference/templates/BOOTSTRAP.md +3 -0
  208. package/docs/reference/templates/HEARTBEAT.md +3 -0
  209. package/docs/reference/templates/IDENTITY.md +3 -0
  210. package/docs/reference/templates/TOOLS.md +3 -0
  211. package/docs/reference/templates/USER.md +3 -0
  212. package/docs/render.mdx +165 -0
  213. package/docs/start/docs-directory.md +63 -0
  214. package/docs/start/getting-started.md +212 -0
  215. package/docs/start/milaidy.md +247 -0
  216. package/docs/start/onboarding.md +258 -0
  217. package/docs/start/pairing.md +86 -0
  218. package/docs/start/quickstart.md +81 -0
  219. package/docs/start/setup.md +149 -0
  220. package/docs/start/showcase.md +416 -0
  221. package/docs/start/wizard.md +418 -0
  222. package/docs/testing.md +368 -0
  223. package/docs/token-use.md +112 -0
  224. package/docs/tools/agent-send.md +53 -0
  225. package/docs/tools/apply-patch.md +50 -0
  226. package/docs/tools/browser-linux-troubleshooting.md +139 -0
  227. package/docs/tools/browser-login.md +68 -0
  228. package/docs/tools/browser.md +576 -0
  229. package/docs/tools/chrome-extension.md +178 -0
  230. package/docs/tools/clawhub.md +257 -0
  231. package/docs/tools/creating-skills.md +54 -0
  232. package/docs/tools/elevated.md +57 -0
  233. package/docs/tools/exec-approvals.md +246 -0
  234. package/docs/tools/exec.md +179 -0
  235. package/docs/tools/firecrawl.md +61 -0
  236. package/docs/tools/index.md +508 -0
  237. package/docs/tools/llm-task.md +115 -0
  238. package/docs/tools/reactions.md +22 -0
  239. package/docs/tools/skills-config.md +76 -0
  240. package/docs/tools/skills.md +300 -0
  241. package/docs/tools/slash-commands.md +196 -0
  242. package/docs/tools/subagents.md +151 -0
  243. package/docs/tools/thinking.md +73 -0
  244. package/docs/tools/web.md +261 -0
  245. package/docs/tui.md +159 -0
  246. package/docs/vps.md +43 -0
  247. package/docs/web/control-ui.md +221 -0
  248. package/docs/web/dashboard.md +46 -0
  249. package/docs/web/index.md +116 -0
  250. package/docs/web/webchat.md +49 -0
  251. package/milaidy.mjs +14 -0
  252. package/package.json +271 -0
  253. package/skills/.cache/catalog.json +88519 -0
@@ -0,0 +1,508 @@
1
+ ---
2
+ summary: "Agent tool surface for Milaidy (browser, canvas, nodes, message, cron) replacing legacy `milaidy-*` skills"
3
+ read_when:
4
+ - Adding or modifying agent tools
5
+ - Retiring or changing `milaidy-*` skills
6
+ title: "Tools"
7
+ ---
8
+
9
+ # Tools (Milaidy)
10
+
11
+ Milaidy exposes **first-class agent tools** for browser, canvas, nodes, and cron.
12
+ These replace the old `milaidy-*` skills: the tools are typed, no shelling,
13
+ and the agent should rely on them directly.
14
+
15
+ ## Disabling tools
16
+
17
+ You can globally allow/deny tools via `tools.allow` / `tools.deny` in `milaidy.json`
18
+ (deny wins). This prevents disallowed tools from being sent to model providers.
19
+
20
+ ```json5
21
+ {
22
+ tools: { deny: ["browser"] },
23
+ }
24
+ ```
25
+
26
+ Notes:
27
+
28
+ - Matching is case-insensitive.
29
+ - `*` wildcards are supported (`"*"` means all tools).
30
+ - If `tools.allow` only references unknown or unloaded plugin tool names, Milaidy logs a warning and ignores the allowlist so core tools stay available.
31
+
32
+ ## Tool profiles (base allowlist)
33
+
34
+ `tools.profile` sets a **base tool allowlist** before `tools.allow`/`tools.deny`.
35
+ Per-agent override: `agents.list[].tools.profile`.
36
+
37
+ Profiles:
38
+
39
+ - `minimal`: `session_status` only
40
+ - `coding`: `group:fs`, `group:runtime`, `group:sessions`, `group:memory`, `image`
41
+ - `messaging`: `group:messaging`, `sessions_list`, `sessions_history`, `sessions_send`, `session_status`
42
+ - `full`: no restriction (same as unset)
43
+
44
+ Example (messaging-only by default, allow Slack + Discord tools too):
45
+
46
+ ```json5
47
+ {
48
+ tools: {
49
+ profile: "messaging",
50
+ allow: ["slack", "discord"],
51
+ },
52
+ }
53
+ ```
54
+
55
+ Example (coding profile, but deny exec/process everywhere):
56
+
57
+ ```json5
58
+ {
59
+ tools: {
60
+ profile: "coding",
61
+ deny: ["group:runtime"],
62
+ },
63
+ }
64
+ ```
65
+
66
+ Example (global coding profile, messaging-only support agent):
67
+
68
+ ```json5
69
+ {
70
+ tools: { profile: "coding" },
71
+ agents: {
72
+ list: [
73
+ {
74
+ id: "support",
75
+ tools: { profile: "messaging", allow: ["slack"] },
76
+ },
77
+ ],
78
+ },
79
+ }
80
+ ```
81
+
82
+ ## Provider-specific tool policy
83
+
84
+ Use `tools.byProvider` to **further restrict** tools for specific providers
85
+ (or a single `provider/model`) without changing your global defaults.
86
+ Per-agent override: `agents.list[].tools.byProvider`.
87
+
88
+ This is applied **after** the base tool profile and **before** allow/deny lists,
89
+ so it can only narrow the tool set.
90
+ Provider keys accept either `provider` (e.g. `google-antigravity`) or
91
+ `provider/model` (e.g. `openai/gpt-5.2`).
92
+
93
+ Example (keep global coding profile, but minimal tools for Google Antigravity):
94
+
95
+ ```json5
96
+ {
97
+ tools: {
98
+ profile: "coding",
99
+ byProvider: {
100
+ "google-antigravity": { profile: "minimal" },
101
+ },
102
+ },
103
+ }
104
+ ```
105
+
106
+ Example (provider/model-specific allowlist for a flaky endpoint):
107
+
108
+ ```json5
109
+ {
110
+ tools: {
111
+ allow: ["group:fs", "group:runtime", "sessions_list"],
112
+ byProvider: {
113
+ "openai/gpt-5.2": { allow: ["group:fs", "sessions_list"] },
114
+ },
115
+ },
116
+ }
117
+ ```
118
+
119
+ Example (agent-specific override for a single provider):
120
+
121
+ ```json5
122
+ {
123
+ agents: {
124
+ list: [
125
+ {
126
+ id: "support",
127
+ tools: {
128
+ byProvider: {
129
+ "google-antigravity": { allow: ["message", "sessions_list"] },
130
+ },
131
+ },
132
+ },
133
+ ],
134
+ },
135
+ }
136
+ ```
137
+
138
+ ## Tool groups (shorthands)
139
+
140
+ Tool policies (global, agent, sandbox) support `group:*` entries that expand to multiple tools.
141
+ Use these in `tools.allow` / `tools.deny`.
142
+
143
+ Available groups:
144
+
145
+ - `group:runtime`: `exec`, `bash`, `process`
146
+ - `group:fs`: `read`, `write`, `edit`, `apply_patch`
147
+ - `group:sessions`: `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`, `session_status`
148
+ - `group:memory`: `memory_search`, `memory_get`
149
+ - `group:web`: `web_search`, `web_fetch`
150
+ - `group:ui`: `browser`, `canvas`
151
+ - `group:automation`: `cron`, `gateway`
152
+ - `group:messaging`: `message`
153
+ - `group:nodes`: `nodes`
154
+ - `group:milaidy`: all built-in Milaidy tools (excludes provider plugins)
155
+
156
+ Example (allow only file tools + browser):
157
+
158
+ ```json5
159
+ {
160
+ tools: {
161
+ allow: ["group:fs", "browser"],
162
+ },
163
+ }
164
+ ```
165
+
166
+ ## Plugins + tools
167
+
168
+ Plugins can register **additional tools** (and CLI commands) beyond the core set.
169
+ See [Plugins](/plugin) for install + config, and [Skills](/tools/skills) for how
170
+ tool usage guidance is injected into prompts. Some plugins ship their own skills
171
+ alongside tools (for example, the voice-call plugin).
172
+
173
+ Optional plugin tools:
174
+
175
+ - [LLM Task](/tools/llm-task): JSON-only LLM step for structured workflow output (optional schema validation).
176
+
177
+ ## Tool inventory
178
+
179
+ ### `apply_patch`
180
+
181
+ Apply structured patches across one or more files. Use for multi-hunk edits.
182
+ Experimental: enable via `tools.exec.applyPatch.enabled` (OpenAI models only).
183
+
184
+ ### `exec`
185
+
186
+ Run shell commands in the workspace.
187
+
188
+ Core parameters:
189
+
190
+ - `command` (required)
191
+ - `yieldMs` (auto-background after timeout, default 10000)
192
+ - `background` (immediate background)
193
+ - `timeout` (seconds; kills the process if exceeded, default 1800)
194
+ - `elevated` (bool; run on host if elevated mode is enabled/allowed; only changes behavior when the agent is sandboxed)
195
+ - `host` (`sandbox | gateway | node`)
196
+ - `security` (`deny | allowlist | full`)
197
+ - `ask` (`off | on-miss | always`)
198
+ - `node` (node id/name for `host=node`)
199
+ - Need a real TTY? Set `pty: true`.
200
+
201
+ Notes:
202
+
203
+ - Returns `status: "running"` with a `sessionId` when backgrounded.
204
+ - Use `process` to poll/log/write/kill/clear background sessions.
205
+ - If `process` is disallowed, `exec` runs synchronously and ignores `yieldMs`/`background`.
206
+ - `elevated` is gated by `tools.elevated` plus any `agents.list[].tools.elevated` override (both must allow) and is an alias for `host=gateway` + `security=full`.
207
+ - `elevated` only changes behavior when the agent is sandboxed (otherwise it’s a no-op).
208
+ - `host=node` can target a macOS companion app or a headless node host (`milaidy node run`).
209
+ - gateway/node approvals and allowlists: [Exec approvals](/tools/exec-approvals).
210
+
211
+ ### `process`
212
+
213
+ Manage background exec sessions.
214
+
215
+ Core actions:
216
+
217
+ - `list`, `poll`, `log`, `write`, `kill`, `clear`, `remove`
218
+
219
+ Notes:
220
+
221
+ - `poll` returns new output and exit status when complete.
222
+ - `log` supports line-based `offset`/`limit` (omit `offset` to grab the last N lines).
223
+ - `process` is scoped per agent; sessions from other agents are not visible.
224
+
225
+ ### `web_search`
226
+
227
+ Search the web using Brave Search API.
228
+
229
+ Core parameters:
230
+
231
+ - `query` (required)
232
+ - `count` (1–10; default from `tools.web.search.maxResults`)
233
+
234
+ Notes:
235
+
236
+ - Requires a Brave API key (recommended: `milaidy configure --section web`, or set `BRAVE_API_KEY`).
237
+ - Enable via `tools.web.search.enabled`.
238
+ - Responses are cached (default 15 min).
239
+ - See [Web tools](/tools/web) for setup.
240
+
241
+ ### `web_fetch`
242
+
243
+ Fetch and extract readable content from a URL (HTML → markdown/text).
244
+
245
+ Core parameters:
246
+
247
+ - `url` (required)
248
+ - `extractMode` (`markdown` | `text`)
249
+ - `maxChars` (truncate long pages)
250
+
251
+ Notes:
252
+
253
+ - Enable via `tools.web.fetch.enabled`.
254
+ - `maxChars` is clamped by `tools.web.fetch.maxCharsCap` (default 50000).
255
+ - Responses are cached (default 15 min).
256
+ - For JS-heavy sites, prefer the browser tool.
257
+ - See [Web tools](/tools/web) for setup.
258
+ - See [Firecrawl](/tools/firecrawl) for the optional anti-bot fallback.
259
+
260
+ ### `browser`
261
+
262
+ Control the dedicated Milaidy-managed browser.
263
+
264
+ Core actions:
265
+
266
+ - `status`, `start`, `stop`, `tabs`, `open`, `focus`, `close`
267
+ - `snapshot` (aria/ai)
268
+ - `screenshot` (returns image block + `MEDIA:<path>`)
269
+ - `act` (UI actions: click/type/press/hover/drag/select/fill/resize/wait/evaluate)
270
+ - `navigate`, `console`, `pdf`, `upload`, `dialog`
271
+
272
+ Profile management:
273
+
274
+ - `profiles` — list all browser profiles with status
275
+ - `create-profile` — create new profile with auto-allocated port (or `cdpUrl`)
276
+ - `delete-profile` — stop browser, delete user data, remove from config (local only)
277
+ - `reset-profile` — kill orphan process on profile's port (local only)
278
+
279
+ Common parameters:
280
+
281
+ - `profile` (optional; defaults to `browser.defaultProfile`)
282
+ - `target` (`sandbox` | `host` | `node`)
283
+ - `node` (optional; picks a specific node id/name)
284
+ Notes:
285
+ - Requires `browser.enabled=true` (default is `true`; set `false` to disable).
286
+ - All actions accept optional `profile` parameter for multi-instance support.
287
+ - When `profile` is omitted, uses `browser.defaultProfile` (defaults to "chrome").
288
+ - Profile names: lowercase alphanumeric + hyphens only (max 64 chars).
289
+ - Port range: 18800-18899 (~100 profiles max).
290
+ - Remote profiles are attach-only (no start/stop/reset).
291
+ - If a browser-capable node is connected, the tool may auto-route to it (unless you pin `target`).
292
+ - `snapshot` defaults to `ai` when Playwright is installed; use `aria` for the accessibility tree.
293
+ - `snapshot` also supports role-snapshot options (`interactive`, `compact`, `depth`, `selector`) which return refs like `e12`.
294
+ - `act` requires `ref` from `snapshot` (numeric `12` from AI snapshots, or `e12` from role snapshots); use `evaluate` for rare CSS selector needs.
295
+ - Avoid `act` → `wait` by default; use it only in exceptional cases (no reliable UI state to wait on).
296
+ - `upload` can optionally pass a `ref` to auto-click after arming.
297
+ - `upload` also supports `inputRef` (aria ref) or `element` (CSS selector) to set `<input type="file">` directly.
298
+
299
+ ### `canvas`
300
+
301
+ Drive the node Canvas (present, eval, snapshot, A2UI).
302
+
303
+ Core actions:
304
+
305
+ - `present`, `hide`, `navigate`, `eval`
306
+ - `snapshot` (returns image block + `MEDIA:<path>`)
307
+ - `a2ui_push`, `a2ui_reset`
308
+
309
+ Notes:
310
+
311
+ - Uses gateway `node.invoke` under the hood.
312
+ - If no `node` is provided, the tool picks a default (single connected node or local mac node).
313
+ - A2UI is v0.8 only (no `createSurface`); the CLI rejects v0.9 JSONL with line errors.
314
+ - Quick smoke: `milaidy nodes canvas a2ui push --node <id> --text "Hello from A2UI"`.
315
+
316
+ ### `nodes`
317
+
318
+ Discover and target paired nodes; send notifications; capture camera/screen.
319
+
320
+ Core actions:
321
+
322
+ - `status`, `describe`
323
+ - `pending`, `approve`, `reject` (pairing)
324
+ - `notify` (macOS `system.notify`)
325
+ - `run` (macOS `system.run`)
326
+ - `camera_snap`, `camera_clip`, `screen_record`
327
+ - `location_get`
328
+
329
+ Notes:
330
+
331
+ - Camera/screen commands require the node app to be foregrounded.
332
+ - Images return image blocks + `MEDIA:<path>`.
333
+ - Videos return `FILE:<path>` (mp4).
334
+ - Location returns a JSON payload (lat/lon/accuracy/timestamp).
335
+ - `run` params: `command` argv array; optional `cwd`, `env` (`KEY=VAL`), `commandTimeoutMs`, `invokeTimeoutMs`, `needsScreenRecording`.
336
+
337
+ Example (`run`):
338
+
339
+ ```json
340
+ {
341
+ "action": "run",
342
+ "node": "office-mac",
343
+ "command": ["echo", "Hello"],
344
+ "env": ["FOO=bar"],
345
+ "commandTimeoutMs": 12000,
346
+ "invokeTimeoutMs": 45000,
347
+ "needsScreenRecording": false
348
+ }
349
+ ```
350
+
351
+ ### `image`
352
+
353
+ Analyze an image with the configured image model.
354
+
355
+ Core parameters:
356
+
357
+ - `image` (required path or URL)
358
+ - `prompt` (optional; defaults to "Describe the image.")
359
+ - `model` (optional override)
360
+ - `maxBytesMb` (optional size cap)
361
+
362
+ Notes:
363
+
364
+ - Only available when `agents.defaults.imageModel` is configured (primary or fallbacks), or when an implicit image model can be inferred from your default model + configured auth (best-effort pairing).
365
+ - Uses the image model directly (independent of the main chat model).
366
+
367
+ ### `message`
368
+
369
+ Send messages and channel actions across Discord/Google Chat/Slack/Telegram/WhatsApp/Signal/iMessage/MS Teams.
370
+
371
+ Core actions:
372
+
373
+ - `send` (text + optional media; MS Teams also supports `card` for Adaptive Cards)
374
+ - `poll` (WhatsApp/Discord/MS Teams polls)
375
+ - `react` / `reactions` / `read` / `edit` / `delete`
376
+ - `pin` / `unpin` / `list-pins`
377
+ - `permissions`
378
+ - `thread-create` / `thread-list` / `thread-reply`
379
+ - `search`
380
+ - `sticker`
381
+ - `member-info` / `role-info`
382
+ - `emoji-list` / `emoji-upload` / `sticker-upload`
383
+ - `role-add` / `role-remove`
384
+ - `channel-info` / `channel-list`
385
+ - `voice-status`
386
+ - `event-list` / `event-create`
387
+ - `timeout` / `kick` / `ban`
388
+
389
+ Notes:
390
+
391
+ - `send` routes WhatsApp via the Gateway; other channels go direct.
392
+ - `poll` uses the Gateway for WhatsApp and MS Teams; Discord polls go direct.
393
+ - When a message tool call is bound to an active chat session, sends are constrained to that session’s target to avoid cross-context leaks.
394
+
395
+ ### `cron`
396
+
397
+ Manage Gateway cron jobs and wakeups.
398
+
399
+ Core actions:
400
+
401
+ - `status`, `list`
402
+ - `add`, `update`, `remove`, `run`, `runs`
403
+ - `wake` (enqueue system event + optional immediate heartbeat)
404
+
405
+ Notes:
406
+
407
+ - `add` expects a full cron job object (same schema as `cron.add` RPC).
408
+ - `update` uses `{ id, patch }`.
409
+
410
+ ### `gateway`
411
+
412
+ Restart or apply updates to the running Gateway process (in-place).
413
+
414
+ Core actions:
415
+
416
+ - `restart` (authorizes + sends `SIGUSR1` for in-process restart; `milaidy gateway` restart in-place)
417
+ - `config.get` / `config.schema`
418
+ - `config.apply` (validate + write config + restart + wake)
419
+ - `config.patch` (merge partial update + restart + wake)
420
+ - `update.run` (run update + restart + wake)
421
+
422
+ Notes:
423
+
424
+ - Use `delayMs` (defaults to 2000) to avoid interrupting an in-flight reply.
425
+ - `restart` is disabled by default; enable with `commands.restart: true`.
426
+
427
+ ### `sessions_list` / `sessions_history` / `sessions_send` / `sessions_spawn` / `session_status`
428
+
429
+ List sessions, inspect transcript history, or send to another session.
430
+
431
+ Core parameters:
432
+
433
+ - `sessions_list`: `kinds?`, `limit?`, `activeMinutes?`, `messageLimit?` (0 = none)
434
+ - `sessions_history`: `sessionKey` (or `sessionId`), `limit?`, `includeTools?`
435
+ - `sessions_send`: `sessionKey` (or `sessionId`), `message`, `timeoutSeconds?` (0 = fire-and-forget)
436
+ - `sessions_spawn`: `task`, `label?`, `agentId?`, `model?`, `runTimeoutSeconds?`, `cleanup?`
437
+ - `session_status`: `sessionKey?` (default current; accepts `sessionId`), `model?` (`default` clears override)
438
+
439
+ Notes:
440
+
441
+ - `main` is the canonical direct-chat key; global/unknown are hidden.
442
+ - `messageLimit > 0` fetches last N messages per session (tool messages filtered).
443
+ - `sessions_send` waits for final completion when `timeoutSeconds > 0`.
444
+ - Delivery/announce happens after completion and is best-effort; `status: "ok"` confirms the agent run finished, not that the announce was delivered.
445
+ - `sessions_spawn` starts a sub-agent run and posts an announce reply back to the requester chat.
446
+ - `sessions_spawn` is non-blocking and returns `status: "accepted"` immediately.
447
+ - `sessions_send` runs a reply‑back ping‑pong (reply `REPLY_SKIP` to stop; max turns via `session.agentToAgent.maxPingPongTurns`, 0–5).
448
+ - After the ping‑pong, the target agent runs an **announce step**; reply `ANNOUNCE_SKIP` to suppress the announcement.
449
+
450
+ ### `agents_list`
451
+
452
+ List agent ids that the current session may target with `sessions_spawn`.
453
+
454
+ Notes:
455
+
456
+ - Result is restricted to per-agent allowlists (`agents.list[].subagents.allowAgents`).
457
+ - When `["*"]` is configured, the tool includes all configured agents and marks `allowAny: true`.
458
+
459
+ ## Parameters (common)
460
+
461
+ Gateway-backed tools (`canvas`, `nodes`, `cron`):
462
+
463
+ - `gatewayUrl` (default `ws://127.0.0.1:18789`)
464
+ - `gatewayToken` (if auth enabled)
465
+ - `timeoutMs`
466
+
467
+ Browser tool:
468
+
469
+ - `profile` (optional; defaults to `browser.defaultProfile`)
470
+ - `target` (`sandbox` | `host` | `node`)
471
+ - `node` (optional; pin a specific node id/name)
472
+
473
+ ## Recommended agent flows
474
+
475
+ Browser automation:
476
+
477
+ 1. `browser` → `status` / `start`
478
+ 2. `snapshot` (ai or aria)
479
+ 3. `act` (click/type/press)
480
+ 4. `screenshot` if you need visual confirmation
481
+
482
+ Canvas render:
483
+
484
+ 1. `canvas` → `present`
485
+ 2. `a2ui_push` (optional)
486
+ 3. `snapshot`
487
+
488
+ Node targeting:
489
+
490
+ 1. `nodes` → `status`
491
+ 2. `describe` on the chosen node
492
+ 3. `notify` / `run` / `camera_snap` / `screen_record`
493
+
494
+ ## Safety
495
+
496
+ - Avoid direct `system.run`; use `nodes` → `run` only with explicit user consent.
497
+ - Respect user consent for camera/screen capture.
498
+ - Use `status/describe` to ensure permissions before invoking media commands.
499
+
500
+ ## How tools are presented to the agent
501
+
502
+ Tools are exposed in two parallel channels:
503
+
504
+ 1. **System prompt text**: a human-readable list + guidance.
505
+ 2. **Tool schema**: the structured function definitions sent to the model API.
506
+
507
+ That means the agent sees both “what tools exist” and “how to call them.” If a tool
508
+ doesn’t appear in the system prompt or the schema, the model cannot call it.
@@ -0,0 +1,115 @@
1
+ ---
2
+ summary: "JSON-only LLM tasks for workflows (optional plugin tool)"
3
+ read_when:
4
+ - You want a JSON-only LLM step inside workflows
5
+ - You need schema-validated LLM output for automation
6
+ title: "LLM Task"
7
+ ---
8
+
9
+ # LLM Task
10
+
11
+ `llm-task` is an **optional plugin tool** that runs a JSON-only LLM task and
12
+ returns structured output (optionally validated against JSON Schema).
13
+
14
+ This is ideal for workflow engines: you can add a single LLM step
15
+ without writing custom Milaidy code for each workflow.
16
+
17
+ ## Enable the plugin
18
+
19
+ 1. Enable the plugin:
20
+
21
+ ```json
22
+ {
23
+ "plugins": {
24
+ "entries": {
25
+ "llm-task": { "enabled": true }
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ 2. Allowlist the tool (it is registered with `optional: true`):
32
+
33
+ ```json
34
+ {
35
+ "agents": {
36
+ "list": [
37
+ {
38
+ "id": "main",
39
+ "tools": { "allow": ["llm-task"] }
40
+ }
41
+ ]
42
+ }
43
+ }
44
+ ```
45
+
46
+ ## Config (optional)
47
+
48
+ ```json
49
+ {
50
+ "plugins": {
51
+ "entries": {
52
+ "llm-task": {
53
+ "enabled": true,
54
+ "config": {
55
+ "defaultProvider": "openai-codex",
56
+ "defaultModel": "gpt-5.2",
57
+ "defaultAuthProfileId": "main",
58
+ "allowedModels": ["openai-codex/gpt-5.2"],
59
+ "maxTokens": 800,
60
+ "timeoutMs": 30000
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ `allowedModels` is an allowlist of `provider/model` strings. If set, any request
69
+ outside the list is rejected.
70
+
71
+ ## Tool parameters
72
+
73
+ - `prompt` (string, required)
74
+ - `input` (any, optional)
75
+ - `schema` (object, optional JSON Schema)
76
+ - `provider` (string, optional)
77
+ - `model` (string, optional)
78
+ - `authProfileId` (string, optional)
79
+ - `temperature` (number, optional)
80
+ - `maxTokens` (number, optional)
81
+ - `timeoutMs` (number, optional)
82
+
83
+ ## Output
84
+
85
+ Returns `details.json` containing the parsed JSON (and validates against
86
+ `schema` when provided).
87
+
88
+ ## Example: workflow step
89
+
90
+ ```bash
91
+ milaidy.invoke --tool llm-task --action json --args-json '{
92
+ "prompt": "Given the input email, return intent and draft.",
93
+ "input": {
94
+ "subject": "Hello",
95
+ "body": "Can you help?"
96
+ },
97
+ "schema": {
98
+ "type": "object",
99
+ "properties": {
100
+ "intent": { "type": "string" },
101
+ "draft": { "type": "string" }
102
+ },
103
+ "required": ["intent", "draft"],
104
+ "additionalProperties": false
105
+ }
106
+ }'
107
+ ```
108
+
109
+ ## Safety notes
110
+
111
+ - The tool is **JSON-only** and instructs the model to output only JSON (no
112
+ code fences, no commentary).
113
+ - No tools are exposed to the model for this run.
114
+ - Treat output as untrusted unless you validate with `schema`.
115
+ - Put approvals before any side-effecting step (send, post, exec).
@@ -0,0 +1,22 @@
1
+ ---
2
+ summary: "Reaction semantics shared across channels"
3
+ read_when:
4
+ - Working on reactions in any channel
5
+ title: "Reactions"
6
+ ---
7
+
8
+ # Reaction tooling
9
+
10
+ Shared reaction semantics across channels:
11
+
12
+ - `emoji` is required when adding a reaction.
13
+ - `emoji=""` removes the bot's reaction(s) when supported.
14
+ - `remove: true` removes the specified emoji when supported (requires `emoji`).
15
+
16
+ Channel notes:
17
+
18
+ - **Discord/Slack**: empty `emoji` removes all of the bot's reactions on the message; `remove: true` removes just that emoji.
19
+ - **Google Chat**: empty `emoji` removes the app's reactions on the message; `remove: true` removes just that emoji.
20
+ - **Telegram**: empty `emoji` removes the bot's reactions; `remove: true` also removes reactions but still requires a non-empty `emoji` for tool validation.
21
+ - **WhatsApp**: empty `emoji` removes the bot reaction; `remove: true` maps to empty emoji (still requires `emoji`).
22
+ - **Signal**: inbound reaction notifications emit system events when `channels.signal.reactionNotifications` is enabled.