@maincode-ai/matilda-code 0.21.13 → 0.22.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 (252) hide show
  1. package/chunks/agent-IUINB66G.js +3 -0
  2. package/chunks/agent-headless-YA2RKYEZ.js +3 -0
  3. package/chunks/{askUserQuestion-BNSWGD26.js → askUserQuestion-RZYBOPLR.js} +3 -3
  4. package/chunks/ca-JKEHLTNL.js +23 -0
  5. package/chunks/chunk-225CZWD7.js +89 -0
  6. package/chunks/{chunk-MEV5XQI2.js → chunk-2XSB5XHX.js} +1 -1
  7. package/chunks/chunk-453BANK3.js +8 -0
  8. package/chunks/{chunk-6M5G5FBH.js → chunk-4UGPARBR.js} +1 -1
  9. package/chunks/{chunk-RNKDFE2S.js → chunk-5B2QERWR.js} +1 -1
  10. package/chunks/chunk-5ETLURI6.js +3 -0
  11. package/chunks/chunk-6NXVLJ3X.js +56 -0
  12. package/chunks/{chunk-QZI2ZGZY.js → chunk-7B65UIHB.js} +1 -1
  13. package/chunks/{chunk-27Q5KW3A.js → chunk-7E2YCGHS.js} +13 -13
  14. package/chunks/{chunk-DHDD5YJC.js → chunk-ARAB5QTM.js} +69 -69
  15. package/chunks/chunk-DUB7JMQV.js +13 -0
  16. package/chunks/chunk-G3F3ZCH2.js +9 -0
  17. package/chunks/chunk-GT6MSEK4.js +3 -0
  18. package/chunks/chunk-HEJO7OBH.js +3 -0
  19. package/chunks/{chunk-6T2GIM76.js → chunk-IHWAOFCQ.js} +1 -1
  20. package/chunks/chunk-ILHNCXBC.js +8 -0
  21. package/chunks/chunk-J3ZCE3TA.js +8 -0
  22. package/chunks/{chunk-AOOZREGV.js → chunk-LBQNFSZ2.js} +1 -1
  23. package/chunks/{chunk-5OHGYMKP.js → chunk-LM6OIN4B.js} +1 -1
  24. package/chunks/{chunk-EZDV7A76.js → chunk-LMZBADPW.js} +1 -1
  25. package/chunks/chunk-MGRXOZAG.js +8 -0
  26. package/chunks/chunk-NBLBE7PE.js +2609 -0
  27. package/chunks/chunk-POGNX7U3.js +31 -0
  28. package/chunks/chunk-PQZ6HKKW.js +80 -0
  29. package/chunks/chunk-QXSBPCBA.js +8 -0
  30. package/chunks/chunk-RHSUTILA.js +9 -0
  31. package/chunks/{chunk-P5TG5CON.js → chunk-RPXRN7E6.js} +1 -1
  32. package/chunks/chunk-TUKNB5CQ.js +33 -0
  33. package/chunks/chunk-UM6CLO7D.js +7 -0
  34. package/chunks/chunk-V2VUANFI.js +120 -0
  35. package/chunks/chunk-V4VILMIK.js +14 -0
  36. package/chunks/chunk-ZSGBDQXU.js +11 -0
  37. package/chunks/{computer-use-J4GAM4M6.js → computer-use-PBCWDTJR.js} +1 -1
  38. package/chunks/{cron-create-IDWSZENI.js → cron-create-PHQ43NYA.js} +1 -1
  39. package/chunks/cron-delete-7RCQIU2U.js +3 -0
  40. package/chunks/cron-list-KKNLLMNN.js +5 -0
  41. package/chunks/de-GMGNR5CZ.js +23 -0
  42. package/chunks/{devtools-XRQ4YJ5S.js → devtools-7YNCRYZV.js} +1 -1
  43. package/chunks/{chunk-OOEH6ZSV.js → dist-UWUWLWTO.js} +2 -2
  44. package/chunks/{edit-X2S2ZXRN.js → edit-ELHNQB5E.js} +1 -1
  45. package/chunks/en-3NQMLVKW.js +23 -0
  46. package/chunks/{enter-worktree-TUCGNCLO.js → enter-worktree-UZIBOBV3.js} +1 -1
  47. package/chunks/enterPlanMode-UHY3DZXE.js +18 -0
  48. package/chunks/{exit-worktree-7FLITFZI.js → exit-worktree-HLG4PDMX.js} +1 -1
  49. package/chunks/{exitPlanMode-O5UUJ3GM.js → exitPlanMode-V4HYNH3J.js} +2 -2
  50. package/chunks/fr-WS3EBB36.js +23 -0
  51. package/chunks/{getMachineId-bsd-ZYBNK2JG.js → getMachineId-bsd-ETKQTB6C.js} +1 -1
  52. package/chunks/{getMachineId-darwin-CM2MQGUI.js → getMachineId-darwin-AKNRWOWB.js} +1 -1
  53. package/chunks/{getMachineId-linux-SYE2KMCW.js → getMachineId-linux-2QSD7FTP.js} +1 -1
  54. package/chunks/{getMachineId-unsupported-6IHVG2XO.js → getMachineId-unsupported-UXSV7I24.js} +1 -1
  55. package/chunks/{getMachineId-win-S3J3JSUM.js → getMachineId-win-4MTFXGP3.js} +1 -1
  56. package/chunks/glob-C5CTWXLP.js +22 -0
  57. package/chunks/{goal-tools-YQOA6OKU.js → goal-tools-BGIWEJ3K.js} +3 -3
  58. package/chunks/{grep-VAB2VSXM.js → grep-BEFTGKHW.js} +1 -1
  59. package/chunks/ja-GBCDQ43R.js +23 -0
  60. package/chunks/keychain-token-storage-FEJZYJBB.js +3 -0
  61. package/chunks/ls-XH55NAD3.js +15 -0
  62. package/chunks/{lsp-NGLDRHZU.js → lsp-BKDCR37G.js} +1 -1
  63. package/chunks/mcp-client-GAQG7MCT.js +3 -0
  64. package/chunks/monitor-NSVUUKCM.js +32 -0
  65. package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
  66. package/chunks/notebook-edit-AXKYC64C.js +17 -0
  67. package/chunks/openaiContentGenerator-66YY6CIM.js +47 -0
  68. package/chunks/pt-VID6J2CM.js +23 -0
  69. package/chunks/read-file-YFJMLS7V.js +3 -0
  70. package/chunks/ripGrep-BEHEB23R.js +3 -0
  71. package/chunks/ru-EB6V6EAN.js +23 -0
  72. package/chunks/scheduler-GKQOREMS.js +8 -0
  73. package/chunks/send-message-GJSEMAZB.js +8 -0
  74. package/chunks/shell-J5Q2UEXH.js +3 -0
  75. package/chunks/{skill-ETQM5NI3.js → skill-3RWNSUNE.js} +1 -1
  76. package/chunks/src-LZEU4AYF.js +5 -0
  77. package/chunks/symbol-search-4VM6J5Y4.js +19 -0
  78. package/chunks/{syntheticOutput-WZDPECYS.js → syntheticOutput-O7LEF3AM.js} +1 -1
  79. package/chunks/task-create-N4IRJBTF.js +3 -0
  80. package/chunks/{task-detach-TBAVUOTC.js → task-detach-RGNQUX3H.js} +1 -1
  81. package/chunks/task-list-Z7JUB4QK.js +9 -0
  82. package/chunks/{task-stop-HDSARSJ6.js → task-stop-L2OWK2PJ.js} +1 -1
  83. package/chunks/{task-update-MW2VT2XV.js → task-update-H5AXVXDS.js} +1 -1
  84. package/chunks/{team-create-VMYNLZCC.js → team-create-FWTIQ2FT.js} +2 -2
  85. package/chunks/team-delete-D45ALROH.js +8 -0
  86. package/chunks/todoWrite-LCQOQBI7.js +3 -0
  87. package/chunks/{tool-search-WX6FOE35.js → tool-search-X6UUCSPU.js} +1 -1
  88. package/chunks/{web-fetch-CKYBHGLF.js → web-fetch-244KUWSX.js} +17 -17
  89. package/chunks/web-search-YRZ3BZ3X.js +26 -0
  90. package/chunks/{workflow-WBSRQG3N.js → workflow-EP4AFR24.js} +2 -2
  91. package/chunks/write-file-EXWGRN4Q.js +15 -0
  92. package/cli.js +641 -678
  93. package/examples/starter/README.md +0 -3
  94. package/locales/ca.js +3 -87
  95. package/locales/de.js +3 -91
  96. package/locales/en.js +3 -91
  97. package/locales/fr.js +3 -88
  98. package/locales/ja.js +3 -92
  99. package/locales/pt.js +3 -92
  100. package/locales/ru.js +3 -91
  101. package/package.json +2 -2
  102. package/sandbox-macos-permissive-proxied.sb +1 -1
  103. package/sandbox-macos-restrictive-closed.sb +14 -1
  104. package/sandbox-macos-restrictive-open.sb +14 -1
  105. package/sandbox-macos-restrictive-proxied.sb +15 -2
  106. package/bundled/mainy/SKILL.md +0 -157
  107. package/bundled/mainy/docs/_meta.ts +0 -32
  108. package/bundled/mainy/docs/common-workflow.md +0 -571
  109. package/bundled/mainy/docs/configuration/_meta.ts +0 -7
  110. package/bundled/mainy/docs/configuration/auth.md +0 -82
  111. package/bundled/mainy/docs/configuration/matilda-ignore.md +0 -55
  112. package/bundled/mainy/docs/configuration/model-providers.md +0 -516
  113. package/bundled/mainy/docs/configuration/settings.md +0 -818
  114. package/bundled/mainy/docs/configuration/themes.md +0 -199
  115. package/bundled/mainy/docs/configuration/trusted-folders.md +0 -67
  116. package/bundled/mainy/docs/extension/_meta.ts +0 -9
  117. package/bundled/mainy/docs/extension/extension-releasing.md +0 -204
  118. package/bundled/mainy/docs/extension/getting-started-extensions.md +0 -299
  119. package/bundled/mainy/docs/extension/introduction.md +0 -338
  120. package/bundled/mainy/docs/features/_meta.ts +0 -27
  121. package/bundled/mainy/docs/features/approval-mode.md +0 -388
  122. package/bundled/mainy/docs/features/arena.md +0 -219
  123. package/bundled/mainy/docs/features/auto-mode.md +0 -308
  124. package/bundled/mainy/docs/features/channels/_meta.ts +0 -5
  125. package/bundled/mainy/docs/features/channels/overview.md +0 -328
  126. package/bundled/mainy/docs/features/channels/plugins.md +0 -87
  127. package/bundled/mainy/docs/features/channels/telegram.md +0 -120
  128. package/bundled/mainy/docs/features/code-review.md +0 -291
  129. package/bundled/mainy/docs/features/commands.md +0 -528
  130. package/bundled/mainy/docs/features/dual-output.md +0 -627
  131. package/bundled/mainy/docs/features/followup-suggestions.md +0 -109
  132. package/bundled/mainy/docs/features/headless.md +0 -448
  133. package/bundled/mainy/docs/features/hooks.md +0 -1308
  134. package/bundled/mainy/docs/features/language.md +0 -144
  135. package/bundled/mainy/docs/features/lsp.md +0 -496
  136. package/bundled/mainy/docs/features/markdown-rendering.md +0 -183
  137. package/bundled/mainy/docs/features/mcp.md +0 -423
  138. package/bundled/mainy/docs/features/memory.md +0 -185
  139. package/bundled/mainy/docs/features/sandbox.md +0 -249
  140. package/bundled/mainy/docs/features/scheduled-tasks.md +0 -139
  141. package/bundled/mainy/docs/features/skills.md +0 -347
  142. package/bundled/mainy/docs/features/status-line.md +0 -397
  143. package/bundled/mainy/docs/features/structured-output.md +0 -309
  144. package/bundled/mainy/docs/features/sub-agents.md +0 -737
  145. package/bundled/mainy/docs/features/tips.md +0 -54
  146. package/bundled/mainy/docs/features/token-caching.md +0 -29
  147. package/bundled/mainy/docs/features/tool-use-summaries.md +0 -178
  148. package/bundled/mainy/docs/features/worktree.md +0 -343
  149. package/bundled/mainy/docs/ide-integration/_meta.ts +0 -4
  150. package/bundled/mainy/docs/ide-integration/ide-companion-spec.md +0 -182
  151. package/bundled/mainy/docs/ide-integration/ide-integration.md +0 -144
  152. package/bundled/mainy/docs/integration-github-action.md +0 -241
  153. package/bundled/mainy/docs/integration-jetbrains.md +0 -81
  154. package/bundled/mainy/docs/integration-vscode.md +0 -39
  155. package/bundled/mainy/docs/integration-zed.md +0 -72
  156. package/bundled/mainy/docs/matilda-serve-deploy-local.md +0 -221
  157. package/bundled/mainy/docs/matilda-serve.md +0 -661
  158. package/bundled/mainy/docs/overview.md +0 -64
  159. package/bundled/mainy/docs/quickstart.md +0 -234
  160. package/bundled/mainy/docs/reference/_meta.ts +0 -3
  161. package/bundled/mainy/docs/reference/keyboard-shortcuts.md +0 -91
  162. package/bundled/mainy/docs/support/Uninstall.md +0 -65
  163. package/bundled/mainy/docs/support/_meta.ts +0 -6
  164. package/bundled/mainy/docs/support/tos-privacy.md +0 -94
  165. package/bundled/mainy/docs/support/troubleshooting.md +0 -127
  166. package/chunks/agent-SRAIVZEE.js +0 -3
  167. package/chunks/agent-headless-XRDOZESG.js +0 -3
  168. package/chunks/anthropicContentGenerator-LLDIKDMQ.js +0 -39
  169. package/chunks/ca-NPYL24ME.js +0 -25
  170. package/chunks/chunk-27HUYW23.js +0 -22
  171. package/chunks/chunk-2HTPVSGT.js +0 -3
  172. package/chunks/chunk-3B2HABK7.js +0 -30
  173. package/chunks/chunk-3MTZTNAU.js +0 -101
  174. package/chunks/chunk-3YLXGE6T.js +0 -8
  175. package/chunks/chunk-47XR7IMP.js +0 -8
  176. package/chunks/chunk-4F4DA5UI.js +0 -8
  177. package/chunks/chunk-4Q2SNBUH.js +0 -18
  178. package/chunks/chunk-6EQMZNIY.js +0 -8
  179. package/chunks/chunk-6I6VGTKD.js +0 -8
  180. package/chunks/chunk-DC7LAFZZ.js +0 -8
  181. package/chunks/chunk-DE3HKC2W.js +0 -9
  182. package/chunks/chunk-FWDMPRKU.js +0 -3
  183. package/chunks/chunk-G7R2XEEF.js +0 -7
  184. package/chunks/chunk-GOJCMVJJ.js +0 -8
  185. package/chunks/chunk-GTVCJCHR.js +0 -8
  186. package/chunks/chunk-IJEGHQ7Z.js +0 -32
  187. package/chunks/chunk-JCE3JAVC.js +0 -25
  188. package/chunks/chunk-KHHJYBR5.js +0 -9
  189. package/chunks/chunk-LUNDTQ3G.js +0 -8
  190. package/chunks/chunk-LWARA7JY.js +0 -37
  191. package/chunks/chunk-M53RP3YP.js +0 -31
  192. package/chunks/chunk-MTMU7JYZ.js +0 -11
  193. package/chunks/chunk-O44XK65C.js +0 -8
  194. package/chunks/chunk-OA56BXPD.js +0 -3
  195. package/chunks/chunk-PEKAUGYV.js +0 -2621
  196. package/chunks/chunk-PGUG43HG.js +0 -24
  197. package/chunks/chunk-PGXQZVLX.js +0 -8
  198. package/chunks/chunk-QKYGQLWC.js +0 -8
  199. package/chunks/chunk-QN6Y6NPA.js +0 -3
  200. package/chunks/chunk-RI54U73U.js +0 -56
  201. package/chunks/chunk-RPFSFS7Z.js +0 -39
  202. package/chunks/chunk-SDTWBD62.js +0 -8
  203. package/chunks/chunk-SOEIVSM5.js +0 -113
  204. package/chunks/chunk-SVSY6AWS.js +0 -59
  205. package/chunks/chunk-T2T2UEPY.js +0 -4
  206. package/chunks/chunk-TISQNFB5.js +0 -3
  207. package/chunks/chunk-TWJLOEAI.js +0 -31
  208. package/chunks/chunk-VI74YQQO.js +0 -8
  209. package/chunks/chunk-VYZOOSMP.js +0 -30
  210. package/chunks/chunk-W4QSMIWO.js +0 -9
  211. package/chunks/chunk-WC2VTVCE.js +0 -27
  212. package/chunks/chunk-YV3PUOBU.js +0 -65
  213. package/chunks/chunk-ZX34M2GF.js +0 -14
  214. package/chunks/contextCommand-5F5M7NA4.js +0 -3
  215. package/chunks/cron-delete-NQCDZDUI.js +0 -3
  216. package/chunks/cron-list-Z4XMC3TO.js +0 -5
  217. package/chunks/de-34YZHGC6.js +0 -25
  218. package/chunks/dist-7UYRLSLE.js +0 -3
  219. package/chunks/dist-PH6JW7XD.js +0 -42
  220. package/chunks/en-QLGMD6OS.js +0 -25
  221. package/chunks/enterPlanMode-SQEZAAIR.js +0 -18
  222. package/chunks/fileFromPath-7UCWPD4W.js +0 -3
  223. package/chunks/fr-EDNBQACJ.js +0 -25
  224. package/chunks/geminiContentGenerator-FIZFLPU3.js +0 -8
  225. package/chunks/glob-GSFTYAS2.js +0 -22
  226. package/chunks/ja-LV4RLM3M.js +0 -25
  227. package/chunks/keychain-token-storage-KQK6MNOJ.js +0 -3
  228. package/chunks/ls-IZJ3CKZY.js +0 -15
  229. package/chunks/matildaAgentContentGenerator-QQHPCFJ5.js +0 -8
  230. package/chunks/matildaContentGenerator-W7Z33ONU.js +0 -8
  231. package/chunks/matildaOAuth2-7COTQQR2.js +0 -3
  232. package/chunks/mcp-client-DXUNIEIB.js +0 -3
  233. package/chunks/monitor-4PFIGAGG.js +0 -32
  234. package/chunks/notebook-edit-MWJYAATJ.js +0 -17
  235. package/chunks/openaiContentGenerator-NDVJL6QL.js +0 -3
  236. package/chunks/pt-5SQ4DGL7.js +0 -25
  237. package/chunks/read-file-WPZKPXWA.js +0 -3
  238. package/chunks/ripGrep-7LZDZFTX.js +0 -3
  239. package/chunks/ru-7K24S53N.js +0 -25
  240. package/chunks/scheduler-DK2MVKXX.js +0 -8
  241. package/chunks/send-message-TCPX5UDU.js +0 -8
  242. package/chunks/serve-GSZPJI2O.js +0 -1026
  243. package/chunks/shell-PRS47PDP.js +0 -3
  244. package/chunks/src-UB7DZRYK.js +0 -3
  245. package/chunks/src-WZTRMETQ.js +0 -5
  246. package/chunks/symbol-search-HARHZ5AH.js +0 -19
  247. package/chunks/task-create-XRNIDT4T.js +0 -3
  248. package/chunks/task-list-Z6BDZZID.js +0 -9
  249. package/chunks/team-delete-F7QDC2TE.js +0 -8
  250. package/chunks/todoWrite-SCF5M24M.js +0 -3
  251. package/chunks/web-search-67DFNS5V.js +0 -26
  252. package/chunks/write-file-S5FAX4JJ.js +0 -15
@@ -1,87 +0,0 @@
1
- # Custom Channel Plugins
2
-
3
- You can extend the channel system with custom platform adapters packaged as [extensions](../../extension/introduction). This lets you connect Matilda Code to any messaging platform, webhook, or custom transport.
4
-
5
- ## How It Works
6
-
7
- Channel plugins are loaded at startup from active extensions. When `matilda channel start` runs, it:
8
-
9
- 1. Scans all enabled extensions for `channels` entries in their `matilda-extension.json`
10
- 2. Dynamically imports each channel's entry point
11
- 3. Registers the channel type so it can be referenced in `settings.json`
12
- 4. Creates channel instances using the plugin's factory function
13
-
14
- Your custom channel gets the full shared pipeline for free: sender gating, group policies, session routing, slash commands, crash recovery, and the ACP bridge to the agent.
15
-
16
- ## Installing a Custom Channel
17
-
18
- Install an extension that provides a channel plugin:
19
-
20
- ```bash
21
- # From a local path (for development or private plugins)
22
- matilda extensions install /path/to/my-channel-extension
23
-
24
- # Or link it for development (changes are reflected immediately)
25
- matilda extensions link /path/to/my-channel-extension
26
- ```
27
-
28
- ## Configuring a Custom Channel
29
-
30
- Add a channel entry to `~/.matilda/settings.json` using the custom type provided by the extension:
31
-
32
- ```json
33
- {
34
- "channels": {
35
- "my-bot": {
36
- "type": "my-platform",
37
- "apiKey": "$MY_PLATFORM_API_KEY",
38
- "senderPolicy": "open",
39
- "cwd": "/path/to/project"
40
- }
41
- }
42
- }
43
- ```
44
-
45
- The `type` must match a channel type registered by an installed extension. Check the extension's documentation for which plugin-specific fields are required (e.g., `apiKey`, `webhookUrl`).
46
-
47
- All standard channel options work with custom channels:
48
-
49
- | Option | Description |
50
- | -------------- | ---------------------------------------------- |
51
- | `senderPolicy` | `allowlist`, `pairing`, or `open` |
52
- | `allowedUsers` | Static allowlist of sender IDs |
53
- | `sessionScope` | `user`, `thread`, or `single` |
54
- | `cwd` | Working directory for the agent |
55
- | `instructions` | Prepended to the first message of each session |
56
- | `model` | Model override for the channel |
57
- | `groupPolicy` | `disabled`, `allowlist`, or `open` |
58
- | `groups` | Per-group settings |
59
-
60
- See [Overview](./overview) for details on each option.
61
-
62
- ## Starting the Channel
63
-
64
- ```bash
65
- # Start all channels including custom ones
66
- matilda channel start
67
-
68
- # Start just your custom channel
69
- matilda channel start my-bot
70
- ```
71
-
72
- ## What You Get for Free
73
-
74
- Custom channels automatically support everything built-in channels do:
75
-
76
- - **Sender policies** — `allowlist`, `pairing`, and `open` access control
77
- - **Group policies** — Per-group settings with optional @mention gating
78
- - **Session routing** — Per-user, per-thread, or single shared sessions
79
- - **DM pairing** — Full pairing code flow for unknown users
80
- - **Slash commands** — `/help`, `/clear`, `/status` work out of the box
81
- - **Custom instructions** — Prepended to the first message in each session
82
- - **Crash recovery** — Automatic restart with session preservation
83
- - **Per-session serialization** — Messages are queued to prevent race conditions
84
-
85
- ## Building Your Own Channel Plugin
86
-
87
- Want to build a channel plugin for a new platform? See the [Channel Plugin Developer Guide](/developers/channel-plugins) for the `ChannelPlugin` interface, the `Envelope` format, and extension points.
@@ -1,120 +0,0 @@
1
- # Telegram
2
-
3
- This guide covers setting up a Matilda Code channel on Telegram.
4
-
5
- ## Prerequisites
6
-
7
- - A Telegram account
8
- - A Telegram bot token (see below)
9
-
10
- ## Creating a Bot
11
-
12
- 1. Open Telegram and search for [@BotFather](https://t.me/BotFather)
13
- 2. Send `/newbot` and follow the prompts to choose a name and username
14
- 3. BotFather will give you a bot token — save it securely
15
-
16
- ## Finding Your User ID
17
-
18
- To use `senderPolicy: "allowlist"` or `"pairing"`, you need your Telegram user ID (a numeric ID, not your username).
19
-
20
- The easiest way to find it:
21
-
22
- 1. Search for [@userinfobot](https://t.me/userinfobot) on Telegram
23
- 2. Send it any message — it will reply with your user ID
24
-
25
- ## Configuration
26
-
27
- Add the channel to `~/.matilda/settings.json`:
28
-
29
- ```json
30
- {
31
- "channels": {
32
- "my-telegram": {
33
- "type": "telegram",
34
- "token": "$TELEGRAM_BOT_TOKEN",
35
- "senderPolicy": "allowlist",
36
- "allowedUsers": ["YOUR_USER_ID"],
37
- "sessionScope": "user",
38
- "cwd": "/path/to/your/project",
39
- "instructions": "You are a concise coding assistant responding via Telegram. Keep responses short.",
40
- "groupPolicy": "disabled",
41
- "groups": {
42
- "*": { "requireMention": true }
43
- }
44
- }
45
- }
46
- }
47
- ```
48
-
49
- Set the bot token as an environment variable:
50
-
51
- ```bash
52
- export TELEGRAM_BOT_TOKEN=<your-token-from-botfather>
53
- ```
54
-
55
- Or add it to a `.env` file that gets sourced before running.
56
-
57
- ## Running
58
-
59
- ```bash
60
- # Start only the Telegram channel
61
- matilda channel start my-telegram
62
-
63
- # Or start all configured channels together
64
- matilda channel start
65
- ```
66
-
67
- Then open your bot in Telegram and send a message. You should see "Working..." appear immediately, followed by the agent's response.
68
-
69
- ## Group Chats
70
-
71
- To use the bot in Telegram groups:
72
-
73
- 1. Set `groupPolicy` to `"allowlist"` or `"open"` in your channel config
74
- 2. **Disable privacy mode** in BotFather: `/mybots` → select your bot → Bot Settings → Group Privacy → Turn Off
75
- 3. Add the bot to a group. If it was already in the group, **remove and re-add it** (Telegram caches privacy settings from when the bot joined)
76
- 4. If using `groupPolicy: "allowlist"`, add the group's chat ID to `groups` in your config
77
-
78
- By default, the bot requires an @mention or a reply to respond in groups. Set `"requireMention": false` for a specific group to make it respond to all messages (useful for dedicated task groups). See [Group Chats](./overview#group-chats) for full details.
79
-
80
- ## Images and Files
81
-
82
- You can send photos and documents to the bot, not just text.
83
-
84
- **Photos:** Send a photo and the agent will analyze it using its vision capabilities. This requires a multimodal model — add `"model": "matilda3.5-plus"` (or another vision-capable model) to your channel config. Photo captions are passed as the message text.
85
-
86
- **Documents:** Send a PDF, code file, or any document. The bot downloads it and saves it locally so the agent can read it with its file tools. This works with any model. Telegram's file size limit is 20MB.
87
-
88
- ## Tips
89
-
90
- - **Keep instructions concise-focused** — Telegram has a 4096-character message limit. Adding instructions like "keep responses short" helps the agent stay within bounds.
91
- - **Use `sessionScope: "user"`** — This gives each user their own conversation. Use `/clear` to start fresh.
92
- - **Restrict access** — Use `senderPolicy: "allowlist"` for a fixed set of users, or `"pairing"` to let new users request access with a code you approve via CLI. See [DM Pairing](./overview#dm-pairing) for details.
93
-
94
- ## Message Formatting
95
-
96
- The agent's markdown responses are automatically converted to Telegram-compatible HTML. Code blocks, bold, italic, links, and lists are all supported.
97
-
98
- ## Troubleshooting
99
-
100
- ### Bot doesn't respond
101
-
102
- - Check that the bot token is correct and the environment variable is set
103
- - Verify your user ID is in `allowedUsers` if using `senderPolicy: "allowlist"`, or that you've been approved if using `"pairing"`
104
- - Check the terminal output for errors
105
-
106
- ### Bot doesn't respond in groups
107
-
108
- - Check that `groupPolicy` is set to `"allowlist"` or `"open"` (default is `"disabled"`)
109
- - If using `"allowlist"`, verify the group's chat ID is in the `groups` config
110
- - Make sure **Group Privacy is turned off** in BotFather — without this, the bot can't see non-command messages in groups
111
- - If you changed privacy mode after adding the bot to a group, **remove and re-add the bot** to the group
112
- - By default, the bot requires an @mention or a reply. Send `@yourbotname hello` to test
113
-
114
- ### "Sorry, something went wrong processing your message"
115
-
116
- This usually means the agent encountered an error. Check the terminal output for details.
117
-
118
- ### Bot takes a long time to respond
119
-
120
- The agent may be running multiple tool calls (reading files, searching, etc.). The "Working..." indicator shows while the agent is processing. Complex tasks can take a minute or more.
@@ -1,291 +0,0 @@
1
- # Code Review
2
-
3
- > Review code changes for correctness, security, performance, and code quality using `/review`.
4
-
5
- ## Quick Start
6
-
7
- ```bash
8
- # Review local uncommitted changes
9
- /review
10
-
11
- # Review a pull request (by number or URL)
12
- /review 123
13
- /review https://github.com/org/repo/pull/123
14
-
15
- # Review and post inline comments on the PR
16
- /review 123 --comment
17
-
18
- # Review a specific file
19
- /review src/utils/auth.ts
20
- ```
21
-
22
- If there are no uncommitted changes, `/review` will let you know and stop — no agents are launched.
23
-
24
- ## How It Works
25
-
26
- The `/review` command runs a multi-stage pipeline:
27
-
28
- ```
29
- Step 1: Determine scope (local diff / PR worktree / file)
30
- Step 2: Load project review rules
31
- Step 3: Run deterministic analysis (linter, typecheck) [zero LLM cost]
32
- Step 4: 9 parallel review agents [9 LLM calls]
33
- |-- Agent 1: Correctness
34
- |-- Agent 2: Security
35
- |-- Agent 3: Code Quality
36
- |-- Agent 4: Performance & Efficiency
37
- |-- Agent 5: Test Coverage
38
- |-- Agent 6: Undirected Audit (3 personas: 6a/6b/6c)
39
- '-- Agent 7: Build & Test (runs shell commands)
40
- Step 5: Deduplicate --> Batch verify --> Aggregate [1 LLM call]
41
- Step 6: Iterative reverse audit (1-3 rounds, gap finding) [1-3 LLM calls]
42
- Step 7: Present findings + verdict
43
- Step 8: Autofix (user-confirmed, optional)
44
- Step 9: Post PR inline comments (if requested)
45
- Step 10: Save report + incremental cache
46
- Step 11: Clean up (remove worktree + temp files)
47
- ```
48
-
49
- ### Review Agents
50
-
51
- | Agent | Focus |
52
- | --------------------------------- | ------------------------------------------------------------------------------------------- |
53
- | Agent 1: Correctness | Logic errors, edge cases, null handling, race conditions, type safety |
54
- | Agent 2: Security | Injection, XSS, SSRF, auth bypass, sensitive data exposure |
55
- | Agent 3: Code Quality | Style consistency, naming, duplication, dead code |
56
- | Agent 4: Performance & Efficiency | N+1 queries, memory leaks, unnecessary re-renders, bundle size |
57
- | Agent 5: Test Coverage | Untested code paths in the diff, missing branch coverage, weak assertions |
58
- | Agent 6: Undirected Audit | 3 parallel personas (attacker / 3am-oncall / maintainer) — catches cross-dimensional issues |
59
- | Agent 7: Build & Test | Runs build and test commands, reports failures |
60
-
61
- All agents run in parallel (Agent 6 launches 3 persona variants concurrently, totaling 9 parallel tasks for same-repo reviews). Findings from Agents 1-6 are verified in a **single batch verification pass** (one agent reviews all findings at once, keeping verification cost fixed regardless of finding count). After verification, **iterative reverse audit** runs 1-3 rounds of gap-finding — each round receives the cumulative finding list from prior rounds, so successive rounds focus on whatever's left undiscovered. The loop stops as soon as a round returns "No issues found", or after 3 rounds (hard cap). Reverse audit findings skip verification (the agent already has full context) and are included as high-confidence results.
62
-
63
- ## Deterministic Analysis
64
-
65
- Before the LLM agents run, `/review` automatically runs your project's existing linters and type checkers:
66
-
67
- | Language | Tools detected |
68
- | --------------------- | ---------------------------------------------------------------- |
69
- | TypeScript/JavaScript | `tsc --noEmit`, `npm run lint`, `eslint` |
70
- | Python | `ruff`, `mypy`, `flake8` |
71
- | Rust | `cargo clippy` |
72
- | Go | `go vet`, `golangci-lint` |
73
- | Java | `mvn compile`, `checkstyle`, `spotbugs`, `pmd` |
74
- | C/C++ | `clang-tidy` (if `compile_commands.json` available) |
75
- | Other | Auto-discovered from CI config (`.github/workflows/*.yml`, etc.) |
76
-
77
- For projects that don't match standard patterns (e.g., OpenJDK), `/review` reads CI configuration files to discover what lint/check commands the project uses. No user configuration needed.
78
-
79
- Deterministic findings are tagged with `[linter]` or `[typecheck]` and skip LLM verification — they are ground truth.
80
-
81
- - **Errors** → Critical severity
82
- - **Warnings** → Nice to have (terminal only, not posted as PR comments)
83
-
84
- If a tool is not installed or times out, it is skipped with an informational note.
85
-
86
- ## Severity Levels
87
-
88
- | Severity | Meaning | Posted as PR comment? |
89
- | ---------------- | ------------------------------------------------------------------- | -------------------------- |
90
- | **Critical** | Must fix before merging (bugs, security, data loss, build failures) | Yes (high-confidence only) |
91
- | **Suggestion** | Recommended improvement | Yes (high-confidence only) |
92
- | **Nice to have** | Optional optimization | No (terminal only) |
93
-
94
- Low-confidence findings appear in a separate "Needs Human Review" section in the terminal and are never posted as PR comments.
95
-
96
- ## Autofix
97
-
98
- After presenting findings, `/review` offers to auto-apply fixes for Critical and Suggestion findings that have clear solutions:
99
-
100
- ```
101
- Found 3 issues with auto-fixable suggestions. Apply auto-fixes? (y/n)
102
- ```
103
-
104
- - Fixes are applied using the `edit` tool (targeted replacements, not full-file rewrites)
105
- - Per-file linter checks run after fixes to verify they don't introduce new issues
106
- - For PR reviews, fixes are committed and pushed from the worktree automatically — your working tree stays clean
107
- - Nice to have and low-confidence findings are never auto-fixed
108
- - PR review submission always uses the **pre-fix verdict** (e.g., "Request changes") since the remote PR hasn't been updated until the autofix push completes
109
-
110
- ## Worktree Isolation
111
-
112
- When reviewing a PR, `/review` creates a temporary git worktree (`.matilda/tmp/review-pr-<number>`) instead of switching your current branch. This means:
113
-
114
- - Your working tree, staged changes, and current branch are **never touched**
115
- - Dependencies are installed in the worktree (`npm ci`, etc.) so linting and build/test work
116
- - Build and test commands run in isolation without polluting your local build cache
117
- - If anything goes wrong, your environment is unaffected — just delete the worktree
118
- - The worktree is automatically cleaned up after the review completes
119
- - If a review is interrupted (Ctrl+C, crash), the next `/review` of the same PR automatically cleans up the stale worktree before starting fresh
120
- - Review reports and cache are saved to the main project directory (not the worktree)
121
-
122
- ## Cross-repo PR Review
123
-
124
- You can review PRs from other repositories by passing the full URL:
125
-
126
- ```bash
127
- /review https://github.com/other-org/other-repo/pull/456
128
- ```
129
-
130
- This runs in **lightweight mode** — no worktree, no linter, no build/test, no autofix. The review is based on the diff text only (fetched via GitHub API). PR comments can still be posted if you have write access.
131
-
132
- | Capability | Same-repo | Cross-repo |
133
- | ---------------------------------------------------------- | --------- | ----------------------------- |
134
- | LLM review (Agents 1-6 + verify + iterative reverse audit) | ✅ | ✅ |
135
- | Agent 7: Build & test | ✅ | ❌ (no local codebase) |
136
- | Deterministic analysis (linter/typecheck) | ✅ | ❌ |
137
- | Cross-file impact analysis | ✅ | ❌ |
138
- | Autofix | ✅ | ❌ |
139
- | PR inline comments | ✅ | ✅ (if you have write access) |
140
- | Incremental review cache | ✅ | ❌ |
141
-
142
- ## PR Inline Comments
143
-
144
- Use `--comment` to post findings directly on the PR:
145
-
146
- ```bash
147
- /review 123 --comment
148
- ```
149
-
150
- Or, after running `/review 123`, type `post comments` to publish findings without re-running the review.
151
-
152
- **What gets posted:**
153
-
154
- - High-confidence Critical and Suggestion findings as inline comments on specific lines
155
- - For Approve/Request changes verdicts: a review summary with the verdict
156
- - For Comment verdict with all inline comments posted: no separate summary (inline comments are sufficient)
157
- - Model attribution footer on each comment (e.g., _— matilda3-coder via Matilda Code /review_)
158
-
159
- **What stays terminal-only:**
160
-
161
- - Nice to have findings (including linter warnings)
162
- - Low-confidence findings
163
-
164
- **Self-authored PRs:** GitHub does not allow you to submit `APPROVE` or `REQUEST_CHANGES` reviews on your own pull request — both fail with HTTP 422. When `/review` detects that the PR author matches the current authenticated user, it automatically downgrades the API event to `COMMENT` regardless of verdict, so the submission still succeeds. The terminal still shows the honest verdict ("Approve" / "Request changes" / "Comment") — only the GitHub-side review event is neutralized. The actual findings still appear as inline comments on specific lines, so substantive feedback is unchanged.
165
-
166
- **Re-reviewing a PR with prior Matilda Code comments:** when `/review` runs on a PR that already has previous Matilda Code review comments, it classifies them before posting new ones. Only **same-line overlap** (an existing comment on the same `(path, line)` as a new finding) prompts you to confirm — that's the case where you'd see a visual duplicate on the same code line. Comments from older commits, replied-to comments (treated as resolved), and comments that simply don't overlap with any new finding are silently skipped, with a terminal log line so you know what was filtered.
167
-
168
- **CI / build status check before APPROVE:** if the verdict is "Approve", `/review` queries the PR's check-runs and commit statuses before submitting. If any check has failed (or all checks are still pending), the API event is automatically downgraded from `APPROVE` to `COMMENT`, with the review body explaining why. Rationale: the LLM review reads code statically and cannot see runtime test failures; approving while CI is red would be misleading. The inline findings are still posted unchanged. If you want to approve anyway (e.g., a known-flaky CI failure), submit the GitHub approval manually after verifying.
169
-
170
- ## Follow-up Actions
171
-
172
- After the review, context-aware tips appear as ghost text. Press Tab to accept:
173
-
174
- | State after review | Tip | What happens |
175
- | ---------------------------------- | ------------------ | --------------------------------------- |
176
- | Local review with unfixed findings | `fix these issues` | LLM interactively fixes each finding |
177
- | PR review with findings | `post comments` | Posts PR inline comments (no re-review) |
178
- | PR review, zero findings | `post comments` | Approves the PR on GitHub (LGTM) |
179
- | Local review, all clear | `commit` | Commits your changes |
180
-
181
- Note: `fix these issues` is only available for local reviews. For PR reviews, use Autofix (Step 8) — the worktree is cleaned up after the review, so post-review interactive fixing is not possible.
182
-
183
- ## Project Review Rules
184
-
185
- You can customize review criteria per project. `/review` reads rules from these files (in order):
186
-
187
- 1. `.matilda/review-rules.md` (Matilda Code native)
188
- 2. `.github/copilot-instructions.md` (preferred) or `copilot-instructions.md` (fallback — only one is loaded, not both)
189
- 3. `AGENTS.md` — `## Code Review` section
190
- 4. `MATILDA.md` — `## Code Review` section
191
-
192
- Rules are injected into the LLM review agents (1-6) as additional criteria. For PR reviews, rules are read from the **base branch** to prevent a malicious PR from injecting bypass rules.
193
-
194
- Example `.matilda/review-rules.md`:
195
-
196
- ```markdown
197
- # Review Rules
198
-
199
- - All API endpoints must validate authentication
200
- - Database queries must use parameterized statements
201
- - React components must not use inline styles
202
- - Error messages must not expose internal paths
203
- ```
204
-
205
- ## Incremental Review
206
-
207
- When reviewing a PR that was previously reviewed, `/review` only examines changes since the last review:
208
-
209
- ```bash
210
- # First review — full review, cache created
211
- /review 123
212
-
213
- # PR updated with new commits — only new changes reviewed
214
- /review 123
215
- ```
216
-
217
- ### Cross-model review
218
-
219
- If you switch models (via `/model`) and re-review the same PR, `/review` detects the model change and runs a full review instead of skipping:
220
-
221
- ```bash
222
- # Review with model A
223
- /review 123
224
-
225
- # Switch model
226
- /model
227
-
228
- # Review again — full review with model B (not skipped)
229
- /review 123
230
- # → "Previous review used matilda3-coder. Running full review with gpt-4o for a second opinion."
231
- ```
232
-
233
- Cache is stored in `.matilda/review-cache/` and tracks both the commit SHA and model ID. Make sure this directory is in your `.gitignore` (a broader rule like `.matilda/*` also works). If the cached commit was rebased away, it falls back to a full review.
234
-
235
- ## Review Reports
236
-
237
- For same-repo reviews, results are saved as a Markdown file in your project's `.matilda/reviews/` directory (cross-repo lightweight reviews skip report persistence):
238
-
239
- ```
240
- .matilda/reviews/2026-04-06-143022-pr-123.md
241
- .matilda/reviews/2026-04-06-150510-local.md
242
- ```
243
-
244
- Reports include: timestamp, diff stats, deterministic analysis results, all findings with verification status, and the verdict.
245
-
246
- ## Cross-file Impact Analysis
247
-
248
- When code changes modify exported functions, classes, or interfaces, the review agents automatically search for all callers and check compatibility:
249
-
250
- - Parameter count/type changes
251
- - Return type changes
252
- - Removed or renamed public methods
253
- - Breaking API changes
254
-
255
- For large diffs (>10 modified symbols), analysis prioritizes functions with signature changes.
256
-
257
- ## Token Efficiency
258
-
259
- The review pipeline uses a bounded number of LLM calls regardless of how many findings are produced:
260
-
261
- | Stage | LLM calls | Notes |
262
- | -------------------------------- | ----------------- | --------------------------------------------------- |
263
- | Deterministic analysis (Step 3) | 0 | Shell commands only |
264
- | Review agents (Step 4) | 9 (or 8) | Run in parallel; Agent 7 skipped in cross-repo mode |
265
- | Batch verification (Step 5) | 1 | Single agent verifies all findings at once |
266
- | Iterative reverse audit (Step 6) | 1-3 | Loops until "No issues found" or 3-round cap |
267
- | **Total** | **11-13 (10-12)** | Same-repo: 11-13; cross-repo: 10-12 (no Agent 7) |
268
-
269
- Most PRs converge to the lower end of the range (1 reverse audit round); the cap prevents runaway cost on pathological cases.
270
-
271
- ## What's NOT Flagged
272
-
273
- The review intentionally excludes:
274
-
275
- - Pre-existing issues in unchanged code (focus on the diff only)
276
- - Style/formatting/naming that matches your codebase conventions
277
- - Issues a linter or type checker would catch (handled by deterministic analysis)
278
- - Subjective "consider doing X" suggestions without a real problem
279
- - Minor refactoring that doesn't fix a bug or risk
280
- - Missing documentation unless the logic is genuinely confusing
281
- - Issues already discussed in existing PR comments (avoids duplicating human feedback)
282
-
283
- ## Design Philosophy
284
-
285
- > **Silence is better than noise.** Every comment should be worth the reader's time.
286
-
287
- - If unsure whether something is a problem → don't report it
288
- - Linter/typecheck issues are handled by tools, not LLM guesses
289
- - Same pattern across N files → aggregated into one finding
290
- - PR comments are high-confidence only
291
- - Style/formatting issues matching codebase conventions are excluded