@lightcone-ai/daemon 0.9.51 → 0.9.52

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.51",
3
+ "version": "0.9.52",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -585,6 +585,15 @@ export class AgentManager {
585
585
  ? content.map(c => c.text ?? c.content ?? JSON.stringify(c)).join('').slice(0, 1000)
586
586
  : JSON.stringify(content ?? event).slice(0, 1000);
587
587
  console.log(`[AgentManager][${displayName}] <tool_result> id=${event.tool_use_id ?? '?'} → ${resultStr}`);
588
+ } else if (event.type === 'user') {
589
+ // Tool results come back as user-turn messages in stream-json
590
+ const toolResults = (event.message?.content ?? []).filter(c => c.type === 'tool_result');
591
+ for (const tr of toolResults) {
592
+ const resultStr = Array.isArray(tr.content)
593
+ ? tr.content.map(c => c.text ?? c.content ?? JSON.stringify(c)).join('').slice(0, 1000)
594
+ : JSON.stringify(tr.content ?? tr).slice(0, 1000);
595
+ console.log(`[AgentManager][${displayName}] <tool_result> id=${tr.tool_use_id ?? '?'} → ${resultStr}`);
596
+ }
588
597
  } else if (event.type === 'result') {
589
598
  console.log(`[AgentManager][${displayName}] turn done (stop_reason=${event.stop_reason ?? '?'})`);
590
599
  connection.send({ type: 'agent:activity', agentId, teamId, activity: 'online', detail: '', entries: [] });