osborn 0.9.247 → 0.9.249

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.
@@ -2022,7 +2022,7 @@ class ClaudeLLMStream extends llm.LLMStream {
2022
2022
  // the permission dialog; adversarial agents (reviewer/tester) do
2023
2023
  // NOT emit here — parity with the prior hardcoded branches.
2024
2024
  if (agentType === 'writer') {
2025
- this.#eventEmitter.emit('tool_use', { name: toolName, input: toolInput, agentRole: agentType || 'main' });
2025
+ this.#eventEmitter.emit('tool_use', { name: toolName, input: toolInput, agentRole: agentType || 'main', agentId: input?.agent_id });
2026
2026
  }
2027
2027
  return { hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'ask' } };
2028
2028
  }
@@ -2038,7 +2038,7 @@ class ClaudeLLMStream extends llm.LLMStream {
2038
2038
  if (st && d)
2039
2039
  this.#pendingTaskByType.set(st, d);
2040
2040
  }
2041
- this.#eventEmitter.emit('tool_use', { name: toolName, input: toolInput, agentRole: agentType || 'main' });
2041
+ this.#eventEmitter.emit('tool_use', { name: toolName, input: toolInput, agentRole: agentType || 'main', agentId: input?.agent_id });
2042
2042
  return {};
2043
2043
  }]
2044
2044
  }],
@@ -2054,7 +2054,7 @@ class ClaudeLLMStream extends llm.LLMStream {
2054
2054
  const agentId = input?.tool_input?.agent_id ?? input?.tool_input?.id ?? undefined;
2055
2055
  console.log('[LIFECYCLE-PROBE] PostToolUse on', toolName, 'agent_id=', agentId, 'ts=', Date.now());
2056
2056
  }
2057
- this.#eventEmitter.emit('tool_result', { name: toolName, input: toolInput, response: toolResponse, agentRole: agentTypePost || 'main' });
2057
+ this.#eventEmitter.emit('tool_result', { name: toolName, input: toolInput, response: toolResponse, agentRole: agentTypePost || 'main', agentId: input?.agent_id });
2058
2058
  // Pattern #1 verifier chaining has MOVED to the SubagentStop hook below. Reason:
2059
2059
  // sub-agents run with run_in_background:true, so PostToolUse-on-Task fires at
2060
2060
  // DISPATCH (placeholder tool_response), not completion — injecting the "now verify"
package/dist/index.js CHANGED
@@ -60,8 +60,10 @@ import { llm } from '@livekit/agents';
60
60
  // any field that can't be derived is simply omitted and the card degrades to
61
61
  // the tool name. `input` is the raw tool arguments already carried on the
62
62
  // tool_use/tool_result events emitted by claude-llm.
63
- function buildToolLogEvent(name, input, status, agentRole) {
64
- const ev = { type: 'tool_use', tool: name, status, agentRole };
63
+ function buildToolLogEvent(name, input, status, agentRole, agentId) {
64
+ // agentId is the sub-agent's id (present only for sub-agent tool calls) — lets the
65
+ // frontend tie this activity to its Running row, not just the Log feed.
66
+ const ev = { type: 'tool_use', tool: name, status, agentRole, agentId };
65
67
  const inp = input || {};
66
68
  const basename = (p) => String(p).split('/').pop() || String(p);
67
69
  const fp = inp.file_path || inp.path || inp.notebook_path;
@@ -3392,11 +3394,11 @@ async function main() {
3392
3394
  // Wire up events from the Claude SDK wrapper to frontend
3393
3395
  directLLM.events.on('tool_use', (data) => {
3394
3396
  console.log(`🔧 Claude: ${data.name}`);
3395
- sendToFrontend(buildToolLogEvent(data.name, data.input, 'running', data.agentRole || 'main'));
3397
+ sendToFrontend(buildToolLogEvent(data.name, data.input, 'running', data.agentRole || 'main', data.agentId));
3396
3398
  });
3397
3399
  directLLM.events.on('tool_result', (data) => {
3398
3400
  console.log(`✅ Done: ${data.name}`);
3399
- sendToFrontend(buildToolLogEvent(data.name, data.input, 'completed', data.agentRole || 'main'));
3401
+ sendToFrontend(buildToolLogEvent(data.name, data.input, 'completed', data.agentRole || 'main', data.agentId));
3400
3402
  // Detect research artifact writes (session workspace or legacy research dir)
3401
3403
  if ((data.name === 'Write' || data.name === 'Edit') && data.input?.file_path) {
3402
3404
  const fp = data.input.file_path;
@@ -3754,6 +3756,7 @@ async function main() {
3754
3756
  type: 'agent_started',
3755
3757
  agent_type: d.agent_type,
3756
3758
  agent_id: d.agent_id,
3759
+ task: d.task, // forward the dispatch instruction so the Running row can label itself
3757
3760
  }));
3758
3761
  // Create the Agent with instructions, STT, LLM, TTS
3759
3762
  // VAD (Silero ONNX) removed — caused 2-5s inference lag on CPU, making interruption detection worse
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osborn",
3
- "version": "0.9.247",
3
+ "version": "0.9.249",
4
4
  "description": "Voice AI coding assistant - local agent that connects to Osborn frontend",
5
5
  "type": "module",
6
6
  "bin": {