@volter-ai-dev/supercode-ui 0.1.36 → 0.1.38

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/README.md CHANGED
@@ -64,9 +64,9 @@ import { HarnessAdvisory, HarnessSettingsPanel } from '@volter-ai-dev/supercode-
64
64
  import { groupConversation } from '@volter-ai-dev/supercode-ui/core';
65
65
  ```
66
66
 
67
- The public components are `SupercodeMessenger`, `Conversation`, `TranscriptEntry`,
67
+ The public components are `SupercodeMessenger`, `AgentActivityLauncher`, `Conversation`, `TranscriptEntry`,
68
68
  `ActivityGroup`, `RequestCard`, `SessionList`, `SessionRow`, `Composer`, `ContinuationBar`,
69
- `LoadingStatus`, `TaskPlan`, `SessionDetails`, `HarnessLogo`, `HarnessAdvisory`, and
69
+ `ContextCandidate`, `ContextCandidates`, `LoadingStatus`, `TaskPlan`, `SessionDetails`, `HarnessLogo`, `HarnessAdvisory`, and
70
70
  `HarnessSettingsPanel`. Pure state readers, selectors,
71
71
  formatters, and intent constructors live at `supercode-ui/core` and have no DOM or Preact imports.
72
72
  For genuine partial delivery, the `preact/logo`, `preact/icon`, `preact/conversation`, `preact/sessions`,
@@ -75,6 +75,82 @@ the logo does not pull in Markdown, the messenger, or session-list code.
75
75
  `harnessLogoDataUrl(id)` gives non-Preact launchers the same self-contained canonical SVG; it
76
76
  returns `null` for an unknown harness rather than inventing a fallback identity.
77
77
 
78
+ ### React and Preact use the same component sources
79
+
80
+ React applications import the native React build instead of isolating a Preact root or aliasing
81
+ their application runtime:
82
+
83
+ ```tsx
84
+ import { SupercodeMessenger } from '@volter-ai-dev/supercode-ui/react/messenger';
85
+ import type { MessengerComponents } from '@volter-ai-dev/supercode-ui/react';
86
+ import '@volter-ai-dev/supercode-ui/styles.css';
87
+
88
+ const components: MessengerComponents = { SessionRow: ProductSessionRow };
89
+ return <SupercodeMessenger state={state} adapter={adapter} components={components} />;
90
+ ```
91
+
92
+ The `react`, `react/logo`, `react/icon`, `react/conversation`, `react/sessions`,
93
+ `react/composer`, `react/settings`, and `react/messenger` exports are generated from the exact same
94
+ JSX sources as their `preact/*` counterparts. Consumers install only the renderer they use; both
95
+ are optional peers, and a React host never loads Preact through the React entry points.
96
+
97
+ ### Compact host launcher
98
+
99
+ Overlay extensions and host applications can use the canonical activity projection without
100
+ recreating Supercode's attention rules:
101
+
102
+ ```tsx
103
+ import { AgentActivityLauncher } from '@volter-ai-dev/supercode-ui/react/activity';
104
+
105
+ <AgentActivityLauncher state={snapshot} showSummary onOpen={() => openMessenger()} />
106
+ ```
107
+
108
+ `projectAgentActivity()` is also available from the renderer-free `core` entry. It selects the
109
+ highest-priority session (`needs-input` → failure → working → unread), reports one aggregate unread
110
+ count, and exposes the selected opaque session key. The default launcher is themeable and allows
111
+ its badge to overflow without being clipped.
112
+
113
+ ### Host navigation and context
114
+
115
+ Hosts do not need to fork the messenger to connect their own object model:
116
+
117
+ ```tsx
118
+ <SupercodeMessenger
119
+ state={state}
120
+ adapter={{
121
+ onIntent,
122
+ confirmIntent: (intent) => showTakeoverConfirmation(intent),
123
+ }}
124
+ navigation={{
125
+ id: selectedObject.revision,
126
+ view: 'new',
127
+ harness: 'claude-code',
128
+ draft: 'Inspect this selection',
129
+ context: [selectedObject.asTranscriptContext()],
130
+ }}
131
+ contextCandidates={visibleObjects.map(asTranscriptContext)}
132
+ components={{ ContextCandidate: ObjectPreview }}
133
+ slots={{ beforeSessions: ProjectThreads }}
134
+ />
135
+ ```
136
+
137
+ `navigation` is an event, not duplicated router state: change its `id` to open a conversation or
138
+ prefill a new one, while `onViewChange` observes user navigation. Context candidates use the exact
139
+ bounded `TranscriptAttachment` envelope sent to the harness; a custom candidate component changes
140
+ presentation without inventing a second context protocol. `beforeSessions` and `afterSessions`
141
+ place host-owned rows inside the same searchable scroller. `confirmIntent` runs before resume,
142
+ join, branch, reduction, or export so a host can explain ownership and destination before action.
143
+
144
+ Harness inventory also retains normalized auth, runtime, protocol, repair, and action-capability
145
+ evidence. The new-chat view renders unavailable harnesses in a compact `HarnessReadiness` section;
146
+ hosts can replace that component while continuing to consume the same readiness contract.
147
+
148
+ When a controlled runtime truthfully advertises native steering, the composer sends a plain-text
149
+ message into the active turn and keeps a separate secondary action for queueing a follow-up. With
150
+ attachments—or with a harness that cannot steer—the same input remains queued for the next turn.
151
+ The distinction is capability-gated from the harness adapter through `availableActions.steer`; the
152
+ UI never infers steering support from a generic `send` method.
153
+
78
154
  ## Bind directly to the headless controller
79
155
 
80
156
  Trusted desktop, editor, and Node hosts can avoid rewriting ordinary snapshot and action glue:
package/activity.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type { AgentActivityLauncherProps, AgentActivityModel } from './index.js';
2
+ export { AgentActivityLauncher } from './index.js';