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,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Milaidy Gateway CLI (`milaidy gateway`) — run, query, and discover gateways"
|
|
3
|
+
read_when:
|
|
4
|
+
- Running the Gateway from the CLI (dev or servers)
|
|
5
|
+
- Debugging Gateway auth, bind modes, and connectivity
|
|
6
|
+
- Discovering gateways via Bonjour (LAN + tailnet)
|
|
7
|
+
title: "gateway"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Gateway CLI
|
|
11
|
+
|
|
12
|
+
The Gateway is Milaidy’s WebSocket server (channels, nodes, sessions, hooks).
|
|
13
|
+
|
|
14
|
+
Subcommands in this page live under `milaidy gateway …`.
|
|
15
|
+
|
|
16
|
+
Related docs:
|
|
17
|
+
|
|
18
|
+
- [/gateway/bonjour](/gateway/bonjour)
|
|
19
|
+
- [/gateway/discovery](/gateway/discovery)
|
|
20
|
+
- [/gateway/configuration](/gateway/configuration)
|
|
21
|
+
|
|
22
|
+
## Run the Gateway
|
|
23
|
+
|
|
24
|
+
Run a local Gateway process:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
milaidy gateway
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Foreground alias:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
milaidy gateway run
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Notes:
|
|
37
|
+
|
|
38
|
+
- By default, the Gateway refuses to start unless `gateway.mode=local` is set in `~/.milaidy/milaidy.json`. Use `--allow-unconfigured` for ad-hoc/dev runs.
|
|
39
|
+
- Binding beyond loopback without auth is blocked (safety guardrail).
|
|
40
|
+
- `SIGUSR1` triggers an in-process restart when authorized (enable `commands.restart` or use the gateway tool/config apply/update).
|
|
41
|
+
- `SIGINT`/`SIGTERM` handlers stop the gateway process, but they don’t restore any custom terminal state. If you wrap the CLI with a TUI or raw-mode input, restore the terminal before exit.
|
|
42
|
+
|
|
43
|
+
### Options
|
|
44
|
+
|
|
45
|
+
- `--port <port>`: WebSocket port (default comes from config/env; usually `18789`).
|
|
46
|
+
- `--bind <loopback|lan|tailnet|auto|custom>`: listener bind mode.
|
|
47
|
+
- `--auth <token|password>`: auth mode override.
|
|
48
|
+
- `--token <token>`: token override (also sets `MILAIDY_GATEWAY_TOKEN` for the process).
|
|
49
|
+
- `--password <password>`: password override (also sets `MILAIDY_GATEWAY_PASSWORD` for the process).
|
|
50
|
+
- `--tailscale <off|serve|funnel>`: expose the Gateway via Tailscale.
|
|
51
|
+
- `--tailscale-reset-on-exit`: reset Tailscale serve/funnel config on shutdown.
|
|
52
|
+
- `--allow-unconfigured`: allow gateway start without `gateway.mode=local` in config.
|
|
53
|
+
- `--dev`: create a dev config + workspace if missing (skips BOOTSTRAP.md).
|
|
54
|
+
- `--reset`: reset dev config + credentials + sessions + workspace (requires `--dev`).
|
|
55
|
+
- `--force`: kill any existing listener on the selected port before starting.
|
|
56
|
+
- `--verbose`: verbose logs.
|
|
57
|
+
- `--claude-cli-logs`: only show claude-cli logs in the console (and enable its stdout/stderr).
|
|
58
|
+
- `--ws-log <auto|full|compact>`: websocket log style (default `auto`).
|
|
59
|
+
- `--compact`: alias for `--ws-log compact`.
|
|
60
|
+
- `--raw-stream`: log raw model stream events to jsonl.
|
|
61
|
+
- `--raw-stream-path <path>`: raw stream jsonl path.
|
|
62
|
+
|
|
63
|
+
## Query a running Gateway
|
|
64
|
+
|
|
65
|
+
All query commands use WebSocket RPC.
|
|
66
|
+
|
|
67
|
+
Output modes:
|
|
68
|
+
|
|
69
|
+
- Default: human-readable (colored in TTY).
|
|
70
|
+
- `--json`: machine-readable JSON (no styling/spinner).
|
|
71
|
+
- `--no-color` (or `NO_COLOR=1`): disable ANSI while keeping human layout.
|
|
72
|
+
|
|
73
|
+
Shared options (where supported):
|
|
74
|
+
|
|
75
|
+
- `--url <url>`: Gateway WebSocket URL.
|
|
76
|
+
- `--token <token>`: Gateway token.
|
|
77
|
+
- `--password <password>`: Gateway password.
|
|
78
|
+
- `--timeout <ms>`: timeout/budget (varies per command).
|
|
79
|
+
- `--expect-final`: wait for a “final” response (agent calls).
|
|
80
|
+
|
|
81
|
+
### `gateway health`
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
milaidy gateway health --url ws://127.0.0.1:18789
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### `gateway status`
|
|
88
|
+
|
|
89
|
+
`gateway status` shows the Gateway service (launchd/systemd/schtasks) plus an optional RPC probe.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
milaidy gateway status
|
|
93
|
+
milaidy gateway status --json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Options:
|
|
97
|
+
|
|
98
|
+
- `--url <url>`: override the probe URL.
|
|
99
|
+
- `--token <token>`: token auth for the probe.
|
|
100
|
+
- `--password <password>`: password auth for the probe.
|
|
101
|
+
- `--timeout <ms>`: probe timeout (default `10000`).
|
|
102
|
+
- `--no-probe`: skip the RPC probe (service-only view).
|
|
103
|
+
- `--deep`: scan system-level services too.
|
|
104
|
+
|
|
105
|
+
### `gateway probe`
|
|
106
|
+
|
|
107
|
+
`gateway probe` is the “debug everything” command. It always probes:
|
|
108
|
+
|
|
109
|
+
- your configured remote gateway (if set), and
|
|
110
|
+
- localhost (loopback) **even if remote is configured**.
|
|
111
|
+
|
|
112
|
+
If multiple gateways are reachable, it prints all of them. Multiple gateways are supported when you use isolated profiles/ports (e.g., a rescue bot), but most installs still run a single gateway.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
milaidy gateway probe
|
|
116
|
+
milaidy gateway probe --json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Remote over SSH (Mac app parity)
|
|
120
|
+
|
|
121
|
+
The macOS app “Remote over SSH” mode uses a local port-forward so the remote gateway (which may be bound to loopback only) becomes reachable at `ws://127.0.0.1:<port>`.
|
|
122
|
+
|
|
123
|
+
CLI equivalent:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
milaidy gateway probe --ssh user@gateway-host
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Options:
|
|
130
|
+
|
|
131
|
+
- `--ssh <target>`: `user@host` or `user@host:port` (port defaults to `22`).
|
|
132
|
+
- `--ssh-identity <path>`: identity file.
|
|
133
|
+
- `--ssh-auto`: pick the first discovered gateway host as SSH target (LAN/WAB only).
|
|
134
|
+
|
|
135
|
+
Config (optional, used as defaults):
|
|
136
|
+
|
|
137
|
+
- `gateway.remote.sshTarget`
|
|
138
|
+
- `gateway.remote.sshIdentity`
|
|
139
|
+
|
|
140
|
+
### `gateway call <method>`
|
|
141
|
+
|
|
142
|
+
Low-level RPC helper.
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
milaidy gateway call status
|
|
146
|
+
milaidy gateway call logs.tail --params '{"sinceMs": 60000}'
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Manage the Gateway service
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
milaidy gateway install
|
|
153
|
+
milaidy gateway start
|
|
154
|
+
milaidy gateway stop
|
|
155
|
+
milaidy gateway restart
|
|
156
|
+
milaidy gateway uninstall
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Notes:
|
|
160
|
+
|
|
161
|
+
- `gateway install` supports `--port`, `--runtime`, `--token`, `--force`, `--json`.
|
|
162
|
+
- Lifecycle commands accept `--json` for scripting.
|
|
163
|
+
|
|
164
|
+
## Discover gateways (Bonjour)
|
|
165
|
+
|
|
166
|
+
`gateway discover` scans for Gateway beacons (`_milaidy-gw._tcp`).
|
|
167
|
+
|
|
168
|
+
- Multicast DNS-SD: `local.`
|
|
169
|
+
- Unicast DNS-SD (Wide-Area Bonjour): choose a domain (example: `milaidy.internal.`) and set up split DNS + a DNS server; see [/gateway/bonjour](/gateway/bonjour)
|
|
170
|
+
|
|
171
|
+
Only gateways with Bonjour discovery enabled (default) advertise the beacon.
|
|
172
|
+
|
|
173
|
+
Wide-Area discovery records include (TXT):
|
|
174
|
+
|
|
175
|
+
- `role` (gateway role hint)
|
|
176
|
+
- `transport` (transport hint, e.g. `gateway`)
|
|
177
|
+
- `gatewayPort` (WebSocket port, usually `18789`)
|
|
178
|
+
- `sshPort` (SSH port; defaults to `22` if not present)
|
|
179
|
+
- `tailnetDns` (MagicDNS hostname, when available)
|
|
180
|
+
- `gatewayTls` / `gatewayTlsSha256` (TLS enabled + cert fingerprint)
|
|
181
|
+
- `cliPath` (optional hint for remote installs)
|
|
182
|
+
|
|
183
|
+
### `gateway discover`
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
milaidy gateway discover
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Options:
|
|
190
|
+
|
|
191
|
+
- `--timeout <ms>`: per-command timeout (browse/resolve); default `2000`.
|
|
192
|
+
- `--json`: machine-readable output (also disables styling/spinner).
|
|
193
|
+
|
|
194
|
+
Examples:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
milaidy gateway discover --timeout 4000
|
|
198
|
+
milaidy gateway discover --json | jq '.beacons[].wsUrl'
|
|
199
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "CLI reference for `milaidy health` (gateway health endpoint via RPC)"
|
|
3
|
+
read_when:
|
|
4
|
+
- You want to quickly check the running Gateway’s health
|
|
5
|
+
title: "health"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# `milaidy health`
|
|
9
|
+
|
|
10
|
+
Fetch health from the running Gateway.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
milaidy health
|
|
14
|
+
milaidy health --json
|
|
15
|
+
milaidy health --verbose
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Notes:
|
|
19
|
+
|
|
20
|
+
- `--verbose` runs live probes and prints per-account timings when multiple accounts are configured.
|
|
21
|
+
- Output includes per-agent session stores when multiple agents are configured.
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "CLI reference for `milaidy hooks` (agent hooks)"
|
|
3
|
+
read_when:
|
|
4
|
+
- You want to manage agent hooks
|
|
5
|
+
- You want to install or update hooks
|
|
6
|
+
title: "hooks"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# `milaidy hooks`
|
|
10
|
+
|
|
11
|
+
Manage agent hooks (event-driven automations for commands like `/new`, `/reset`, and gateway startup).
|
|
12
|
+
|
|
13
|
+
Related:
|
|
14
|
+
|
|
15
|
+
- Hooks: [Hooks](/hooks)
|
|
16
|
+
- Plugin hooks: [Plugins](/plugin#plugin-hooks)
|
|
17
|
+
|
|
18
|
+
## List All Hooks
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
milaidy hooks list
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
List all discovered hooks from workspace, managed, and bundled directories.
|
|
25
|
+
|
|
26
|
+
**Options:**
|
|
27
|
+
|
|
28
|
+
- `--eligible`: Show only eligible hooks (requirements met)
|
|
29
|
+
- `--json`: Output as JSON
|
|
30
|
+
- `-v, --verbose`: Show detailed information including missing requirements
|
|
31
|
+
|
|
32
|
+
**Example output:**
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Hooks (4/4 ready)
|
|
36
|
+
|
|
37
|
+
Ready:
|
|
38
|
+
🚀 boot-md ✓ - Run BOOT.md on gateway startup
|
|
39
|
+
📝 command-logger ✓ - Log all command events to a centralized audit file
|
|
40
|
+
💾 session-memory ✓ - Save session context to memory when /new command is issued
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Example (verbose):**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
milaidy hooks list --verbose
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Shows missing requirements for ineligible hooks.
|
|
50
|
+
|
|
51
|
+
**Example (JSON):**
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
milaidy hooks list --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Returns structured JSON for programmatic use.
|
|
58
|
+
|
|
59
|
+
## Get Hook Information
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
milaidy hooks info <name>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Show detailed information about a specific hook.
|
|
66
|
+
|
|
67
|
+
**Arguments:**
|
|
68
|
+
|
|
69
|
+
- `<name>`: Hook name (e.g., `session-memory`)
|
|
70
|
+
|
|
71
|
+
**Options:**
|
|
72
|
+
|
|
73
|
+
- `--json`: Output as JSON
|
|
74
|
+
|
|
75
|
+
**Example:**
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
milaidy hooks info session-memory
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Output:**
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
💾 session-memory ✓ Ready
|
|
85
|
+
|
|
86
|
+
Save session context to memory when /new command is issued
|
|
87
|
+
|
|
88
|
+
Details:
|
|
89
|
+
Source: milaidy-bundled
|
|
90
|
+
Path: /path/to/milaidy/hooks/bundled/session-memory/HOOK.md
|
|
91
|
+
Handler: /path/to/milaidy/hooks/bundled/session-memory/handler.ts
|
|
92
|
+
Homepage: https://docs.milaidy.ai/hooks#session-memory
|
|
93
|
+
Events: command:new
|
|
94
|
+
|
|
95
|
+
Requirements:
|
|
96
|
+
Config: ✓ workspace.dir
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Check Hooks Eligibility
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
milaidy hooks check
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Show summary of hook eligibility status (how many are ready vs. not ready).
|
|
106
|
+
|
|
107
|
+
**Options:**
|
|
108
|
+
|
|
109
|
+
- `--json`: Output as JSON
|
|
110
|
+
|
|
111
|
+
**Example output:**
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
Hooks Status
|
|
115
|
+
|
|
116
|
+
Total hooks: 4
|
|
117
|
+
Ready: 4
|
|
118
|
+
Not ready: 0
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Enable a Hook
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
milaidy hooks enable <name>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Enable a specific hook by adding it to your config (`~/.milaidy/config.json`).
|
|
128
|
+
|
|
129
|
+
**Note:** Hooks managed by plugins show `plugin:<id>` in `milaidy hooks list` and
|
|
130
|
+
can’t be enabled/disabled here. Enable/disable the plugin instead.
|
|
131
|
+
|
|
132
|
+
**Arguments:**
|
|
133
|
+
|
|
134
|
+
- `<name>`: Hook name (e.g., `session-memory`)
|
|
135
|
+
|
|
136
|
+
**Example:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
milaidy hooks enable session-memory
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Output:**
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
✓ Enabled hook: 💾 session-memory
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**What it does:**
|
|
149
|
+
|
|
150
|
+
- Checks if hook exists and is eligible
|
|
151
|
+
- Updates `hooks.internal.entries.<name>.enabled = true` in your config
|
|
152
|
+
- Saves config to disk
|
|
153
|
+
|
|
154
|
+
**After enabling:**
|
|
155
|
+
|
|
156
|
+
- Restart the gateway so hooks reload (menu bar app restart on macOS, or restart your gateway process in dev).
|
|
157
|
+
|
|
158
|
+
## Disable a Hook
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
milaidy hooks disable <name>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Disable a specific hook by updating your config.
|
|
165
|
+
|
|
166
|
+
**Arguments:**
|
|
167
|
+
|
|
168
|
+
- `<name>`: Hook name (e.g., `command-logger`)
|
|
169
|
+
|
|
170
|
+
**Example:**
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
milaidy hooks disable command-logger
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Output:**
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
⏸ Disabled hook: 📝 command-logger
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**After disabling:**
|
|
183
|
+
|
|
184
|
+
- Restart the gateway so hooks reload
|
|
185
|
+
|
|
186
|
+
## Install Hooks
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
milaidy hooks install <path-or-spec>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Install a hook pack from a local folder/archive or npm.
|
|
193
|
+
|
|
194
|
+
**What it does:**
|
|
195
|
+
|
|
196
|
+
- Copies the hook pack into `~/.milaidy/hooks/<id>`
|
|
197
|
+
- Enables the installed hooks in `hooks.internal.entries.*`
|
|
198
|
+
- Records the install under `hooks.internal.installs`
|
|
199
|
+
|
|
200
|
+
**Options:**
|
|
201
|
+
|
|
202
|
+
- `-l, --link`: Link a local directory instead of copying (adds it to `hooks.internal.load.extraDirs`)
|
|
203
|
+
|
|
204
|
+
**Supported archives:** `.zip`, `.tgz`, `.tar.gz`, `.tar`
|
|
205
|
+
|
|
206
|
+
**Examples:**
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Local directory
|
|
210
|
+
milaidy hooks install ./my-hook-pack
|
|
211
|
+
|
|
212
|
+
# Local archive
|
|
213
|
+
milaidy hooks install ./my-hook-pack.zip
|
|
214
|
+
|
|
215
|
+
# NPM package
|
|
216
|
+
milaidy hooks install @milaidy/my-hook-pack
|
|
217
|
+
|
|
218
|
+
# Link a local directory without copying
|
|
219
|
+
milaidy hooks install -l ./my-hook-pack
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Update Hooks
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
milaidy hooks update <id>
|
|
226
|
+
milaidy hooks update --all
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Update installed hook packs (npm installs only).
|
|
230
|
+
|
|
231
|
+
**Options:**
|
|
232
|
+
|
|
233
|
+
- `--all`: Update all tracked hook packs
|
|
234
|
+
- `--dry-run`: Show what would change without writing
|
|
235
|
+
|
|
236
|
+
## Bundled Hooks
|
|
237
|
+
|
|
238
|
+
### session-memory
|
|
239
|
+
|
|
240
|
+
Saves session context to memory when you issue `/new`.
|
|
241
|
+
|
|
242
|
+
**Enable:**
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
milaidy hooks enable session-memory
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Output:** `~/.milaidy/workspace/memory/YYYY-MM-DD-slug.md`
|
|
249
|
+
|
|
250
|
+
**See:** [session-memory documentation](/hooks#session-memory)
|
|
251
|
+
|
|
252
|
+
### command-logger
|
|
253
|
+
|
|
254
|
+
Logs all command events to a centralized audit file.
|
|
255
|
+
|
|
256
|
+
**Enable:**
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
milaidy hooks enable command-logger
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Output:** `~/.milaidy/logs/commands.log`
|
|
263
|
+
|
|
264
|
+
**View logs:**
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
# Recent commands
|
|
268
|
+
tail -n 20 ~/.milaidy/logs/commands.log
|
|
269
|
+
|
|
270
|
+
# Pretty-print
|
|
271
|
+
cat ~/.milaidy/logs/commands.log | jq .
|
|
272
|
+
|
|
273
|
+
# Filter by action
|
|
274
|
+
grep '"action":"new"' ~/.milaidy/logs/commands.log | jq .
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**See:** [command-logger documentation](/hooks#command-logger)
|
|
278
|
+
|
|
279
|
+
### boot-md
|
|
280
|
+
|
|
281
|
+
Runs `BOOT.md` when the gateway starts (after channels start).
|
|
282
|
+
|
|
283
|
+
**Events**: `gateway:startup`
|
|
284
|
+
|
|
285
|
+
**Enable**:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
milaidy hooks enable boot-md
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**See:** [boot-md documentation](/hooks#boot-md)
|