@maincode-ai/matilda-code 0.21.11 → 0.21.13-nightly.20261026.e0eae1d8c

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 (200) hide show
  1. package/bundled/mainy/SKILL.md +0 -2
  2. package/bundled/mainy/docs/_meta.ts +0 -2
  3. package/bundled/mainy/docs/configuration/auth.md +5 -10
  4. package/bundled/mainy/docs/configuration/model-providers.md +31 -217
  5. package/bundled/mainy/docs/configuration/settings.md +48 -9
  6. package/bundled/mainy/docs/configuration/trusted-folders.md +12 -6
  7. package/bundled/mainy/docs/features/auto-mode.md +1 -1
  8. package/bundled/mainy/docs/features/channels/_meta.ts +0 -3
  9. package/bundled/mainy/docs/features/channels/overview.md +8 -16
  10. package/bundled/mainy/docs/features/commands.md +4 -4
  11. package/bundled/mainy/docs/features/hooks.md +9 -7
  12. package/bundled/mainy/docs/features/language.md +2 -29
  13. package/bundled/mainy/docs/features/sub-agents.md +1 -1
  14. package/bundled/mainy/docs/features/worktree.md +3 -5
  15. package/bundled/mainy/docs/integration-github-action.md +3 -3
  16. package/bundled/mainy/docs/matilda-serve.md +1 -1
  17. package/bundled/mainy/docs/quickstart.md +2 -2
  18. package/bundled/mainy/docs/support/troubleshooting.md +3 -10
  19. package/chunks/agent-4FTU3WN6.js +3 -0
  20. package/chunks/agent-headless-QJUVHPFC.js +3 -0
  21. package/chunks/{askUserQuestion-XWHJY3DM.js → askUserQuestion-QKX4NEFX.js} +1 -1
  22. package/chunks/{ca-EUJBUYX5.js → ca-C2V7I65K.js} +6 -6
  23. package/chunks/{chunk-T4P4KEDW.js → chunk-2ONZZ46N.js} +2 -2
  24. package/chunks/chunk-36K4HBVM.js +7 -0
  25. package/chunks/{chunk-EQGA7LH7.js → chunk-3B2HABK7.js} +1 -1
  26. package/chunks/{chunk-5427BPR2.js → chunk-5NMK4Y7C.js} +1 -1
  27. package/chunks/chunk-5YT4GCK7.js +14 -0
  28. package/chunks/{chunk-MH2P4YXC.js → chunk-62AFAL4I.js} +10 -10
  29. package/chunks/chunk-75KP2FVD.js +81 -0
  30. package/chunks/chunk-7ZODGQO6.js +4 -0
  31. package/chunks/chunk-BZB7HYRC.js +37 -0
  32. package/chunks/{chunk-WHG6N5X2.js → chunk-EXNHJQCD.js} +1 -1
  33. package/chunks/chunk-FCGYRGV4.js +9 -0
  34. package/chunks/chunk-G4YMVWG4.js +8 -0
  35. package/chunks/{chunk-4FVBPNTZ.js → chunk-HDARIAVM.js} +1 -1
  36. package/chunks/{chunk-4YVN5HXG.js → chunk-HM5LCKDB.js} +2 -2
  37. package/chunks/chunk-IIQ5YERM.js +120 -0
  38. package/chunks/chunk-JGJ7BVZN.js +101 -0
  39. package/chunks/{chunk-FFFZ2QMG.js → chunk-JIKQI4MZ.js} +1 -1
  40. package/chunks/{chunk-SPW5DXX4.js → chunk-LHDCAN7Z.js} +1 -1
  41. package/chunks/chunk-LZDHANXA.js +89 -0
  42. package/chunks/{chunk-ELH4YHJR.js → chunk-NOE4UNQN.js} +1 -1
  43. package/chunks/chunk-OEZS5R3S.js +207 -0
  44. package/chunks/{chunk-OOEH6ZSV.js → chunk-PTMCLADZ.js} +1 -1
  45. package/chunks/{chunk-NYEWHSBL.js → chunk-PYZNGIIR.js} +1 -1
  46. package/chunks/chunk-QJJTUDDA.js +56 -0
  47. package/chunks/{chunk-GO2GA2GY.js → chunk-R34HYLL4.js} +1 -1
  48. package/chunks/{chunk-Q55AVE2N.js → chunk-RK4LPGBV.js} +11 -11
  49. package/chunks/{chunk-JXUDKX6D.js → chunk-RYHMPK5G.js} +1 -1
  50. package/chunks/chunk-SR7ARGUY.js +13 -0
  51. package/chunks/chunk-SY6JRCN3.js +2612 -0
  52. package/chunks/chunk-TUKNB5CQ.js +33 -0
  53. package/chunks/{chunk-YMIF2DMT.js → chunk-TZ4FRU6B.js} +1 -1
  54. package/chunks/chunk-U7V7APDV.js +9 -0
  55. package/chunks/{chunk-SNLH42QJ.js → chunk-UVWZ44ZW.js} +1 -1
  56. package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
  57. package/chunks/{chunk-4CSSDBOS.js → chunk-VLDZBRTL.js} +10 -10
  58. package/chunks/{computer-use-SXP25RZQ.js → computer-use-OXAMR75N.js} +1 -1
  59. package/chunks/contextCommand-ERLW5VWL.js +3 -0
  60. package/chunks/{cron-create-2UI4AT4Q.js → cron-create-AUDQ6STP.js} +1 -1
  61. package/chunks/{cron-delete-ZB6BOTFF.js → cron-delete-P5HE3PDD.js} +1 -1
  62. package/chunks/{cron-list-YYAXNHB6.js → cron-list-NR5FZBK2.js} +1 -1
  63. package/chunks/{de-DNEPG7S7.js → de-KOUI2CEW.js} +6 -6
  64. package/chunks/{devtools-5JRKK3E7.js → devtools-G5DWLP2N.js} +1 -1
  65. package/chunks/dist-XXTQNTKQ.js +42 -0
  66. package/chunks/dist-ZFZZLIQU.js +3 -0
  67. package/chunks/edit-REFR5ROS.js +43 -0
  68. package/chunks/{en-NOD6KQNM.js → en-RMYRLXC2.js} +4 -4
  69. package/chunks/{enter-worktree-X47BSJLE.js → enter-worktree-WO3DT2G7.js} +1 -1
  70. package/chunks/{enterPlanMode-F22ZNTYJ.js → enterPlanMode-PLRHEU5A.js} +1 -1
  71. package/chunks/{exit-worktree-XY5UMDHX.js → exit-worktree-J5PW6DCV.js} +1 -1
  72. package/chunks/exitPlanMode-KXUPNLCJ.js +120 -0
  73. package/chunks/{fr-2OE5WLJ4.js → fr-R3QF3LA2.js} +5 -5
  74. package/chunks/glob-ZVTVRDQO.js +22 -0
  75. package/chunks/{goal-tools-6QTC3UI7.js → goal-tools-XVKQJL5I.js} +1 -1
  76. package/chunks/{grep-6TTPZ524.js → grep-R7CWUNNE.js} +1 -1
  77. package/chunks/{ja-3B6V5KS7.js → ja-A5OQLXUZ.js} +6 -6
  78. package/chunks/{keychain-token-storage-54BNK6VH.js → keychain-token-storage-IM4UB4P4.js} +1 -1
  79. package/chunks/{ls-YWZU3FYL.js → ls-DEAFYDVV.js} +1 -1
  80. package/chunks/{lsp-4CJDKEEC.js → lsp-DL7W47VY.js} +1 -1
  81. package/chunks/matildaAgentContentGenerator-57EIU5XE.js +8 -0
  82. package/chunks/mcp-client-X7LEGSP3.js +3 -0
  83. package/chunks/monitor-KPWTMH3V.js +32 -0
  84. package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
  85. package/chunks/notebook-edit-3ZH5M2TC.js +17 -0
  86. package/chunks/openaiContentGenerator-6PXSD3T7.js +37 -0
  87. package/chunks/{pt-KP2JCPUY.js → pt-RG3S3KA7.js} +6 -6
  88. package/chunks/read-file-JNS7WRUP.js +3 -0
  89. package/chunks/ripGrep-ICJDGIIV.js +3 -0
  90. package/chunks/{ru-K7IQQKHC.js → ru-5S5HLRT7.js} +5 -5
  91. package/chunks/scheduler-QC2PPMFP.js +8 -0
  92. package/chunks/{send-message-OO2HAKCC.js → send-message-V2WYLN5X.js} +1 -1
  93. package/chunks/{serve-ZQX2WBLF.js → serve-NUVQULZJ.js} +59 -48
  94. package/chunks/shell-5LNI7URE.js +3 -0
  95. package/chunks/{skill-KDM3UUML.js → skill-QFATRHQW.js} +1 -1
  96. package/chunks/src-6UPZ7TVB.js +3 -0
  97. package/chunks/src-LZEU4AYF.js +5 -0
  98. package/chunks/{symbol-search-ALYOX5JN.js → symbol-search-WL6ZHUUN.js} +1 -1
  99. package/chunks/{syntheticOutput-UASKABJH.js → syntheticOutput-3KW6SQAF.js} +1 -1
  100. package/chunks/task-create-PNW5SN27.js +3 -0
  101. package/chunks/{task-detach-I67ZE5MX.js → task-detach-B7PDPFBA.js} +1 -1
  102. package/chunks/task-list-GGZATGK5.js +9 -0
  103. package/chunks/{task-stop-ERI5X4AO.js → task-stop-UKBBE2KG.js} +1 -1
  104. package/chunks/{task-update-CD3W556L.js → task-update-4RHVUBUV.js} +1 -1
  105. package/chunks/{team-create-F4KQRGMB.js → team-create-2TJC3X57.js} +1 -1
  106. package/chunks/team-delete-4UJ7SU65.js +8 -0
  107. package/chunks/todoWrite-NEBVKOSG.js +3 -0
  108. package/chunks/{tool-search-JFCD5W5M.js → tool-search-R5GS64YR.js} +1 -1
  109. package/chunks/tree-sitter-bash-2SWKO5B7.js +3 -0
  110. package/chunks/{web-fetch-REWGIRWQ.js → web-fetch-H3XJMAEF.js} +17 -17
  111. package/chunks/{web-search-OX2DPEVN.js → web-search-Q6RWPEIB.js} +1 -1
  112. package/chunks/{workflow-SEFYGBED.js → workflow-3A7KN3E3.js} +2 -2
  113. package/chunks/write-file-O7Q6SKZC.js +15 -0
  114. package/cli.js +509 -495
  115. package/locales/ca.js +2 -28
  116. package/locales/de.js +2 -28
  117. package/locales/en.js +2 -30
  118. package/locales/fr.js +2 -30
  119. package/locales/ja.js +2 -28
  120. package/locales/pt.js +2 -28
  121. package/locales/ru.js +2 -28
  122. package/package.json +2 -2
  123. package/sandbox-macos-permissive-closed.sb +0 -1
  124. package/sandbox-macos-permissive-open.sb +0 -1
  125. package/sandbox-macos-permissive-proxied.sb +0 -1
  126. package/sandbox-macos-restrictive-closed.sb +3 -1
  127. package/sandbox-macos-restrictive-open.sb +3 -1
  128. package/sandbox-macos-restrictive-proxied.sb +3 -1
  129. package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
  130. package/bundled/mainy/docs/features/channels/feishu.md +0 -186
  131. package/bundled/mainy/docs/features/channels/weixin.md +0 -106
  132. package/bundled/mainy/docs/integration-jetbrains.md +0 -81
  133. package/bundled/mainy/docs/integration-zed.md +0 -72
  134. package/chunks/agent-ZFZ4HJQC.js +0 -3
  135. package/chunks/agent-headless-KH2BKLP7.js +0 -3
  136. package/chunks/anthropicContentGenerator-IYZILRDW.js +0 -39
  137. package/chunks/chunk-25NCTG5H.js +0 -184
  138. package/chunks/chunk-2HQMJ2IU.js +0 -8
  139. package/chunks/chunk-3YLXGE6T.js +0 -8
  140. package/chunks/chunk-4F4DA5UI.js +0 -8
  141. package/chunks/chunk-4J6DC24J.js +0 -59
  142. package/chunks/chunk-4Q2SNBUH.js +0 -18
  143. package/chunks/chunk-6GBNB5Z2.js +0 -3
  144. package/chunks/chunk-G7R2XEEF.js +0 -7
  145. package/chunks/chunk-GHBKFIHC.js +0 -35
  146. package/chunks/chunk-GUFIMKF5.js +0 -65
  147. package/chunks/chunk-HWOQNYAO.js +0 -27
  148. package/chunks/chunk-LJR4RZZ2.js +0 -3
  149. package/chunks/chunk-NIQK6NX3.js +0 -37
  150. package/chunks/chunk-NVM7W7TG.js +0 -101
  151. package/chunks/chunk-O44XK65C.js +0 -8
  152. package/chunks/chunk-OA56BXPD.js +0 -3
  153. package/chunks/chunk-ODZOYHIC.js +0 -8
  154. package/chunks/chunk-PA6532AY.js +0 -6
  155. package/chunks/chunk-QFNFLE2I.js +0 -2625
  156. package/chunks/chunk-QH7736R5.js +0 -8
  157. package/chunks/chunk-QN6WSWMM.js +0 -9
  158. package/chunks/chunk-QN6Y6NPA.js +0 -3
  159. package/chunks/chunk-RK2AKQAX.js +0 -39
  160. package/chunks/chunk-SDTWBD62.js +0 -8
  161. package/chunks/chunk-SUH3UUWZ.js +0 -25
  162. package/chunks/chunk-U347OO7S.js +0 -9
  163. package/chunks/chunk-UIRBHC5X.js +0 -3
  164. package/chunks/chunk-VI74YQQO.js +0 -8
  165. package/chunks/chunk-VYZOOSMP.js +0 -30
  166. package/chunks/chunk-W5CGKUM4.js +0 -15
  167. package/chunks/chunk-WRQLIPXW.js +0 -113
  168. package/chunks/chunk-WVY2P6WH.js +0 -26
  169. package/chunks/chunk-WZ75OGYY.js +0 -14
  170. package/chunks/chunk-XCFLI3OC.js +0 -9
  171. package/chunks/chunk-XMZIY7XX.js +0 -13
  172. package/chunks/contextCommand-3GN5CAOK.js +0 -3
  173. package/chunks/dist-7UYRLSLE.js +0 -3
  174. package/chunks/dist-ME6647DQ.js +0 -195
  175. package/chunks/dist-P6SLWL5V.js +0 -42
  176. package/chunks/dist-VG3ZDJ2A.js +0 -28
  177. package/chunks/dist-YTCHM57U.js +0 -23
  178. package/chunks/edit-KX6V4PH3.js +0 -39
  179. package/chunks/exitPlanMode-G3QLIWJ4.js +0 -90
  180. package/chunks/fileFromPath-7UCWPD4W.js +0 -3
  181. package/chunks/geminiContentGenerator-EQEGOXOV.js +0 -8
  182. package/chunks/glob-KSBEWI3E.js +0 -22
  183. package/chunks/matildaAgentContentGenerator-OV4U6DJD.js +0 -8
  184. package/chunks/matildaContentGenerator-ETIAWE22.js +0 -8
  185. package/chunks/matildaOAuth2-WOY7ZS43.js +0 -3
  186. package/chunks/monitor-F4K5HOZX.js +0 -32
  187. package/chunks/notebook-edit-TL7CI5EA.js +0 -17
  188. package/chunks/openaiContentGenerator-MGASUFQL.js +0 -3
  189. package/chunks/read-file-6EAPS2KG.js +0 -3
  190. package/chunks/ripGrep-K6SFFUIE.js +0 -3
  191. package/chunks/scheduler-TKWPD4LP.js +0 -8
  192. package/chunks/shell-AZRK5GIO.js +0 -3
  193. package/chunks/src-SGI6VLOS.js +0 -3
  194. package/chunks/src-WZTRMETQ.js +0 -5
  195. package/chunks/task-create-EBJD55TB.js +0 -3
  196. package/chunks/task-list-5BGX4G5N.js +0 -9
  197. package/chunks/team-delete-5U3GBFKJ.js +0 -8
  198. package/chunks/todoWrite-YGG6AZ3A.js +0 -3
  199. package/chunks/tree-sitter-bash-XNCMPQBK.js +0 -3
  200. package/chunks/write-file-UAGVBZMC.js +0 -15
@@ -72,8 +72,6 @@ Use this index to locate the right document for the user's question. Load only t
72
72
  | Topic | Doc Path |
73
73
  | ----------------------- | -------------------------------------------- |
74
74
  | VS Code integration | `docs/integration-vscode.md` |
75
- | Zed IDE integration | `docs/integration-zed.md` |
76
- | JetBrains integration | `docs/integration-jetbrains.md` |
77
75
  | GitHub Actions | `docs/integration-github-action.md` |
78
76
  | IDE companion spec | `docs/ide-integration/ide-companion-spec.md` |
79
77
  | IDE integration details | `docs/ide-integration/ide-integration.md` |
@@ -11,8 +11,6 @@ export default {
11
11
  title: 'Outside of the terminal', // Title is optional
12
12
  },
13
13
  'integration-vscode': 'Visual Studio Code',
14
- 'integration-zed': 'Zed IDE',
15
- 'integration-jetbrains': 'JetBrains IDEs',
16
14
  'integration-github-action': 'GitHub Actions',
17
15
  'matilda-serve': 'Daemon mode (matilda serve)',
18
16
  'matilda-serve-deploy-local': 'Daemon mode — local launch templates',
@@ -3,8 +3,8 @@
3
3
  Matilda Code's standard sign-in uses your Matilda account. For normal
4
4
  interactive use, you do not need to create, copy, or export an API key.
5
5
 
6
- You can also use a Matilda API token (CI/automation) or a third-party /
7
- custom OpenAI-compatible provider via `/auth`.
6
+ You can also use a Matilda API token, through `/auth` or, for CI and
7
+ automation, the `MATILDA_API_KEY` environment variable.
8
8
 
9
9
  ## Sign in
10
10
 
@@ -60,14 +60,9 @@ tokens or `~/.matilda/matilda-auth.json` to source control.
60
60
 
61
61
  ## Other model providers
62
62
 
63
- `/auth` inside an interactive Matilda Code session lets you choose:
64
-
65
- - **Matilda account** or **Matilda API token**
66
- - **Third-party providers** (DeepSeek, OpenRouter, MiniMax, Z.AI, ModelScope, …)
67
- - **Custom Provider** for any OpenAI-compatible endpoint
68
-
69
- For an advanced custom provider configuration, see the
70
- [Model Providers reference](model-providers.md).
63
+ `/auth` inside an interactive Matilda Code session offers the Matilda account
64
+ sign-in and a Matilda API token. Other providers are configured in
65
+ `settings.json`; see the [Model Providers reference](model-providers.md).
71
66
 
72
67
  ## Troubleshooting
73
68
 
@@ -4,7 +4,7 @@ Matilda Code allows you to configure multiple model providers through the `model
4
4
 
5
5
  ## Overview
6
6
 
7
- Use `modelProviders` to declare curated model lists per auth type that the `/model` picker can switch between. Keys must be valid auth types (`openai`, `anthropic`, `gemini`, etc.). Each entry requires an `id` and **must include `envKey`**, with optional `name`, `description`, `baseUrl`, and `generationConfig`. Credentials are never persisted in settings; the runtime reads them from `process.env[envKey]`. Matilda OAuth models remain hard-coded and cannot be overridden.
7
+ Use `modelProviders` to declare curated model lists per auth type that the `/model` picker can switch between. Keys must be valid auth types (currently only `openai`). Each entry requires an `id` and **must include `envKey`**, with optional `name`, `description`, `baseUrl`, and `generationConfig`. Credentials are never persisted in settings; the runtime reads them from `process.env[envKey]`.
8
8
 
9
9
  > [!note]
10
10
 
@@ -20,12 +20,9 @@ Below are comprehensive configuration examples for different authentication type
20
20
 
21
21
  The `modelProviders` object keys must be valid `authType` values. Currently supported auth types are:
22
22
 
23
- | Auth Type | Description |
24
- | --------------- | --------------------------------------------------------------------------------------- |
25
- | `openai` | OpenAI-compatible APIs (OpenAI, Azure OpenAI, local inference servers like vLLM/Ollama) |
26
- | `anthropic` | Anthropic Claude API |
27
- | `gemini` | Google Gemini API |
28
- | `matilda-oauth` | Matilda OAuth (hard-coded, cannot be overridden in `modelProviders`) |
23
+ | Auth Type | Description |
24
+ | --------- | --------------------------------------------------------------------------------------- |
25
+ | `openai` | OpenAI-compatible APIs (OpenAI, Azure OpenAI, local inference servers like vLLM/Ollama) |
29
26
 
30
27
  > [!warning]
31
28
  > If an invalid auth type key is used (e.g., a typo like `"openai-custom"`), the configuration will be **silently skipped** and the models will not appear in the `/model` picker. Always use one of the supported auth type values listed above.
@@ -34,24 +31,20 @@ The `modelProviders` object keys must be valid `authType` values. Currently supp
34
31
 
35
32
  Matilda Code uses the following official SDKs to send requests to each provider:
36
33
 
37
- | Auth Type | SDK Package |
38
- | --------------- | ----------------------------------------------------------------------------------------------------- |
39
- | `openai` | [`openai`](https://www.npmjs.com/package/openai) - Official OpenAI Node.js SDK |
40
- | `anthropic` | [`@anthropic-ai/sdk`](https://www.npmjs.com/package/@anthropic-ai/sdk) - Official Anthropic SDK |
41
- | `gemini` | [`@google/genai`](https://www.npmjs.com/package/@google/genai) - Official Google GenAI SDK |
42
- | `matilda-oauth` | [`openai`](https://www.npmjs.com/package/openai) with custom provider (Matilda-compatible-compatible) |
34
+ | Auth Type | SDK Package |
35
+ | --------- | ------------------------------------------------------------------------------ |
36
+ | `openai` | [`openai`](https://www.npmjs.com/package/openai) - Official OpenAI Node.js SDK |
43
37
 
44
38
  This means the `baseUrl` you configure should be compatible with the corresponding SDK's expected API format. For example, when using `openai` auth type, the endpoint must accept OpenAI API format requests.
45
39
 
46
40
  ### OpenAI-compatible providers (`openai`)
47
41
 
48
- This auth type supports not only OpenAI's official API but also any OpenAI-compatible endpoint, including aggregated model providers like OpenRouter.
42
+ This auth type supports not only OpenAI's official API but also any OpenAI-compatible endpoint.
49
43
 
50
44
  ```json
51
45
  {
52
46
  "env": {
53
- "OPENAI_API_KEY": "sk-your-actual-openai-key-here",
54
- "OPENROUTER_API_KEY": "sk-or-your-actual-openrouter-key-here"
47
+ "OPENAI_API_KEY": "sk-your-actual-openai-key-here"
55
48
  },
56
49
  "modelProviders": {
57
50
  "openai": [
@@ -96,97 +89,6 @@ This auth type supports not only OpenAI's official API but also any OpenAI-compa
96
89
  "max_tokens": 2048
97
90
  }
98
91
  }
99
- },
100
- {
101
- "id": "openai/gpt-4o",
102
- "name": "GPT-4o (via OpenRouter)",
103
- "envKey": "OPENROUTER_API_KEY",
104
- "baseUrl": "https://openrouter.ai/api/v1",
105
- "generationConfig": {
106
- "timeout": 120000,
107
- "maxRetries": 3,
108
- "samplingParams": {
109
- "temperature": 0.7
110
- }
111
- }
112
- }
113
- ]
114
- }
115
- }
116
- ```
117
-
118
- ### Anthropic (`anthropic`)
119
-
120
- ```json
121
- {
122
- "env": {
123
- "ANTHROPIC_API_KEY": "sk-ant-your-actual-anthropic-key-here"
124
- },
125
- "modelProviders": {
126
- "anthropic": [
127
- {
128
- "id": "claude-3-5-sonnet",
129
- "name": "Claude 3.5 Sonnet",
130
- "envKey": "ANTHROPIC_API_KEY",
131
- "baseUrl": "https://api.anthropic.com/v1",
132
- "generationConfig": {
133
- "timeout": 120000,
134
- "maxRetries": 3,
135
- "contextWindowSize": 200000,
136
- "samplingParams": {
137
- "temperature": 0.7,
138
- "max_tokens": 8192,
139
- "top_p": 0.9
140
- }
141
- }
142
- },
143
- {
144
- "id": "claude-3-opus",
145
- "name": "Claude 3 Opus",
146
- "envKey": "ANTHROPIC_API_KEY",
147
- "baseUrl": "https://api.anthropic.com/v1",
148
- "generationConfig": {
149
- "timeout": 180000,
150
- "samplingParams": {
151
- "temperature": 0.3,
152
- "max_tokens": 4096
153
- }
154
- }
155
- }
156
- ]
157
- }
158
- }
159
- ```
160
-
161
- ### Google Gemini (`gemini`)
162
-
163
- ```json
164
- {
165
- "env": {
166
- "GEMINI_API_KEY": "AIza-your-actual-gemini-key-here"
167
- },
168
- "modelProviders": {
169
- "gemini": [
170
- {
171
- "id": "gemini-2.0-flash",
172
- "name": "Gemini 2.0 Flash",
173
- "envKey": "GEMINI_API_KEY",
174
- "baseUrl": "https://generativelanguage.googleapis.com",
175
- "capabilities": {
176
- "vision": true
177
- },
178
- "generationConfig": {
179
- "timeout": 60000,
180
- "maxRetries": 2,
181
- "contextWindowSize": 1000000,
182
- "schemaCompliance": "auto",
183
- "samplingParams": {
184
- "temperature": 0.4,
185
- "top_p": 0.95,
186
- "max_tokens": 8192,
187
- "top_k": 40
188
- }
189
- }
190
92
  }
191
93
  ]
192
94
  }
@@ -266,7 +168,7 @@ export VLLM_API_KEY="not-needed"
266
168
 
267
169
  > [!note]
268
170
  >
269
- > The `extra_body` parameter is **only supported for OpenAI-compatible providers** (`openai`, `matilda-oauth`). It is ignored for Anthropic, and Gemini providers.
171
+ > The `extra_body` parameter is **only supported for OpenAI-compatible providers** (`openai`).
270
172
 
271
173
  > [!note]
272
174
  >
@@ -289,88 +191,6 @@ export VLLM_API_KEY="not-needed"
289
191
  >
290
192
  > Each provider example includes an `env` field to illustrate how the API key should be configured.
291
193
 
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
194
  ## Resolution Layers and Atomicity
375
195
 
376
196
  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.
@@ -382,9 +202,9 @@ The effective auth/model/credential values are chosen per field using the follow
382
202
  | CLI arguments | `--auth-type` | `--model` | `--openaiApiKey` (or provider-specific equivalents) | `--openaiBaseUrl` (or provider-specific equivalents) | — | — |
383
203
  | Environment variables | — | Provider-specific mapping (e.g. `OPENAI_MODEL`) | Provider-specific mapping (e.g. `OPENAI_API_KEY`) | Provider-specific mapping (e.g. `OPENAI_BASE_URL`) | — | — |
384
204
  | Settings (`settings.json`) | `security.auth.selectedType` | `model.name` | `security.auth.apiKey` | `security.auth.baseUrl` | — | — |
385
- | Default / computed | Falls back to `AuthType.MATILDA_OAUTH` | Built-in default (OpenAI ⇒ `matilda3-coder-plus`) | — | — | — | `Config.getProxy()` if configured |
205
+ | Default / computed | None: sign in or set `MATILDA_API_KEY` | Built-in default (OpenAI ⇒ `matilda3-coder-plus`) | — | — | — | `Config.getProxy()` if configured |
386
206
 
387
- \*When present, CLI auth flags override settings. Otherwise, `security.auth.selectedType` or the implicit default determine the auth type. Matilda OAuth and OpenAI are the only auth types surfaced without extra configuration.
207
+ \*When present, CLI auth flags override settings. Otherwise, `security.auth.selectedType` or the implicit default determine the auth type. `openai`, which the Matilda sign-in uses, is the only auth type surfaced without extra configuration.
388
208
 
389
209
  > [!warning]
390
210
  >
@@ -422,7 +242,7 @@ The configuration resolution follows a strict layering model with one crucial ru
422
242
  | 1 | Programmatic overrides | Runtime `/model`, `/auth` changes |
423
243
  | 2 | `modelProviders[authType][].generationConfig` | **Impermeable layer** - completely replaces all generationConfig fields; lower layers do not participate |
424
244
  | 3 | `settings.model.generationConfig` | Only used for **Runtime Models** (when no provider model is selected) |
425
- | 4 | Content-generator defaults | Provider-specific defaults (e.g., OpenAI vs Gemini) - only for Runtime Models |
245
+ | 4 | Content-generator defaults | Provider-specific defaults (e.g., Matilda vs other endpoints) - only for Runtime Models |
426
246
 
427
247
  ### Atomic field treatment
428
248
 
@@ -476,24 +296,24 @@ The merge strategy for `modelProviders` itself is REPLACE: the entire `modelProv
476
296
 
477
297
  ## Reasoning / thinking configuration
478
298
 
479
- The optional `reasoning` field under `generationConfig` controls how aggressively the model reasons before responding. The Anthropic and Gemini converters always honor it. The OpenAI-compatible pipeline honors it **unless** `generationConfig.samplingParams` is set — see the "Interaction with `samplingParams`" caveat below.
299
+ The optional `reasoning` field under `generationConfig` controls how aggressively the model reasons before responding. The OpenAI-compatible pipeline honors it **unless** `generationConfig.samplingParams` is set (see the "Interaction with `samplingParams`" caveat below).
480
300
 
481
301
  ```jsonc
482
302
  {
483
303
  "modelProviders": {
484
304
  "openai": [
485
305
  {
486
- "id": "deepseek-v4-pro",
487
- "name": "DeepSeek V4 Pro",
488
- "baseUrl": "https://api.deepseek.com/v1",
489
- "envKey": "DEEPSEEK_API_KEY",
306
+ "id": "gpt-5",
307
+ "name": "GPT-5",
308
+ "baseUrl": "https://api.openai.com/v1",
309
+ "envKey": "OPENAI_API_KEY",
490
310
  "generationConfig": {
491
- // The four-tier scale:
492
- // 'low' | 'medium' — server-mapped to 'high' on DeepSeek
493
- // 'high' — default reasoning intensity
494
- // 'max' — DeepSeek-specific extra-strong tier
495
- // Or set `false` to disable reasoning entirely.
496
- "reasoning": { "effort": "max" },
311
+ // OpenAI's Chat Completions API reads the flat `reasoning_effort`
312
+ // field, not the nested `reasoning` object, so set it through
313
+ // `samplingParams`, whose keys are sent unchanged.
314
+ "samplingParams": {
315
+ "reasoning_effort": "high",
316
+ },
497
317
  },
498
318
  },
499
319
  ],
@@ -503,29 +323,23 @@ The optional `reasoning` field under `generationConfig` controls how aggressivel
503
323
 
504
324
  ### Per-provider behavior
505
325
 
506
- | Protocol / provider | Wire shape | Notes |
507
- | -------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
508
- | **OpenAI / DeepSeek** (`api.deepseek.com`) | Flat `reasoning_effort: <effort>` body parameter | When `reasoning.effort` is set in the nested config shape, it's rewritten to flat `reasoning_effort` and `'low'`/`'medium'` are normalized to `'high'`, `'xhigh'` to `'max'` — mirroring DeepSeek's [server-side back-compat](https://api-docs.deepseek.com/zh-cn/api/create-chat-completion). Top-level `samplingParams.reasoning_effort` or `extra_body.reasoning_effort` overrides skip this normalization and ship verbatim. |
509
- | **OpenAI** (other compatible servers) | `reasoning: { effort, ... }` passed through verbatim | Set via `samplingParams` (e.g. `samplingParams.reasoning_effort` for GPT-5/o-series) when the provider expects a different shape. |
510
- | **Anthropic** (real `api.anthropic.com`) | `output_config: { effort }` plus the `effort-2025-11-24` beta header | Real Anthropic accepts `'low'`/`'medium'`/`'high'` only. `'max'` is **clamped to `'high'`** with a `debugLogger.warn` line (once per generator); if you want max effort, switch the baseURL to a DeepSeek-compatible endpoint that supports it. |
511
- | **Anthropic** (`api.deepseek.com/anthropic`) | Same `output_config: { effort }` + beta header | `'max'` is passed through unchanged. |
512
- | **Gemini** (`@google/genai`) | `thinkingConfig: { includeThoughts: true, thinkingLevel }` | `'low'` → `LOW`, `'high'`/`'max'` → `HIGH`, others → `THINKING_LEVEL_UNSPECIFIED` (Gemini has no `MAX` tier). |
326
+ | Protocol / provider | Wire shape | Notes |
327
+ | --------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
328
+ | **OpenAI-compatible** | `reasoning: { effort, ... }` passed through verbatim | Set via `samplingParams` (e.g. `samplingParams.reasoning_effort` for GPT-5/o-series) when the provider expects a different shape. |
513
329
 
514
330
  ### `reasoning: false`
515
331
 
516
332
  Setting `reasoning: false` (the literal boolean) explicitly disables thinking on every provider — useful for cheap side queries that don't benefit from reasoning. This is honored at the request level too via `request.config.thinkingConfig.includeThoughts: false` for one-off calls (e.g. suggestion generation).
517
333
 
518
- On a `api.deepseek.com` baseURL, the OpenAI pipeline emits the explicit `thinking: { type: 'disabled' }` field that DeepSeek V4+ requires — the server-side default is `'enabled'`, so simply omitting `reasoning_effort` would still pay thinking latency/cost. Self-hosted DeepSeek backends (sglang/vllm) and other OpenAI-compatible servers do **not** receive this field; if you need to disable thinking on those, inject `thinking: { type: 'disabled' }` (or whatever knob your inference framework exposes) via `samplingParams`/`extra_body`.
334
+ On Matilda's endpoint the OpenAI pipeline also sends `enable_thinking: false`. Other OpenAI-compatible servers whose models think by default need their own knob, such as `thinking: { type: 'disabled' }`, injected via `samplingParams` or `extra_body`.
519
335
 
520
336
  ### Interaction with `samplingParams` (OpenAI-compatible only)
521
337
 
522
338
  > [!warning]
523
339
  >
524
- > When `generationConfig.samplingParams` is set on an OpenAI-compatible provider, the pipeline ships those keys to the wire **verbatim** and skips the separate `reasoning` injection entirely. So a config like `{ samplingParams: { temperature: 0.5 }, reasoning: { effort: 'max' } }` will silently drop the reasoning field on OpenAI/DeepSeek requests.
525
- >
526
- > If you set `samplingParams`, include the reasoning knob inside it directly — for DeepSeek that's `samplingParams.reasoning_effort`, for GPT-5/o-series it's `samplingParams.reasoning_effort` (their flat field) or `samplingParams.reasoning` (the nested object). For OpenRouter and other providers the field name varies; consult the provider docs.
340
+ > When `generationConfig.samplingParams` is set on an OpenAI-compatible provider, the pipeline ships those keys to the wire **verbatim** and skips the separate `reasoning` injection entirely. So a config like `{ samplingParams: { temperature: 0.5 }, reasoning: { effort: 'max' } }` will silently drop the reasoning field on OpenAI-compatible requests.
527
341
  >
528
- > The Anthropic and Gemini converters are unaffected — they always read `reasoning.effort` directly regardless of `samplingParams`.
342
+ > If you set `samplingParams`, include the reasoning knob inside it directly. For GPT-5/o-series on Chat Completions that is `samplingParams.reasoning_effort`; for other servers the field name varies, so consult their docs.
529
343
 
530
344
  ### `budget_tokens`
531
345
 
@@ -535,7 +349,7 @@ You can pin an exact thinking-token budget by including `budget_tokens` alongsid
535
349
  "reasoning": { "effort": "high", "budget_tokens": 50000 }
536
350
  ```
537
351
 
538
- For Anthropic this becomes `thinking.budget_tokens`. For OpenAI/DeepSeek the field is preserved but currently ignored by the server — `reasoning_effort` is the load-bearing knob.
352
+ It is passed through inside `reasoning`, and whether it is honored depends on the server.
539
353
 
540
354
  ## Provider Models vs Runtime Models
541
355
 
@@ -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:
@@ -118,6 +146,7 @@ Settings are organized into categories. Most settings should be placed within th
118
146
  | `ui.showThinkingTrace` | boolean | Show the full reasoning trace in thinking blocks instead of the collapsed one-line summary. Toggle with `Ctrl+Q` during a session or via the Settings dialog. The setting persists across sessions. | `false` |
119
147
  | `ui.shellOutputMaxLines` | number | Max number of shell output lines shown inline. Set to `0` to disable the cap and show full output. Hidden lines are surfaced via the `+N lines` indicator. Errors, `!`-prefix user-initiated commands, confirming tools, and focused embedded shells always show full output. | `5` |
120
148
  | `ui.maxFps` | number | Cap on terminal render rate (frames per second). Higher values (e.g. `144`) reduce input-to-render latency on high-refresh displays at the cost of more CPU. Values `<= 0` are ignored (treated as the default). Requires restart. | `60` |
149
+ | `ui.maxHistoryItems` | number | Max number of messages kept in the on-screen history of a session; once exceeded, the oldest messages are dropped from view and a trim notice marks the cut. Set to `0` (or a negative value) for unlimited. Bounds memory use and per-message render cost on long sessions. The full transcript always remains on disk (see `/export`) and is unaffected. Only applies with fullscreen rendering (`ui.useTerminalBuffer`) enabled. | `2000` |
121
150
  | `ui.enableWelcomeBack` | boolean | Show welcome back dialog when returning to a project with conversation history. When enabled, Matilda Code will automatically detect if you're returning to a project with a previously generated project summary (`.matilda/PROJECT_SUMMARY.md`) and show a dialog allowing you to continue your previous conversation or start fresh. If you choose **Start new chat session**, that choice is remembered for the current project until the project summary changes. This feature integrates with the `/summary` command and quit confirmation dialog. | `true` |
122
151
  | `ui.accessibility.enableLoadingPhrases` | boolean | Enable loading phrases (disable for accessibility). | `true` |
123
152
  | `ui.accessibility.screenReader` | boolean | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | `false` |
@@ -149,8 +178,8 @@ Settings are organized into categories. Most settings should be placed within th
149
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` |
150
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` |
151
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` |
152
- | `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` |
153
- | `model.chatCompression.maxRecentFilesToRetain` | number | Number of most-recently-touched files whose current content is restored (embedded if small, otherwise referenced by path) into history after auto-compaction. `0` restores none. Env override: `MATILDA_COMPACT_MAX_RECENT_FILES`. | `5` |
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` |
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` |
154
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` |
155
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` |
156
185
  | `model.chatCompression.screenshotTriggerThreshold` | number | Tool-returned image count at or above which the screenshot trigger fires (only when `enableScreenshotTrigger`). Compaction resets the count — surviving images are re-embedded as top-level parts, which the trigger doesn't count — so it won't immediately re-fire. Env override: `MATILDA_COMPACT_SCREENSHOT_THRESHOLD`. | `50` |
@@ -217,7 +246,7 @@ Overrides the auto-detected input modalities for the selected model. Matilda Cod
217
246
 
218
247
  Allows you to add custom HTTP headers to all API requests. This is useful for request tracing, monitoring, API gateway routing, or when different models require different headers. For provider models, define `customHeaders` in `modelProviders[].generationConfig.customHeaders`. For runtime models without a matching provider entry, define it in `model.generationConfig.customHeaders`. No merging occurs between the two levels.
219
248
 
220
- The `extra_body` field allows you to add custom parameters to the request body sent to the API. This is useful for provider-specific options that are not covered by the standard configuration fields. **Note: This field is only supported for OpenAI-compatible providers (`openai`, `matilda-oauth`). It is ignored for Anthropic and Gemini providers.** For provider models, define `extra_body` in `modelProviders[].generationConfig.extra_body`. For runtime models without a matching provider entry, define it in `model.generationConfig.extra_body`.
249
+ The `extra_body` field allows you to add custom parameters to the request body sent to the API. This is useful for provider-specific options that are not covered by the standard configuration fields. **Note: This field is only supported for OpenAI-compatible providers (`openai`).** For provider models, define `extra_body` in `modelProviders[].generationConfig.extra_body`. For runtime models without a matching provider entry, define it in `model.generationConfig.extra_body`.
221
250
 
222
251
  **model.openAILoggingDir examples:**
223
252
 
@@ -442,7 +471,7 @@ LSP server configuration is done through `.lsp.json` files in your project root
442
471
 
443
472
  | Setting | Type | Description | Default |
444
473
  | ------------------------------ | ------- | ------------------------------------------------- | ----------- |
445
- | `security.folderTrust.enabled` | boolean | Setting to track whether Folder trust is enabled. | `false` |
474
+ | `security.folderTrust.enabled` | boolean | Setting to track whether Folder trust is enabled. | `true` |
446
475
  | `security.auth.selectedType` | string | The currently selected authentication type. | `undefined` |
447
476
  | `security.auth.enforcedType` | string | The required auth type (useful for enterprises). | `undefined` |
448
477
  | `security.auth.useExternal` | boolean | Whether to use an external authentication flow. | `undefined` |
@@ -453,7 +482,7 @@ LSP server configuration is done through `.lsp.json` files in your project root
453
482
  | ------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
454
483
  | `advanced.autoConfigureMemory` | boolean | Automatically configure Node.js memory limits. | `false` |
455
484
  | `advanced.dnsResolutionOrder` | string | The DNS resolution order. | `undefined` |
456
- | `advanced.excludedEnvVars` | array of strings | Environment variables to exclude from project context. Specifies environment variables that should be excluded from being loaded from project `.env` files. This prevents project-specific environment variables (like `DEBUG=true`) from interfering with the CLI behavior. Variables from `.matilda/.env` files are never excluded. | `["DEBUG","DEBUG_MODE"]` |
485
+ | `advanced.excludedEnvVars` | array of strings | Environment variables to exclude from project `.env` files. Configurable exclusions do not apply to `.matilda/.env` files; bootstrap and policy variables remain protected across all project environment sources. | `["DEBUG","DEBUG_MODE"]` |
457
486
  | `advanced.bugCommand` | object | Configuration for the bug report command. Overrides the default URL for the `/bug` command. Properties: `urlTemplate` (string): A URL that can contain `{title}` and `{info}` placeholders. Example: `"bugCommand": { "urlTemplate": "https://bug.example.com/new?title={title}&info={info}" }` | `undefined` |
458
487
  | `plansDirectory` | string | Custom directory for approved Plan Mode files. Relative paths are resolved from the project root, and the resolved path must stay within the project root. If unset, plan files are stored in `~/.matilda/plans`. **Requires restart.** If the directory is inside the project root, add it to `.gitignore` to avoid committing plan files. | `undefined` |
459
488
 
@@ -466,6 +495,14 @@ How much a Goal may do on its own after you create it, or resume one whose budge
466
495
  | `goal.tokenBudget` | number | Tokens a Goal may spend on its own. `-1` means unlimited. | `30000000` |
467
496
  | `goal.turnBudget` | number | Goal turns that may finish before the Goal stops and asks. `-1` means unlimited. | `50` |
468
497
 
498
+ #### planGate
499
+
500
+ Settings for the plan approval gate that reviews plans before autonomous execution (leaving plan mode under an autonomous approval mode). Optional and advanced.
501
+
502
+ | Setting | Type | Description | Default |
503
+ | -------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
504
+ | `planGate.systemOneTriage` | boolean | Screen plans with the System One evaluation endpoint (`matilda-jev`, `POST /api/systemone` on the session's Matilda Core origin) before the full gate review. An approve verdict skips the full review; an approve-with-comments verdict runs the review as advisory notes and approves; a reject verdict — or any evaluation failure — falls back to the full reviewer agent. Auth reuses the session credential: a signed-in Matilda account works as-is, while a raw `MATILDA_API_KEY` (`mc_live_…`) requires the `api:systemone` scope. Set `false` for the single-agent gate. | `true` |
505
+
469
506
  #### mcpServers
470
507
 
471
508
  Configures connections to one or more Model-Context Protocol (MCP) servers for discovering and using custom tools. Matilda Code attempts to connect to each configured MCP server to discover available tools. If multiple MCP servers expose a tool with the same name, the tool names will be prefixed with the server alias you defined in the configuration (e.g., `serverAlias__actualToolName`) to avoid conflicts. Note that the system might strip certain schema properties from MCP tool definitions for compatibility. At least one of `command`, `url`, or `httpUrl` must be provided. If multiple are specified, the order of precedence is `httpUrl`, then `url`, then `command`.
@@ -583,7 +620,9 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.mat
583
620
 
584
621
  > [!tip]
585
622
  >
586
- > **Environment Variable Exclusion:** Some environment variables (like `DEBUG` and `DEBUG_MODE`) are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. Variables from `.matilda/.env` files are never excluded. You can customize this behavior using the `advanced.excludedEnvVars`setting in your `settings.json` file.
623
+ > **Environment Variable Exclusion:** Some environment variables (like `DEBUG` and `DEBUG_MODE`) are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. The configurable exclusions do not apply to `.matilda/.env` files. Bootstrap and policy variables remain protected in all project environment sources. You can customize this behavior using the `advanced.excludedEnvVars`setting in your `settings.json` file.
624
+
625
+ Project `.env`, project `.matilda/.env` and workspace `settings.env` cannot configure sandbox startup, IDE helper connections, simple mode, interpreter startup, global state paths or workspace consent. Configure these inputs in the launch environment or user settings instead. User-level initial environment values are preserved; hot reload leaves bootstrap values fixed. Ordinary project provider and gateway variables continue to load in trusted workspaces.
587
626
 
588
627
  ### Environment Variables Table
589
628
 
@@ -601,7 +640,7 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.mat
601
640
  | `MATILDA_SANDBOX` | Alternative to the `sandbox` setting in `settings.json`. | Accepts `true`, `false`, `docker`, `podman`, or a custom command string. |
602
641
  | `MATILDA_SANDBOX_IMAGE` | Overrides sandbox image selection for Docker/Podman. | Takes precedence over `tools.sandboxImage`. |
603
642
  | `SEATBELT_PROFILE` | (macOS specific) Switches the Seatbelt (`sandbox-exec`) profile on macOS. | `permissive-open`: (Default) Restricts writes to the project folder (and a few other folders, see `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other operations. `strict`: Uses a strict profile that declines operations by default. `<profile_name>`: Uses a custom profile. To define a custom profile, create a file named `sandbox-macos-<profile_name>.sb` in your project's `.matilda/` directory (e.g., `my-project/.matilda/sandbox-macos-custom.sb`). |
604
- | `DEBUG` or `DEBUG_MODE` | (often used by underlying libraries or the CLI itself) Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting. | **Note:** These variables are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. Use `.matilda/.env` files if you need to set these for Matilda Code specifically. |
643
+ | `DEBUG` or `DEBUG_MODE` | (often used by underlying libraries or the CLI itself) Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting. | **Note:** These variables are excluded from project environment sources. Set them in the launch environment or user-level `.matilda/.env` to configure Matilda Code. |
605
644
  | `NO_COLOR` | Set to any value to disable all color output in the CLI. | |
606
645
  | `FORCE_HYPERLINK` | Override the OSC 8 clickable-link detection in the markdown renderer. Set to `1` (or any non-zero value, or empty string) to force-enable, `0` to force-disable. Honors `NO_COLOR` / `MATILDA_DISABLE_HYPERLINKS` opt-outs above it. | Use this to opt into OSC 8 inside `tmux` / GNU `screen` (auto-detection refuses by default because the host terminal's capabilities are hidden behind the multiplexer). Requires `set -g allow-passthrough on` on tmux 3.3+. Also enables Hyper, which isn't auto-detected. |
607
646
  | `MATILDA_DISABLE_HYPERLINKS` | Set to `1` to hard-disable OSC 8 clickable hyperlinks in the markdown renderer even on terminals that auto-detect as capable. | Useful when a terminal advertises support but breaks on long URLs, or when piping output through an intermediary that mangles escape sequences. The renderer falls back to plain `label (url)` rendering. |
@@ -652,7 +691,7 @@ For sandbox image selection, precedence is:
652
691
  | `--telemetry-otlp-endpoint` | | Sets the OTLP endpoint for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
653
692
  | `--telemetry-otlp-protocol` | | Sets the OTLP protocol for telemetry (`grpc` or `http`). | | Defaults to `grpc`. See [telemetry](../../developers/development/telemetry) for more information. |
654
693
  | `--telemetry-log-prompts` | | Enables logging of prompts for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
655
- | `--acp` | | Enables ACP mode (Agent Client Protocol). Useful for IDE/editor integrations like [Zed](../integration-zed). | | Stable. Replaces the deprecated `--experimental-acp` flag. |
694
+ | `--acp` | | Enables ACP mode (Agent Client Protocol), which the VS Code companion and Matilda Desktop use. | | Stable. Replaces the deprecated `--experimental-acp` flag. |
656
695
  | `--experimental-lsp` | | Enables experimental [LSP (Language Server Protocol)](../features/lsp) feature for code intelligence (go-to-definition, find references, diagnostics, etc.). | | Experimental. Requires language servers to be installed. |
657
696
  | `--extensions` | `-e` | Specifies a list of extensions to use for the session. | Extension names | If not provided, all available extensions are used. Use the special term `matilda -e none` to disable all extensions. Example: `matilda -e my-extension -e my-other-extension` |
658
697
  | `--list-extensions` | `-l` | Lists all available extensions and exits. | | |