@cjhyy/code-shell-core 0.5.0-rc.1 → 0.5.0-rc.2

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 (278) hide show
  1. package/dist/agent/agent-definition-registry.d.ts +18 -3
  2. package/dist/agent/agent-definition-registry.js +47 -18
  3. package/dist/agent/agent-definition.d.ts +17 -0
  4. package/dist/agent/agent-definition.js +22 -1
  5. package/dist/arena/arena.js +11 -12
  6. package/dist/arena/context/context-tools.js +2 -4
  7. package/dist/arena/context/within-root.d.ts +7 -0
  8. package/dist/arena/context/within-root.js +15 -0
  9. package/dist/arena/iterate/phases/argue.js +8 -2
  10. package/dist/arena/iterate/phases/revise.js +1 -1
  11. package/dist/arena/iterate/phases/tournament.js +3 -3
  12. package/dist/arena/phases/adjudication.js +1 -4
  13. package/dist/arena/phases/build-consensus.js +1 -4
  14. package/dist/arena/phases/cross-review.js +2 -8
  15. package/dist/arena/phases/debate-rounds.js +1 -4
  16. package/dist/arena/phases/participant-research.js +1 -4
  17. package/dist/arena/phases/planning-detail-expansion.js +8 -10
  18. package/dist/arena/planner.js +0 -1
  19. package/dist/arena/providers/docs.d.ts +1 -0
  20. package/dist/arena/providers/docs.js +5 -2
  21. package/dist/arena/providers/repo.d.ts +1 -0
  22. package/dist/arena/providers/repo.js +5 -2
  23. package/dist/arena/strategies/utils.js +36 -3
  24. package/dist/arena/transitions.d.ts +7 -2
  25. package/dist/arena/transitions.js +9 -4
  26. package/dist/arena/types.d.ts +8 -2
  27. package/dist/automation/cron-expr.d.ts +31 -0
  28. package/dist/automation/cron-expr.js +151 -0
  29. package/dist/automation/index.d.ts +41 -0
  30. package/dist/automation/index.js +39 -0
  31. package/dist/automation/runner.d.ts +67 -0
  32. package/dist/automation/runner.js +56 -0
  33. package/dist/automation/scheduler.d.ts +156 -0
  34. package/dist/automation/scheduler.js +546 -0
  35. package/dist/automation/store.d.ts +39 -0
  36. package/dist/automation/store.js +119 -0
  37. package/dist/automation/write-policy.d.ts +34 -0
  38. package/dist/automation/write-policy.js +113 -0
  39. package/dist/automation/write-run.d.ts +51 -0
  40. package/dist/automation/write-run.js +38 -0
  41. package/dist/capability-control/index.d.ts +5 -0
  42. package/dist/capability-control/index.js +3 -0
  43. package/dist/capability-control/overlay.d.ts +49 -0
  44. package/dist/capability-control/overlay.js +89 -0
  45. package/dist/capability-control/project.d.ts +65 -0
  46. package/dist/capability-control/project.js +147 -0
  47. package/dist/capability-control/service.d.ts +70 -0
  48. package/dist/capability-control/service.js +147 -0
  49. package/dist/capability-control/types.d.ts +62 -0
  50. package/dist/capability-control/types.js +17 -0
  51. package/dist/cli/agent-server-stdio.d.ts +12 -1
  52. package/dist/cli/agent-server-stdio.js +114 -19
  53. package/dist/cli/agent-server-tcp.d.ts +20 -0
  54. package/dist/cli/agent-server-tcp.js +120 -0
  55. package/dist/cli/graceful-shutdown.d.ts +27 -0
  56. package/dist/cli/graceful-shutdown.js +30 -0
  57. package/dist/context/compaction.js +23 -15
  58. package/dist/context/manager.d.ts +0 -20
  59. package/dist/context/manager.js +0 -37
  60. package/dist/cron/cron-runtime.d.ts +2 -0
  61. package/dist/cron/cron-runtime.js +2 -0
  62. package/dist/cron/cron-store.d.ts +2 -0
  63. package/dist/cron/cron-store.js +2 -0
  64. package/dist/cron/scheduler.d.ts +5 -32
  65. package/dist/cron/scheduler.js +5 -113
  66. package/dist/data/openrouter-sync.js +1 -1
  67. package/dist/engine/engine.d.ts +208 -14
  68. package/dist/engine/engine.js +754 -169
  69. package/dist/engine/goal.d.ts +42 -0
  70. package/dist/engine/goal.js +52 -0
  71. package/dist/engine/image-compression.d.ts +81 -0
  72. package/dist/engine/image-compression.js +186 -0
  73. package/dist/engine/image-policy.d.ts +152 -0
  74. package/dist/engine/image-policy.js +165 -0
  75. package/dist/engine/reactive-threshold.d.ts +13 -0
  76. package/dist/engine/reactive-threshold.js +17 -0
  77. package/dist/engine/runtime.js +7 -0
  78. package/dist/engine/session-title.d.ts +13 -0
  79. package/dist/engine/session-title.js +34 -0
  80. package/dist/engine/turn-loop.d.ts +29 -8
  81. package/dist/engine/turn-loop.js +498 -316
  82. package/dist/git/parse-log.d.ts +13 -0
  83. package/dist/git/parse-log.js +21 -0
  84. package/dist/git/utils.d.ts +8 -6
  85. package/dist/git/utils.js +57 -26
  86. package/dist/git/worktree.js +33 -18
  87. package/dist/hooks/events.d.ts +23 -1
  88. package/dist/hooks/goal-stop-hook.d.ts +30 -0
  89. package/dist/hooks/goal-stop-hook.js +102 -0
  90. package/dist/hooks/hook-output.d.ts +33 -0
  91. package/dist/hooks/hook-output.js +79 -0
  92. package/dist/hooks/registry.d.ts +7 -0
  93. package/dist/hooks/registry.js +38 -1
  94. package/dist/hooks/shell-runner.d.ts +2 -0
  95. package/dist/hooks/shell-runner.js +43 -2
  96. package/dist/index.d.ts +31 -6
  97. package/dist/index.js +30 -3
  98. package/dist/llm/capabilities/reasoning-control.d.ts +24 -0
  99. package/dist/llm/capabilities/reasoning-control.js +38 -0
  100. package/dist/llm/capabilities/rules.js +33 -3
  101. package/dist/llm/capabilities/types.d.ts +22 -2
  102. package/dist/llm/clamp-max-tokens.d.ts +11 -0
  103. package/dist/llm/clamp-max-tokens.js +17 -0
  104. package/dist/llm/client-base.d.ts +41 -4
  105. package/dist/llm/client-base.js +67 -13
  106. package/dist/llm/client-factory.d.ts +3 -3
  107. package/dist/llm/client-factory.js +2 -2
  108. package/dist/llm/model-pool.d.ts +15 -11
  109. package/dist/llm/model-pool.js +23 -20
  110. package/dist/llm/provider-catalog.d.ts +2 -2
  111. package/dist/llm/providers/anthropic.d.ts +32 -2
  112. package/dist/llm/providers/anthropic.js +147 -8
  113. package/dist/llm/providers/openai.d.ts +11 -2
  114. package/dist/llm/providers/openai.js +253 -52
  115. package/dist/llm/reasoning-setting.d.ts +51 -0
  116. package/dist/llm/reasoning-setting.js +32 -0
  117. package/dist/llm/stop-reason.d.ts +13 -0
  118. package/dist/llm/stop-reason.js +21 -0
  119. package/dist/llm/strip-vision.d.ts +32 -0
  120. package/dist/llm/strip-vision.js +94 -0
  121. package/dist/llm/types.d.ts +5 -6
  122. package/dist/logging/logger.js +18 -4
  123. package/dist/logging/sanitize-messages.d.ts +10 -0
  124. package/dist/logging/sanitize-messages.js +90 -0
  125. package/dist/lsp/client.js +28 -8
  126. package/dist/lsp/manager.js +2 -1
  127. package/dist/lsp/root-path.d.ts +9 -0
  128. package/dist/lsp/root-path.js +12 -0
  129. package/dist/onboarding.js +18 -11
  130. package/dist/plugins/gitOps.d.ts +34 -0
  131. package/dist/plugins/gitOps.js +59 -3
  132. package/dist/plugins/installer/codex/convertAgents.d.ts +7 -0
  133. package/dist/plugins/installer/codex/convertAgents.js +55 -0
  134. package/dist/plugins/installer/codex/convertMcp.d.ts +8 -0
  135. package/dist/plugins/installer/codex/convertMcp.js +45 -0
  136. package/dist/plugins/installer/codex/convertSkills.d.ts +12 -0
  137. package/dist/plugins/installer/codex/convertSkills.js +33 -0
  138. package/dist/plugins/installer/detectFormat.d.ts +2 -0
  139. package/dist/plugins/installer/detectFormat.js +6 -0
  140. package/dist/plugins/installer/install.d.ts +7 -0
  141. package/dist/plugins/installer/install.js +99 -0
  142. package/dist/plugins/installer/installFromSource.d.ts +13 -0
  143. package/dist/plugins/installer/installFromSource.js +45 -0
  144. package/dist/plugins/installer/list.d.ts +9 -0
  145. package/dist/plugins/installer/list.js +30 -0
  146. package/dist/plugins/installer/loadPluginAgents.d.ts +3 -0
  147. package/dist/plugins/installer/loadPluginAgents.js +23 -0
  148. package/dist/plugins/installer/loadPluginMcp.d.ts +7 -0
  149. package/dist/plugins/installer/loadPluginMcp.js +74 -0
  150. package/dist/plugins/installer/parseSource.d.ts +20 -0
  151. package/dist/plugins/installer/parseSource.js +74 -0
  152. package/dist/plugins/installer/paths.d.ts +5 -0
  153. package/dist/plugins/installer/paths.js +25 -0
  154. package/dist/plugins/installer/types.d.ts +49 -0
  155. package/dist/plugins/installer/types.js +27 -0
  156. package/dist/plugins/installer/uninstall.d.ts +2 -0
  157. package/dist/plugins/installer/uninstall.js +14 -0
  158. package/dist/plugins/installer/update.d.ts +14 -0
  159. package/dist/plugins/installer/update.js +65 -0
  160. package/dist/plugins/loadPluginHooks.d.ts +8 -1
  161. package/dist/plugins/loadPluginHooks.js +11 -1
  162. package/dist/plugins/marketplaceManager.d.ts +8 -1
  163. package/dist/plugins/marketplaceManager.js +38 -4
  164. package/dist/plugins/pluginCommandHook.js +34 -0
  165. package/dist/plugins/pluginInstaller.d.ts +21 -0
  166. package/dist/plugins/pluginInstaller.js +128 -29
  167. package/dist/plugins/schemas.js +40 -6
  168. package/dist/plugins/types.d.ts +4 -0
  169. package/dist/preset/index.js +16 -0
  170. package/dist/prompt/composer.d.ts +4 -0
  171. package/dist/prompt/composer.js +28 -4
  172. package/dist/prompt/sections/orchestration.md +8 -0
  173. package/dist/protocol/chat-session-manager.d.ts +8 -1
  174. package/dist/protocol/chat-session-manager.js +10 -0
  175. package/dist/protocol/chat-session.d.ts +17 -0
  176. package/dist/protocol/chat-session.js +28 -0
  177. package/dist/protocol/redact.d.ts +50 -0
  178. package/dist/protocol/redact.js +71 -0
  179. package/dist/protocol/server.d.ts +41 -2
  180. package/dist/protocol/server.js +231 -33
  181. package/dist/protocol/tcp-transport.d.ts +45 -0
  182. package/dist/protocol/tcp-transport.js +74 -0
  183. package/dist/protocol/types.d.ts +23 -0
  184. package/dist/protocol/types.js +6 -0
  185. package/dist/remote/bridge.d.ts +11 -2
  186. package/dist/remote/bridge.js +61 -33
  187. package/dist/run/ArtifactTracker.js +5 -4
  188. package/dist/run/EngineRunner.d.ts +27 -1
  189. package/dist/run/EngineRunner.js +46 -8
  190. package/dist/run/FileRunStore.js +32 -8
  191. package/dist/run/RunLock.d.ts +28 -2
  192. package/dist/run/RunLock.js +49 -7
  193. package/dist/run/RunManager.js +51 -3
  194. package/dist/run/RunQueue.d.ts +1 -0
  195. package/dist/run/RunQueue.js +8 -2
  196. package/dist/run/factory.d.ts +7 -0
  197. package/dist/run/factory.js +1 -0
  198. package/dist/run/index.d.ts +2 -2
  199. package/dist/run/index.js +1 -1
  200. package/dist/run/redirect-target.d.ts +7 -0
  201. package/dist/run/redirect-target.js +13 -0
  202. package/dist/run/types.js +1 -1
  203. package/dist/services/browser-open.d.ts +13 -0
  204. package/dist/services/browser-open.js +16 -0
  205. package/dist/services/dream-consolidation.d.ts +57 -0
  206. package/dist/services/dream-consolidation.js +151 -0
  207. package/dist/services/memory-orchestrator.js +18 -0
  208. package/dist/services/notifier.d.ts +8 -0
  209. package/dist/services/notifier.js +39 -25
  210. package/dist/services/oauth.js +5 -7
  211. package/dist/services/session-memory-sort.d.ts +8 -0
  212. package/dist/services/session-memory-sort.js +9 -0
  213. package/dist/services/session-memory.js +8 -9
  214. package/dist/session/file-history.js +10 -3
  215. package/dist/session/session-manager.d.ts +23 -1
  216. package/dist/session/session-manager.js +73 -2
  217. package/dist/settings/disk-defaults.d.ts +35 -0
  218. package/dist/settings/disk-defaults.js +24 -0
  219. package/dist/settings/manager.d.ts +33 -0
  220. package/dist/settings/manager.js +94 -1
  221. package/dist/settings/personalization.d.ts +19 -0
  222. package/dist/settings/personalization.js +7 -0
  223. package/dist/settings/schema.d.ts +1142 -126
  224. package/dist/settings/schema.js +119 -10
  225. package/dist/tool-system/builtin/add-marketplace.d.ts +12 -0
  226. package/dist/tool-system/builtin/add-marketplace.js +76 -0
  227. package/dist/tool-system/builtin/agent-registry.d.ts +11 -0
  228. package/dist/tool-system/builtin/agent-registry.js +8 -4
  229. package/dist/tool-system/builtin/agent.d.ts +29 -10
  230. package/dist/tool-system/builtin/agent.js +108 -52
  231. package/dist/tool-system/builtin/apply-patch/index.js +22 -3
  232. package/dist/tool-system/builtin/arena.js +6 -7
  233. package/dist/tool-system/builtin/complete-goal.d.ts +25 -0
  234. package/dist/tool-system/builtin/complete-goal.js +45 -0
  235. package/dist/tool-system/builtin/cron.js +53 -9
  236. package/dist/tool-system/builtin/edit.d.ts +2 -1
  237. package/dist/tool-system/builtin/edit.js +6 -1
  238. package/dist/tool-system/builtin/generate-image.d.ts +25 -0
  239. package/dist/tool-system/builtin/generate-image.js +146 -0
  240. package/dist/tool-system/builtin/glob.js +7 -0
  241. package/dist/tool-system/builtin/grep.js +6 -0
  242. package/dist/tool-system/builtin/index.d.ts +18 -1
  243. package/dist/tool-system/builtin/index.js +62 -1
  244. package/dist/tool-system/builtin/notebook-edit.d.ts +2 -1
  245. package/dist/tool-system/builtin/notebook-edit.js +8 -1
  246. package/dist/tool-system/builtin/read.d.ts +2 -1
  247. package/dist/tool-system/builtin/read.js +9 -1
  248. package/dist/tool-system/builtin/sleep.js +9 -3
  249. package/dist/tool-system/builtin/task.js +4 -1
  250. package/dist/tool-system/builtin/update-automation-memory.d.ts +24 -0
  251. package/dist/tool-system/builtin/update-automation-memory.js +60 -0
  252. package/dist/tool-system/builtin/view-image.d.ts +18 -0
  253. package/dist/tool-system/builtin/view-image.js +96 -0
  254. package/dist/tool-system/builtin/web-search.d.ts +4 -1
  255. package/dist/tool-system/builtin/web-search.js +36 -3
  256. package/dist/tool-system/builtin/write.d.ts +2 -1
  257. package/dist/tool-system/builtin/write.js +7 -1
  258. package/dist/tool-system/context.d.ts +12 -0
  259. package/dist/tool-system/executor.d.ts +0 -1
  260. package/dist/tool-system/executor.js +34 -40
  261. package/dist/tool-system/investigation-guard.d.ts +4 -1
  262. package/dist/tool-system/investigation-guard.js +19 -3
  263. package/dist/tool-system/mcp-manager.d.ts +36 -12
  264. package/dist/tool-system/mcp-manager.js +173 -10
  265. package/dist/tool-system/path-policy.d.ts +94 -0
  266. package/dist/tool-system/path-policy.js +279 -0
  267. package/dist/tool-system/permission.js +43 -50
  268. package/dist/tool-system/plan-mode-allowlist.d.ts +21 -0
  269. package/dist/tool-system/plan-mode-allowlist.js +43 -0
  270. package/dist/tool-system/registry.js +12 -1
  271. package/dist/tool-system/validation.d.ts +10 -0
  272. package/dist/tool-system/validation.js +16 -3
  273. package/dist/types.d.ts +90 -15
  274. package/dist/utils/format.js +4 -2
  275. package/dist/utils/lockfile.js +9 -2
  276. package/dist/utils/theme.d.ts +6 -0
  277. package/dist/utils/theme.js +4 -2
  278. package/package.json +2 -1
@@ -2,6 +2,38 @@
2
2
  * Settings schema with Zod validation.
3
3
  */
4
4
  import { z } from "zod";
5
+ /**
6
+ * Tri-state project capability overlay. Lives in PROJECT settings only and
7
+ * layers over the global baseline (disabledSkills / disabledPlugins /
8
+ * mcpServers.<name>.enabled / disabledAgents). NOT a second denylist:
9
+ * - "on" → force enabled (even if globally disabled)
10
+ * - "off" → force disabled (even if globally enabled)
11
+ * - "inherit" → take the global baseline. We don't persist "inherit"; an
12
+ * absent key means inherit. See the project-scoped
13
+ * capabilities design (spec §4).
14
+ */
15
+ export declare const CapabilityOverrideSchema: z.ZodEnum<["inherit", "on", "off"]>;
16
+ export type CapabilityOverride = z.infer<typeof CapabilityOverrideSchema>;
17
+ export declare const CapabilityOverridesSchema: z.ZodOptional<z.ZodObject<{
18
+ skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
19
+ plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
20
+ agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
21
+ mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
22
+ builtin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
25
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
26
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
27
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
28
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
29
+ }, {
30
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
31
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
32
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
33
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
34
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
35
+ }>>;
36
+ export type CapabilityOverrides = z.infer<typeof CapabilityOverridesSchema>;
5
37
  export declare const SettingsSchema: z.ZodObject<{
6
38
  agent: z.ZodDefault<z.ZodObject<{
7
39
  preset: z.ZodDefault<z.ZodString>;
@@ -9,18 +41,42 @@ export declare const SettingsSchema: z.ZodObject<{
9
41
  disabledBuiltinTools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
10
42
  customSystemPrompt: z.ZodOptional<z.ZodString>;
11
43
  appendSystemPrompt: z.ZodOptional<z.ZodString>;
44
+ responseLanguage: z.ZodOptional<z.ZodString>;
45
+ userProfile: z.ZodOptional<z.ZodString>;
46
+ instructions: z.ZodOptional<z.ZodObject<{
47
+ compatClaude: z.ZodDefault<z.ZodBoolean>;
48
+ compatCodex: z.ZodDefault<z.ZodBoolean>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ compatClaude: boolean;
51
+ compatCodex: boolean;
52
+ }, {
53
+ compatClaude?: boolean | undefined;
54
+ compatCodex?: boolean | undefined;
55
+ }>>;
12
56
  }, "strip", z.ZodTypeAny, {
13
57
  preset: string;
14
58
  enabledBuiltinTools: string[];
15
59
  disabledBuiltinTools: string[];
16
60
  customSystemPrompt?: string | undefined;
17
61
  appendSystemPrompt?: string | undefined;
62
+ responseLanguage?: string | undefined;
63
+ userProfile?: string | undefined;
64
+ instructions?: {
65
+ compatClaude: boolean;
66
+ compatCodex: boolean;
67
+ } | undefined;
18
68
  }, {
19
69
  preset?: string | undefined;
20
70
  enabledBuiltinTools?: string[] | undefined;
21
71
  disabledBuiltinTools?: string[] | undefined;
22
72
  customSystemPrompt?: string | undefined;
23
73
  appendSystemPrompt?: string | undefined;
74
+ responseLanguage?: string | undefined;
75
+ userProfile?: string | undefined;
76
+ instructions?: {
77
+ compatClaude?: boolean | undefined;
78
+ compatCodex?: boolean | undefined;
79
+ } | undefined;
24
80
  }>>;
25
81
  /**
26
82
  * Primary source of truth for the active model is settings.activeKey
@@ -30,6 +86,15 @@ export declare const SettingsSchema: z.ZodObject<{
30
86
  * both — appendOnboardingResult does this in one shot.
31
87
  */
32
88
  activeKey: z.ZodOptional<z.ZodString>;
89
+ /**
90
+ * Auxiliary-task model — points at a models[].key. Background, non-user-
91
+ * facing LLM calls (memory extraction, the auto-dream loop) use this model
92
+ * instead of the active one, so per-turn book-keeping doesn't burn the
93
+ * expensive primary model. Pick something fast/cheap (e.g. a Haiku or
94
+ * DeepSeek key). When unset, those calls fall back to the active model
95
+ * (legacy behavior). An invalid/missing key also falls back to active.
96
+ */
97
+ auxModelKey: z.ZodOptional<z.ZodString>;
33
98
  /**
34
99
  * Toggle background auto-update. When true (default), code-shell checks
35
100
  * npm for newer versions and — if the npm global prefix is writable —
@@ -46,16 +111,16 @@ export declare const SettingsSchema: z.ZodObject<{
46
111
  temperature: z.ZodDefault<z.ZodNumber>;
47
112
  maxTokens: z.ZodDefault<z.ZodNumber>;
48
113
  }, "strip", z.ZodTypeAny, {
49
- provider: string;
50
- name: string;
51
114
  temperature: number;
115
+ name: string;
116
+ provider: string;
52
117
  baseUrl: string;
53
118
  maxTokens: number;
54
119
  apiKey?: string | undefined;
55
120
  }, {
56
- provider?: string | undefined;
57
- name?: string | undefined;
58
121
  temperature?: number | undefined;
122
+ name?: string | undefined;
123
+ provider?: string | undefined;
59
124
  baseUrl?: string | undefined;
60
125
  apiKey?: string | undefined;
61
126
  maxTokens?: number | undefined;
@@ -69,26 +134,75 @@ export declare const SettingsSchema: z.ZodObject<{
69
134
  protocol: z.ZodOptional<z.ZodEnum<["openai-compat", "anthropic-style"]>>;
70
135
  modelsPath: z.ZodOptional<z.ZodString>;
71
136
  /**
72
- * DeepSeek V4 thinking-mode default for this provider. "enabled"
73
- * matches endpoint default; "disabled" makes V4 calls run in
74
- * non-thinking mode (faster, cheaper). Ignored by every provider
75
- * other than DeepSeek V4. Per-call overrides still win.
137
+ * Default reasoning/thinking setting for this provider's models.
138
+ * Rich shape: {mode:"off"|"on"} | {mode:"effort",effort} |
139
+ * {mode:"budget",budgetTokens}. Per-model `reasoning` wins.
76
140
  */
77
- thinking: z.ZodOptional<z.ZodEnum<["enabled", "disabled"]>>;
141
+ reasoning: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
142
+ mode: z.ZodLiteral<"off">;
143
+ }, "strip", z.ZodTypeAny, {
144
+ mode: "off";
145
+ }, {
146
+ mode: "off";
147
+ }>, z.ZodObject<{
148
+ mode: z.ZodLiteral<"on">;
149
+ }, "strip", z.ZodTypeAny, {
150
+ mode: "on";
151
+ }, {
152
+ mode: "on";
153
+ }>, z.ZodObject<{
154
+ mode: z.ZodLiteral<"effort">;
155
+ effort: z.ZodEnum<["minimal", "low", "medium", "high", "xhigh"]>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ mode: "effort";
158
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
159
+ }, {
160
+ mode: "effort";
161
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
162
+ }>, z.ZodObject<{
163
+ mode: z.ZodLiteral<"budget">;
164
+ budgetTokens: z.ZodNumber;
165
+ }, "strip", z.ZodTypeAny, {
166
+ mode: "budget";
167
+ budgetTokens: number;
168
+ }, {
169
+ mode: "budget";
170
+ budgetTokens: number;
171
+ }>]>>;
78
172
  }, "strip", z.ZodTypeAny, {
79
173
  key: string;
80
- kind: "anthropic" | "openai" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
174
+ kind: "openai" | "anthropic" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
81
175
  baseUrl: string;
82
- thinking?: "enabled" | "disabled" | undefined;
176
+ reasoning?: {
177
+ mode: "off";
178
+ } | {
179
+ mode: "on";
180
+ } | {
181
+ mode: "effort";
182
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
183
+ } | {
184
+ mode: "budget";
185
+ budgetTokens: number;
186
+ } | undefined;
83
187
  label?: string | undefined;
84
188
  apiKey?: string | undefined;
85
189
  protocol?: "openai-compat" | "anthropic-style" | undefined;
86
190
  modelsPath?: string | undefined;
87
191
  }, {
88
192
  key: string;
89
- kind: "anthropic" | "openai" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
193
+ kind: "openai" | "anthropic" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
90
194
  baseUrl: string;
91
- thinking?: "enabled" | "disabled" | undefined;
195
+ reasoning?: {
196
+ mode: "off";
197
+ } | {
198
+ mode: "on";
199
+ } | {
200
+ mode: "effort";
201
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
202
+ } | {
203
+ mode: "budget";
204
+ budgetTokens: number;
205
+ } | undefined;
92
206
  label?: string | undefined;
93
207
  apiKey?: string | undefined;
94
208
  protocol?: "openai-compat" | "anthropic-style" | undefined;
@@ -112,59 +226,129 @@ export declare const SettingsSchema: z.ZodObject<{
112
226
  baseUrl: z.ZodOptional<z.ZodString>;
113
227
  apiKey: z.ZodOptional<z.ZodString>;
114
228
  /**
115
- * Per-model thinking override. Wins over the provider-level
116
- * setting (settings.providers[].thinking). Use this when
117
- * different models under the same provider need different
118
- * defaults — e.g. DeepSeek V4 Pro off (faster) but V4 Flash on.
229
+ * Per-model reasoning override. Wins over the provider-level
230
+ * `reasoning` setting (settings.providers[].reasoning). Use this
231
+ * when different models under the same provider need different
232
+ * defaults — e.g. one model off (faster) and another on.
119
233
  */
120
- thinking: z.ZodOptional<z.ZodEnum<["enabled", "disabled"]>>;
234
+ reasoning: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
235
+ mode: z.ZodLiteral<"off">;
236
+ }, "strip", z.ZodTypeAny, {
237
+ mode: "off";
238
+ }, {
239
+ mode: "off";
240
+ }>, z.ZodObject<{
241
+ mode: z.ZodLiteral<"on">;
242
+ }, "strip", z.ZodTypeAny, {
243
+ mode: "on";
244
+ }, {
245
+ mode: "on";
246
+ }>, z.ZodObject<{
247
+ mode: z.ZodLiteral<"effort">;
248
+ effort: z.ZodEnum<["minimal", "low", "medium", "high", "xhigh"]>;
249
+ }, "strip", z.ZodTypeAny, {
250
+ mode: "effort";
251
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
252
+ }, {
253
+ mode: "effort";
254
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
255
+ }>, z.ZodObject<{
256
+ mode: z.ZodLiteral<"budget">;
257
+ budgetTokens: z.ZodNumber;
258
+ }, "strip", z.ZodTypeAny, {
259
+ mode: "budget";
260
+ budgetTokens: number;
261
+ }, {
262
+ mode: "budget";
263
+ budgetTokens: number;
264
+ }>]>>;
121
265
  }, "strip", z.ZodTypeAny, {
122
- model: string;
123
266
  key: string;
267
+ model: string;
268
+ reasoning?: {
269
+ mode: "off";
270
+ } | {
271
+ mode: "on";
272
+ } | {
273
+ mode: "effort";
274
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
275
+ } | {
276
+ mode: "budget";
277
+ budgetTokens: number;
278
+ } | undefined;
124
279
  provider?: string | undefined;
125
- thinking?: "enabled" | "disabled" | undefined;
280
+ maxOutputTokens?: number | undefined;
126
281
  label?: string | undefined;
127
282
  baseUrl?: string | undefined;
128
283
  apiKey?: string | undefined;
129
284
  protocol?: string | undefined;
130
285
  providerKey?: string | undefined;
131
- maxOutputTokens?: number | undefined;
132
286
  maxContextTokens?: number | undefined;
133
287
  }, {
134
- model: string;
135
288
  key: string;
289
+ model: string;
290
+ reasoning?: {
291
+ mode: "off";
292
+ } | {
293
+ mode: "on";
294
+ } | {
295
+ mode: "effort";
296
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
297
+ } | {
298
+ mode: "budget";
299
+ budgetTokens: number;
300
+ } | undefined;
136
301
  provider?: string | undefined;
137
- thinking?: "enabled" | "disabled" | undefined;
302
+ maxOutputTokens?: number | undefined;
138
303
  label?: string | undefined;
139
304
  baseUrl?: string | undefined;
140
305
  apiKey?: string | undefined;
141
306
  protocol?: string | undefined;
142
307
  providerKey?: string | undefined;
143
- maxOutputTokens?: number | undefined;
144
308
  maxContextTokens?: number | undefined;
145
309
  }>, {
146
310
  protocol: string | undefined;
147
311
  provider: string | undefined;
148
- model: string;
149
312
  key: string;
150
- thinking?: "enabled" | "disabled" | undefined;
313
+ model: string;
314
+ reasoning?: {
315
+ mode: "off";
316
+ } | {
317
+ mode: "on";
318
+ } | {
319
+ mode: "effort";
320
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
321
+ } | {
322
+ mode: "budget";
323
+ budgetTokens: number;
324
+ } | undefined;
325
+ maxOutputTokens?: number | undefined;
151
326
  label?: string | undefined;
152
327
  baseUrl?: string | undefined;
153
328
  apiKey?: string | undefined;
154
329
  providerKey?: string | undefined;
155
- maxOutputTokens?: number | undefined;
156
330
  maxContextTokens?: number | undefined;
157
331
  }, {
158
- model: string;
159
332
  key: string;
333
+ model: string;
334
+ reasoning?: {
335
+ mode: "off";
336
+ } | {
337
+ mode: "on";
338
+ } | {
339
+ mode: "effort";
340
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
341
+ } | {
342
+ mode: "budget";
343
+ budgetTokens: number;
344
+ } | undefined;
160
345
  provider?: string | undefined;
161
- thinking?: "enabled" | "disabled" | undefined;
346
+ maxOutputTokens?: number | undefined;
162
347
  label?: string | undefined;
163
348
  baseUrl?: string | undefined;
164
349
  apiKey?: string | undefined;
165
350
  protocol?: string | undefined;
166
351
  providerKey?: string | undefined;
167
- maxOutputTokens?: number | undefined;
168
352
  maxContextTokens?: number | undefined;
169
353
  }>, "many">>;
170
354
  permissions: z.ZodDefault<z.ZodObject<{
@@ -186,7 +370,7 @@ export declare const SettingsSchema: z.ZodObject<{
186
370
  argsPattern?: Record<string, string> | undefined;
187
371
  }>, "many">>;
188
372
  }, "strip", z.ZodTypeAny, {
189
- defaultMode: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan";
373
+ defaultMode: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan";
190
374
  rules: {
191
375
  tool: string;
192
376
  decision: "allow" | "deny" | "ask";
@@ -194,7 +378,7 @@ export declare const SettingsSchema: z.ZodObject<{
194
378
  argsPattern?: Record<string, string> | undefined;
195
379
  }[];
196
380
  }, {
197
- defaultMode?: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan" | undefined;
381
+ defaultMode?: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan" | undefined;
198
382
  rules?: {
199
383
  tool: string;
200
384
  decision: "allow" | "deny" | "ask";
@@ -233,20 +417,23 @@ export declare const SettingsSchema: z.ZodObject<{
233
417
  url: z.ZodOptional<z.ZodString>;
234
418
  transport: z.ZodOptional<z.ZodEnum<["stdio", "sse", "streamable-http", "inprocess"]>>;
235
419
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
420
+ enabled: z.ZodOptional<z.ZodBoolean>;
236
421
  }, "strip", z.ZodTypeAny, {
237
422
  name: string;
423
+ enabled?: boolean | undefined;
238
424
  url?: string | undefined;
239
425
  args?: string[] | undefined;
240
- env?: Record<string, string> | undefined;
241
426
  command?: string | undefined;
427
+ env?: Record<string, string> | undefined;
242
428
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
243
429
  headers?: Record<string, string> | undefined;
244
430
  }, {
245
431
  name: string;
432
+ enabled?: boolean | undefined;
246
433
  url?: string | undefined;
247
434
  args?: string[] | undefined;
248
- env?: Record<string, string> | undefined;
249
435
  command?: string | undefined;
436
+ env?: Record<string, string> | undefined;
250
437
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
251
438
  headers?: Record<string, string> | undefined;
252
439
  }>>>;
@@ -264,6 +451,38 @@ export declare const SettingsSchema: z.ZodObject<{
264
451
  * names (no colon suffix). See scanSkills(opts.disabledPlugins).
265
452
  */
266
453
  disabledPlugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
454
+ /**
455
+ * Sub-agent role names (the `name` in .code-shell/agents/*.md) to
456
+ * hide from the registry. A disabled role is filtered out at load
457
+ * so it never appears in registry.list()/get() — the Agent tool's
458
+ * agent_type list won't show it and the LLM can't pick it. Mirrors
459
+ * disabledSkills / disabledPlugins.
460
+ */
461
+ disabledAgents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
462
+ /**
463
+ * Project-scoped tri-state capability overlay. Only meaningful in
464
+ * ${cwd}/.code-shell/settings.json; layered over the global baseline at
465
+ * capability-assembly time. Optional — absence === everything inherits.
466
+ */
467
+ capabilityOverrides: z.ZodOptional<z.ZodObject<{
468
+ skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
469
+ plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
470
+ agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
471
+ mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
472
+ builtin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
473
+ }, "strip", z.ZodTypeAny, {
474
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
475
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
476
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
477
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
478
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
479
+ }, {
480
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
481
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
482
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
483
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
484
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
485
+ }>>;
267
486
  instructions: z.ZodDefault<z.ZodObject<{
268
487
  fileName: z.ZodDefault<z.ZodString>;
269
488
  scanDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -288,30 +507,30 @@ export declare const SettingsSchema: z.ZodObject<{
288
507
  apiKey: z.ZodOptional<z.ZodString>;
289
508
  baseUrl: z.ZodOptional<z.ZodString>;
290
509
  }, "strip", z.ZodTypeAny, {
291
- model: string;
292
510
  name: string;
511
+ model: string;
293
512
  provider?: string | undefined;
294
513
  baseUrl?: string | undefined;
295
514
  apiKey?: string | undefined;
296
515
  }, {
297
- model: string;
298
516
  name: string;
517
+ model: string;
299
518
  provider?: string | undefined;
300
519
  baseUrl?: string | undefined;
301
520
  apiKey?: string | undefined;
302
521
  }>]>, "many">>;
303
522
  }, "strip", z.ZodTypeAny, {
304
523
  participants: (string | {
305
- model: string;
306
524
  name: string;
525
+ model: string;
307
526
  provider?: string | undefined;
308
527
  baseUrl?: string | undefined;
309
528
  apiKey?: string | undefined;
310
529
  })[];
311
530
  }, {
312
531
  participants?: (string | {
313
- model: string;
314
532
  name: string;
533
+ model: string;
315
534
  provider?: string | undefined;
316
535
  baseUrl?: string | undefined;
317
536
  apiKey?: string | undefined;
@@ -331,12 +550,45 @@ export declare const SettingsSchema: z.ZodObject<{
331
550
  providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["serper", "tavily", "searxng"]>, z.ZodObject<{
332
551
  apiKey: z.ZodOptional<z.ZodString>;
333
552
  baseUrl: z.ZodOptional<z.ZodString>;
553
+ lastProbe: z.ZodOptional<z.ZodObject<{
554
+ status: z.ZodEnum<["ok", "error", "unconfigured"]>;
555
+ sampleTitles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
556
+ errorMessage: z.ZodOptional<z.ZodString>;
557
+ errorDetail: z.ZodOptional<z.ZodString>;
558
+ lastProbedAt: z.ZodString;
559
+ }, "strip", z.ZodTypeAny, {
560
+ status: "error" | "ok" | "unconfigured";
561
+ lastProbedAt: string;
562
+ sampleTitles?: string[] | undefined;
563
+ errorMessage?: string | undefined;
564
+ errorDetail?: string | undefined;
565
+ }, {
566
+ status: "error" | "ok" | "unconfigured";
567
+ lastProbedAt: string;
568
+ sampleTitles?: string[] | undefined;
569
+ errorMessage?: string | undefined;
570
+ errorDetail?: string | undefined;
571
+ }>>;
334
572
  }, "strip", z.ZodTypeAny, {
335
573
  baseUrl?: string | undefined;
336
574
  apiKey?: string | undefined;
575
+ lastProbe?: {
576
+ status: "error" | "ok" | "unconfigured";
577
+ lastProbedAt: string;
578
+ sampleTitles?: string[] | undefined;
579
+ errorMessage?: string | undefined;
580
+ errorDetail?: string | undefined;
581
+ } | undefined;
337
582
  }, {
338
583
  baseUrl?: string | undefined;
339
584
  apiKey?: string | undefined;
585
+ lastProbe?: {
586
+ status: "error" | "ok" | "unconfigured";
587
+ lastProbedAt: string;
588
+ sampleTitles?: string[] | undefined;
589
+ errorMessage?: string | undefined;
590
+ errorDetail?: string | undefined;
591
+ } | undefined;
340
592
  }>>>;
341
593
  }, "strip", z.ZodTypeAny, {
342
594
  provider: "serper" | "tavily" | "searxng";
@@ -345,6 +597,13 @@ export declare const SettingsSchema: z.ZodObject<{
345
597
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
346
598
  baseUrl?: string | undefined;
347
599
  apiKey?: string | undefined;
600
+ lastProbe?: {
601
+ status: "error" | "ok" | "unconfigured";
602
+ lastProbedAt: string;
603
+ sampleTitles?: string[] | undefined;
604
+ errorMessage?: string | undefined;
605
+ errorDetail?: string | undefined;
606
+ } | undefined;
348
607
  }>> | undefined;
349
608
  }, {
350
609
  provider?: "serper" | "tavily" | "searxng" | undefined;
@@ -353,6 +612,13 @@ export declare const SettingsSchema: z.ZodObject<{
353
612
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
354
613
  baseUrl?: string | undefined;
355
614
  apiKey?: string | undefined;
615
+ lastProbe?: {
616
+ status: "error" | "ok" | "unconfigured";
617
+ lastProbedAt: string;
618
+ sampleTitles?: string[] | undefined;
619
+ errorMessage?: string | undefined;
620
+ errorDetail?: string | undefined;
621
+ } | undefined;
356
622
  }>> | undefined;
357
623
  }>>;
358
624
  output: z.ZodDefault<z.ZodObject<{
@@ -362,6 +628,28 @@ export declare const SettingsSchema: z.ZodObject<{
362
628
  }, {
363
629
  format?: "text" | "json" | "jsonl" | "stream-json" | undefined;
364
630
  }>>;
631
+ /**
632
+ * Image attachment handling. Sub-fields:
633
+ * - detail: OpenAI-style fidelity hint applied to every user-
634
+ * attached image. "low" = 85 tokens/image fixed (cheap
635
+ * thumbnail), "high" = ~768 px tiles (default), "original" =
636
+ * keep client-side dimensions (most expensive). Anthropic
637
+ * ignores this field today; that's fine — it just gets
638
+ * dropped on the Claude path.
639
+ * - mcpImageTokenBudget: per-turn cap on token cost of images
640
+ * returned by MCP tools. Codex doesn't enforce this; CC uses
641
+ * 25 000. Set to 0 to disable.
642
+ */
643
+ images: z.ZodOptional<z.ZodObject<{
644
+ detail: z.ZodOptional<z.ZodEnum<["low", "high", "original"]>>;
645
+ mcpImageTokenBudget: z.ZodOptional<z.ZodNumber>;
646
+ }, "strip", z.ZodTypeAny, {
647
+ detail?: "low" | "high" | "original" | undefined;
648
+ mcpImageTokenBudget?: number | undefined;
649
+ }, {
650
+ detail?: "low" | "high" | "original" | undefined;
651
+ mcpImageTokenBudget?: number | undefined;
652
+ }>>;
365
653
  /**
366
654
  * OS-level sandbox for shell-tool execution. "auto" picks per platform:
367
655
  * Seatbelt on macOS, bubblewrap on Linux when installed, otherwise off.
@@ -374,16 +662,88 @@ export declare const SettingsSchema: z.ZodObject<{
374
662
  deniedReads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
375
663
  network: z.ZodOptional<z.ZodEnum<["allow", "deny"]>>;
376
664
  }, "strip", z.ZodTypeAny, {
377
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
665
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
378
666
  writableRoots?: string[] | undefined;
379
667
  deniedReads?: string[] | undefined;
380
668
  network?: "allow" | "deny" | undefined;
381
669
  }, {
382
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
670
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
383
671
  writableRoots?: string[] | undefined;
384
672
  deniedReads?: string[] | undefined;
385
673
  network?: "allow" | "deny" | undefined;
386
674
  }>>;
675
+ /**
676
+ * Project-local environment profile. Mirrors Codex's local-environment
677
+ * shape at the settings layer: setup/cleanup scripts can be customized per
678
+ * platform, and env values are stored as KEY=VALUE pairs. Runtime wiring is
679
+ * intentionally separate from the MCP server env model above.
680
+ */
681
+ localEnvironment: z.ZodOptional<z.ZodObject<{
682
+ name: z.ZodOptional<z.ZodString>;
683
+ setupScripts: z.ZodOptional<z.ZodObject<{
684
+ default: z.ZodOptional<z.ZodString>;
685
+ macos: z.ZodOptional<z.ZodString>;
686
+ linux: z.ZodOptional<z.ZodString>;
687
+ windows: z.ZodOptional<z.ZodString>;
688
+ }, "strip", z.ZodTypeAny, {
689
+ default?: string | undefined;
690
+ linux?: string | undefined;
691
+ macos?: string | undefined;
692
+ windows?: string | undefined;
693
+ }, {
694
+ default?: string | undefined;
695
+ linux?: string | undefined;
696
+ macos?: string | undefined;
697
+ windows?: string | undefined;
698
+ }>>;
699
+ cleanupScripts: z.ZodOptional<z.ZodObject<{
700
+ default: z.ZodOptional<z.ZodString>;
701
+ macos: z.ZodOptional<z.ZodString>;
702
+ linux: z.ZodOptional<z.ZodString>;
703
+ windows: z.ZodOptional<z.ZodString>;
704
+ }, "strip", z.ZodTypeAny, {
705
+ default?: string | undefined;
706
+ linux?: string | undefined;
707
+ macos?: string | undefined;
708
+ windows?: string | undefined;
709
+ }, {
710
+ default?: string | undefined;
711
+ linux?: string | undefined;
712
+ macos?: string | undefined;
713
+ windows?: string | undefined;
714
+ }>>;
715
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
716
+ }, "strip", z.ZodTypeAny, {
717
+ name?: string | undefined;
718
+ env?: Record<string, string> | undefined;
719
+ setupScripts?: {
720
+ default?: string | undefined;
721
+ linux?: string | undefined;
722
+ macos?: string | undefined;
723
+ windows?: string | undefined;
724
+ } | undefined;
725
+ cleanupScripts?: {
726
+ default?: string | undefined;
727
+ linux?: string | undefined;
728
+ macos?: string | undefined;
729
+ windows?: string | undefined;
730
+ } | undefined;
731
+ }, {
732
+ name?: string | undefined;
733
+ env?: Record<string, string> | undefined;
734
+ setupScripts?: {
735
+ default?: string | undefined;
736
+ linux?: string | undefined;
737
+ macos?: string | undefined;
738
+ windows?: string | undefined;
739
+ } | undefined;
740
+ cleanupScripts?: {
741
+ default?: string | undefined;
742
+ linux?: string | undefined;
743
+ macos?: string | undefined;
744
+ windows?: string | undefined;
745
+ } | undefined;
746
+ }>>;
387
747
  /**
388
748
  * Shell-hook configuration. Each entry binds a HookEventName to a
389
749
  * shell command; the command receives ctx JSON on stdin and returns
@@ -403,15 +763,15 @@ export declare const SettingsSchema: z.ZodObject<{
403
763
  }, "strip", z.ZodTypeAny, {
404
764
  command: string;
405
765
  event: string;
406
- cwd?: string | undefined;
407
766
  matcher?: string | undefined;
408
767
  timeout_ms?: number | undefined;
768
+ cwd?: string | undefined;
409
769
  }, {
410
770
  command: string;
411
771
  event: string;
412
- cwd?: string | undefined;
413
772
  matcher?: string | undefined;
414
773
  timeout_ms?: number | undefined;
774
+ cwd?: string | undefined;
415
775
  }>, "many">>;
416
776
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
417
777
  agent: z.ZodDefault<z.ZodObject<{
@@ -420,18 +780,42 @@ export declare const SettingsSchema: z.ZodObject<{
420
780
  disabledBuiltinTools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
421
781
  customSystemPrompt: z.ZodOptional<z.ZodString>;
422
782
  appendSystemPrompt: z.ZodOptional<z.ZodString>;
783
+ responseLanguage: z.ZodOptional<z.ZodString>;
784
+ userProfile: z.ZodOptional<z.ZodString>;
785
+ instructions: z.ZodOptional<z.ZodObject<{
786
+ compatClaude: z.ZodDefault<z.ZodBoolean>;
787
+ compatCodex: z.ZodDefault<z.ZodBoolean>;
788
+ }, "strip", z.ZodTypeAny, {
789
+ compatClaude: boolean;
790
+ compatCodex: boolean;
791
+ }, {
792
+ compatClaude?: boolean | undefined;
793
+ compatCodex?: boolean | undefined;
794
+ }>>;
423
795
  }, "strip", z.ZodTypeAny, {
424
796
  preset: string;
425
797
  enabledBuiltinTools: string[];
426
798
  disabledBuiltinTools: string[];
427
799
  customSystemPrompt?: string | undefined;
428
800
  appendSystemPrompt?: string | undefined;
801
+ responseLanguage?: string | undefined;
802
+ userProfile?: string | undefined;
803
+ instructions?: {
804
+ compatClaude: boolean;
805
+ compatCodex: boolean;
806
+ } | undefined;
429
807
  }, {
430
808
  preset?: string | undefined;
431
809
  enabledBuiltinTools?: string[] | undefined;
432
810
  disabledBuiltinTools?: string[] | undefined;
433
811
  customSystemPrompt?: string | undefined;
434
812
  appendSystemPrompt?: string | undefined;
813
+ responseLanguage?: string | undefined;
814
+ userProfile?: string | undefined;
815
+ instructions?: {
816
+ compatClaude?: boolean | undefined;
817
+ compatCodex?: boolean | undefined;
818
+ } | undefined;
435
819
  }>>;
436
820
  /**
437
821
  * Primary source of truth for the active model is settings.activeKey
@@ -441,6 +825,15 @@ export declare const SettingsSchema: z.ZodObject<{
441
825
  * both — appendOnboardingResult does this in one shot.
442
826
  */
443
827
  activeKey: z.ZodOptional<z.ZodString>;
828
+ /**
829
+ * Auxiliary-task model — points at a models[].key. Background, non-user-
830
+ * facing LLM calls (memory extraction, the auto-dream loop) use this model
831
+ * instead of the active one, so per-turn book-keeping doesn't burn the
832
+ * expensive primary model. Pick something fast/cheap (e.g. a Haiku or
833
+ * DeepSeek key). When unset, those calls fall back to the active model
834
+ * (legacy behavior). An invalid/missing key also falls back to active.
835
+ */
836
+ auxModelKey: z.ZodOptional<z.ZodString>;
444
837
  /**
445
838
  * Toggle background auto-update. When true (default), code-shell checks
446
839
  * npm for newer versions and — if the npm global prefix is writable —
@@ -457,16 +850,16 @@ export declare const SettingsSchema: z.ZodObject<{
457
850
  temperature: z.ZodDefault<z.ZodNumber>;
458
851
  maxTokens: z.ZodDefault<z.ZodNumber>;
459
852
  }, "strip", z.ZodTypeAny, {
460
- provider: string;
461
- name: string;
462
853
  temperature: number;
854
+ name: string;
855
+ provider: string;
463
856
  baseUrl: string;
464
857
  maxTokens: number;
465
858
  apiKey?: string | undefined;
466
859
  }, {
467
- provider?: string | undefined;
468
- name?: string | undefined;
469
860
  temperature?: number | undefined;
861
+ name?: string | undefined;
862
+ provider?: string | undefined;
470
863
  baseUrl?: string | undefined;
471
864
  apiKey?: string | undefined;
472
865
  maxTokens?: number | undefined;
@@ -480,26 +873,75 @@ export declare const SettingsSchema: z.ZodObject<{
480
873
  protocol: z.ZodOptional<z.ZodEnum<["openai-compat", "anthropic-style"]>>;
481
874
  modelsPath: z.ZodOptional<z.ZodString>;
482
875
  /**
483
- * DeepSeek V4 thinking-mode default for this provider. "enabled"
484
- * matches endpoint default; "disabled" makes V4 calls run in
485
- * non-thinking mode (faster, cheaper). Ignored by every provider
486
- * other than DeepSeek V4. Per-call overrides still win.
876
+ * Default reasoning/thinking setting for this provider's models.
877
+ * Rich shape: {mode:"off"|"on"} | {mode:"effort",effort} |
878
+ * {mode:"budget",budgetTokens}. Per-model `reasoning` wins.
487
879
  */
488
- thinking: z.ZodOptional<z.ZodEnum<["enabled", "disabled"]>>;
880
+ reasoning: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
881
+ mode: z.ZodLiteral<"off">;
882
+ }, "strip", z.ZodTypeAny, {
883
+ mode: "off";
884
+ }, {
885
+ mode: "off";
886
+ }>, z.ZodObject<{
887
+ mode: z.ZodLiteral<"on">;
888
+ }, "strip", z.ZodTypeAny, {
889
+ mode: "on";
890
+ }, {
891
+ mode: "on";
892
+ }>, z.ZodObject<{
893
+ mode: z.ZodLiteral<"effort">;
894
+ effort: z.ZodEnum<["minimal", "low", "medium", "high", "xhigh"]>;
895
+ }, "strip", z.ZodTypeAny, {
896
+ mode: "effort";
897
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
898
+ }, {
899
+ mode: "effort";
900
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
901
+ }>, z.ZodObject<{
902
+ mode: z.ZodLiteral<"budget">;
903
+ budgetTokens: z.ZodNumber;
904
+ }, "strip", z.ZodTypeAny, {
905
+ mode: "budget";
906
+ budgetTokens: number;
907
+ }, {
908
+ mode: "budget";
909
+ budgetTokens: number;
910
+ }>]>>;
489
911
  }, "strip", z.ZodTypeAny, {
490
912
  key: string;
491
- kind: "anthropic" | "openai" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
913
+ kind: "openai" | "anthropic" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
492
914
  baseUrl: string;
493
- thinking?: "enabled" | "disabled" | undefined;
915
+ reasoning?: {
916
+ mode: "off";
917
+ } | {
918
+ mode: "on";
919
+ } | {
920
+ mode: "effort";
921
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
922
+ } | {
923
+ mode: "budget";
924
+ budgetTokens: number;
925
+ } | undefined;
494
926
  label?: string | undefined;
495
927
  apiKey?: string | undefined;
496
928
  protocol?: "openai-compat" | "anthropic-style" | undefined;
497
929
  modelsPath?: string | undefined;
498
930
  }, {
499
931
  key: string;
500
- kind: "anthropic" | "openai" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
932
+ kind: "openai" | "anthropic" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
501
933
  baseUrl: string;
502
- thinking?: "enabled" | "disabled" | undefined;
934
+ reasoning?: {
935
+ mode: "off";
936
+ } | {
937
+ mode: "on";
938
+ } | {
939
+ mode: "effort";
940
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
941
+ } | {
942
+ mode: "budget";
943
+ budgetTokens: number;
944
+ } | undefined;
503
945
  label?: string | undefined;
504
946
  apiKey?: string | undefined;
505
947
  protocol?: "openai-compat" | "anthropic-style" | undefined;
@@ -523,59 +965,129 @@ export declare const SettingsSchema: z.ZodObject<{
523
965
  baseUrl: z.ZodOptional<z.ZodString>;
524
966
  apiKey: z.ZodOptional<z.ZodString>;
525
967
  /**
526
- * Per-model thinking override. Wins over the provider-level
527
- * setting (settings.providers[].thinking). Use this when
528
- * different models under the same provider need different
529
- * defaults — e.g. DeepSeek V4 Pro off (faster) but V4 Flash on.
968
+ * Per-model reasoning override. Wins over the provider-level
969
+ * `reasoning` setting (settings.providers[].reasoning). Use this
970
+ * when different models under the same provider need different
971
+ * defaults — e.g. one model off (faster) and another on.
530
972
  */
531
- thinking: z.ZodOptional<z.ZodEnum<["enabled", "disabled"]>>;
973
+ reasoning: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
974
+ mode: z.ZodLiteral<"off">;
975
+ }, "strip", z.ZodTypeAny, {
976
+ mode: "off";
977
+ }, {
978
+ mode: "off";
979
+ }>, z.ZodObject<{
980
+ mode: z.ZodLiteral<"on">;
981
+ }, "strip", z.ZodTypeAny, {
982
+ mode: "on";
983
+ }, {
984
+ mode: "on";
985
+ }>, z.ZodObject<{
986
+ mode: z.ZodLiteral<"effort">;
987
+ effort: z.ZodEnum<["minimal", "low", "medium", "high", "xhigh"]>;
988
+ }, "strip", z.ZodTypeAny, {
989
+ mode: "effort";
990
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
991
+ }, {
992
+ mode: "effort";
993
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
994
+ }>, z.ZodObject<{
995
+ mode: z.ZodLiteral<"budget">;
996
+ budgetTokens: z.ZodNumber;
997
+ }, "strip", z.ZodTypeAny, {
998
+ mode: "budget";
999
+ budgetTokens: number;
1000
+ }, {
1001
+ mode: "budget";
1002
+ budgetTokens: number;
1003
+ }>]>>;
532
1004
  }, "strip", z.ZodTypeAny, {
533
- model: string;
534
1005
  key: string;
1006
+ model: string;
1007
+ reasoning?: {
1008
+ mode: "off";
1009
+ } | {
1010
+ mode: "on";
1011
+ } | {
1012
+ mode: "effort";
1013
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1014
+ } | {
1015
+ mode: "budget";
1016
+ budgetTokens: number;
1017
+ } | undefined;
535
1018
  provider?: string | undefined;
536
- thinking?: "enabled" | "disabled" | undefined;
1019
+ maxOutputTokens?: number | undefined;
537
1020
  label?: string | undefined;
538
1021
  baseUrl?: string | undefined;
539
1022
  apiKey?: string | undefined;
540
1023
  protocol?: string | undefined;
541
1024
  providerKey?: string | undefined;
542
- maxOutputTokens?: number | undefined;
543
1025
  maxContextTokens?: number | undefined;
544
1026
  }, {
545
- model: string;
546
1027
  key: string;
1028
+ model: string;
1029
+ reasoning?: {
1030
+ mode: "off";
1031
+ } | {
1032
+ mode: "on";
1033
+ } | {
1034
+ mode: "effort";
1035
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1036
+ } | {
1037
+ mode: "budget";
1038
+ budgetTokens: number;
1039
+ } | undefined;
547
1040
  provider?: string | undefined;
548
- thinking?: "enabled" | "disabled" | undefined;
1041
+ maxOutputTokens?: number | undefined;
549
1042
  label?: string | undefined;
550
1043
  baseUrl?: string | undefined;
551
1044
  apiKey?: string | undefined;
552
1045
  protocol?: string | undefined;
553
1046
  providerKey?: string | undefined;
554
- maxOutputTokens?: number | undefined;
555
1047
  maxContextTokens?: number | undefined;
556
1048
  }>, {
557
1049
  protocol: string | undefined;
558
1050
  provider: string | undefined;
559
- model: string;
560
1051
  key: string;
561
- thinking?: "enabled" | "disabled" | undefined;
1052
+ model: string;
1053
+ reasoning?: {
1054
+ mode: "off";
1055
+ } | {
1056
+ mode: "on";
1057
+ } | {
1058
+ mode: "effort";
1059
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1060
+ } | {
1061
+ mode: "budget";
1062
+ budgetTokens: number;
1063
+ } | undefined;
1064
+ maxOutputTokens?: number | undefined;
562
1065
  label?: string | undefined;
563
1066
  baseUrl?: string | undefined;
564
1067
  apiKey?: string | undefined;
565
1068
  providerKey?: string | undefined;
566
- maxOutputTokens?: number | undefined;
567
1069
  maxContextTokens?: number | undefined;
568
1070
  }, {
569
- model: string;
570
1071
  key: string;
1072
+ model: string;
1073
+ reasoning?: {
1074
+ mode: "off";
1075
+ } | {
1076
+ mode: "on";
1077
+ } | {
1078
+ mode: "effort";
1079
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1080
+ } | {
1081
+ mode: "budget";
1082
+ budgetTokens: number;
1083
+ } | undefined;
571
1084
  provider?: string | undefined;
572
- thinking?: "enabled" | "disabled" | undefined;
1085
+ maxOutputTokens?: number | undefined;
573
1086
  label?: string | undefined;
574
1087
  baseUrl?: string | undefined;
575
1088
  apiKey?: string | undefined;
576
1089
  protocol?: string | undefined;
577
1090
  providerKey?: string | undefined;
578
- maxOutputTokens?: number | undefined;
579
1091
  maxContextTokens?: number | undefined;
580
1092
  }>, "many">>;
581
1093
  permissions: z.ZodDefault<z.ZodObject<{
@@ -597,7 +1109,7 @@ export declare const SettingsSchema: z.ZodObject<{
597
1109
  argsPattern?: Record<string, string> | undefined;
598
1110
  }>, "many">>;
599
1111
  }, "strip", z.ZodTypeAny, {
600
- defaultMode: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan";
1112
+ defaultMode: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan";
601
1113
  rules: {
602
1114
  tool: string;
603
1115
  decision: "allow" | "deny" | "ask";
@@ -605,7 +1117,7 @@ export declare const SettingsSchema: z.ZodObject<{
605
1117
  argsPattern?: Record<string, string> | undefined;
606
1118
  }[];
607
1119
  }, {
608
- defaultMode?: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan" | undefined;
1120
+ defaultMode?: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan" | undefined;
609
1121
  rules?: {
610
1122
  tool: string;
611
1123
  decision: "allow" | "deny" | "ask";
@@ -644,20 +1156,23 @@ export declare const SettingsSchema: z.ZodObject<{
644
1156
  url: z.ZodOptional<z.ZodString>;
645
1157
  transport: z.ZodOptional<z.ZodEnum<["stdio", "sse", "streamable-http", "inprocess"]>>;
646
1158
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1159
+ enabled: z.ZodOptional<z.ZodBoolean>;
647
1160
  }, "strip", z.ZodTypeAny, {
648
1161
  name: string;
1162
+ enabled?: boolean | undefined;
649
1163
  url?: string | undefined;
650
1164
  args?: string[] | undefined;
651
- env?: Record<string, string> | undefined;
652
1165
  command?: string | undefined;
1166
+ env?: Record<string, string> | undefined;
653
1167
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
654
1168
  headers?: Record<string, string> | undefined;
655
1169
  }, {
656
1170
  name: string;
1171
+ enabled?: boolean | undefined;
657
1172
  url?: string | undefined;
658
1173
  args?: string[] | undefined;
659
- env?: Record<string, string> | undefined;
660
1174
  command?: string | undefined;
1175
+ env?: Record<string, string> | undefined;
661
1176
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
662
1177
  headers?: Record<string, string> | undefined;
663
1178
  }>>>;
@@ -675,6 +1190,38 @@ export declare const SettingsSchema: z.ZodObject<{
675
1190
  * names (no colon suffix). See scanSkills(opts.disabledPlugins).
676
1191
  */
677
1192
  disabledPlugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1193
+ /**
1194
+ * Sub-agent role names (the `name` in .code-shell/agents/*.md) to
1195
+ * hide from the registry. A disabled role is filtered out at load
1196
+ * so it never appears in registry.list()/get() — the Agent tool's
1197
+ * agent_type list won't show it and the LLM can't pick it. Mirrors
1198
+ * disabledSkills / disabledPlugins.
1199
+ */
1200
+ disabledAgents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1201
+ /**
1202
+ * Project-scoped tri-state capability overlay. Only meaningful in
1203
+ * ${cwd}/.code-shell/settings.json; layered over the global baseline at
1204
+ * capability-assembly time. Optional — absence === everything inherits.
1205
+ */
1206
+ capabilityOverrides: z.ZodOptional<z.ZodObject<{
1207
+ skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1208
+ plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1209
+ agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1210
+ mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1211
+ builtin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1212
+ }, "strip", z.ZodTypeAny, {
1213
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
1214
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
1215
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
1216
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
1217
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
1218
+ }, {
1219
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
1220
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
1221
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
1222
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
1223
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
1224
+ }>>;
678
1225
  instructions: z.ZodDefault<z.ZodObject<{
679
1226
  fileName: z.ZodDefault<z.ZodString>;
680
1227
  scanDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -699,30 +1246,30 @@ export declare const SettingsSchema: z.ZodObject<{
699
1246
  apiKey: z.ZodOptional<z.ZodString>;
700
1247
  baseUrl: z.ZodOptional<z.ZodString>;
701
1248
  }, "strip", z.ZodTypeAny, {
702
- model: string;
703
1249
  name: string;
1250
+ model: string;
704
1251
  provider?: string | undefined;
705
1252
  baseUrl?: string | undefined;
706
1253
  apiKey?: string | undefined;
707
1254
  }, {
708
- model: string;
709
1255
  name: string;
1256
+ model: string;
710
1257
  provider?: string | undefined;
711
1258
  baseUrl?: string | undefined;
712
1259
  apiKey?: string | undefined;
713
1260
  }>]>, "many">>;
714
1261
  }, "strip", z.ZodTypeAny, {
715
1262
  participants: (string | {
716
- model: string;
717
1263
  name: string;
1264
+ model: string;
718
1265
  provider?: string | undefined;
719
1266
  baseUrl?: string | undefined;
720
1267
  apiKey?: string | undefined;
721
1268
  })[];
722
1269
  }, {
723
1270
  participants?: (string | {
724
- model: string;
725
1271
  name: string;
1272
+ model: string;
726
1273
  provider?: string | undefined;
727
1274
  baseUrl?: string | undefined;
728
1275
  apiKey?: string | undefined;
@@ -742,12 +1289,45 @@ export declare const SettingsSchema: z.ZodObject<{
742
1289
  providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["serper", "tavily", "searxng"]>, z.ZodObject<{
743
1290
  apiKey: z.ZodOptional<z.ZodString>;
744
1291
  baseUrl: z.ZodOptional<z.ZodString>;
1292
+ lastProbe: z.ZodOptional<z.ZodObject<{
1293
+ status: z.ZodEnum<["ok", "error", "unconfigured"]>;
1294
+ sampleTitles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1295
+ errorMessage: z.ZodOptional<z.ZodString>;
1296
+ errorDetail: z.ZodOptional<z.ZodString>;
1297
+ lastProbedAt: z.ZodString;
1298
+ }, "strip", z.ZodTypeAny, {
1299
+ status: "error" | "ok" | "unconfigured";
1300
+ lastProbedAt: string;
1301
+ sampleTitles?: string[] | undefined;
1302
+ errorMessage?: string | undefined;
1303
+ errorDetail?: string | undefined;
1304
+ }, {
1305
+ status: "error" | "ok" | "unconfigured";
1306
+ lastProbedAt: string;
1307
+ sampleTitles?: string[] | undefined;
1308
+ errorMessage?: string | undefined;
1309
+ errorDetail?: string | undefined;
1310
+ }>>;
745
1311
  }, "strip", z.ZodTypeAny, {
746
1312
  baseUrl?: string | undefined;
747
1313
  apiKey?: string | undefined;
1314
+ lastProbe?: {
1315
+ status: "error" | "ok" | "unconfigured";
1316
+ lastProbedAt: string;
1317
+ sampleTitles?: string[] | undefined;
1318
+ errorMessage?: string | undefined;
1319
+ errorDetail?: string | undefined;
1320
+ } | undefined;
748
1321
  }, {
749
1322
  baseUrl?: string | undefined;
750
1323
  apiKey?: string | undefined;
1324
+ lastProbe?: {
1325
+ status: "error" | "ok" | "unconfigured";
1326
+ lastProbedAt: string;
1327
+ sampleTitles?: string[] | undefined;
1328
+ errorMessage?: string | undefined;
1329
+ errorDetail?: string | undefined;
1330
+ } | undefined;
751
1331
  }>>>;
752
1332
  }, "strip", z.ZodTypeAny, {
753
1333
  provider: "serper" | "tavily" | "searxng";
@@ -756,6 +1336,13 @@ export declare const SettingsSchema: z.ZodObject<{
756
1336
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
757
1337
  baseUrl?: string | undefined;
758
1338
  apiKey?: string | undefined;
1339
+ lastProbe?: {
1340
+ status: "error" | "ok" | "unconfigured";
1341
+ lastProbedAt: string;
1342
+ sampleTitles?: string[] | undefined;
1343
+ errorMessage?: string | undefined;
1344
+ errorDetail?: string | undefined;
1345
+ } | undefined;
759
1346
  }>> | undefined;
760
1347
  }, {
761
1348
  provider?: "serper" | "tavily" | "searxng" | undefined;
@@ -764,6 +1351,13 @@ export declare const SettingsSchema: z.ZodObject<{
764
1351
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
765
1352
  baseUrl?: string | undefined;
766
1353
  apiKey?: string | undefined;
1354
+ lastProbe?: {
1355
+ status: "error" | "ok" | "unconfigured";
1356
+ lastProbedAt: string;
1357
+ sampleTitles?: string[] | undefined;
1358
+ errorMessage?: string | undefined;
1359
+ errorDetail?: string | undefined;
1360
+ } | undefined;
767
1361
  }>> | undefined;
768
1362
  }>>;
769
1363
  output: z.ZodDefault<z.ZodObject<{
@@ -773,6 +1367,28 @@ export declare const SettingsSchema: z.ZodObject<{
773
1367
  }, {
774
1368
  format?: "text" | "json" | "jsonl" | "stream-json" | undefined;
775
1369
  }>>;
1370
+ /**
1371
+ * Image attachment handling. Sub-fields:
1372
+ * - detail: OpenAI-style fidelity hint applied to every user-
1373
+ * attached image. "low" = 85 tokens/image fixed (cheap
1374
+ * thumbnail), "high" = ~768 px tiles (default), "original" =
1375
+ * keep client-side dimensions (most expensive). Anthropic
1376
+ * ignores this field today; that's fine — it just gets
1377
+ * dropped on the Claude path.
1378
+ * - mcpImageTokenBudget: per-turn cap on token cost of images
1379
+ * returned by MCP tools. Codex doesn't enforce this; CC uses
1380
+ * 25 000. Set to 0 to disable.
1381
+ */
1382
+ images: z.ZodOptional<z.ZodObject<{
1383
+ detail: z.ZodOptional<z.ZodEnum<["low", "high", "original"]>>;
1384
+ mcpImageTokenBudget: z.ZodOptional<z.ZodNumber>;
1385
+ }, "strip", z.ZodTypeAny, {
1386
+ detail?: "low" | "high" | "original" | undefined;
1387
+ mcpImageTokenBudget?: number | undefined;
1388
+ }, {
1389
+ detail?: "low" | "high" | "original" | undefined;
1390
+ mcpImageTokenBudget?: number | undefined;
1391
+ }>>;
776
1392
  /**
777
1393
  * OS-level sandbox for shell-tool execution. "auto" picks per platform:
778
1394
  * Seatbelt on macOS, bubblewrap on Linux when installed, otherwise off.
@@ -785,16 +1401,88 @@ export declare const SettingsSchema: z.ZodObject<{
785
1401
  deniedReads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
786
1402
  network: z.ZodOptional<z.ZodEnum<["allow", "deny"]>>;
787
1403
  }, "strip", z.ZodTypeAny, {
788
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
1404
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
789
1405
  writableRoots?: string[] | undefined;
790
1406
  deniedReads?: string[] | undefined;
791
1407
  network?: "allow" | "deny" | undefined;
792
1408
  }, {
793
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
1409
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
794
1410
  writableRoots?: string[] | undefined;
795
1411
  deniedReads?: string[] | undefined;
796
1412
  network?: "allow" | "deny" | undefined;
797
1413
  }>>;
1414
+ /**
1415
+ * Project-local environment profile. Mirrors Codex's local-environment
1416
+ * shape at the settings layer: setup/cleanup scripts can be customized per
1417
+ * platform, and env values are stored as KEY=VALUE pairs. Runtime wiring is
1418
+ * intentionally separate from the MCP server env model above.
1419
+ */
1420
+ localEnvironment: z.ZodOptional<z.ZodObject<{
1421
+ name: z.ZodOptional<z.ZodString>;
1422
+ setupScripts: z.ZodOptional<z.ZodObject<{
1423
+ default: z.ZodOptional<z.ZodString>;
1424
+ macos: z.ZodOptional<z.ZodString>;
1425
+ linux: z.ZodOptional<z.ZodString>;
1426
+ windows: z.ZodOptional<z.ZodString>;
1427
+ }, "strip", z.ZodTypeAny, {
1428
+ default?: string | undefined;
1429
+ linux?: string | undefined;
1430
+ macos?: string | undefined;
1431
+ windows?: string | undefined;
1432
+ }, {
1433
+ default?: string | undefined;
1434
+ linux?: string | undefined;
1435
+ macos?: string | undefined;
1436
+ windows?: string | undefined;
1437
+ }>>;
1438
+ cleanupScripts: z.ZodOptional<z.ZodObject<{
1439
+ default: z.ZodOptional<z.ZodString>;
1440
+ macos: z.ZodOptional<z.ZodString>;
1441
+ linux: z.ZodOptional<z.ZodString>;
1442
+ windows: z.ZodOptional<z.ZodString>;
1443
+ }, "strip", z.ZodTypeAny, {
1444
+ default?: string | undefined;
1445
+ linux?: string | undefined;
1446
+ macos?: string | undefined;
1447
+ windows?: string | undefined;
1448
+ }, {
1449
+ default?: string | undefined;
1450
+ linux?: string | undefined;
1451
+ macos?: string | undefined;
1452
+ windows?: string | undefined;
1453
+ }>>;
1454
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1455
+ }, "strip", z.ZodTypeAny, {
1456
+ name?: string | undefined;
1457
+ env?: Record<string, string> | undefined;
1458
+ setupScripts?: {
1459
+ default?: string | undefined;
1460
+ linux?: string | undefined;
1461
+ macos?: string | undefined;
1462
+ windows?: string | undefined;
1463
+ } | undefined;
1464
+ cleanupScripts?: {
1465
+ default?: string | undefined;
1466
+ linux?: string | undefined;
1467
+ macos?: string | undefined;
1468
+ windows?: string | undefined;
1469
+ } | undefined;
1470
+ }, {
1471
+ name?: string | undefined;
1472
+ env?: Record<string, string> | undefined;
1473
+ setupScripts?: {
1474
+ default?: string | undefined;
1475
+ linux?: string | undefined;
1476
+ macos?: string | undefined;
1477
+ windows?: string | undefined;
1478
+ } | undefined;
1479
+ cleanupScripts?: {
1480
+ default?: string | undefined;
1481
+ linux?: string | undefined;
1482
+ macos?: string | undefined;
1483
+ windows?: string | undefined;
1484
+ } | undefined;
1485
+ }>>;
798
1486
  /**
799
1487
  * Shell-hook configuration. Each entry binds a HookEventName to a
800
1488
  * shell command; the command receives ctx JSON on stdin and returns
@@ -814,15 +1502,15 @@ export declare const SettingsSchema: z.ZodObject<{
814
1502
  }, "strip", z.ZodTypeAny, {
815
1503
  command: string;
816
1504
  event: string;
817
- cwd?: string | undefined;
818
1505
  matcher?: string | undefined;
819
1506
  timeout_ms?: number | undefined;
1507
+ cwd?: string | undefined;
820
1508
  }, {
821
1509
  command: string;
822
1510
  event: string;
823
- cwd?: string | undefined;
824
1511
  matcher?: string | undefined;
825
1512
  timeout_ms?: number | undefined;
1513
+ cwd?: string | undefined;
826
1514
  }>, "many">>;
827
1515
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
828
1516
  agent: z.ZodDefault<z.ZodObject<{
@@ -831,18 +1519,42 @@ export declare const SettingsSchema: z.ZodObject<{
831
1519
  disabledBuiltinTools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
832
1520
  customSystemPrompt: z.ZodOptional<z.ZodString>;
833
1521
  appendSystemPrompt: z.ZodOptional<z.ZodString>;
1522
+ responseLanguage: z.ZodOptional<z.ZodString>;
1523
+ userProfile: z.ZodOptional<z.ZodString>;
1524
+ instructions: z.ZodOptional<z.ZodObject<{
1525
+ compatClaude: z.ZodDefault<z.ZodBoolean>;
1526
+ compatCodex: z.ZodDefault<z.ZodBoolean>;
1527
+ }, "strip", z.ZodTypeAny, {
1528
+ compatClaude: boolean;
1529
+ compatCodex: boolean;
1530
+ }, {
1531
+ compatClaude?: boolean | undefined;
1532
+ compatCodex?: boolean | undefined;
1533
+ }>>;
834
1534
  }, "strip", z.ZodTypeAny, {
835
1535
  preset: string;
836
1536
  enabledBuiltinTools: string[];
837
1537
  disabledBuiltinTools: string[];
838
1538
  customSystemPrompt?: string | undefined;
839
1539
  appendSystemPrompt?: string | undefined;
1540
+ responseLanguage?: string | undefined;
1541
+ userProfile?: string | undefined;
1542
+ instructions?: {
1543
+ compatClaude: boolean;
1544
+ compatCodex: boolean;
1545
+ } | undefined;
840
1546
  }, {
841
1547
  preset?: string | undefined;
842
1548
  enabledBuiltinTools?: string[] | undefined;
843
1549
  disabledBuiltinTools?: string[] | undefined;
844
1550
  customSystemPrompt?: string | undefined;
845
1551
  appendSystemPrompt?: string | undefined;
1552
+ responseLanguage?: string | undefined;
1553
+ userProfile?: string | undefined;
1554
+ instructions?: {
1555
+ compatClaude?: boolean | undefined;
1556
+ compatCodex?: boolean | undefined;
1557
+ } | undefined;
846
1558
  }>>;
847
1559
  /**
848
1560
  * Primary source of truth for the active model is settings.activeKey
@@ -852,6 +1564,15 @@ export declare const SettingsSchema: z.ZodObject<{
852
1564
  * both — appendOnboardingResult does this in one shot.
853
1565
  */
854
1566
  activeKey: z.ZodOptional<z.ZodString>;
1567
+ /**
1568
+ * Auxiliary-task model — points at a models[].key. Background, non-user-
1569
+ * facing LLM calls (memory extraction, the auto-dream loop) use this model
1570
+ * instead of the active one, so per-turn book-keeping doesn't burn the
1571
+ * expensive primary model. Pick something fast/cheap (e.g. a Haiku or
1572
+ * DeepSeek key). When unset, those calls fall back to the active model
1573
+ * (legacy behavior). An invalid/missing key also falls back to active.
1574
+ */
1575
+ auxModelKey: z.ZodOptional<z.ZodString>;
855
1576
  /**
856
1577
  * Toggle background auto-update. When true (default), code-shell checks
857
1578
  * npm for newer versions and — if the npm global prefix is writable —
@@ -868,16 +1589,16 @@ export declare const SettingsSchema: z.ZodObject<{
868
1589
  temperature: z.ZodDefault<z.ZodNumber>;
869
1590
  maxTokens: z.ZodDefault<z.ZodNumber>;
870
1591
  }, "strip", z.ZodTypeAny, {
871
- provider: string;
872
- name: string;
873
1592
  temperature: number;
1593
+ name: string;
1594
+ provider: string;
874
1595
  baseUrl: string;
875
1596
  maxTokens: number;
876
1597
  apiKey?: string | undefined;
877
1598
  }, {
878
- provider?: string | undefined;
879
- name?: string | undefined;
880
1599
  temperature?: number | undefined;
1600
+ name?: string | undefined;
1601
+ provider?: string | undefined;
881
1602
  baseUrl?: string | undefined;
882
1603
  apiKey?: string | undefined;
883
1604
  maxTokens?: number | undefined;
@@ -891,26 +1612,75 @@ export declare const SettingsSchema: z.ZodObject<{
891
1612
  protocol: z.ZodOptional<z.ZodEnum<["openai-compat", "anthropic-style"]>>;
892
1613
  modelsPath: z.ZodOptional<z.ZodString>;
893
1614
  /**
894
- * DeepSeek V4 thinking-mode default for this provider. "enabled"
895
- * matches endpoint default; "disabled" makes V4 calls run in
896
- * non-thinking mode (faster, cheaper). Ignored by every provider
897
- * other than DeepSeek V4. Per-call overrides still win.
1615
+ * Default reasoning/thinking setting for this provider's models.
1616
+ * Rich shape: {mode:"off"|"on"} | {mode:"effort",effort} |
1617
+ * {mode:"budget",budgetTokens}. Per-model `reasoning` wins.
898
1618
  */
899
- thinking: z.ZodOptional<z.ZodEnum<["enabled", "disabled"]>>;
1619
+ reasoning: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1620
+ mode: z.ZodLiteral<"off">;
1621
+ }, "strip", z.ZodTypeAny, {
1622
+ mode: "off";
1623
+ }, {
1624
+ mode: "off";
1625
+ }>, z.ZodObject<{
1626
+ mode: z.ZodLiteral<"on">;
1627
+ }, "strip", z.ZodTypeAny, {
1628
+ mode: "on";
1629
+ }, {
1630
+ mode: "on";
1631
+ }>, z.ZodObject<{
1632
+ mode: z.ZodLiteral<"effort">;
1633
+ effort: z.ZodEnum<["minimal", "low", "medium", "high", "xhigh"]>;
1634
+ }, "strip", z.ZodTypeAny, {
1635
+ mode: "effort";
1636
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1637
+ }, {
1638
+ mode: "effort";
1639
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1640
+ }>, z.ZodObject<{
1641
+ mode: z.ZodLiteral<"budget">;
1642
+ budgetTokens: z.ZodNumber;
1643
+ }, "strip", z.ZodTypeAny, {
1644
+ mode: "budget";
1645
+ budgetTokens: number;
1646
+ }, {
1647
+ mode: "budget";
1648
+ budgetTokens: number;
1649
+ }>]>>;
900
1650
  }, "strip", z.ZodTypeAny, {
901
1651
  key: string;
902
- kind: "anthropic" | "openai" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
1652
+ kind: "openai" | "anthropic" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
903
1653
  baseUrl: string;
904
- thinking?: "enabled" | "disabled" | undefined;
1654
+ reasoning?: {
1655
+ mode: "off";
1656
+ } | {
1657
+ mode: "on";
1658
+ } | {
1659
+ mode: "effort";
1660
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1661
+ } | {
1662
+ mode: "budget";
1663
+ budgetTokens: number;
1664
+ } | undefined;
905
1665
  label?: string | undefined;
906
1666
  apiKey?: string | undefined;
907
1667
  protocol?: "openai-compat" | "anthropic-style" | undefined;
908
1668
  modelsPath?: string | undefined;
909
1669
  }, {
910
1670
  key: string;
911
- kind: "anthropic" | "openai" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
1671
+ kind: "openai" | "anthropic" | "deepseek" | "zai" | "xai" | "mistral" | "groq" | "google" | "openrouter" | "ollama" | "custom";
912
1672
  baseUrl: string;
913
- thinking?: "enabled" | "disabled" | undefined;
1673
+ reasoning?: {
1674
+ mode: "off";
1675
+ } | {
1676
+ mode: "on";
1677
+ } | {
1678
+ mode: "effort";
1679
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1680
+ } | {
1681
+ mode: "budget";
1682
+ budgetTokens: number;
1683
+ } | undefined;
914
1684
  label?: string | undefined;
915
1685
  apiKey?: string | undefined;
916
1686
  protocol?: "openai-compat" | "anthropic-style" | undefined;
@@ -934,59 +1704,129 @@ export declare const SettingsSchema: z.ZodObject<{
934
1704
  baseUrl: z.ZodOptional<z.ZodString>;
935
1705
  apiKey: z.ZodOptional<z.ZodString>;
936
1706
  /**
937
- * Per-model thinking override. Wins over the provider-level
938
- * setting (settings.providers[].thinking). Use this when
939
- * different models under the same provider need different
940
- * defaults — e.g. DeepSeek V4 Pro off (faster) but V4 Flash on.
1707
+ * Per-model reasoning override. Wins over the provider-level
1708
+ * `reasoning` setting (settings.providers[].reasoning). Use this
1709
+ * when different models under the same provider need different
1710
+ * defaults — e.g. one model off (faster) and another on.
941
1711
  */
942
- thinking: z.ZodOptional<z.ZodEnum<["enabled", "disabled"]>>;
1712
+ reasoning: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1713
+ mode: z.ZodLiteral<"off">;
1714
+ }, "strip", z.ZodTypeAny, {
1715
+ mode: "off";
1716
+ }, {
1717
+ mode: "off";
1718
+ }>, z.ZodObject<{
1719
+ mode: z.ZodLiteral<"on">;
1720
+ }, "strip", z.ZodTypeAny, {
1721
+ mode: "on";
1722
+ }, {
1723
+ mode: "on";
1724
+ }>, z.ZodObject<{
1725
+ mode: z.ZodLiteral<"effort">;
1726
+ effort: z.ZodEnum<["minimal", "low", "medium", "high", "xhigh"]>;
1727
+ }, "strip", z.ZodTypeAny, {
1728
+ mode: "effort";
1729
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1730
+ }, {
1731
+ mode: "effort";
1732
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1733
+ }>, z.ZodObject<{
1734
+ mode: z.ZodLiteral<"budget">;
1735
+ budgetTokens: z.ZodNumber;
1736
+ }, "strip", z.ZodTypeAny, {
1737
+ mode: "budget";
1738
+ budgetTokens: number;
1739
+ }, {
1740
+ mode: "budget";
1741
+ budgetTokens: number;
1742
+ }>]>>;
943
1743
  }, "strip", z.ZodTypeAny, {
944
- model: string;
945
1744
  key: string;
1745
+ model: string;
1746
+ reasoning?: {
1747
+ mode: "off";
1748
+ } | {
1749
+ mode: "on";
1750
+ } | {
1751
+ mode: "effort";
1752
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1753
+ } | {
1754
+ mode: "budget";
1755
+ budgetTokens: number;
1756
+ } | undefined;
946
1757
  provider?: string | undefined;
947
- thinking?: "enabled" | "disabled" | undefined;
1758
+ maxOutputTokens?: number | undefined;
948
1759
  label?: string | undefined;
949
1760
  baseUrl?: string | undefined;
950
1761
  apiKey?: string | undefined;
951
1762
  protocol?: string | undefined;
952
1763
  providerKey?: string | undefined;
953
- maxOutputTokens?: number | undefined;
954
1764
  maxContextTokens?: number | undefined;
955
1765
  }, {
956
- model: string;
957
1766
  key: string;
1767
+ model: string;
1768
+ reasoning?: {
1769
+ mode: "off";
1770
+ } | {
1771
+ mode: "on";
1772
+ } | {
1773
+ mode: "effort";
1774
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1775
+ } | {
1776
+ mode: "budget";
1777
+ budgetTokens: number;
1778
+ } | undefined;
958
1779
  provider?: string | undefined;
959
- thinking?: "enabled" | "disabled" | undefined;
1780
+ maxOutputTokens?: number | undefined;
960
1781
  label?: string | undefined;
961
1782
  baseUrl?: string | undefined;
962
1783
  apiKey?: string | undefined;
963
1784
  protocol?: string | undefined;
964
1785
  providerKey?: string | undefined;
965
- maxOutputTokens?: number | undefined;
966
1786
  maxContextTokens?: number | undefined;
967
1787
  }>, {
968
1788
  protocol: string | undefined;
969
1789
  provider: string | undefined;
970
- model: string;
971
1790
  key: string;
972
- thinking?: "enabled" | "disabled" | undefined;
1791
+ model: string;
1792
+ reasoning?: {
1793
+ mode: "off";
1794
+ } | {
1795
+ mode: "on";
1796
+ } | {
1797
+ mode: "effort";
1798
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1799
+ } | {
1800
+ mode: "budget";
1801
+ budgetTokens: number;
1802
+ } | undefined;
1803
+ maxOutputTokens?: number | undefined;
973
1804
  label?: string | undefined;
974
1805
  baseUrl?: string | undefined;
975
1806
  apiKey?: string | undefined;
976
1807
  providerKey?: string | undefined;
977
- maxOutputTokens?: number | undefined;
978
1808
  maxContextTokens?: number | undefined;
979
1809
  }, {
980
- model: string;
981
1810
  key: string;
1811
+ model: string;
1812
+ reasoning?: {
1813
+ mode: "off";
1814
+ } | {
1815
+ mode: "on";
1816
+ } | {
1817
+ mode: "effort";
1818
+ effort: "minimal" | "low" | "medium" | "high" | "xhigh";
1819
+ } | {
1820
+ mode: "budget";
1821
+ budgetTokens: number;
1822
+ } | undefined;
982
1823
  provider?: string | undefined;
983
- thinking?: "enabled" | "disabled" | undefined;
1824
+ maxOutputTokens?: number | undefined;
984
1825
  label?: string | undefined;
985
1826
  baseUrl?: string | undefined;
986
1827
  apiKey?: string | undefined;
987
1828
  protocol?: string | undefined;
988
1829
  providerKey?: string | undefined;
989
- maxOutputTokens?: number | undefined;
990
1830
  maxContextTokens?: number | undefined;
991
1831
  }>, "many">>;
992
1832
  permissions: z.ZodDefault<z.ZodObject<{
@@ -1008,7 +1848,7 @@ export declare const SettingsSchema: z.ZodObject<{
1008
1848
  argsPattern?: Record<string, string> | undefined;
1009
1849
  }>, "many">>;
1010
1850
  }, "strip", z.ZodTypeAny, {
1011
- defaultMode: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan";
1851
+ defaultMode: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan";
1012
1852
  rules: {
1013
1853
  tool: string;
1014
1854
  decision: "allow" | "deny" | "ask";
@@ -1016,7 +1856,7 @@ export declare const SettingsSchema: z.ZodObject<{
1016
1856
  argsPattern?: Record<string, string> | undefined;
1017
1857
  }[];
1018
1858
  }, {
1019
- defaultMode?: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan" | undefined;
1859
+ defaultMode?: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan" | undefined;
1020
1860
  rules?: {
1021
1861
  tool: string;
1022
1862
  decision: "allow" | "deny" | "ask";
@@ -1055,20 +1895,23 @@ export declare const SettingsSchema: z.ZodObject<{
1055
1895
  url: z.ZodOptional<z.ZodString>;
1056
1896
  transport: z.ZodOptional<z.ZodEnum<["stdio", "sse", "streamable-http", "inprocess"]>>;
1057
1897
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1898
+ enabled: z.ZodOptional<z.ZodBoolean>;
1058
1899
  }, "strip", z.ZodTypeAny, {
1059
1900
  name: string;
1901
+ enabled?: boolean | undefined;
1060
1902
  url?: string | undefined;
1061
1903
  args?: string[] | undefined;
1062
- env?: Record<string, string> | undefined;
1063
1904
  command?: string | undefined;
1905
+ env?: Record<string, string> | undefined;
1064
1906
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
1065
1907
  headers?: Record<string, string> | undefined;
1066
1908
  }, {
1067
1909
  name: string;
1910
+ enabled?: boolean | undefined;
1068
1911
  url?: string | undefined;
1069
1912
  args?: string[] | undefined;
1070
- env?: Record<string, string> | undefined;
1071
1913
  command?: string | undefined;
1914
+ env?: Record<string, string> | undefined;
1072
1915
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
1073
1916
  headers?: Record<string, string> | undefined;
1074
1917
  }>>>;
@@ -1086,6 +1929,38 @@ export declare const SettingsSchema: z.ZodObject<{
1086
1929
  * names (no colon suffix). See scanSkills(opts.disabledPlugins).
1087
1930
  */
1088
1931
  disabledPlugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1932
+ /**
1933
+ * Sub-agent role names (the `name` in .code-shell/agents/*.md) to
1934
+ * hide from the registry. A disabled role is filtered out at load
1935
+ * so it never appears in registry.list()/get() — the Agent tool's
1936
+ * agent_type list won't show it and the LLM can't pick it. Mirrors
1937
+ * disabledSkills / disabledPlugins.
1938
+ */
1939
+ disabledAgents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1940
+ /**
1941
+ * Project-scoped tri-state capability overlay. Only meaningful in
1942
+ * ${cwd}/.code-shell/settings.json; layered over the global baseline at
1943
+ * capability-assembly time. Optional — absence === everything inherits.
1944
+ */
1945
+ capabilityOverrides: z.ZodOptional<z.ZodObject<{
1946
+ skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1947
+ plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1948
+ agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1949
+ mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1950
+ builtin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["inherit", "on", "off"]>>>;
1951
+ }, "strip", z.ZodTypeAny, {
1952
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
1953
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
1954
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
1955
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
1956
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
1957
+ }, {
1958
+ builtin?: Record<string, "off" | "on" | "inherit"> | undefined;
1959
+ mcp?: Record<string, "off" | "on" | "inherit"> | undefined;
1960
+ skills?: Record<string, "off" | "on" | "inherit"> | undefined;
1961
+ plugins?: Record<string, "off" | "on" | "inherit"> | undefined;
1962
+ agents?: Record<string, "off" | "on" | "inherit"> | undefined;
1963
+ }>>;
1089
1964
  instructions: z.ZodDefault<z.ZodObject<{
1090
1965
  fileName: z.ZodDefault<z.ZodString>;
1091
1966
  scanDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -1110,30 +1985,30 @@ export declare const SettingsSchema: z.ZodObject<{
1110
1985
  apiKey: z.ZodOptional<z.ZodString>;
1111
1986
  baseUrl: z.ZodOptional<z.ZodString>;
1112
1987
  }, "strip", z.ZodTypeAny, {
1113
- model: string;
1114
1988
  name: string;
1989
+ model: string;
1115
1990
  provider?: string | undefined;
1116
1991
  baseUrl?: string | undefined;
1117
1992
  apiKey?: string | undefined;
1118
1993
  }, {
1119
- model: string;
1120
1994
  name: string;
1995
+ model: string;
1121
1996
  provider?: string | undefined;
1122
1997
  baseUrl?: string | undefined;
1123
1998
  apiKey?: string | undefined;
1124
1999
  }>]>, "many">>;
1125
2000
  }, "strip", z.ZodTypeAny, {
1126
2001
  participants: (string | {
1127
- model: string;
1128
2002
  name: string;
2003
+ model: string;
1129
2004
  provider?: string | undefined;
1130
2005
  baseUrl?: string | undefined;
1131
2006
  apiKey?: string | undefined;
1132
2007
  })[];
1133
2008
  }, {
1134
2009
  participants?: (string | {
1135
- model: string;
1136
2010
  name: string;
2011
+ model: string;
1137
2012
  provider?: string | undefined;
1138
2013
  baseUrl?: string | undefined;
1139
2014
  apiKey?: string | undefined;
@@ -1153,12 +2028,45 @@ export declare const SettingsSchema: z.ZodObject<{
1153
2028
  providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["serper", "tavily", "searxng"]>, z.ZodObject<{
1154
2029
  apiKey: z.ZodOptional<z.ZodString>;
1155
2030
  baseUrl: z.ZodOptional<z.ZodString>;
2031
+ lastProbe: z.ZodOptional<z.ZodObject<{
2032
+ status: z.ZodEnum<["ok", "error", "unconfigured"]>;
2033
+ sampleTitles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2034
+ errorMessage: z.ZodOptional<z.ZodString>;
2035
+ errorDetail: z.ZodOptional<z.ZodString>;
2036
+ lastProbedAt: z.ZodString;
2037
+ }, "strip", z.ZodTypeAny, {
2038
+ status: "error" | "ok" | "unconfigured";
2039
+ lastProbedAt: string;
2040
+ sampleTitles?: string[] | undefined;
2041
+ errorMessage?: string | undefined;
2042
+ errorDetail?: string | undefined;
2043
+ }, {
2044
+ status: "error" | "ok" | "unconfigured";
2045
+ lastProbedAt: string;
2046
+ sampleTitles?: string[] | undefined;
2047
+ errorMessage?: string | undefined;
2048
+ errorDetail?: string | undefined;
2049
+ }>>;
1156
2050
  }, "strip", z.ZodTypeAny, {
1157
2051
  baseUrl?: string | undefined;
1158
2052
  apiKey?: string | undefined;
2053
+ lastProbe?: {
2054
+ status: "error" | "ok" | "unconfigured";
2055
+ lastProbedAt: string;
2056
+ sampleTitles?: string[] | undefined;
2057
+ errorMessage?: string | undefined;
2058
+ errorDetail?: string | undefined;
2059
+ } | undefined;
1159
2060
  }, {
1160
2061
  baseUrl?: string | undefined;
1161
2062
  apiKey?: string | undefined;
2063
+ lastProbe?: {
2064
+ status: "error" | "ok" | "unconfigured";
2065
+ lastProbedAt: string;
2066
+ sampleTitles?: string[] | undefined;
2067
+ errorMessage?: string | undefined;
2068
+ errorDetail?: string | undefined;
2069
+ } | undefined;
1162
2070
  }>>>;
1163
2071
  }, "strip", z.ZodTypeAny, {
1164
2072
  provider: "serper" | "tavily" | "searxng";
@@ -1167,6 +2075,13 @@ export declare const SettingsSchema: z.ZodObject<{
1167
2075
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
1168
2076
  baseUrl?: string | undefined;
1169
2077
  apiKey?: string | undefined;
2078
+ lastProbe?: {
2079
+ status: "error" | "ok" | "unconfigured";
2080
+ lastProbedAt: string;
2081
+ sampleTitles?: string[] | undefined;
2082
+ errorMessage?: string | undefined;
2083
+ errorDetail?: string | undefined;
2084
+ } | undefined;
1170
2085
  }>> | undefined;
1171
2086
  }, {
1172
2087
  provider?: "serper" | "tavily" | "searxng" | undefined;
@@ -1175,6 +2090,13 @@ export declare const SettingsSchema: z.ZodObject<{
1175
2090
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
1176
2091
  baseUrl?: string | undefined;
1177
2092
  apiKey?: string | undefined;
2093
+ lastProbe?: {
2094
+ status: "error" | "ok" | "unconfigured";
2095
+ lastProbedAt: string;
2096
+ sampleTitles?: string[] | undefined;
2097
+ errorMessage?: string | undefined;
2098
+ errorDetail?: string | undefined;
2099
+ } | undefined;
1178
2100
  }>> | undefined;
1179
2101
  }>>;
1180
2102
  output: z.ZodDefault<z.ZodObject<{
@@ -1184,6 +2106,28 @@ export declare const SettingsSchema: z.ZodObject<{
1184
2106
  }, {
1185
2107
  format?: "text" | "json" | "jsonl" | "stream-json" | undefined;
1186
2108
  }>>;
2109
+ /**
2110
+ * Image attachment handling. Sub-fields:
2111
+ * - detail: OpenAI-style fidelity hint applied to every user-
2112
+ * attached image. "low" = 85 tokens/image fixed (cheap
2113
+ * thumbnail), "high" = ~768 px tiles (default), "original" =
2114
+ * keep client-side dimensions (most expensive). Anthropic
2115
+ * ignores this field today; that's fine — it just gets
2116
+ * dropped on the Claude path.
2117
+ * - mcpImageTokenBudget: per-turn cap on token cost of images
2118
+ * returned by MCP tools. Codex doesn't enforce this; CC uses
2119
+ * 25 000. Set to 0 to disable.
2120
+ */
2121
+ images: z.ZodOptional<z.ZodObject<{
2122
+ detail: z.ZodOptional<z.ZodEnum<["low", "high", "original"]>>;
2123
+ mcpImageTokenBudget: z.ZodOptional<z.ZodNumber>;
2124
+ }, "strip", z.ZodTypeAny, {
2125
+ detail?: "low" | "high" | "original" | undefined;
2126
+ mcpImageTokenBudget?: number | undefined;
2127
+ }, {
2128
+ detail?: "low" | "high" | "original" | undefined;
2129
+ mcpImageTokenBudget?: number | undefined;
2130
+ }>>;
1187
2131
  /**
1188
2132
  * OS-level sandbox for shell-tool execution. "auto" picks per platform:
1189
2133
  * Seatbelt on macOS, bubblewrap on Linux when installed, otherwise off.
@@ -1196,16 +2140,88 @@ export declare const SettingsSchema: z.ZodObject<{
1196
2140
  deniedReads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1197
2141
  network: z.ZodOptional<z.ZodEnum<["allow", "deny"]>>;
1198
2142
  }, "strip", z.ZodTypeAny, {
1199
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
2143
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
1200
2144
  writableRoots?: string[] | undefined;
1201
2145
  deniedReads?: string[] | undefined;
1202
2146
  network?: "allow" | "deny" | undefined;
1203
2147
  }, {
1204
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
2148
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
1205
2149
  writableRoots?: string[] | undefined;
1206
2150
  deniedReads?: string[] | undefined;
1207
2151
  network?: "allow" | "deny" | undefined;
1208
2152
  }>>;
2153
+ /**
2154
+ * Project-local environment profile. Mirrors Codex's local-environment
2155
+ * shape at the settings layer: setup/cleanup scripts can be customized per
2156
+ * platform, and env values are stored as KEY=VALUE pairs. Runtime wiring is
2157
+ * intentionally separate from the MCP server env model above.
2158
+ */
2159
+ localEnvironment: z.ZodOptional<z.ZodObject<{
2160
+ name: z.ZodOptional<z.ZodString>;
2161
+ setupScripts: z.ZodOptional<z.ZodObject<{
2162
+ default: z.ZodOptional<z.ZodString>;
2163
+ macos: z.ZodOptional<z.ZodString>;
2164
+ linux: z.ZodOptional<z.ZodString>;
2165
+ windows: z.ZodOptional<z.ZodString>;
2166
+ }, "strip", z.ZodTypeAny, {
2167
+ default?: string | undefined;
2168
+ linux?: string | undefined;
2169
+ macos?: string | undefined;
2170
+ windows?: string | undefined;
2171
+ }, {
2172
+ default?: string | undefined;
2173
+ linux?: string | undefined;
2174
+ macos?: string | undefined;
2175
+ windows?: string | undefined;
2176
+ }>>;
2177
+ cleanupScripts: z.ZodOptional<z.ZodObject<{
2178
+ default: z.ZodOptional<z.ZodString>;
2179
+ macos: z.ZodOptional<z.ZodString>;
2180
+ linux: z.ZodOptional<z.ZodString>;
2181
+ windows: z.ZodOptional<z.ZodString>;
2182
+ }, "strip", z.ZodTypeAny, {
2183
+ default?: string | undefined;
2184
+ linux?: string | undefined;
2185
+ macos?: string | undefined;
2186
+ windows?: string | undefined;
2187
+ }, {
2188
+ default?: string | undefined;
2189
+ linux?: string | undefined;
2190
+ macos?: string | undefined;
2191
+ windows?: string | undefined;
2192
+ }>>;
2193
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2194
+ }, "strip", z.ZodTypeAny, {
2195
+ name?: string | undefined;
2196
+ env?: Record<string, string> | undefined;
2197
+ setupScripts?: {
2198
+ default?: string | undefined;
2199
+ linux?: string | undefined;
2200
+ macos?: string | undefined;
2201
+ windows?: string | undefined;
2202
+ } | undefined;
2203
+ cleanupScripts?: {
2204
+ default?: string | undefined;
2205
+ linux?: string | undefined;
2206
+ macos?: string | undefined;
2207
+ windows?: string | undefined;
2208
+ } | undefined;
2209
+ }, {
2210
+ name?: string | undefined;
2211
+ env?: Record<string, string> | undefined;
2212
+ setupScripts?: {
2213
+ default?: string | undefined;
2214
+ linux?: string | undefined;
2215
+ macos?: string | undefined;
2216
+ windows?: string | undefined;
2217
+ } | undefined;
2218
+ cleanupScripts?: {
2219
+ default?: string | undefined;
2220
+ linux?: string | undefined;
2221
+ macos?: string | undefined;
2222
+ windows?: string | undefined;
2223
+ } | undefined;
2224
+ }>>;
1209
2225
  /**
1210
2226
  * Shell-hook configuration. Each entry binds a HookEventName to a
1211
2227
  * shell command; the command receives ctx JSON on stdin and returns
@@ -1225,15 +2241,15 @@ export declare const SettingsSchema: z.ZodObject<{
1225
2241
  }, "strip", z.ZodTypeAny, {
1226
2242
  command: string;
1227
2243
  event: string;
1228
- cwd?: string | undefined;
1229
2244
  matcher?: string | undefined;
1230
2245
  timeout_ms?: number | undefined;
2246
+ cwd?: string | undefined;
1231
2247
  }, {
1232
2248
  command: string;
1233
2249
  event: string;
1234
- cwd?: string | undefined;
1235
2250
  matcher?: string | undefined;
1236
2251
  timeout_ms?: number | undefined;
2252
+ cwd?: string | undefined;
1237
2253
  }>, "many">>;
1238
2254
  }, z.ZodTypeAny, "passthrough">>;
1239
2255
  export type ValidatedSettings = z.infer<typeof SettingsSchema>;