@cjhyy/code-shell-core 0.5.0-rc.0 → 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 (283) hide show
  1. package/dist/agent/agent-definition-registry.d.ts +29 -0
  2. package/dist/agent/agent-definition-registry.js +74 -0
  3. package/dist/agent/agent-definition.d.ts +37 -0
  4. package/dist/agent/agent-definition.js +59 -0
  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 +118 -18
  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 +256 -16
  68. package/dist/engine/engine.js +856 -200
  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 +32 -7
  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 +10 -0
  171. package/dist/prompt/composer.js +29 -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 +45 -1
  220. package/dist/settings/manager.js +121 -17
  221. package/dist/settings/manager.test.d.ts +1 -0
  222. package/dist/settings/manager.test.js +73 -0
  223. package/dist/settings/personalization.d.ts +19 -0
  224. package/dist/settings/personalization.js +7 -0
  225. package/dist/settings/schema.d.ts +1163 -126
  226. package/dist/settings/schema.js +126 -10
  227. package/dist/skills/scanner.d.ts +13 -6
  228. package/dist/skills/scanner.js +23 -4
  229. package/dist/tool-system/builtin/add-marketplace.d.ts +12 -0
  230. package/dist/tool-system/builtin/add-marketplace.js +76 -0
  231. package/dist/tool-system/builtin/agent-registry.d.ts +15 -0
  232. package/dist/tool-system/builtin/agent-registry.js +14 -4
  233. package/dist/tool-system/builtin/agent.d.ts +55 -0
  234. package/dist/tool-system/builtin/agent.js +165 -17
  235. package/dist/tool-system/builtin/apply-patch/index.js +22 -3
  236. package/dist/tool-system/builtin/arena.js +6 -7
  237. package/dist/tool-system/builtin/complete-goal.d.ts +25 -0
  238. package/dist/tool-system/builtin/complete-goal.js +45 -0
  239. package/dist/tool-system/builtin/cron.js +53 -9
  240. package/dist/tool-system/builtin/edit.d.ts +2 -1
  241. package/dist/tool-system/builtin/edit.js +6 -1
  242. package/dist/tool-system/builtin/generate-image.d.ts +25 -0
  243. package/dist/tool-system/builtin/generate-image.js +146 -0
  244. package/dist/tool-system/builtin/glob.js +7 -0
  245. package/dist/tool-system/builtin/grep.js +6 -0
  246. package/dist/tool-system/builtin/index.d.ts +18 -1
  247. package/dist/tool-system/builtin/index.js +62 -1
  248. package/dist/tool-system/builtin/notebook-edit.d.ts +2 -1
  249. package/dist/tool-system/builtin/notebook-edit.js +8 -1
  250. package/dist/tool-system/builtin/read.d.ts +2 -1
  251. package/dist/tool-system/builtin/read.js +9 -1
  252. package/dist/tool-system/builtin/skill.js +23 -5
  253. package/dist/tool-system/builtin/sleep.js +9 -3
  254. package/dist/tool-system/builtin/task.js +4 -1
  255. package/dist/tool-system/builtin/update-automation-memory.d.ts +24 -0
  256. package/dist/tool-system/builtin/update-automation-memory.js +60 -0
  257. package/dist/tool-system/builtin/view-image.d.ts +18 -0
  258. package/dist/tool-system/builtin/view-image.js +96 -0
  259. package/dist/tool-system/builtin/web-search.d.ts +4 -1
  260. package/dist/tool-system/builtin/web-search.js +36 -3
  261. package/dist/tool-system/builtin/write.d.ts +2 -1
  262. package/dist/tool-system/builtin/write.js +7 -1
  263. package/dist/tool-system/context.d.ts +43 -0
  264. package/dist/tool-system/executor.d.ts +0 -1
  265. package/dist/tool-system/executor.js +34 -40
  266. package/dist/tool-system/investigation-guard.d.ts +4 -1
  267. package/dist/tool-system/investigation-guard.js +19 -3
  268. package/dist/tool-system/mcp-manager.d.ts +36 -12
  269. package/dist/tool-system/mcp-manager.js +173 -10
  270. package/dist/tool-system/path-policy.d.ts +94 -0
  271. package/dist/tool-system/path-policy.js +279 -0
  272. package/dist/tool-system/permission.js +43 -50
  273. package/dist/tool-system/plan-mode-allowlist.d.ts +21 -0
  274. package/dist/tool-system/plan-mode-allowlist.js +43 -0
  275. package/dist/tool-system/registry.js +12 -1
  276. package/dist/tool-system/validation.d.ts +10 -0
  277. package/dist/tool-system/validation.js +16 -3
  278. package/dist/types.d.ts +90 -15
  279. package/dist/utils/format.js +4 -2
  280. package/dist/utils/lockfile.js +9 -2
  281. package/dist/utils/theme.d.ts +6 -0
  282. package/dist/utils/theme.js +4 -2
  283. 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
  }>>>;
@@ -257,6 +444,45 @@ export declare const SettingsSchema: z.ZodObject<{
257
444
  * tool both see the filtered set — see scanSkills(opts).
258
445
  */
259
446
  disabledSkills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
447
+ /**
448
+ * Plugin-level total switch: every skill whose namespaced name
449
+ * starts with `${pluginName}:` is filtered. Coarser knob than
450
+ * disabledSkills; both are honored simultaneously. Bare plugin
451
+ * names (no colon suffix). See scanSkills(opts.disabledPlugins).
452
+ */
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
+ }>>;
260
486
  instructions: z.ZodDefault<z.ZodObject<{
261
487
  fileName: z.ZodDefault<z.ZodString>;
262
488
  scanDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -281,30 +507,30 @@ export declare const SettingsSchema: z.ZodObject<{
281
507
  apiKey: z.ZodOptional<z.ZodString>;
282
508
  baseUrl: z.ZodOptional<z.ZodString>;
283
509
  }, "strip", z.ZodTypeAny, {
284
- model: string;
285
510
  name: string;
511
+ model: string;
286
512
  provider?: string | undefined;
287
513
  baseUrl?: string | undefined;
288
514
  apiKey?: string | undefined;
289
515
  }, {
290
- model: string;
291
516
  name: string;
517
+ model: string;
292
518
  provider?: string | undefined;
293
519
  baseUrl?: string | undefined;
294
520
  apiKey?: string | undefined;
295
521
  }>]>, "many">>;
296
522
  }, "strip", z.ZodTypeAny, {
297
523
  participants: (string | {
298
- model: string;
299
524
  name: string;
525
+ model: string;
300
526
  provider?: string | undefined;
301
527
  baseUrl?: string | undefined;
302
528
  apiKey?: string | undefined;
303
529
  })[];
304
530
  }, {
305
531
  participants?: (string | {
306
- model: string;
307
532
  name: string;
533
+ model: string;
308
534
  provider?: string | undefined;
309
535
  baseUrl?: string | undefined;
310
536
  apiKey?: string | undefined;
@@ -324,12 +550,45 @@ export declare const SettingsSchema: z.ZodObject<{
324
550
  providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["serper", "tavily", "searxng"]>, z.ZodObject<{
325
551
  apiKey: z.ZodOptional<z.ZodString>;
326
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
+ }>>;
327
572
  }, "strip", z.ZodTypeAny, {
328
573
  baseUrl?: string | undefined;
329
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;
330
582
  }, {
331
583
  baseUrl?: string | undefined;
332
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;
333
592
  }>>>;
334
593
  }, "strip", z.ZodTypeAny, {
335
594
  provider: "serper" | "tavily" | "searxng";
@@ -338,6 +597,13 @@ export declare const SettingsSchema: z.ZodObject<{
338
597
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
339
598
  baseUrl?: string | undefined;
340
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;
341
607
  }>> | undefined;
342
608
  }, {
343
609
  provider?: "serper" | "tavily" | "searxng" | undefined;
@@ -346,6 +612,13 @@ export declare const SettingsSchema: z.ZodObject<{
346
612
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
347
613
  baseUrl?: string | undefined;
348
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;
349
622
  }>> | undefined;
350
623
  }>>;
351
624
  output: z.ZodDefault<z.ZodObject<{
@@ -355,6 +628,28 @@ export declare const SettingsSchema: z.ZodObject<{
355
628
  }, {
356
629
  format?: "text" | "json" | "jsonl" | "stream-json" | undefined;
357
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
+ }>>;
358
653
  /**
359
654
  * OS-level sandbox for shell-tool execution. "auto" picks per platform:
360
655
  * Seatbelt on macOS, bubblewrap on Linux when installed, otherwise off.
@@ -367,16 +662,88 @@ export declare const SettingsSchema: z.ZodObject<{
367
662
  deniedReads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
368
663
  network: z.ZodOptional<z.ZodEnum<["allow", "deny"]>>;
369
664
  }, "strip", z.ZodTypeAny, {
370
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
665
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
371
666
  writableRoots?: string[] | undefined;
372
667
  deniedReads?: string[] | undefined;
373
668
  network?: "allow" | "deny" | undefined;
374
669
  }, {
375
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
670
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
376
671
  writableRoots?: string[] | undefined;
377
672
  deniedReads?: string[] | undefined;
378
673
  network?: "allow" | "deny" | undefined;
379
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
+ }>>;
380
747
  /**
381
748
  * Shell-hook configuration. Each entry binds a HookEventName to a
382
749
  * shell command; the command receives ctx JSON on stdin and returns
@@ -396,15 +763,15 @@ export declare const SettingsSchema: z.ZodObject<{
396
763
  }, "strip", z.ZodTypeAny, {
397
764
  command: string;
398
765
  event: string;
399
- cwd?: string | undefined;
400
766
  matcher?: string | undefined;
401
767
  timeout_ms?: number | undefined;
768
+ cwd?: string | undefined;
402
769
  }, {
403
770
  command: string;
404
771
  event: string;
405
- cwd?: string | undefined;
406
772
  matcher?: string | undefined;
407
773
  timeout_ms?: number | undefined;
774
+ cwd?: string | undefined;
408
775
  }>, "many">>;
409
776
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
410
777
  agent: z.ZodDefault<z.ZodObject<{
@@ -413,18 +780,42 @@ export declare const SettingsSchema: z.ZodObject<{
413
780
  disabledBuiltinTools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
414
781
  customSystemPrompt: z.ZodOptional<z.ZodString>;
415
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
+ }>>;
416
795
  }, "strip", z.ZodTypeAny, {
417
796
  preset: string;
418
797
  enabledBuiltinTools: string[];
419
798
  disabledBuiltinTools: string[];
420
799
  customSystemPrompt?: string | undefined;
421
800
  appendSystemPrompt?: string | undefined;
801
+ responseLanguage?: string | undefined;
802
+ userProfile?: string | undefined;
803
+ instructions?: {
804
+ compatClaude: boolean;
805
+ compatCodex: boolean;
806
+ } | undefined;
422
807
  }, {
423
808
  preset?: string | undefined;
424
809
  enabledBuiltinTools?: string[] | undefined;
425
810
  disabledBuiltinTools?: string[] | undefined;
426
811
  customSystemPrompt?: string | undefined;
427
812
  appendSystemPrompt?: string | undefined;
813
+ responseLanguage?: string | undefined;
814
+ userProfile?: string | undefined;
815
+ instructions?: {
816
+ compatClaude?: boolean | undefined;
817
+ compatCodex?: boolean | undefined;
818
+ } | undefined;
428
819
  }>>;
429
820
  /**
430
821
  * Primary source of truth for the active model is settings.activeKey
@@ -434,6 +825,15 @@ export declare const SettingsSchema: z.ZodObject<{
434
825
  * both — appendOnboardingResult does this in one shot.
435
826
  */
436
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>;
437
837
  /**
438
838
  * Toggle background auto-update. When true (default), code-shell checks
439
839
  * npm for newer versions and — if the npm global prefix is writable —
@@ -450,16 +850,16 @@ export declare const SettingsSchema: z.ZodObject<{
450
850
  temperature: z.ZodDefault<z.ZodNumber>;
451
851
  maxTokens: z.ZodDefault<z.ZodNumber>;
452
852
  }, "strip", z.ZodTypeAny, {
453
- provider: string;
454
- name: string;
455
853
  temperature: number;
854
+ name: string;
855
+ provider: string;
456
856
  baseUrl: string;
457
857
  maxTokens: number;
458
858
  apiKey?: string | undefined;
459
859
  }, {
460
- provider?: string | undefined;
461
- name?: string | undefined;
462
860
  temperature?: number | undefined;
861
+ name?: string | undefined;
862
+ provider?: string | undefined;
463
863
  baseUrl?: string | undefined;
464
864
  apiKey?: string | undefined;
465
865
  maxTokens?: number | undefined;
@@ -473,26 +873,75 @@ export declare const SettingsSchema: z.ZodObject<{
473
873
  protocol: z.ZodOptional<z.ZodEnum<["openai-compat", "anthropic-style"]>>;
474
874
  modelsPath: z.ZodOptional<z.ZodString>;
475
875
  /**
476
- * DeepSeek V4 thinking-mode default for this provider. "enabled"
477
- * matches endpoint default; "disabled" makes V4 calls run in
478
- * non-thinking mode (faster, cheaper). Ignored by every provider
479
- * 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.
480
879
  */
481
- 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
+ }>]>>;
482
911
  }, "strip", z.ZodTypeAny, {
483
912
  key: string;
484
- 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";
485
914
  baseUrl: string;
486
- 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;
487
926
  label?: string | undefined;
488
927
  apiKey?: string | undefined;
489
928
  protocol?: "openai-compat" | "anthropic-style" | undefined;
490
929
  modelsPath?: string | undefined;
491
930
  }, {
492
931
  key: string;
493
- 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";
494
933
  baseUrl: string;
495
- 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;
496
945
  label?: string | undefined;
497
946
  apiKey?: string | undefined;
498
947
  protocol?: "openai-compat" | "anthropic-style" | undefined;
@@ -516,59 +965,129 @@ export declare const SettingsSchema: z.ZodObject<{
516
965
  baseUrl: z.ZodOptional<z.ZodString>;
517
966
  apiKey: z.ZodOptional<z.ZodString>;
518
967
  /**
519
- * Per-model thinking override. Wins over the provider-level
520
- * setting (settings.providers[].thinking). Use this when
521
- * different models under the same provider need different
522
- * 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.
523
972
  */
524
- 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
+ }>]>>;
525
1004
  }, "strip", z.ZodTypeAny, {
526
- model: string;
527
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;
528
1018
  provider?: string | undefined;
529
- thinking?: "enabled" | "disabled" | undefined;
1019
+ maxOutputTokens?: number | undefined;
530
1020
  label?: string | undefined;
531
1021
  baseUrl?: string | undefined;
532
1022
  apiKey?: string | undefined;
533
1023
  protocol?: string | undefined;
534
1024
  providerKey?: string | undefined;
535
- maxOutputTokens?: number | undefined;
536
1025
  maxContextTokens?: number | undefined;
537
1026
  }, {
538
- model: string;
539
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;
540
1040
  provider?: string | undefined;
541
- thinking?: "enabled" | "disabled" | undefined;
1041
+ maxOutputTokens?: number | undefined;
542
1042
  label?: string | undefined;
543
1043
  baseUrl?: string | undefined;
544
1044
  apiKey?: string | undefined;
545
1045
  protocol?: string | undefined;
546
1046
  providerKey?: string | undefined;
547
- maxOutputTokens?: number | undefined;
548
1047
  maxContextTokens?: number | undefined;
549
1048
  }>, {
550
1049
  protocol: string | undefined;
551
1050
  provider: string | undefined;
552
- model: string;
553
1051
  key: string;
554
- 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;
555
1065
  label?: string | undefined;
556
1066
  baseUrl?: string | undefined;
557
1067
  apiKey?: string | undefined;
558
1068
  providerKey?: string | undefined;
559
- maxOutputTokens?: number | undefined;
560
1069
  maxContextTokens?: number | undefined;
561
1070
  }, {
562
- model: string;
563
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;
564
1084
  provider?: string | undefined;
565
- thinking?: "enabled" | "disabled" | undefined;
1085
+ maxOutputTokens?: number | undefined;
566
1086
  label?: string | undefined;
567
1087
  baseUrl?: string | undefined;
568
1088
  apiKey?: string | undefined;
569
1089
  protocol?: string | undefined;
570
1090
  providerKey?: string | undefined;
571
- maxOutputTokens?: number | undefined;
572
1091
  maxContextTokens?: number | undefined;
573
1092
  }>, "many">>;
574
1093
  permissions: z.ZodDefault<z.ZodObject<{
@@ -590,7 +1109,7 @@ export declare const SettingsSchema: z.ZodObject<{
590
1109
  argsPattern?: Record<string, string> | undefined;
591
1110
  }>, "many">>;
592
1111
  }, "strip", z.ZodTypeAny, {
593
- defaultMode: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan";
1112
+ defaultMode: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan";
594
1113
  rules: {
595
1114
  tool: string;
596
1115
  decision: "allow" | "deny" | "ask";
@@ -598,7 +1117,7 @@ export declare const SettingsSchema: z.ZodObject<{
598
1117
  argsPattern?: Record<string, string> | undefined;
599
1118
  }[];
600
1119
  }, {
601
- defaultMode?: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan" | undefined;
1120
+ defaultMode?: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan" | undefined;
602
1121
  rules?: {
603
1122
  tool: string;
604
1123
  decision: "allow" | "deny" | "ask";
@@ -637,20 +1156,23 @@ export declare const SettingsSchema: z.ZodObject<{
637
1156
  url: z.ZodOptional<z.ZodString>;
638
1157
  transport: z.ZodOptional<z.ZodEnum<["stdio", "sse", "streamable-http", "inprocess"]>>;
639
1158
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1159
+ enabled: z.ZodOptional<z.ZodBoolean>;
640
1160
  }, "strip", z.ZodTypeAny, {
641
1161
  name: string;
1162
+ enabled?: boolean | undefined;
642
1163
  url?: string | undefined;
643
1164
  args?: string[] | undefined;
644
- env?: Record<string, string> | undefined;
645
1165
  command?: string | undefined;
1166
+ env?: Record<string, string> | undefined;
646
1167
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
647
1168
  headers?: Record<string, string> | undefined;
648
1169
  }, {
649
1170
  name: string;
1171
+ enabled?: boolean | undefined;
650
1172
  url?: string | undefined;
651
1173
  args?: string[] | undefined;
652
- env?: Record<string, string> | undefined;
653
1174
  command?: string | undefined;
1175
+ env?: Record<string, string> | undefined;
654
1176
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
655
1177
  headers?: Record<string, string> | undefined;
656
1178
  }>>>;
@@ -661,6 +1183,45 @@ export declare const SettingsSchema: z.ZodObject<{
661
1183
  * tool both see the filtered set — see scanSkills(opts).
662
1184
  */
663
1185
  disabledSkills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1186
+ /**
1187
+ * Plugin-level total switch: every skill whose namespaced name
1188
+ * starts with `${pluginName}:` is filtered. Coarser knob than
1189
+ * disabledSkills; both are honored simultaneously. Bare plugin
1190
+ * names (no colon suffix). See scanSkills(opts.disabledPlugins).
1191
+ */
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
+ }>>;
664
1225
  instructions: z.ZodDefault<z.ZodObject<{
665
1226
  fileName: z.ZodDefault<z.ZodString>;
666
1227
  scanDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -685,30 +1246,30 @@ export declare const SettingsSchema: z.ZodObject<{
685
1246
  apiKey: z.ZodOptional<z.ZodString>;
686
1247
  baseUrl: z.ZodOptional<z.ZodString>;
687
1248
  }, "strip", z.ZodTypeAny, {
688
- model: string;
689
1249
  name: string;
1250
+ model: string;
690
1251
  provider?: string | undefined;
691
1252
  baseUrl?: string | undefined;
692
1253
  apiKey?: string | undefined;
693
1254
  }, {
694
- model: string;
695
1255
  name: string;
1256
+ model: string;
696
1257
  provider?: string | undefined;
697
1258
  baseUrl?: string | undefined;
698
1259
  apiKey?: string | undefined;
699
1260
  }>]>, "many">>;
700
1261
  }, "strip", z.ZodTypeAny, {
701
1262
  participants: (string | {
702
- model: string;
703
1263
  name: string;
1264
+ model: string;
704
1265
  provider?: string | undefined;
705
1266
  baseUrl?: string | undefined;
706
1267
  apiKey?: string | undefined;
707
1268
  })[];
708
1269
  }, {
709
1270
  participants?: (string | {
710
- model: string;
711
1271
  name: string;
1272
+ model: string;
712
1273
  provider?: string | undefined;
713
1274
  baseUrl?: string | undefined;
714
1275
  apiKey?: string | undefined;
@@ -728,12 +1289,45 @@ export declare const SettingsSchema: z.ZodObject<{
728
1289
  providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["serper", "tavily", "searxng"]>, z.ZodObject<{
729
1290
  apiKey: z.ZodOptional<z.ZodString>;
730
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
+ }>>;
731
1311
  }, "strip", z.ZodTypeAny, {
732
1312
  baseUrl?: string | undefined;
733
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;
734
1321
  }, {
735
1322
  baseUrl?: string | undefined;
736
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;
737
1331
  }>>>;
738
1332
  }, "strip", z.ZodTypeAny, {
739
1333
  provider: "serper" | "tavily" | "searxng";
@@ -742,6 +1336,13 @@ export declare const SettingsSchema: z.ZodObject<{
742
1336
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
743
1337
  baseUrl?: string | undefined;
744
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;
745
1346
  }>> | undefined;
746
1347
  }, {
747
1348
  provider?: "serper" | "tavily" | "searxng" | undefined;
@@ -750,6 +1351,13 @@ export declare const SettingsSchema: z.ZodObject<{
750
1351
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
751
1352
  baseUrl?: string | undefined;
752
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;
753
1361
  }>> | undefined;
754
1362
  }>>;
755
1363
  output: z.ZodDefault<z.ZodObject<{
@@ -759,6 +1367,28 @@ export declare const SettingsSchema: z.ZodObject<{
759
1367
  }, {
760
1368
  format?: "text" | "json" | "jsonl" | "stream-json" | undefined;
761
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
+ }>>;
762
1392
  /**
763
1393
  * OS-level sandbox for shell-tool execution. "auto" picks per platform:
764
1394
  * Seatbelt on macOS, bubblewrap on Linux when installed, otherwise off.
@@ -771,16 +1401,88 @@ export declare const SettingsSchema: z.ZodObject<{
771
1401
  deniedReads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
772
1402
  network: z.ZodOptional<z.ZodEnum<["allow", "deny"]>>;
773
1403
  }, "strip", z.ZodTypeAny, {
774
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
1404
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
775
1405
  writableRoots?: string[] | undefined;
776
1406
  deniedReads?: string[] | undefined;
777
1407
  network?: "allow" | "deny" | undefined;
778
1408
  }, {
779
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
1409
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
780
1410
  writableRoots?: string[] | undefined;
781
1411
  deniedReads?: string[] | undefined;
782
1412
  network?: "allow" | "deny" | undefined;
783
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
+ }>>;
784
1486
  /**
785
1487
  * Shell-hook configuration. Each entry binds a HookEventName to a
786
1488
  * shell command; the command receives ctx JSON on stdin and returns
@@ -800,15 +1502,15 @@ export declare const SettingsSchema: z.ZodObject<{
800
1502
  }, "strip", z.ZodTypeAny, {
801
1503
  command: string;
802
1504
  event: string;
803
- cwd?: string | undefined;
804
1505
  matcher?: string | undefined;
805
1506
  timeout_ms?: number | undefined;
1507
+ cwd?: string | undefined;
806
1508
  }, {
807
1509
  command: string;
808
1510
  event: string;
809
- cwd?: string | undefined;
810
1511
  matcher?: string | undefined;
811
1512
  timeout_ms?: number | undefined;
1513
+ cwd?: string | undefined;
812
1514
  }>, "many">>;
813
1515
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
814
1516
  agent: z.ZodDefault<z.ZodObject<{
@@ -817,18 +1519,42 @@ export declare const SettingsSchema: z.ZodObject<{
817
1519
  disabledBuiltinTools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
818
1520
  customSystemPrompt: z.ZodOptional<z.ZodString>;
819
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
+ }>>;
820
1534
  }, "strip", z.ZodTypeAny, {
821
1535
  preset: string;
822
1536
  enabledBuiltinTools: string[];
823
1537
  disabledBuiltinTools: string[];
824
1538
  customSystemPrompt?: string | undefined;
825
1539
  appendSystemPrompt?: string | undefined;
1540
+ responseLanguage?: string | undefined;
1541
+ userProfile?: string | undefined;
1542
+ instructions?: {
1543
+ compatClaude: boolean;
1544
+ compatCodex: boolean;
1545
+ } | undefined;
826
1546
  }, {
827
1547
  preset?: string | undefined;
828
1548
  enabledBuiltinTools?: string[] | undefined;
829
1549
  disabledBuiltinTools?: string[] | undefined;
830
1550
  customSystemPrompt?: string | undefined;
831
1551
  appendSystemPrompt?: string | undefined;
1552
+ responseLanguage?: string | undefined;
1553
+ userProfile?: string | undefined;
1554
+ instructions?: {
1555
+ compatClaude?: boolean | undefined;
1556
+ compatCodex?: boolean | undefined;
1557
+ } | undefined;
832
1558
  }>>;
833
1559
  /**
834
1560
  * Primary source of truth for the active model is settings.activeKey
@@ -838,6 +1564,15 @@ export declare const SettingsSchema: z.ZodObject<{
838
1564
  * both — appendOnboardingResult does this in one shot.
839
1565
  */
840
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>;
841
1576
  /**
842
1577
  * Toggle background auto-update. When true (default), code-shell checks
843
1578
  * npm for newer versions and — if the npm global prefix is writable —
@@ -854,16 +1589,16 @@ export declare const SettingsSchema: z.ZodObject<{
854
1589
  temperature: z.ZodDefault<z.ZodNumber>;
855
1590
  maxTokens: z.ZodDefault<z.ZodNumber>;
856
1591
  }, "strip", z.ZodTypeAny, {
857
- provider: string;
858
- name: string;
859
1592
  temperature: number;
1593
+ name: string;
1594
+ provider: string;
860
1595
  baseUrl: string;
861
1596
  maxTokens: number;
862
1597
  apiKey?: string | undefined;
863
1598
  }, {
864
- provider?: string | undefined;
865
- name?: string | undefined;
866
1599
  temperature?: number | undefined;
1600
+ name?: string | undefined;
1601
+ provider?: string | undefined;
867
1602
  baseUrl?: string | undefined;
868
1603
  apiKey?: string | undefined;
869
1604
  maxTokens?: number | undefined;
@@ -877,26 +1612,75 @@ export declare const SettingsSchema: z.ZodObject<{
877
1612
  protocol: z.ZodOptional<z.ZodEnum<["openai-compat", "anthropic-style"]>>;
878
1613
  modelsPath: z.ZodOptional<z.ZodString>;
879
1614
  /**
880
- * DeepSeek V4 thinking-mode default for this provider. "enabled"
881
- * matches endpoint default; "disabled" makes V4 calls run in
882
- * non-thinking mode (faster, cheaper). Ignored by every provider
883
- * 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.
884
1618
  */
885
- 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
+ }>]>>;
886
1650
  }, "strip", z.ZodTypeAny, {
887
1651
  key: string;
888
- 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";
889
1653
  baseUrl: string;
890
- 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;
891
1665
  label?: string | undefined;
892
1666
  apiKey?: string | undefined;
893
1667
  protocol?: "openai-compat" | "anthropic-style" | undefined;
894
1668
  modelsPath?: string | undefined;
895
1669
  }, {
896
1670
  key: string;
897
- 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";
898
1672
  baseUrl: string;
899
- 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;
900
1684
  label?: string | undefined;
901
1685
  apiKey?: string | undefined;
902
1686
  protocol?: "openai-compat" | "anthropic-style" | undefined;
@@ -920,59 +1704,129 @@ export declare const SettingsSchema: z.ZodObject<{
920
1704
  baseUrl: z.ZodOptional<z.ZodString>;
921
1705
  apiKey: z.ZodOptional<z.ZodString>;
922
1706
  /**
923
- * Per-model thinking override. Wins over the provider-level
924
- * setting (settings.providers[].thinking). Use this when
925
- * different models under the same provider need different
926
- * 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.
927
1711
  */
928
- 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
+ }>]>>;
929
1743
  }, "strip", z.ZodTypeAny, {
930
- model: string;
931
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;
932
1757
  provider?: string | undefined;
933
- thinking?: "enabled" | "disabled" | undefined;
1758
+ maxOutputTokens?: number | undefined;
934
1759
  label?: string | undefined;
935
1760
  baseUrl?: string | undefined;
936
1761
  apiKey?: string | undefined;
937
1762
  protocol?: string | undefined;
938
1763
  providerKey?: string | undefined;
939
- maxOutputTokens?: number | undefined;
940
1764
  maxContextTokens?: number | undefined;
941
1765
  }, {
942
- model: string;
943
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;
944
1779
  provider?: string | undefined;
945
- thinking?: "enabled" | "disabled" | undefined;
1780
+ maxOutputTokens?: number | undefined;
946
1781
  label?: string | undefined;
947
1782
  baseUrl?: string | undefined;
948
1783
  apiKey?: string | undefined;
949
1784
  protocol?: string | undefined;
950
1785
  providerKey?: string | undefined;
951
- maxOutputTokens?: number | undefined;
952
1786
  maxContextTokens?: number | undefined;
953
1787
  }>, {
954
1788
  protocol: string | undefined;
955
1789
  provider: string | undefined;
956
- model: string;
957
1790
  key: string;
958
- 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;
959
1804
  label?: string | undefined;
960
1805
  baseUrl?: string | undefined;
961
1806
  apiKey?: string | undefined;
962
1807
  providerKey?: string | undefined;
963
- maxOutputTokens?: number | undefined;
964
1808
  maxContextTokens?: number | undefined;
965
1809
  }, {
966
- model: string;
967
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;
968
1823
  provider?: string | undefined;
969
- thinking?: "enabled" | "disabled" | undefined;
1824
+ maxOutputTokens?: number | undefined;
970
1825
  label?: string | undefined;
971
1826
  baseUrl?: string | undefined;
972
1827
  apiKey?: string | undefined;
973
1828
  protocol?: string | undefined;
974
1829
  providerKey?: string | undefined;
975
- maxOutputTokens?: number | undefined;
976
1830
  maxContextTokens?: number | undefined;
977
1831
  }>, "many">>;
978
1832
  permissions: z.ZodDefault<z.ZodObject<{
@@ -994,7 +1848,7 @@ export declare const SettingsSchema: z.ZodObject<{
994
1848
  argsPattern?: Record<string, string> | undefined;
995
1849
  }>, "many">>;
996
1850
  }, "strip", z.ZodTypeAny, {
997
- defaultMode: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan";
1851
+ defaultMode: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan";
998
1852
  rules: {
999
1853
  tool: string;
1000
1854
  decision: "allow" | "deny" | "ask";
@@ -1002,7 +1856,7 @@ export declare const SettingsSchema: z.ZodObject<{
1002
1856
  argsPattern?: Record<string, string> | undefined;
1003
1857
  }[];
1004
1858
  }, {
1005
- defaultMode?: "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "auto" | "plan" | undefined;
1859
+ defaultMode?: "auto" | "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan" | undefined;
1006
1860
  rules?: {
1007
1861
  tool: string;
1008
1862
  decision: "allow" | "deny" | "ask";
@@ -1041,20 +1895,23 @@ export declare const SettingsSchema: z.ZodObject<{
1041
1895
  url: z.ZodOptional<z.ZodString>;
1042
1896
  transport: z.ZodOptional<z.ZodEnum<["stdio", "sse", "streamable-http", "inprocess"]>>;
1043
1897
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1898
+ enabled: z.ZodOptional<z.ZodBoolean>;
1044
1899
  }, "strip", z.ZodTypeAny, {
1045
1900
  name: string;
1901
+ enabled?: boolean | undefined;
1046
1902
  url?: string | undefined;
1047
1903
  args?: string[] | undefined;
1048
- env?: Record<string, string> | undefined;
1049
1904
  command?: string | undefined;
1905
+ env?: Record<string, string> | undefined;
1050
1906
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
1051
1907
  headers?: Record<string, string> | undefined;
1052
1908
  }, {
1053
1909
  name: string;
1910
+ enabled?: boolean | undefined;
1054
1911
  url?: string | undefined;
1055
1912
  args?: string[] | undefined;
1056
- env?: Record<string, string> | undefined;
1057
1913
  command?: string | undefined;
1914
+ env?: Record<string, string> | undefined;
1058
1915
  transport?: "stdio" | "sse" | "streamable-http" | "inprocess" | undefined;
1059
1916
  headers?: Record<string, string> | undefined;
1060
1917
  }>>>;
@@ -1065,6 +1922,45 @@ export declare const SettingsSchema: z.ZodObject<{
1065
1922
  * tool both see the filtered set — see scanSkills(opts).
1066
1923
  */
1067
1924
  disabledSkills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1925
+ /**
1926
+ * Plugin-level total switch: every skill whose namespaced name
1927
+ * starts with `${pluginName}:` is filtered. Coarser knob than
1928
+ * disabledSkills; both are honored simultaneously. Bare plugin
1929
+ * names (no colon suffix). See scanSkills(opts.disabledPlugins).
1930
+ */
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
+ }>>;
1068
1964
  instructions: z.ZodDefault<z.ZodObject<{
1069
1965
  fileName: z.ZodDefault<z.ZodString>;
1070
1966
  scanDirs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -1089,30 +1985,30 @@ export declare const SettingsSchema: z.ZodObject<{
1089
1985
  apiKey: z.ZodOptional<z.ZodString>;
1090
1986
  baseUrl: z.ZodOptional<z.ZodString>;
1091
1987
  }, "strip", z.ZodTypeAny, {
1092
- model: string;
1093
1988
  name: string;
1989
+ model: string;
1094
1990
  provider?: string | undefined;
1095
1991
  baseUrl?: string | undefined;
1096
1992
  apiKey?: string | undefined;
1097
1993
  }, {
1098
- model: string;
1099
1994
  name: string;
1995
+ model: string;
1100
1996
  provider?: string | undefined;
1101
1997
  baseUrl?: string | undefined;
1102
1998
  apiKey?: string | undefined;
1103
1999
  }>]>, "many">>;
1104
2000
  }, "strip", z.ZodTypeAny, {
1105
2001
  participants: (string | {
1106
- model: string;
1107
2002
  name: string;
2003
+ model: string;
1108
2004
  provider?: string | undefined;
1109
2005
  baseUrl?: string | undefined;
1110
2006
  apiKey?: string | undefined;
1111
2007
  })[];
1112
2008
  }, {
1113
2009
  participants?: (string | {
1114
- model: string;
1115
2010
  name: string;
2011
+ model: string;
1116
2012
  provider?: string | undefined;
1117
2013
  baseUrl?: string | undefined;
1118
2014
  apiKey?: string | undefined;
@@ -1132,12 +2028,45 @@ export declare const SettingsSchema: z.ZodObject<{
1132
2028
  providers: z.ZodOptional<z.ZodRecord<z.ZodEnum<["serper", "tavily", "searxng"]>, z.ZodObject<{
1133
2029
  apiKey: z.ZodOptional<z.ZodString>;
1134
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
+ }>>;
1135
2050
  }, "strip", z.ZodTypeAny, {
1136
2051
  baseUrl?: string | undefined;
1137
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;
1138
2060
  }, {
1139
2061
  baseUrl?: string | undefined;
1140
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;
1141
2070
  }>>>;
1142
2071
  }, "strip", z.ZodTypeAny, {
1143
2072
  provider: "serper" | "tavily" | "searxng";
@@ -1146,6 +2075,13 @@ export declare const SettingsSchema: z.ZodObject<{
1146
2075
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
1147
2076
  baseUrl?: string | undefined;
1148
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;
1149
2085
  }>> | undefined;
1150
2086
  }, {
1151
2087
  provider?: "serper" | "tavily" | "searxng" | undefined;
@@ -1154,6 +2090,13 @@ export declare const SettingsSchema: z.ZodObject<{
1154
2090
  providers?: Partial<Record<"serper" | "tavily" | "searxng", {
1155
2091
  baseUrl?: string | undefined;
1156
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;
1157
2100
  }>> | undefined;
1158
2101
  }>>;
1159
2102
  output: z.ZodDefault<z.ZodObject<{
@@ -1163,6 +2106,28 @@ export declare const SettingsSchema: z.ZodObject<{
1163
2106
  }, {
1164
2107
  format?: "text" | "json" | "jsonl" | "stream-json" | undefined;
1165
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
+ }>>;
1166
2131
  /**
1167
2132
  * OS-level sandbox for shell-tool execution. "auto" picks per platform:
1168
2133
  * Seatbelt on macOS, bubblewrap on Linux when installed, otherwise off.
@@ -1175,16 +2140,88 @@ export declare const SettingsSchema: z.ZodObject<{
1175
2140
  deniedReads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1176
2141
  network: z.ZodOptional<z.ZodEnum<["allow", "deny"]>>;
1177
2142
  }, "strip", z.ZodTypeAny, {
1178
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
2143
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
1179
2144
  writableRoots?: string[] | undefined;
1180
2145
  deniedReads?: string[] | undefined;
1181
2146
  network?: "allow" | "deny" | undefined;
1182
2147
  }, {
1183
- mode?: "auto" | "seatbelt" | "bwrap" | "off" | undefined;
2148
+ mode?: "auto" | "off" | "seatbelt" | "bwrap" | undefined;
1184
2149
  writableRoots?: string[] | undefined;
1185
2150
  deniedReads?: string[] | undefined;
1186
2151
  network?: "allow" | "deny" | undefined;
1187
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
+ }>>;
1188
2225
  /**
1189
2226
  * Shell-hook configuration. Each entry binds a HookEventName to a
1190
2227
  * shell command; the command receives ctx JSON on stdin and returns
@@ -1204,15 +2241,15 @@ export declare const SettingsSchema: z.ZodObject<{
1204
2241
  }, "strip", z.ZodTypeAny, {
1205
2242
  command: string;
1206
2243
  event: string;
1207
- cwd?: string | undefined;
1208
2244
  matcher?: string | undefined;
1209
2245
  timeout_ms?: number | undefined;
2246
+ cwd?: string | undefined;
1210
2247
  }, {
1211
2248
  command: string;
1212
2249
  event: string;
1213
- cwd?: string | undefined;
1214
2250
  matcher?: string | undefined;
1215
2251
  timeout_ms?: number | undefined;
2252
+ cwd?: string | undefined;
1216
2253
  }>, "many">>;
1217
2254
  }, z.ZodTypeAny, "passthrough">>;
1218
2255
  export type ValidatedSettings = z.infer<typeof SettingsSchema>;