@volter-ai-dev/supercode-ui 0.1.59 → 0.1.61

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/controller.d.ts CHANGED
@@ -37,6 +37,8 @@ export interface ClientProjectionOptions {
37
37
  /** Host bootstrap phase before the controller itself is ready. */
38
38
  startup?: StartupPhase;
39
39
  attention?: SessionAttention[];
40
+ /** Host-loaded child inventory/detail. Kept on demand and outside the controller's root list. */
41
+ subagentInspector?: SupercodeUiState['subagentInspector'];
40
42
  savedDraft?: string;
41
43
  history?: Partial<SupercodeUiState['history']>;
42
44
  exportBackTarget?: SessionFormat | null;
@@ -121,6 +123,9 @@ export interface ControllerBindingOptions {
121
123
  onAcknowledge?: (key: string) => void | Promise<void>;
122
124
  onLoadSessions?: () => void | Promise<void>;
123
125
  onLoadEarlier?: () => void | Promise<void>;
126
+ onOpenSubagents?: (key: string) => void | Promise<void>;
127
+ onOpenSubagent?: (parentKey: string, key: string) => void | Promise<void>;
128
+ onCloseSubagents?: () => void | Promise<void>;
124
129
  onStartTerminal?: (intent: Extract<SupercodeUiIntent, { action: 'new' }>) => void | Promise<void>;
125
130
  onResumeTerminal?: (intent: Extract<SupercodeUiIntent, { action: 'resume' }>) => void | Promise<void>;
126
131
  copyText?: UiAdapter['copyText'];
package/controller.mjs CHANGED
@@ -519,6 +519,9 @@ function projectClientSnapshotInternal(snapshot, options, imageRegistry) {
519
519
  writable: session.key === snapshot.activeSessionKey && actions.send === true,
520
520
  live: typeof session.updatedAt === 'number' && now - session.updatedAt <= liveWindowMs,
521
521
  runtimeStatus: session.liveStatus ?? null,
522
+ ...(Number.isSafeInteger(session.childSessionCount) && session.childSessionCount > 0
523
+ ? { subagentCount: session.childSessionCount }
524
+ : {}),
522
525
  }));
523
526
  const sessions = options.sessions ?? snapshotSessions;
524
527
  const active = options.attached === undefined ? attached(snapshot) : options.attached;
@@ -606,6 +609,7 @@ function projectClientSnapshotInternal(snapshot, options, imageRegistry) {
606
609
  savedDraft: options.savedDraft ?? '',
607
610
  attention: options.attention ?? [],
608
611
  sessions,
612
+ subagentInspector: options.subagentInspector ?? null,
609
613
  attached: active,
610
614
  owned,
611
615
  attachError: options.attachError ?? null,
@@ -684,6 +688,11 @@ export async function dispatchControllerIntent(controller, intent, options = {})
684
688
  ? options.onLoadEarlier()
685
689
  : controller.dispatch({ type: 'loadEarlier' });
686
690
  }
691
+ if (intent.action === 'openSubagents') return options.onOpenSubagents?.(intent.key);
692
+ if (intent.action === 'openSubagent') {
693
+ return options.onOpenSubagent?.(intent.parentKey, intent.key);
694
+ }
695
+ if (intent.action === 'closeSubagents') return options.onCloseSubagents?.();
687
696
  return options.onUnsupported?.(intent);
688
697
  }
689
698
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter-ai-dev/supercode-ui",
3
- "version": "0.1.59",
3
+ "version": "0.1.61",
4
4
  "type": "module",
5
5
  "description": "Composable default UI kit for Supercode-powered coding-agent experiences",
6
6
  "exports": {