@lightcone-ai/daemon 0.9.48 → 0.9.50

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.
@@ -129,6 +129,7 @@ async function _spawnChrome(profileDir, port) {
129
129
  '--window-size=1280,900',
130
130
  '--disable-blink-features=AutomationControlled',
131
131
  '--disable-infobars',
132
+ '--disable-component-extensions-with-background-pages',
132
133
  '--no-first-run',
133
134
  '--no-default-browser-check',
134
135
  '--disable-hang-monitor',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.9.48",
3
+ "version": "0.9.50",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -563,18 +563,29 @@ export class AgentManager {
563
563
  }
564
564
 
565
565
  // Activity state machine
566
+ const displayName = this.agents.get(key)?.config?.displayName ?? agentId.slice(0, 8);
566
567
  if (event.type === 'assistant') {
567
- const hasToolUse = event.message?.content?.some?.(c => c.type === 'tool_use');
568
- if (hasToolUse) {
569
- const toolName = event.message.content.find(c => c.type === 'tool_use')?.name ?? 'tool';
570
- const displayName = this.agents.get(key)?.config?.displayName ?? agentId.slice(0, 8);
571
- console.log(`[AgentManager][${displayName}] tool_use: ${toolName}`);
572
- connection.send({ type: 'agent:activity', agentId, teamId, activity: 'working', detail: toolName, entries: [] });
573
- } else {
568
+ const content = event.message?.content ?? [];
569
+ for (const block of content) {
570
+ if (block.type === 'thinking') {
571
+ console.log(`[AgentManager][${displayName}] <thinking> ${block.thinking?.slice(0, 500)}`);
572
+ } else if (block.type === 'text') {
573
+ console.log(`[AgentManager][${displayName}] <text> ${block.text?.slice(0, 500)}`);
574
+ } else if (block.type === 'tool_use') {
575
+ console.log(`[AgentManager][${displayName}] <tool_use> ${block.name} params=${JSON.stringify(block.input ?? {}).slice(0, 500)}`);
576
+ connection.send({ type: 'agent:activity', agentId, teamId, activity: 'working', detail: block.name, entries: [] });
577
+ }
578
+ }
579
+ if (!content.some(c => c.type === 'tool_use')) {
574
580
  connection.send({ type: 'agent:activity', agentId, teamId, activity: 'thinking', detail: '', entries: [] });
575
581
  }
582
+ } else if (event.type === 'tool') {
583
+ const content = event.content;
584
+ const resultStr = Array.isArray(content)
585
+ ? content.map(c => c.text ?? c.content ?? JSON.stringify(c)).join('').slice(0, 1000)
586
+ : JSON.stringify(content ?? event).slice(0, 1000);
587
+ console.log(`[AgentManager][${displayName}] <tool_result> id=${event.tool_use_id ?? '?'} → ${resultStr}`);
576
588
  } else if (event.type === 'result') {
577
- const displayName = this.agents.get(key)?.config?.displayName ?? agentId.slice(0, 8);
578
589
  console.log(`[AgentManager][${displayName}] turn done (stop_reason=${event.stop_reason ?? '?'})`);
579
590
  connection.send({ type: 'agent:activity', agentId, teamId, activity: 'online', detail: '', entries: [] });
580
591
  }
@@ -132,6 +132,7 @@ export class BrowserLoginSession {
132
132
  '--window-size=800,900',
133
133
  '--disable-blink-features=AutomationControlled',
134
134
  '--disable-infobars',
135
+ '--disable-component-extensions-with-background-pages',
135
136
  '--use-mock-keychain',
136
137
  '--password-store=basic',
137
138
  '--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',