@lightcone-ai/daemon 0.6.5 → 0.6.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -18,6 +18,15 @@ function quote(value) {
18
18
  return JSON.stringify(value);
19
19
  }
20
20
 
21
+ function normalizeCodexModel(model) {
22
+ if (!model) return 'gpt-5.2';
23
+ const normalized = String(model).trim().toLowerCase();
24
+ if (!normalized) return 'gpt-5.2';
25
+ if (['sonnet', 'opus', 'haiku'].includes(normalized)) return 'gpt-5.2';
26
+ if (normalized.startsWith('claude-')) return 'gpt-5.2';
27
+ return model;
28
+ }
29
+
21
30
  function ensureGitRepo(workspaceDir) {
22
31
  const gitDir = path.join(workspaceDir, '.git');
23
32
  if (existsSync(gitDir)) return;
@@ -80,10 +89,6 @@ export function buildCodexSpawn({
80
89
  '-c', 'mcp_servers.chat.tool_timeout_sec=300',
81
90
  );
82
91
 
83
- if (channelId) {
84
- args.push('-c', `mcp_servers.chat.env=${quote({ CHANNEL_ID: channelId })}`);
85
- }
86
-
87
92
  if (config.browserAccess) {
88
93
  args.push(
89
94
  '-c', `mcp_servers.chrome-devtools.command=${quote('npx')}`,
@@ -96,21 +101,23 @@ export function buildCodexSpawn({
96
101
  const mysqlServerPath = new URL('../../mcp-servers/mysql/index.js', import.meta.url).pathname;
97
102
  const agentEnv = config.envVars ?? {};
98
103
  args.push(
99
- '-c', `mcp_servers.mysql.command=${quote('node')}`,
100
- '-c', `mcp_servers.mysql.args=${quote([mysqlServerPath])}`,
101
- '-c', `mcp_servers.mysql.env=${quote({
102
- DB_HOST: process.env.DB_HOST ?? '',
103
- DB_PORT: process.env.DB_PORT ?? '3306',
104
- DB_USER: process.env.DB_USER ?? '',
105
- DB_PASSWORD: process.env.DB_PASSWORD ?? '',
106
- DB_NAME: agentEnv.MYSQL_DB ?? process.env.DB_NAME ?? '',
107
- })}`,
104
+ '-c', `mcp_servers.mysql.command=${quote('env')}`,
105
+ '-c', `mcp_servers.mysql.args=${quote([
106
+ `DB_HOST=${process.env.DB_HOST ?? ''}`,
107
+ `DB_PORT=${process.env.DB_PORT ?? '3306'}`,
108
+ `DB_USER=${process.env.DB_USER ?? ''}`,
109
+ `DB_PASSWORD=${process.env.DB_PASSWORD ?? ''}`,
110
+ `DB_NAME=${agentEnv.MYSQL_DB ?? process.env.DB_NAME ?? ''}`,
111
+ 'node',
112
+ mysqlServerPath,
113
+ ])}`,
108
114
  '-c', 'mcp_servers.mysql.enabled=true'
109
115
  );
110
116
  }
111
117
 
112
- if (config.model) {
113
- args.push('-m', config.model);
118
+ const model = normalizeCodexModel(config.model);
119
+ if (model) {
120
+ args.push('-m', model);
114
121
  }
115
122
 
116
123
  if (config.reasoningEffort) {