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,35 @@
1
+ ---
2
+ summary: "Usage tracking surfaces and credential requirements"
3
+ read_when:
4
+ - You are wiring provider usage/quota surfaces
5
+ - You need to explain usage tracking behavior or auth requirements
6
+ title: "Usage Tracking"
7
+ ---
8
+
9
+ # Usage tracking
10
+
11
+ ## What it is
12
+
13
+ - Pulls provider usage/quota directly from their usage endpoints.
14
+ - No estimated costs; only the provider-reported windows.
15
+
16
+ ## Where it shows up
17
+
18
+ - `/status` in chats: emoji‑rich status card with session tokens + estimated cost (API key only). Provider usage shows for the **current model provider** when available.
19
+ - `/usage off|tokens|full` in chats: per-response usage footer (OAuth shows tokens only).
20
+ - `/usage cost` in chats: local cost summary aggregated from Milaidy session logs.
21
+ - CLI: `milaidy status --usage` prints a full per-provider breakdown.
22
+ - CLI: `milaidy channels list` prints the same usage snapshot alongside provider config (use `--no-usage` to skip).
23
+ - macOS menu bar: “Usage” section under Context (only if available).
24
+
25
+ ## Providers + credentials
26
+
27
+ - **Anthropic (Claude)**: OAuth tokens in auth profiles.
28
+ - **GitHub Copilot**: OAuth tokens in auth profiles.
29
+ - **Gemini CLI**: OAuth tokens in auth profiles.
30
+ - **Antigravity**: OAuth tokens in auth profiles.
31
+ - **OpenAI Codex**: OAuth tokens in auth profiles (accountId used when present).
32
+ - **MiniMax**: API key (coding plan key; `MINIMAX_CODE_PLAN_KEY` or `MINIMAX_API_KEY`); uses the 5‑hour coding plan window.
33
+ - **z.ai**: API key via env/config/auth store.
34
+
35
+ Usage is hidden if no matching OAuth/API credentials exist.
@@ -0,0 +1,4 @@
1
+ #content-area h1:first-of-type,
2
+ .prose h1:first-of-type {
3
+ display: none !important;
4
+ }
@@ -0,0 +1,128 @@
1
+ ---
2
+ summary: "Date and time handling across envelopes, prompts, tools, and connectors"
3
+ read_when:
4
+ - You are changing how timestamps are shown to the model or users
5
+ - You are debugging time formatting in messages or system prompt output
6
+ title: "Date and Time"
7
+ ---
8
+
9
+ # Date & Time
10
+
11
+ Milaidy defaults to **host-local time for transport timestamps** and **user timezone only in the system prompt**.
12
+ Provider timestamps are preserved so tools keep their native semantics (current time is available via `session_status`).
13
+
14
+ ## Message envelopes (local by default)
15
+
16
+ Inbound messages are wrapped with a timestamp (minute precision):
17
+
18
+ ```
19
+ [Provider ... 2026-01-05 16:26 PST] message text
20
+ ```
21
+
22
+ This envelope timestamp is **host-local by default**, regardless of the provider timezone.
23
+
24
+ You can override this behavior:
25
+
26
+ ```json5
27
+ {
28
+ agents: {
29
+ defaults: {
30
+ envelopeTimezone: "local", // "utc" | "local" | "user" | IANA timezone
31
+ envelopeTimestamp: "on", // "on" | "off"
32
+ envelopeElapsed: "on", // "on" | "off"
33
+ },
34
+ },
35
+ }
36
+ ```
37
+
38
+ - `envelopeTimezone: "utc"` uses UTC.
39
+ - `envelopeTimezone: "local"` uses the host timezone.
40
+ - `envelopeTimezone: "user"` uses `agents.defaults.userTimezone` (falls back to host timezone).
41
+ - Use an explicit IANA timezone (e.g., `"America/Chicago"`) for a fixed zone.
42
+ - `envelopeTimestamp: "off"` removes absolute timestamps from envelope headers.
43
+ - `envelopeElapsed: "off"` removes elapsed time suffixes (the `+2m` style).
44
+
45
+ ### Examples
46
+
47
+ **Local (default):**
48
+
49
+ ```
50
+ [WhatsApp +1555 2026-01-18 00:19 PST] hello
51
+ ```
52
+
53
+ **User timezone:**
54
+
55
+ ```
56
+ [WhatsApp +1555 2026-01-18 00:19 CST] hello
57
+ ```
58
+
59
+ **Elapsed time enabled:**
60
+
61
+ ```
62
+ [WhatsApp +1555 +30s 2026-01-18T05:19Z] follow-up
63
+ ```
64
+
65
+ ## System prompt: Current Date & Time
66
+
67
+ If the user timezone is known, the system prompt includes a dedicated
68
+ **Current Date & Time** section with the **time zone only** (no clock/time format)
69
+ to keep prompt caching stable:
70
+
71
+ ```
72
+ Time zone: America/Chicago
73
+ ```
74
+
75
+ When the agent needs the current time, use the `session_status` tool; the status
76
+ card includes a timestamp line.
77
+
78
+ ## System event lines (local by default)
79
+
80
+ Queued system events inserted into agent context are prefixed with a timestamp using the
81
+ same timezone selection as message envelopes (default: host-local).
82
+
83
+ ```
84
+ System: [2026-01-12 12:19:17 PST] Model switched.
85
+ ```
86
+
87
+ ### Configure user timezone + format
88
+
89
+ ```json5
90
+ {
91
+ agents: {
92
+ defaults: {
93
+ userTimezone: "America/Chicago",
94
+ timeFormat: "auto", // auto | 12 | 24
95
+ },
96
+ },
97
+ }
98
+ ```
99
+
100
+ - `userTimezone` sets the **user-local timezone** for prompt context.
101
+ - `timeFormat` controls **12h/24h display** in the prompt. `auto` follows OS prefs.
102
+
103
+ ## Time format detection (auto)
104
+
105
+ When `timeFormat: "auto"`, Milaidy inspects the OS preference (macOS/Windows)
106
+ and falls back to locale formatting. The detected value is **cached per process**
107
+ to avoid repeated system calls.
108
+
109
+ ## Tool payloads + connectors (raw provider time + normalized fields)
110
+
111
+ Channel tools return **provider-native timestamps** and add normalized fields for consistency:
112
+
113
+ - `timestampMs`: epoch milliseconds (UTC)
114
+ - `timestampUtc`: ISO 8601 UTC string
115
+
116
+ Raw provider fields are preserved so nothing is lost.
117
+
118
+ - Slack: epoch-like strings from the API
119
+ - Discord: UTC ISO timestamps
120
+ - Telegram/WhatsApp: provider-specific numeric/ISO timestamps
121
+
122
+ If you need local time, convert it downstream using the known timezone.
123
+
124
+ ## Related docs
125
+
126
+ - [System Prompt](/concepts/system-prompt)
127
+ - [Timezones](/concepts/timezone)
128
+ - [Messages](/concepts/messages)
@@ -0,0 +1,162 @@
1
+ ---
2
+ summary: "Debugging tools: watch mode, raw model streams, and tracing reasoning leakage"
3
+ read_when:
4
+ - You need to inspect raw model output for reasoning leakage
5
+ - You want to run the Gateway in watch mode while iterating
6
+ - You need a repeatable debugging workflow
7
+ title: "Debugging"
8
+ ---
9
+
10
+ # Debugging
11
+
12
+ This page covers debugging helpers for streaming output, especially when a
13
+ provider mixes reasoning into normal text.
14
+
15
+ ## Runtime debug overrides
16
+
17
+ Use `/debug` in chat to set **runtime-only** config overrides (memory, not disk).
18
+ `/debug` is disabled by default; enable with `commands.debug: true`.
19
+ This is handy when you need to toggle obscure settings without editing `milaidy.json`.
20
+
21
+ Examples:
22
+
23
+ ```
24
+ /debug show
25
+ /debug set messages.responsePrefix="[milaidy]"
26
+ /debug unset messages.responsePrefix
27
+ /debug reset
28
+ ```
29
+
30
+ `/debug reset` clears all overrides and returns to the on-disk config.
31
+
32
+ ## Gateway watch mode
33
+
34
+ For fast iteration, run the gateway under the file watcher:
35
+
36
+ ```bash
37
+ pnpm gateway:watch --force
38
+ ```
39
+
40
+ This maps to:
41
+
42
+ ```bash
43
+ tsx watch src/entry.ts gateway --force
44
+ ```
45
+
46
+ Add any gateway CLI flags after `gateway:watch` and they will be passed through
47
+ on each restart.
48
+
49
+ ## Dev profile + dev gateway (--dev)
50
+
51
+ Use the dev profile to isolate state and spin up a safe, disposable setup for
52
+ debugging. There are **two** `--dev` flags:
53
+
54
+ - **Global `--dev` (profile):** isolates state under `~/.milaidy-dev` and
55
+ defaults the gateway port to `19001` (derived ports shift with it).
56
+ - **`gateway --dev`: tells the Gateway to auto-create a default config +
57
+ workspace** when missing (and skip BOOTSTRAP.md).
58
+
59
+ Recommended flow (dev profile + dev bootstrap):
60
+
61
+ ```bash
62
+ pnpm gateway:dev
63
+ MILAIDY_PROFILE=dev milaidy tui
64
+ ```
65
+
66
+ If you don’t have a global install yet, run the CLI via `pnpm milaidy ...`.
67
+
68
+ What this does:
69
+
70
+ 1. **Profile isolation** (global `--dev`)
71
+ - `MILAIDY_PROFILE=dev`
72
+ - `MILAIDY_STATE_DIR=~/.milaidy-dev`
73
+ - `MILAIDY_CONFIG_PATH=~/.milaidy-dev/milaidy.json`
74
+ - `MILAIDY_GATEWAY_PORT=19001` (browser/canvas shift accordingly)
75
+
76
+ 2. **Dev bootstrap** (`gateway --dev`)
77
+ - Writes a minimal config if missing (`gateway.mode=local`, bind loopback).
78
+ - Sets `agent.workspace` to the dev workspace.
79
+ - Sets `agent.skipBootstrap=true` (no BOOTSTRAP.md).
80
+ - Seeds the workspace files if missing:
81
+ `AGENTS.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `HEARTBEAT.md`.
82
+ - Default identity: **C3‑PO** (protocol droid).
83
+ - Skips channel providers in dev mode (`MILAIDY_SKIP_CHANNELS=1`).
84
+
85
+ Reset flow (fresh start):
86
+
87
+ ```bash
88
+ pnpm gateway:dev:reset
89
+ ```
90
+
91
+ Note: `--dev` is a **global** profile flag and gets eaten by some runners.
92
+ If you need to spell it out, use the env var form:
93
+
94
+ ```bash
95
+ MILAIDY_PROFILE=dev milaidy gateway --dev --reset
96
+ ```
97
+
98
+ `--reset` wipes config, credentials, sessions, and the dev workspace (using
99
+ `trash`, not `rm`), then recreates the default dev setup.
100
+
101
+ Tip: if a non‑dev gateway is already running (launchd/systemd), stop it first:
102
+
103
+ ```bash
104
+ milaidy gateway stop
105
+ ```
106
+
107
+ ## Raw stream logging (Milaidy)
108
+
109
+ Milaidy can log the **raw assistant stream** before any filtering/formatting.
110
+ This is the best way to see whether reasoning is arriving as plain text deltas
111
+ (or as separate thinking blocks).
112
+
113
+ Enable it via CLI:
114
+
115
+ ```bash
116
+ pnpm gateway:watch --force --raw-stream
117
+ ```
118
+
119
+ Optional path override:
120
+
121
+ ```bash
122
+ pnpm gateway:watch --force --raw-stream --raw-stream-path ~/.milaidy/logs/raw-stream.jsonl
123
+ ```
124
+
125
+ Equivalent env vars:
126
+
127
+ ```bash
128
+ MILAIDY_RAW_STREAM=1
129
+ MILAIDY_RAW_STREAM_PATH=~/.milaidy/logs/raw-stream.jsonl
130
+ ```
131
+
132
+ Default file:
133
+
134
+ `~/.milaidy/logs/raw-stream.jsonl`
135
+
136
+ ## Raw chunk logging (pi-mono)
137
+
138
+ To capture **raw OpenAI-compat chunks** before they are parsed into blocks,
139
+ pi-mono exposes a separate logger:
140
+
141
+ ```bash
142
+ PI_RAW_STREAM=1
143
+ ```
144
+
145
+ Optional path:
146
+
147
+ ```bash
148
+ PI_RAW_STREAM_PATH=~/.pi-mono/logs/raw-openai-completions.jsonl
149
+ ```
150
+
151
+ Default file:
152
+
153
+ `~/.pi-mono/logs/raw-openai-completions.jsonl`
154
+
155
+ > Note: this is only emitted by processes using pi-mono’s
156
+ > `openai-completions` provider.
157
+
158
+ ## Safety notes
159
+
160
+ - Raw stream logs can include full prompts, tool output, and user data.
161
+ - Keep logs local and delete them after debugging.
162
+ - If you share logs, scrub secrets and PII first.