sneakoscope 0.6.76 → 0.6.78

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.
@@ -376,6 +376,47 @@ export async function renderTeamAgentLane(dir, opts = {}) {
376
376
  ].join('\n');
377
377
  }
378
378
 
379
+ export async function renderTeamWatch(dir, opts = {}) {
380
+ const lines = Math.max(1, Number(opts.lines) || 20);
381
+ const dashboard = await readTeamDashboard(dir);
382
+ const runtime = await readJson(path.join(dir, TEAM_RUNTIME_TASKS_ARTIFACT), null);
383
+ const missionId = opts.missionId || dashboard?.mission_id || runtime?.mission_id || path.basename(dir);
384
+ const agents = Object.entries(dashboard?.agents || {});
385
+ const visibleAgents = agents
386
+ .filter(([name]) => name !== 'parent_orchestrator')
387
+ .slice(0, Math.max(3, Number(dashboard?.agent_session_count) || 3));
388
+ const events = (await readTeamTranscriptTail(dir, lines)).map(parseTranscriptLine).filter(Boolean);
389
+ const runtimeTasks = Array.isArray(runtime?.tasks) ? runtime.tasks : Array.isArray(runtime) ? runtime : [];
390
+ return [
391
+ '# SKS Team Live Orchestration',
392
+ '',
393
+ `Mission: ${missionId}`,
394
+ `Updated: ${dashboard?.updated_at || 'unknown'}`,
395
+ `Agent session budget: ${dashboard?.agent_session_count || 'unknown'}`,
396
+ dashboard?.role_counts ? `Role counts: ${formatRoleCounts(dashboard.role_counts)}` : null,
397
+ '',
398
+ '## Split-Screen Map',
399
+ '- This overview pane follows the whole mission transcript.',
400
+ '- Neighbor cmux panes follow individual `sks team lane ... --agent <name>` views.',
401
+ '- Use `sks team event ...` to mirror scout, debate, executor, review, and verification status into the live panes.',
402
+ '',
403
+ '## Cockpit Views',
404
+ '- Mission / Goal | Agents | MultiAgentV2 | Work Orders | Skills | Memory Health | Forget Queue',
405
+ '- Mistake Immunity | Tool Reliability | Harness Experiments | Dogfood Evidence | Code Structure | Statusline/Title',
406
+ '',
407
+ '## Visible Agent Lanes',
408
+ ...(visibleAgents.length
409
+ ? visibleAgents.map(([name, status]) => `- ${name}: ${status.status || 'pending'} | ${status.phase || 'unknown'} | last_seen:${status.last_seen || 'never'}`)
410
+ : ['- No agent lanes registered yet.']),
411
+ '',
412
+ '## Runtime Task Snapshot',
413
+ ...(runtimeTasks.length ? formatRuntimeTasks(runtimeTasks.slice(0, 8)) : ['- team-runtime-tasks.json not available yet.']),
414
+ '',
415
+ '## Recent Mission Events',
416
+ ...(events.length ? events.map(formatTranscriptEvent) : ['- No transcript events yet.'])
417
+ ].filter((line) => line !== null).join('\n');
418
+ }
419
+
379
420
  function normalizeEvent(event = {}) {
380
421
  return {
381
422
  ts: event.ts || nowIso(),