openvisio-agent 0.25.11 → 0.25.13

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/studio/app.mjs CHANGED
@@ -15,7 +15,7 @@ export function normalizeStatus(value, fallback = 'observed') {
15
15
  if (['active', 'running', 'started', 'ready', 'in_progress', 'working', 'online', 'preflight'].includes(status)) return 'active';
16
16
  if (['queued', 'pending', 'waiting'].includes(status)) return 'queued';
17
17
  if (['completed', 'complete', 'finished', 'done', 'success', 'succeeded', 'ok'].includes(status)) return 'completed';
18
- if (['failed', 'failure', 'error', 'rejected', 'rate_limited'].includes(status)) return 'failed';
18
+ if (['failed', 'failure', 'error', 'rejected', 'rate_limited', 'handoff_error'].includes(status)) return 'failed';
19
19
  if (['cancelled', 'canceled', 'aborted', 'interrupted'].includes(status)) return 'cancelled';
20
20
  if (['offline', 'stopped', 'disconnected', 'exited'].includes(status)) return 'offline';
21
21
  if (['skipped', 'recovering', 'idle', 'blocked', 'timeout', 'continued'].includes(status)) return status;
@@ -115,7 +115,7 @@ export function deriveModel(input) {
115
115
  const prior = runtimes.get(processKey) || {};
116
116
  runtimes.set(processKey, {
117
117
  ...prior, ...data, id: processKey, type: 'process', agent: event.agent, event,
118
- name: text(data.runtime || prior.name || data.provider || 'Coding runtime'),
118
+ name: runtimeLabel({ ...prior, ...data }),
119
119
  pid: Number.isInteger(data.runtimePid) && data.runtimePid > 0 ? data.runtimePid : prior.pid ?? null,
120
120
  status: eventStatus(event), lastSeen: event.timestamp,
121
121
  });
@@ -181,15 +181,22 @@ export function taskActivityCycles(model, selectedCycle) {
181
181
  return [...latest.values()].sort((a, b) => agentId(a.agent).localeCompare(agentId(b.agent)));
182
182
  }
183
183
 
184
+ export function runtimeLabel(data = {}) {
185
+ return data.lane === 'reply' ? 'Reply runtime' : data.lane === 'work' ? 'Coding runtime' : 'Agent runtime';
186
+ }
187
+
184
188
  export function eventTitle(event) {
185
189
  const data = record(event?.data);
190
+ if (['process.started', 'process.ready', 'process.stopped'].includes(event?.type)) {
191
+ const phase = event.type === 'process.started' ? 'starting' : event.type === 'process.stopped' ? 'stopped' : data.status === 'idle' ? 'idle' : 'ready';
192
+ return `${runtimeLabel(data)} ${phase}`;
193
+ }
186
194
  const titles = {
187
195
  'runtime.started': 'Watcher connected', 'runtime.heartbeat': 'Watcher heartbeat', 'runtime.stopped': 'Watcher stopped',
188
196
  'cycle.queued': 'Cycle queued', 'cycle.started': 'Cycle started', 'cycle.finished': 'Cycle finished',
189
- 'cycle.continued': 'Continued in coding workspace',
197
+ 'cycle.continued': 'Coding continuation queued',
190
198
  'cycle.completed': 'Cycle completed', 'cycle.cancelled': 'Cycle cancelled', 'cycle.failed': 'Cycle failed',
191
199
  'plan.updated': 'Plan updated', 'output.progress': 'Progress update', 'output.final': 'Final response',
192
- 'process.started': 'Coding runtime starting', 'process.ready': 'Coding runtime ready', 'process.stopped': 'Coding runtime stopped',
193
200
  };
194
201
  if (text(event?.type).startsWith('tool.')) {
195
202
  const action = event.type === 'tool.started' ? 'Started' : ['tool.finished', 'tool.completed'].includes(event.type) ? 'Finished' : 'Updated';
@@ -767,7 +774,7 @@ function initializeStudio() {
767
774
  inspector.replaceChildren(inspectorHeader('Process details', process.name, agentName(process.agent), process.status));
768
775
  const section = detailSection('Process record', 'terminal');
769
776
  section.append(detailGrid([
770
- ['Kind', process.type === 'watcher' ? 'BYO watcher' : 'Coding runtime'], ['Provider', process.agent.provider || process.provider],
777
+ ['Kind', process.type === 'watcher' ? 'BYO watcher' : runtimeLabel(process)], ['Provider', process.agent.provider || process.provider],
771
778
  ['PID', process.pid || (process.status === 'demo' ? 'Simulated' : 'Not reported'), true],
772
779
  ['Last event', fullTime(process.lastSeen)], ['Session', process.sessionId, true], ['Run ID', process.runId || process.event?.runId, true],
773
780
  ]));