@lightcone-ai/daemon 0.9.1 → 0.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -202,7 +202,7 @@ export class AgentManager {
202
202
  args: [chatBridgePath],
203
203
  env: {
204
204
  SERVER_URL: this.serverUrl,
205
- MACHINE_API_KEY: this.machineApiKey,
205
+ MACHINE_API_KEY: config.authToken,
206
206
  AGENT_ID: agentId,
207
207
  TEAM_ID: teamId ?? '',
208
208
  },
@@ -215,15 +215,23 @@ export class AgentManager {
215
215
  if (!skill.mcpConfig) continue;
216
216
  const mc = skill.mcpConfig;
217
217
  if (mcpServers[mc.server]) continue; // already added
218
- const resolvedArgs = (mc.args ?? []).map(a =>
219
- a === '{mysql_mcp_path}'
220
- ? new URL('../../mcp-servers/mysql/index.js', import.meta.url).pathname
221
- : a
222
- );
218
+ const resolvedArgs = (mc.args ?? []).map(a => {
219
+ if (a === '{mysql_mcp_path}')
220
+ return new URL('../../mcp-servers/mysql/index.js', import.meta.url).pathname;
221
+ if (a === '{workspace_migrate_mcp_path}')
222
+ return new URL('../../mcp-servers/workspace-migrate/index.js', import.meta.url).pathname;
223
+ return a;
224
+ });
223
225
  const resolvedEnv = {};
224
226
  for (const envKey of (mc.env ?? [])) {
225
227
  resolvedEnv[envKey] = agentEnv[envKey] ?? process.env[envKey] ?? '';
226
228
  }
229
+ // Inject platform vars for MCP servers that need to call back to the server
230
+ if (mc.server === 'workspace-migrate') {
231
+ resolvedEnv.SERVER_URL = this.serverUrl;
232
+ resolvedEnv.MACHINE_API_KEY = config.authToken;
233
+ resolvedEnv.AGENT_ID = agentId;
234
+ }
227
235
  mcpServers[mc.server] = {
228
236
  command: mc.command,
229
237
  args: resolvedArgs,
@@ -331,13 +331,15 @@ Use \`skill_read\` to load full content when needed.
331
331
  }
332
332
 
333
333
  export function buildSystemPrompt(config, agentId, skills) {
334
- const { name, displayName, description, feishuBotName } = config;
334
+ const { name, displayName, description, feishuBotName, rolePrompt } = config;
335
335
 
336
336
  const base = BASE_PROMPT(displayName, name, description, agentId, feishuBotName);
337
337
 
338
- const rolePrompt = '';
338
+ const roleSection = rolePrompt
339
+ ? `\n\n## Your role in this team\n\n${rolePrompt}`
340
+ : '';
339
341
 
340
342
  const skillsPrompt = buildSkillsPrompt(skills);
341
343
 
342
- return base + skillsPrompt + rolePrompt;
344
+ return base + skillsPrompt + roleSection;
343
345
  }
@@ -44,7 +44,7 @@ export function buildKimiSpawn({ config, agentId, teamId, workspaceDir, chatBrid
44
44
  args: [chatBridgePath],
45
45
  env: {
46
46
  SERVER_URL: serverUrl,
47
- MACHINE_API_KEY: machineApiKey,
47
+ MACHINE_API_KEY: config.authToken,
48
48
  AGENT_ID: agentId,
49
49
  TEAM_ID: teamId ?? '',
50
50
  },