clay-server 4.0.0-beta.3 → 4.0.0-beta.4

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.
@@ -12,6 +12,23 @@ var { resolveOsUserInfo } = require("../../os-users");
12
12
  var backgroundTasks = require("../codex-background-tasks");
13
13
  var codexUserInput = require("../codex-user-input");
14
14
 
15
+ // --- Reasoning defaults ---
16
+ // Reasoning summaries are the only readable thinking channel Codex offers:
17
+ // raw reasoning content is encrypted for ChatGPT-authenticated models, so the
18
+ // item/reasoning/* events this adapter already maps to thinking only carry
19
+ // text when the app-server is asked for summaries. The CLI default
20
+ // (`model_reasoning_summary = "auto"`) frequently produces none at all, and the
21
+ // app-server otherwise inherits whatever is in the user's ~/.codex/config.toml,
22
+ // so Clay asks for detailed summaries explicitly.
23
+ //
24
+ // `show_raw_agent_reasoning` is deliberately absent: it is encrypted on
25
+ // ChatGPT-auth models and noisy elsewhere, so it stays a user opt-in.
26
+ // Everything here is overridable via adapterOptions.CODEX.config.
27
+ var CODEX_REASONING_DEFAULTS = {
28
+ model_reasoning_summary: "detailed",
29
+ model_supports_reasoning_summaries: true,
30
+ };
31
+
15
32
  // --- Event flattening ---
16
33
  // Converts app-server JSON-RPC notifications into flat objects with a yokeType field.
17
34
  //
@@ -1567,12 +1584,16 @@ function createCodexAdapter(opts) {
1567
1584
  serverOpts.osUserInfo = _resolveOsUserInfo(_runtimeLinuxUser);
1568
1585
  }
1569
1586
 
1587
+ // Clay's config defaults go in first so any user-supplied
1588
+ // adapterOptions.CODEX.config key of the same name overrides them.
1589
+ serverOpts.config = Object.assign({}, CODEX_REASONING_DEFAULTS);
1590
+
1570
1591
  // Extract adapter options
1571
1592
  if (effectiveInitOpts && effectiveInitOpts.adapterOptions && effectiveInitOpts.adapterOptions.CODEX) {
1572
1593
  var co = effectiveInitOpts.adapterOptions.CODEX;
1573
1594
  if (co.apiKey) serverOpts.env = Object.assign({}, serverOpts.env || {}, { OPENAI_API_KEY: co.apiKey });
1574
1595
  if (co.baseUrl) serverOpts.env = Object.assign({}, serverOpts.env || {}, { OPENAI_BASE_URL: co.baseUrl });
1575
- if (co.config) serverOpts.config = co.config;
1596
+ if (co.config) serverOpts.config = Object.assign(serverOpts.config, co.config);
1576
1597
  }
1577
1598
 
1578
1599
  // Track 1: Read local MCP server definitions from ~/.clay/mcp.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.0-beta.4",
4
4
  "description": "Self-hosted team workspace for Claude Code and Codex. Multi-user, browser-based, with persistent AI mates.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",