@maincode-ai/matilda-code 0.21.12 → 0.21.13

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 (150) hide show
  1. package/bundled/mainy/docs/configuration/model-providers.md +0 -82
  2. package/bundled/mainy/docs/configuration/settings.md +30 -2
  3. package/bundled/mainy/docs/features/auto-mode.md +1 -1
  4. package/bundled/mainy/docs/features/channels/_meta.ts +0 -3
  5. package/bundled/mainy/docs/features/channels/overview.md +8 -16
  6. package/bundled/mainy/docs/features/commands.md +4 -4
  7. package/bundled/mainy/docs/features/hooks.md +9 -7
  8. package/bundled/mainy/docs/features/language.md +2 -29
  9. package/bundled/mainy/docs/features/worktree.md +0 -2
  10. package/bundled/mainy/docs/integration-github-action.md +3 -3
  11. package/bundled/mainy/docs/quickstart.md +2 -2
  12. package/bundled/mainy/docs/support/troubleshooting.md +1 -1
  13. package/chunks/agent-SRAIVZEE.js +3 -0
  14. package/chunks/agent-headless-XRDOZESG.js +3 -0
  15. package/chunks/{anthropicContentGenerator-VKFTAIU3.js → anthropicContentGenerator-LLDIKDMQ.js} +3 -3
  16. package/chunks/{askUserQuestion-2QI4NSFJ.js → askUserQuestion-BNSWGD26.js} +1 -1
  17. package/chunks/{ca-I2HEEIL7.js → ca-NPYL24ME.js} +2 -2
  18. package/chunks/{chunk-YJAKOETP.js → chunk-27HUYW23.js} +2 -2
  19. package/chunks/{chunk-EQGA7LH7.js → chunk-3B2HABK7.js} +1 -1
  20. package/chunks/{chunk-CSJTA7NE.js → chunk-3MTZTNAU.js} +18 -18
  21. package/chunks/{chunk-YRQP3SLC.js → chunk-5OHGYMKP.js} +1 -1
  22. package/chunks/chunk-6I6VGTKD.js +8 -0
  23. package/chunks/{chunk-MCQUPLRE.js → chunk-6M5G5FBH.js} +1 -1
  24. package/chunks/chunk-7ZODGQO6.js +4 -0
  25. package/chunks/chunk-AOOZREGV.js +9 -0
  26. package/chunks/chunk-DHDD5YJC.js +207 -0
  27. package/chunks/{chunk-WV3IUPZS.js → chunk-EZDV7A76.js} +1 -1
  28. package/chunks/{chunk-QVCGLQCI.js → chunk-IJEGHQ7Z.js} +3 -3
  29. package/chunks/{chunk-5C2RJ5RR.js → chunk-LWARA7JY.js} +1 -1
  30. package/chunks/{chunk-VTGICC67.js → chunk-MEV5XQI2.js} +1 -1
  31. package/chunks/{chunk-DOOFGSRV.js → chunk-P5TG5CON.js} +1 -1
  32. package/chunks/{chunk-JRECUFB3.js → chunk-PEKAUGYV.js} +552 -561
  33. package/chunks/chunk-PGUG43HG.js +24 -0
  34. package/chunks/{chunk-CZGZ3KK7.js → chunk-QZI2ZGZY.js} +1 -1
  35. package/chunks/chunk-RI54U73U.js +56 -0
  36. package/chunks/chunk-RPFSFS7Z.js +39 -0
  37. package/chunks/chunk-SOEIVSM5.js +113 -0
  38. package/chunks/{chunk-4J6DC24J.js → chunk-SVSY6AWS.js} +1 -1
  39. package/chunks/{chunk-6E766NPX.js → chunk-TWJLOEAI.js} +1 -1
  40. package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
  41. package/chunks/chunk-W4QSMIWO.js +9 -0
  42. package/chunks/chunk-ZX34M2GF.js +14 -0
  43. package/chunks/{computer-use-WKDNUTLD.js → computer-use-J4GAM4M6.js} +1 -1
  44. package/chunks/contextCommand-5F5M7NA4.js +3 -0
  45. package/chunks/{cron-create-F2LXM2OA.js → cron-create-IDWSZENI.js} +1 -1
  46. package/chunks/{cron-delete-DE6Q2S2L.js → cron-delete-NQCDZDUI.js} +1 -1
  47. package/chunks/{cron-list-IAQEJVV7.js → cron-list-Z4XMC3TO.js} +1 -1
  48. package/chunks/{de-AQXFJYZI.js → de-34YZHGC6.js} +2 -2
  49. package/chunks/{devtools-5JRKK3E7.js → devtools-XRQ4YJ5S.js} +1 -1
  50. package/chunks/{dist-P6SLWL5V.js → dist-PH6JW7XD.js} +1 -1
  51. package/chunks/{edit-QQNJZ55P.js → edit-X2S2ZXRN.js} +1 -1
  52. package/chunks/{en-EJLDYIBM.js → en-QLGMD6OS.js} +3 -3
  53. package/chunks/{enter-worktree-5X5SAMBJ.js → enter-worktree-TUCGNCLO.js} +1 -1
  54. package/chunks/{enterPlanMode-HP35SPLN.js → enterPlanMode-SQEZAAIR.js} +1 -1
  55. package/chunks/{exit-worktree-SRKZBEYF.js → exit-worktree-7FLITFZI.js} +1 -1
  56. package/chunks/{exitPlanMode-WSPTGGVN.js → exitPlanMode-O5UUJ3GM.js} +1 -1
  57. package/chunks/{fr-6TDHK7F2.js → fr-EDNBQACJ.js} +3 -3
  58. package/chunks/geminiContentGenerator-FIZFLPU3.js +8 -0
  59. package/chunks/glob-GSFTYAS2.js +22 -0
  60. package/chunks/{goal-tools-C6BSBHCF.js → goal-tools-YQOA6OKU.js} +1 -1
  61. package/chunks/{grep-MVCOBUYW.js → grep-VAB2VSXM.js} +1 -1
  62. package/chunks/{ja-GGNJR7AR.js → ja-LV4RLM3M.js} +2 -2
  63. package/chunks/{ls-JYJXFSXN.js → ls-IZJ3CKZY.js} +1 -1
  64. package/chunks/{lsp-DYDK6XCS.js → lsp-NGLDRHZU.js} +1 -1
  65. package/chunks/matildaAgentContentGenerator-QQHPCFJ5.js +8 -0
  66. package/chunks/matildaContentGenerator-W7Z33ONU.js +8 -0
  67. package/chunks/mcp-client-DXUNIEIB.js +3 -0
  68. package/chunks/monitor-4PFIGAGG.js +32 -0
  69. package/chunks/notebook-edit-MWJYAATJ.js +17 -0
  70. package/chunks/{openaiContentGenerator-2EALAM3U.js → openaiContentGenerator-NDVJL6QL.js} +1 -1
  71. package/chunks/{pt-D6L2QTDM.js → pt-5SQ4DGL7.js} +2 -2
  72. package/chunks/read-file-WPZKPXWA.js +3 -0
  73. package/chunks/ripGrep-7LZDZFTX.js +3 -0
  74. package/chunks/{ru-BNJCHDYO.js → ru-7K24S53N.js} +2 -2
  75. package/chunks/scheduler-DK2MVKXX.js +8 -0
  76. package/chunks/{send-message-P3SMWNEE.js → send-message-TCPX5UDU.js} +1 -1
  77. package/chunks/{serve-FXH6EBQ6.js → serve-GSZPJI2O.js} +59 -48
  78. package/chunks/shell-PRS47PDP.js +3 -0
  79. package/chunks/{skill-HZPFEAPF.js → skill-ETQM5NI3.js} +1 -1
  80. package/chunks/src-UB7DZRYK.js +3 -0
  81. package/chunks/{symbol-search-EAIZPWN7.js → symbol-search-HARHZ5AH.js} +1 -1
  82. package/chunks/{syntheticOutput-432LXITX.js → syntheticOutput-WZDPECYS.js} +1 -1
  83. package/chunks/task-create-XRNIDT4T.js +3 -0
  84. package/chunks/{task-detach-XMSJ3HBM.js → task-detach-TBAVUOTC.js} +1 -1
  85. package/chunks/task-list-Z6BDZZID.js +9 -0
  86. package/chunks/{task-stop-NTS62FLG.js → task-stop-HDSARSJ6.js} +1 -1
  87. package/chunks/{task-update-AR26UFYZ.js → task-update-MW2VT2XV.js} +1 -1
  88. package/chunks/{team-create-PYXFVIR5.js → team-create-VMYNLZCC.js} +1 -1
  89. package/chunks/team-delete-F7QDC2TE.js +8 -0
  90. package/chunks/{todoWrite-5NZ7CHTC.js → todoWrite-SCF5M24M.js} +1 -1
  91. package/chunks/{tool-search-RKZDSRYS.js → tool-search-WX6FOE35.js} +1 -1
  92. package/chunks/{web-fetch-VW3SVDQ6.js → web-fetch-CKYBHGLF.js} +1 -1
  93. package/chunks/{web-search-XQUIZARL.js → web-search-67DFNS5V.js} +1 -1
  94. package/chunks/{workflow-YXNXDRWZ.js → workflow-WBSRQG3N.js} +2 -2
  95. package/chunks/write-file-S5FAX4JJ.js +15 -0
  96. package/cli.js +436 -439
  97. package/locales/ca.js +0 -3
  98. package/locales/de.js +0 -3
  99. package/locales/en.js +0 -3
  100. package/locales/fr.js +0 -3
  101. package/locales/ja.js +0 -3
  102. package/locales/pt.js +0 -3
  103. package/locales/ru.js +0 -3
  104. package/package.json +2 -2
  105. package/sandbox-macos-permissive-closed.sb +0 -1
  106. package/sandbox-macos-permissive-open.sb +0 -1
  107. package/sandbox-macos-permissive-proxied.sb +0 -1
  108. package/sandbox-macos-restrictive-closed.sb +0 -1
  109. package/sandbox-macos-restrictive-open.sb +0 -1
  110. package/sandbox-macos-restrictive-proxied.sb +0 -1
  111. package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
  112. package/bundled/mainy/docs/features/channels/feishu.md +0 -186
  113. package/bundled/mainy/docs/features/channels/weixin.md +0 -106
  114. package/chunks/agent-WM63A6NK.js +0 -3
  115. package/chunks/agent-headless-QIUBDKPW.js +0 -3
  116. package/chunks/chunk-2MOGYHWM.js +0 -8
  117. package/chunks/chunk-3IRGBRSP.js +0 -113
  118. package/chunks/chunk-6GBNB5Z2.js +0 -3
  119. package/chunks/chunk-6Z2MV7ZY.js +0 -186
  120. package/chunks/chunk-BVOCFLC4.js +0 -56
  121. package/chunks/chunk-FPO57O66.js +0 -39
  122. package/chunks/chunk-LJR4RZZ2.js +0 -3
  123. package/chunks/chunk-MO2HXJG5.js +0 -9
  124. package/chunks/chunk-PA6532AY.js +0 -6
  125. package/chunks/chunk-S3CWEVTS.js +0 -15
  126. package/chunks/chunk-U347OO7S.js +0 -9
  127. package/chunks/chunk-UIRBHC5X.js +0 -3
  128. package/chunks/chunk-WVY2P6WH.js +0 -26
  129. package/chunks/chunk-WZ75OGYY.js +0 -14
  130. package/chunks/chunk-XMZIY7XX.js +0 -13
  131. package/chunks/contextCommand-DAB3HOHY.js +0 -3
  132. package/chunks/dist-ME6647DQ.js +0 -195
  133. package/chunks/dist-VG3ZDJ2A.js +0 -28
  134. package/chunks/dist-YTCHM57U.js +0 -23
  135. package/chunks/geminiContentGenerator-RJ73DQAP.js +0 -8
  136. package/chunks/glob-QQ6LGKDX.js +0 -22
  137. package/chunks/matildaAgentContentGenerator-YUYS4336.js +0 -8
  138. package/chunks/matildaContentGenerator-O4Z2QPCP.js +0 -8
  139. package/chunks/mcp-client-RXVQU5VI.js +0 -3
  140. package/chunks/monitor-77KXDXPR.js +0 -32
  141. package/chunks/notebook-edit-TKJD2EQZ.js +0 -17
  142. package/chunks/read-file-3KUAH6ND.js +0 -3
  143. package/chunks/ripGrep-U2PLKXMY.js +0 -3
  144. package/chunks/scheduler-J7VU2V5Y.js +0 -8
  145. package/chunks/shell-PXR2AXDD.js +0 -3
  146. package/chunks/src-RFAEPLY7.js +0 -3
  147. package/chunks/task-create-Z3QRCMX4.js +0 -3
  148. package/chunks/task-list-GXAJW3JP.js +0 -9
  149. package/chunks/team-delete-OMYVUAQU.js +0 -8
  150. package/chunks/write-file-XDDLTGSG.js +0 -15
@@ -289,88 +289,6 @@ export VLLM_API_KEY="not-needed"
289
289
  >
290
290
  > Each provider example includes an `env` field to illustrate how the API key should be configured.
291
291
 
292
- ### Overview
293
-
294
- | Model ID | Name | Description |
295
- | ------------------------- | ----------------------- | --------------------------------------------------------- |
296
- | `matilda3.5-plus` | matilda3.5-plus | Advanced model with thinking enabled |
297
- | `matilda3.6-plus` | matilda3.6-plus | Latest model with thinking enabled (Pro subscribers only) |
298
- | `matilda3.7-plus` | matilda3.7-plus | Advanced model with thinking enabled |
299
- | `matilda3-coder-plus` | matilda3-coder-plus | Optimized for coding tasks |
300
- | `matilda3-coder-next` | matilda3-coder-next | Experimental coding model |
301
- | `matilda3-max-2026-01-23` | matilda3-max-2026-01-23 | Latest max model with thinking enabled |
302
- | `glm-5` | glm-5 | GLM model with thinking enabled |
303
- | `glm-4.7` | glm-4.7 | GLM model with thinking enabled |
304
- | `kimi-k2.5` | kimi-k2.5 | Kimi model with thinking and vision/video support |
305
- | `MiniMax-M2.5` | MiniMax-M2.5 | MiniMax model with thinking enabled |
306
-
307
- ### Setup
308
-
309
- 2. Run the `/auth` command in Matilda Code
310
- 3. Select your region
311
- 4. Enter your API key when prompted
312
-
313
- The models will be automatically configured and added to your `/model` picker.
314
-
315
- ### Regions
316
-
317
- | Region | Endpoint | Description |
318
- | ------ | -------- | ----------- |
319
-
320
- The region is selected during authentication and stored in `settings.json` under the `modelProviders` configuration. To switch regions, re-run the `/auth` command and select a different region.
321
-
322
- ### API Key Storage
323
-
324
- > [!warning]
325
- >
326
- > **Security Recommendation**: For better security, it is recommended to move the API key from `settings.json` to a separate `.env` file and load it as an environment variable. For example:
327
- >
328
- > ```bash
329
- > # ~/.matilda/.env
330
- > ```
331
- >
332
- > Then ensure this file is added to your `.gitignore` if you're using project-level settings.
333
-
334
- ### Automatic Updates
335
-
336
- Coding Plan model configurations are versioned. When Matilda Code detects a newer version of the model template, you will be prompted to update. Accepting the update will:
337
-
338
- - Replace the existing Coding Plan model configurations with the latest versions
339
- - Preserve any custom model configurations you've added manually
340
- - Automatically switch to the first model in the updated configuration
341
-
342
- The update process ensures you always have access to the latest model configurations and features without manual intervention.
343
-
344
- ### Manual Configuration (Advanced)
345
-
346
- If you prefer to manually configure Coding Plan models, you can add them to your `settings.json` like any OpenAI-compatible provider:
347
-
348
- ```json
349
- {
350
- "modelProviders": {
351
- "openai": [
352
- {
353
- "id": "matilda3-coder-plus",
354
- "name": "matilda3-coder-plus",
355
- "envKey": "YOUR_CUSTOM_ENV_KEY"
356
- }
357
- ]
358
- }
359
- }
360
- ```
361
-
362
- > [!note]
363
- >
364
- > When using manual configuration:
365
- >
366
- > - You can use any environment variable name for `envKey`
367
- > - You do not need to configure `codingPlan.*`
368
- > - **Automatic updates will not apply** to manually configured Coding Plan models
369
-
370
- > [!warning]
371
- >
372
- > If you also use automatic Coding Plan configuration, automatic updates may overwrite your manual configurations if they use the same `envKey` and `baseUrl` as the automatic configuration. To avoid this, ensure your manual configuration uses a different `envKey` if possible.
373
-
374
292
  ## Resolution Layers and Atomicity
375
293
 
376
294
  The effective auth/model/credential values are chosen per field using the following precedence (first present wins). You can combine `--auth-type` with `--model` to point directly at a provider entry; these CLI flags run before other layers.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > [!tip]
4
4
  >
5
- > **Authentication / API keys:** Authentication (API Key, Matilda Coding Plan) and auth-related environment variables (like `OPENAI_API_KEY`) are documented in **[Authentication](../configuration/auth)**.
5
+ > **Authentication / API keys:** Authentication (Matilda account, API token) and auth-related environment variables (like `OPENAI_API_KEY`) are documented in **[Authentication](../configuration/auth)**.
6
6
 
7
7
  > [!note]
8
8
  >
@@ -23,6 +23,34 @@ Configuration is applied in the following order of precedence (lower numbers are
23
23
  | 6 | Environment variables | System-wide or session-specific variables, potentially loaded from `.env` files |
24
24
  | 7 | Command-line arguments | Values passed when launching the CLI |
25
25
 
26
+ ## Organization usage
27
+
28
+ Pass `--organization-id <uuid>` to use an organization for this invocation's
29
+ Matilda Core Code requests. Without this option, requests keep their personal
30
+ scope. The selection is not saved to your settings or inferred from a previous
31
+ session. Pass it again when resuming a session that should use the organization.
32
+
33
+ The server checks your current membership, product access and applicable
34
+ allowance. Selecting an organization does not grant access or authorize wallet
35
+ spending. If the organization is unavailable, resolve the server error instead
36
+ of removing the option to silently change who pays.
37
+
38
+ The option requires the first-party Matilda Core Code endpoint. Third-party
39
+ providers, direct model endpoints and legacy routes reject it. Organization
40
+ and credit-spending headers cannot be supplied through `customHeaders`.
41
+
42
+ ## Optional Code credits
43
+
44
+ Pass `--code-credit-limit-minor 100` to allow up to 100 USD cents for each primary model generation when Core confirms that your included allowance is exhausted. The amount is per generation, not a conversation or session budget. Each tool follow-up may start another generation with the same cap. Core still enforces your account and organization limits.
45
+
46
+ The option is off by default and is never saved to settings. It requires the first-party Matilda Core Code endpoint and a Matilda OAuth session. Credit-enabled requests currently support text and tools with an output limit of at most 32,768 tokens; configured lower limits are preserved.
47
+
48
+ Code records request IDs and non-secret recovery metadata before sending an included or paid request when credit consent is enabled. This journal is retained even with chat recording disabled; prompts, tokens and spending capabilities are not written to it. An interrupted generation retains its original intent, and financial recovery does not recover missing output.
49
+
50
+ After a restart, inspect requests with `matilda credits list --session <session-id>` and use `matilda credits recover <intent-id> --session <session-id>` for the current financial state. Add `--json` for structured output. These commands require the original Matilda account and endpoint and cannot start a generation. Forks retain references to their original sessions rather than copying spending authority.
51
+
52
+ Resumed sessions require a new user prompt before model work; automatic retries, continuations and pending tool follow-ups cannot replay the old generation, even when the credit option is omitted. A new prompt uses only the new invocation's settings, so pass the credit cap again to authorize new paid work. Production availability also depends on the server's paid Code rollout.
53
+
26
54
  ## Settings files
27
55
 
28
56
  Matilda Code uses JSON settings files for persistent configuration. There are four locations for these files:
@@ -150,7 +178,7 @@ Settings are organized into categories. Most settings should be placed within th
150
178
  | `model.maxWallTimeSeconds` | number | Wall-clock budget for headless / unattended runs, in seconds. `-1` means unlimited. Overridable per-invocation via `--max-wall-time`, which requires a positive duration (`90`, `30s`, `5m`, `1h`, `1.5h`); the minimum is 1 second — sub-second values (`500ms`, `0.5`) are rejected as typos. Omit the flag to fall back to this setting. Aborts with exit code 55 when exceeded. | `-1` |
151
179
  | `model.maxToolCalls` | number | Cumulative tool-call budget for a run (counts every executed tool, success or failure; `structured_output` under `--json-schema` is exempt). `-1` means unlimited; `0` means "no tool calls allowed". Capped at 1,000,000 to catch typos. Overridable via `--max-tool-calls`. Aborts with exit code 55 when exceeded. | `-1` |
152
180
  | `model.generationConfig` | object | Advanced overrides passed to the underlying content generator. Supports request controls such as `timeout`, `maxRetries`, `enableCacheControl`, `splitToolMedia` (default `true`; splits tool-returned media — including images read by the built-in read_file — into a follow-up user message instead of the spec-violating `role: "tool"` message, so strict OpenAI-compatible servers like doubao / new-api / LM Studio can see it; set `false` to restore the legacy embed-in-tool behavior), `contextWindowSize` (override model's context window size), `modalities` (override auto-detected input modalities), `customHeaders` (custom HTTP headers for API requests), and `extra_body` (additional body parameters for OpenAI-compatible API requests only), along with fine-tuning knobs under `samplingParams` (for example `temperature`, `top_p`, `max_tokens`). Leave unset to rely on provider defaults. | `undefined` |
153
- | `model.chatCompression.contextPercentageThreshold` | number | **REMOVED.** Auto-compaction now uses a three-tier threshold ladder (warn / auto / hard) computed internally from the model's context window via the `computeThresholds()` function — no longer user-configurable. Setting this field in `settings.json` is silently ignored (no startup warning). There is currently no replacement for "disable compression entirely" — reactive overflow recovery remains the safety net at the API layer if compression itself fails. (See PR #4345 / `docs/design/auto-compaction-threshold-redesign.md` for the redesign rationale.) | `N/A` |
181
+ | `model.chatCompression.contextPercentageThreshold` | number | **REMOVED.** Auto-compaction now uses a three-tier threshold ladder (warn / auto / hard) computed internally from the model's context window via the `computeThresholds()` function — no longer user-configurable. Setting this field in `settings.json` is silently ignored (no startup warning). There is currently no replacement for "disable compression entirely" — reactive overflow recovery remains the safety net at the API layer if compression itself fails. | `N/A` |
154
182
  | `model.chatCompression.maxRecentFilesToRetain` | number | **REMOVED.** Compaction no longer restores file contents; it lists the files the session read and changed by path, and the model reads what it needs. Setting this field in `settings.json` or `MATILDA_COMPACT_MAX_RECENT_FILES` is silently ignored. | `N/A` |
155
183
  | `model.chatCompression.maxRecentImagesToRetain` | number | Number of most-recent images (tool screenshots / user pastes) restored into history after auto-compaction. `0` restores none. Env override: `MATILDA_COMPACT_MAX_RECENT_IMAGES`. | `3` |
156
184
  | `model.chatCompression.enableScreenshotTrigger` | boolean | When `true`, auto-compaction also fires once the number of tool-returned images accumulated in history reaches `screenshotTriggerThreshold`, independent of token usage — aimed at computer-use sessions where frequent screenshots dilute model attention. Counts only images returned inside tool results, not user-pasted images. Env override: `MATILDA_COMPACT_SCREENSHOT_TRIGGER` (`1`/`true`/`0`/`false`). | `true` |
@@ -173,7 +173,7 @@ ask you for explicit approval rather than route around the denial.
173
173
 
174
174
  Classifier reasons are produced by the LLM and are not translated. If you
175
175
  want non-English reasons, add a hint like
176
- `Respond reasons in Chinese` to `permissions.autoMode.environment`.
176
+ `Respond reasons in Japanese` to `permissions.autoMode.environment`.
177
177
 
178
178
  ## Fallback to manual approval
179
179
 
@@ -1,8 +1,5 @@
1
1
  export default {
2
2
  overview: 'Overview',
3
3
  telegram: 'Telegram',
4
- weixin: 'WeChat',
5
- dingtalk: 'DingTalk',
6
- feishu: 'Feishu',
7
4
  plugins: 'Plugins',
8
5
  };
@@ -1,6 +1,6 @@
1
1
  # Channels
2
2
 
3
- Channels let you interact with a Matilda Code agent from messaging platforms like Telegram, WeChat, or DingTalk, instead of the terminal. You send messages from your phone or desktop chat app, and the agent responds just like it would in the CLI.
3
+ Channels let you interact with a Matilda Code agent from messaging platforms like Telegram, instead of the terminal. You send messages from your phone or desktop chat app, and the agent responds just like it would in the CLI.
4
4
 
5
5
  ## How It Works
6
6
 
@@ -15,7 +15,7 @@ All channels share one agent process with isolated sessions per user. Each chann
15
15
 
16
16
  ## Quick Start
17
17
 
18
- 1. Set up a bot on your messaging platform (see channel-specific guides: [Telegram](./telegram), [WeChat](./weixin), [DingTalk](./dingtalk))
18
+ 1. Set up a bot on your messaging platform (see the [Telegram](./telegram) guide)
19
19
  2. Add the channel configuration to `~/.matilda/settings.json`
20
20
  3. Run `matilda channel start` to start all channels, or `matilda channel start <name>` for a single channel
21
21
 
@@ -49,10 +49,10 @@ Channels are configured under the `channels` key in `settings.json`. Each channe
49
49
 
50
50
  | Option | Required | Description |
51
51
  | ------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
52
- | `type` | Yes | Channel type: `telegram`, `weixin`, `dingtalk`, or a custom type from an extension (see [Plugins](./plugins)) |
53
- | `token` | Telegram | Bot token. Supports `$ENV_VAR` syntax to read from environment variables. Not needed for WeChat or DingTalk |
54
- | `clientId` | DingTalk | DingTalk AppKey. Supports `$ENV_VAR` syntax |
55
- | `clientSecret` | DingTalk | DingTalk AppSecret. Supports `$ENV_VAR` syntax |
52
+ | `type` | Yes | Channel type: `telegram`, or a custom type from an extension (see [Plugins](./plugins)) |
53
+ | `token` | Telegram | Bot token. Supports `$ENV_VAR` syntax to read from environment variables |
54
+ | `clientId` | No | Client ID, for extension channels that need one. Supports `$ENV_VAR` syntax |
55
+ | `clientSecret` | No | Client secret, for extension channels that need one. Supports `$ENV_VAR` syntax |
56
56
  | `model` | No | Model to use for this channel (e.g., `matilda3.5-plus`). Overrides the default model. Useful for multimodal models that support image input |
57
57
  | `senderPolicy` | No | Who can talk to the bot: `allowlist` (default), `open`, or `pairing` |
58
58
  | `allowedUsers` | No | List of user IDs allowed to use the bot (used by `allowlist` and `pairing` policies) |
@@ -215,14 +215,6 @@ Send a document (PDF, code file, text file, etc.) to the bot. The file is downlo
215
215
 
216
216
  Files work with any model — no multimodal support required.
217
217
 
218
- ### Platform differences
219
-
220
- | Feature | Telegram | WeChat | DingTalk |
221
- | -------- | -------------------------------------------- | -------------------------------- | --------------------------------------------- |
222
- | Images | Direct download via Bot API | CDN download with AES decryption | downloadCode API (two-step) |
223
- | Files | Direct download via Bot API (20MB limit) | CDN download with AES decryption | downloadCode API (two-step) |
224
- | Captions | Photo/file captions included as message text | Not applicable | Rich text: mixed text + images in one message |
225
-
226
218
  ## Dispatch Modes
227
219
 
228
220
  Controls what happens when you send a new message while the bot is still processing a previous one.
@@ -292,7 +284,7 @@ Channels support slash commands. These are handled locally (no agent round-trip)
292
284
 
293
285
  All other slash commands (e.g., `/compress`, `/summary`) are forwarded to the agent.
294
286
 
295
- These commands work on all channel types (Telegram, WeChat, DingTalk).
287
+ These commands work on all channel types.
296
288
 
297
289
  ## Running
298
290
 
@@ -314,7 +306,7 @@ The bot runs in the foreground. Press `Ctrl+C` to stop, or use `matilda channel
314
306
 
315
307
  ### Multi-Channel Mode
316
308
 
317
- When you run `matilda channel start` without a name, all channels defined in `settings.json` start together sharing a single agent process. Each channel maintains its own sessions — a Telegram user and a WeChat user get separate conversations, even though they share the same agent.
309
+ When you run `matilda channel start` without a name, all channels defined in `settings.json` start together sharing a single agent process. Each channel maintains its own sessions, so users on different channels get separate conversations, even though they share the same agent.
318
310
 
319
311
  Each channel uses its own `cwd` from its config, so different channels can work on different projects simultaneously.
320
312
 
@@ -59,11 +59,11 @@ Commands specifically for controlling interface and output language.
59
59
  | Command | Description | Usage Examples |
60
60
  | --------------------- | -------------------------------- | -------------------------- |
61
61
  | `/language` | View or change language settings | `/language` |
62
- | → `ui [language]` | Set UI interface language | `/language ui zh-CN` |
63
- | → `output [language]` | Set LLM output language | `/language output Chinese` |
62
+ | → `ui [language]` | Set UI interface language | `/language ui de-DE` |
63
+ | → `output [language]` | Set LLM output language | `/language output English` |
64
64
 
65
- - Available built-in UI languages: `zh-CN` (Simplified Chinese), `en-US` (English), `ru-RU` (Russian), `de-DE` (German), `ja-JP` (Japanese), `pt-BR` (Portuguese - Brazil), `fr-FR` (French), `ca-ES` (Catalan)
66
- - Output language examples: `Chinese`, `English`, `Japanese`, etc.
65
+ - Available built-in UI languages: `en-US` (English), `ru-RU` (Russian), `de-DE` (German), `ja-JP` (Japanese), `pt-BR` (Portuguese - Brazil), `fr-FR` (French), `ca-ES` (Catalan)
66
+ - Output language examples: `English`, `Japanese`, `German`, etc.
67
67
 
68
68
  ### 1.4 Tool and Model Management
69
69
 
@@ -51,12 +51,14 @@ Command hooks execute commands via child processes. Input JSON is passed through
51
51
  | `command` | `string` | Yes | Command to execute |
52
52
  | `name` | `string` | No | Hook name (for logging) |
53
53
  | `description` | `string` | No | Hook description |
54
- | `timeout` | `number` | No | Timeout in milliseconds, default 60000 |
54
+ | `timeout` | `number` | No | Timeout in seconds, default 60 |
55
55
  | `async` | `boolean` | No | Whether to run asynchronously in background |
56
56
  | `env` | `Record<string, string>` | No | Environment variables |
57
57
  | `shell` | `"bash" \| "powershell"` | No | Shell to use |
58
58
  | `statusMessage` | `string` | No | Status message displayed during execution |
59
59
 
60
+ `timeout` is in seconds for command, HTTP and prompt hooks, as in Claude Code; SDK-registered function hooks keep milliseconds. Earlier versions read command hook timeouts as milliseconds, so rewrite any such value in seconds, for example `10000` as `10`; otherwise it is read as 10000 seconds. A command hook `timeout` that is not a positive number, such as `"30s"`, is ignored and the 60 second default applies, and one longer than about 24.8 days, the longest a timer supports, is capped there.
61
+
60
62
  **Example:**
61
63
 
62
64
  ```json
@@ -70,7 +72,7 @@ Command hooks execute commands via child processes. Input JSON is passed through
70
72
  "type": "command",
71
73
  "command": "$MATILDA_PROJECT_DIR/.matilda/hooks/security-check.sh",
72
74
  "name": "security-check",
73
- "timeout": 10000
75
+ "timeout": 10
74
76
  }
75
77
  ]
76
78
  }
@@ -942,7 +944,7 @@ exit 0
942
944
  "type": "command",
943
945
  "command": "$HOME/.matilda/hooks/todo-validator.sh",
944
946
  "name": "todo-validator",
945
- "timeout": 5000
947
+ "timeout": 5
946
948
  }
947
949
  ]
948
950
  }
@@ -1036,7 +1038,7 @@ exit 0
1036
1038
  "type": "command",
1037
1039
  "command": "$HOME/.matilda/hooks/todo-completion-validator.sh",
1038
1040
  "name": "completion-validator",
1039
- "timeout": 5000
1041
+ "timeout": 5
1040
1042
  }
1041
1043
  ]
1042
1044
  }
@@ -1069,7 +1071,7 @@ Hooks are configured in Matilda Code settings, typically in `.matilda/settings.j
1069
1071
  "command": "/path/to/security-check.sh",
1070
1072
  "name": "security-check",
1071
1073
  "description": "Run security checks before tool execution",
1072
- "timeout": 30000
1074
+ "timeout": 30
1073
1075
  }
1074
1076
  ]
1075
1077
  }
@@ -1120,7 +1122,7 @@ Only `command` type supports asynchronous execution. Setting `"async": true` run
1120
1122
  "type": "command",
1121
1123
  "command": "$MATILDA_PROJECT_DIR/.matilda/hooks/run-tests-async.sh",
1122
1124
  "async": true,
1123
- "timeout": 300000
1125
+ "timeout": 300
1124
1126
  }
1125
1127
  ]
1126
1128
  }
@@ -1206,7 +1208,7 @@ Configure in `.matilda/settings.json`:
1206
1208
  "command": "${SECURITY_CHECK_SCRIPT}",
1207
1209
  "name": "security-checker",
1208
1210
  "description": "Security validation for bash commands",
1209
- "timeout": 10000
1211
+ "timeout": 10
1210
1212
  }
1211
1213
  ]
1212
1214
  }
@@ -21,7 +21,6 @@ This is the CLI’s UI localization layer (i18n/l10n): it controls the language
21
21
  Use the `/language ui` command:
22
22
 
23
23
  ```bash
24
- /language ui zh-CN # Chinese
25
24
  /language ui en-US # English
26
25
  /language ui ru-RU # Russian
27
26
  /language ui de-DE # German
@@ -34,7 +33,6 @@ Use the `/language ui` command:
34
33
  Aliases are also supported:
35
34
 
36
35
  ```bash
37
- /language ui zh # Chinese
38
36
  /language ui en # English
39
37
  /language ui ru # Russian
40
38
  /language ui de # German
@@ -67,7 +65,6 @@ The LLM output language is controlled by a rule file at `~/.matilda/output-langu
67
65
 
68
66
  On first startup, if no `output-language.md` file exists, Matilda Code automatically creates one based on your system locale. For example:
69
67
 
70
- - System locale `zh` creates a rule for Chinese responses
71
68
  - System locale `en` creates a rule for English responses
72
69
  - System locale `ru` creates a rule for Russian responses
73
70
  - System locale `de` creates a rule for German responses
@@ -81,13 +78,12 @@ On first startup, if no `output-language.md` file exists, Matilda Code automatic
81
78
  Use `/language output <language>` to change:
82
79
 
83
80
  ```bash
84
- /language output Chinese
85
81
  /language output English
86
82
  /language output Japanese
87
83
  /language output German
88
84
  ```
89
85
 
90
- Any language name works. The LLM will be instructed to respond in that language.
86
+ The LLM will be instructed to respond in that language.
91
87
 
92
88
  > [!note]
93
89
  >
@@ -110,7 +106,7 @@ Any language name works. The LLM will be instructed to respond in that language.
110
106
  ### Via Environment Variable
111
107
 
112
108
  ```bash
113
- export MATILDA_CODE_LANG=zh
109
+ export MATILDA_CODE_LANG=de
114
110
  ```
115
111
 
116
112
  This influences auto-detection on first startup (if you haven’t set a UI language and no `output-language.md` file exists yet).
@@ -129,29 +125,6 @@ User directory takes precedence over built-in translations.
129
125
  > Contributions are welcome! If you’d like to improve built-in translations or add new languages.
130
126
  > For a concrete example, see [PR #1238: feat(i18n): add Russian language support](https://github.com/MaincodeHQ/matilda-code/pull/1238).
131
127
 
132
- ### Maintaining `zh-TW` (Traditional Chinese for Taiwan)
133
-
134
- `zh-TW` is **not** an automatic OpenCC s2t conversion of `zh.js` — it is a hand-maintained Taiwan-vocabulary translation. When adding or updating keys, please follow the conventions below.
135
-
136
- The "CI enforced?" column indicates whether `npm run check-i18n` will fail the build on a violation. Rows marked **No** are style guidance enforced by review only — typically because the offending form has a legitimate non-UI meaning (`文件` can mean "document", `打開` is colloquially fine in Taiwan).
137
-
138
- | Avoid | Use instead | CI enforced? | Reason |
139
- | --------------------- | --------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
140
- | 文件 (file) | 檔案 | No | Taiwan term for filesystem files (but `文件` can legitimately mean "document") |
141
- | 服務器 / 服务器 | 伺服器 | Yes | Taiwan term for "server" |
142
- | 菜單 / 菜单 | 選單 | Yes | Taiwan term for "menu" |
143
- | 鏈接 / 链接 | 連結 | Yes | Taiwan term for "link" (bare `鏈` is fine — e.g. 區塊鏈) |
144
- | 打開 | 開啟 | No | Taiwan-preferred verb for "open" (UI); `打開` is colloquially common |
145
- | 爲 / 啓 / 曆史 / 鏈接 | 為 / 啟 / 歷史 / 連結 | Yes | Variant Traditional forms from raw OpenCC s2t. Note: `曆` is context-dependent and correct in calendar terms (日曆, 農曆, 西曆); CI only flags the bigram `曆史`, not bare `曆`. |
146
-
147
- If you are not a Traditional Chinese speaker and need to bootstrap a value, **do not paste raw OpenCC `s2t` output**: the default s2t profile emits variant Traditional characters (e.g. 爲, 啓) that Taiwan does not use, and never rewrites Mainland-Chinese vocabulary (服務器, 菜單). Prefer `s2twp.json` (Simplified → Taiwan with phrase mapping) as a starting point and then ask a Taiwan-Chinese speaker to review.
148
-
149
- The `check-i18n` script (run in CI via `npm run check-i18n`) will fail the build if any of the CI-enforced substrings above end up in a `zh-TW` value. See `scripts/check-i18n.ts → ZH_TW_FORBIDDEN_PATTERNS` for the full list. If a translation legitimately needs to contain a CI-forbidden substring, add its key to `ZH_TW_ALLOWED_EXCEPTIONS` in the same file with a brief justification.
150
-
151
- > [!note]
152
- >
153
- > The check uses plain substring matching, which does not understand Chinese word boundaries. A bigram pattern can therefore false-positive across compound-word boundaries — for example, `區塊鏈接口` (= `區塊鏈` + `接口`) contains the substring `鏈接` even though neither word is incorrect. If you hit a surprising CI failure of this kind, add the translation key to `ZH_TW_ALLOWED_EXCEPTIONS` rather than removing the pattern.
154
-
155
128
  ### Language Pack Format
156
129
 
157
130
  ```javascript
@@ -328,8 +328,6 @@ The following items are intentionally not implemented in the current phase:
328
328
  - **Mid-session `enter_worktree` does NOT switch `process.cwd()` or `Config.targetDir`.** That tool uses the model-context-only convention (see [Sub-Agents](./sub-agents.md)). Only the startup `--worktree` flag actually switches the process working directory.
329
329
  - **Relative paths in other arg fields are resolved BEFORE the worktree chdir.** Path-taking flags (`--mcp-config`, `--openai-logging-dir`, `--json-file`, `--input-file`, `--telemetry-outfile`, `--include-directories`) are normalized to absolute paths against the launch cwd when `--worktree` is set. Other path-shaped argv fields not in this list still resolve against the worktree cwd — use absolute paths to be safe.
330
330
 
331
- Track the roadmap in `docs/design/worktree.md`.
332
-
333
331
  ## Troubleshooting
334
332
 
335
333
  **The Footer shows no worktree indicator even though I just created one.**
@@ -21,7 +21,7 @@ Get started with Matilda Code CLI in your repository in just a few minutes:
21
21
 
22
22
  ### 1. Get a Matilda API Key
23
23
 
24
- Obtain your API key from [Matilda-compatible](https://help.matilda.com/zh/model-studio/matilda-code) (Matilda's AI platform)
24
+ Get a Matilda API token from the [Matilda external API guide][Matilda external API].
25
25
 
26
26
  ### 2. Add it as a GitHub Secret
27
27
 
@@ -175,7 +175,7 @@ You can set the following secrets in your repository:
175
175
 
176
176
  | Name | Description | Required | When Required |
177
177
  | ----------------- | --------------------------------------------- | -------- | --------------------------------------------- |
178
- | `MATILDA_API_KEY` | Your Matilda API key from Matilda-compatible. | Yes | Required for all workflows that call Matilda. |
178
+ | `MATILDA_API_KEY` | Your Matilda API token. | Yes | Required for all workflows that call Matilda. |
179
179
  | `APP_PRIVATE_KEY` | Private key for your GitHub App (PEM format). | No | Using a custom GitHub App. |
180
180
 
181
181
  To add a secret:
@@ -234,7 +234,7 @@ Contributions are welcome! Check out the Matilda Code CLI **Contributing Guide**
234
234
 
235
235
  [secrets]: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions
236
236
  [Matilda Code]: https://github.com/MaincodeHQ/matilda-code
237
- [Matilda-compatible]: https://matilda.maincode.help/welcome/external-api
237
+ [Matilda external API]: https://matilda.maincode.help/welcome/external-api
238
238
  [Matilda Code CLI]: https://github.com/MaincodeHQ/matilda-code-action/
239
239
  [variables]: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-variables#creating-configuration-variables-for-a-repository
240
240
  [GitHub CLI]: https://docs.github.com/en/github-cli/github-cli
@@ -185,8 +185,8 @@ Here are the most important commands for daily use:
185
185
  | `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
186
186
  | `/theme` | Change Matilda Code visual theme | `/theme` |
187
187
  | `/language` | View or change language settings | `/language` |
188
- | → `ui [language]` | Set UI interface language | `/language ui zh-CN` |
189
- | → `output [language]` | Set LLM output language | `/language output Chinese` |
188
+ | → `ui [language]` | Set UI interface language | `/language ui de-DE` |
189
+ | → `output [language]` | Set LLM output language | `/language output German` |
190
190
  | `/quit` | Exit Matilda Code immediately | `/quit` or `/exit` |
191
191
 
192
192
  See the [CLI reference](./features/commands) for a complete list of commands.
@@ -21,7 +21,7 @@ This guide provides solutions to common issues and debugging tips, including top
21
21
  - **Error: `Device authorization flow failed: fetch failed`**
22
22
  - **Cause:** Node.js could not reach Matilda OAuth endpoints (often a proxy or SSL/TLS trust issue). When available, Matilda Code will also print the underlying error cause (for example: `UNABLE_TO_VERIFY_LEAF_SIGNATURE`). Note: this error is specific to the legacy Matilda OAuth flow.
23
23
  - **Solution:**
24
- - If you are still using Matilda OAuth, switch to API Key or Coding Plan via `/auth`.
24
+ - If you are still using Matilda OAuth, switch to a Matilda account or API token via `/auth`.
25
25
  - If you are behind a proxy, set it via `matilda --proxy <url>` (or the `proxy` setting in `settings.json`).
26
26
  - If your network uses a corporate TLS inspection CA, set `NODE_EXTRA_CA_CERTS` as described above.
27
27
 
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{Pg as a,Qg as b,Rg as c,Sg as d,Tg as e,Ug as f}from"./chunk-PEKAUGYV.js";import"./chunk-M53RP3YP.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-2HTPVSGT.js";import"./chunk-W4QSMIWO.js";import"./chunk-6I6VGTKD.js";import"./chunk-ZX34M2GF.js";import"./chunk-47XR7IMP.js";import"./chunk-MTMU7JYZ.js";import"./chunk-QKYGQLWC.js";import"./chunk-EZDV7A76.js";import"./chunk-RNKDFE2S.js";import"./chunk-RI54U73U.js";import"./chunk-6M5G5FBH.js";import"./chunk-QZI2ZGZY.js";import"./chunk-V6UPUMP3.js";import"./chunk-WC2VTVCE.js";import"./chunk-KHHJYBR5.js";import"./chunk-6EQMZNIY.js";import"./chunk-P5TG5CON.js";import"./chunk-DE3HKC2W.js";import"./chunk-GTVCJCHR.js";import"./chunk-IJEGHQ7Z.js";import"./chunk-PGUG43HG.js";import"./chunk-7ZODGQO6.js";import"./chunk-TISQNFB5.js";import"./chunk-VI74YQQO.js";import"./chunk-YV3PUOBU.js";import"./chunk-SOEIVSM5.js";import"./chunk-DC7LAFZZ.js";import"./chunk-4F4DA5UI.js";import"./chunk-3YLXGE6T.js";import"./chunk-JCE3JAVC.js";import"./chunk-SVSY6AWS.js";import"./chunk-AOOZREGV.js";import"./chunk-SDTWBD62.js";import"./chunk-DHDD5YJC.js";import"./chunk-PGXQZVLX.js";import"./chunk-LUNDTQ3G.js";import"./chunk-5OHGYMKP.js";import"./chunk-TWJLOEAI.js";import"./chunk-27Q5KW3A.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{f as AgentTool,b as TOOL_REGISTRY_REBUILT,e as createApprovalModeOverride,c as hasRebuiltToolRegistry,d as rebuildToolRegistryOnOverride,a as resolveSubagentApprovalMode};
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{ng as a,og as b,pg as c}from"./chunk-PEKAUGYV.js";import"./chunk-M53RP3YP.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-2HTPVSGT.js";import"./chunk-W4QSMIWO.js";import"./chunk-6I6VGTKD.js";import"./chunk-ZX34M2GF.js";import"./chunk-47XR7IMP.js";import"./chunk-MTMU7JYZ.js";import"./chunk-QKYGQLWC.js";import"./chunk-EZDV7A76.js";import"./chunk-RNKDFE2S.js";import"./chunk-RI54U73U.js";import"./chunk-6M5G5FBH.js";import"./chunk-QZI2ZGZY.js";import"./chunk-V6UPUMP3.js";import"./chunk-WC2VTVCE.js";import"./chunk-KHHJYBR5.js";import"./chunk-6EQMZNIY.js";import"./chunk-P5TG5CON.js";import"./chunk-DE3HKC2W.js";import"./chunk-GTVCJCHR.js";import"./chunk-IJEGHQ7Z.js";import"./chunk-PGUG43HG.js";import"./chunk-7ZODGQO6.js";import"./chunk-TISQNFB5.js";import"./chunk-VI74YQQO.js";import"./chunk-YV3PUOBU.js";import"./chunk-SOEIVSM5.js";import"./chunk-DC7LAFZZ.js";import"./chunk-4F4DA5UI.js";import"./chunk-3YLXGE6T.js";import"./chunk-JCE3JAVC.js";import"./chunk-SVSY6AWS.js";import"./chunk-AOOZREGV.js";import"./chunk-SDTWBD62.js";import"./chunk-DHDD5YJC.js";import"./chunk-PGXQZVLX.js";import"./chunk-LUNDTQ3G.js";import"./chunk-5OHGYMKP.js";import"./chunk-TWJLOEAI.js";import"./chunk-27Q5KW3A.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{c as AgentHeadless,a as ContextState,b as templateString};