@volter-ai-dev/supercode-ui 0.1.29 → 0.1.30
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 +10 -2
- package/components.mjs +326 -130
- package/composer.mjs +3 -0
- package/controller.mjs +10 -11
- package/conversation.mjs +4 -1
- package/core.d.ts +1 -0
- package/core.mjs +94 -2
- package/embed.mjs +326 -132
- package/index.d.ts +80 -1
- package/messenger.mjs +324 -130
- package/package.json +8 -2
- package/sessions.mjs +30 -6
- package/settings.d.ts +2 -0
- package/settings.mjs +216 -0
- package/styles.css +12 -3
package/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface SessionRowModel {
|
|
|
24
24
|
/** Latest human-visible conversation message, separate from the stable title. */
|
|
25
25
|
preview?: string;
|
|
26
26
|
age: string;
|
|
27
|
+
/** Timestamp of the message rendered as `preview`; distinct from session-store recency. */
|
|
28
|
+
previewUpdatedAt?: number | null;
|
|
27
29
|
updatedAt: number | null;
|
|
28
30
|
messages: number | null;
|
|
29
31
|
active: boolean;
|
|
@@ -158,6 +160,58 @@ export interface ReductionReceiptModel {
|
|
|
158
160
|
targetHarness: HarnessId;
|
|
159
161
|
}
|
|
160
162
|
|
|
163
|
+
export interface HarnessSettingChoiceModel {
|
|
164
|
+
value: string;
|
|
165
|
+
label: string;
|
|
166
|
+
description: string;
|
|
167
|
+
risk?: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface HarnessInteropControlModel {
|
|
171
|
+
key: string;
|
|
172
|
+
nativeKey: string;
|
|
173
|
+
label: string;
|
|
174
|
+
description: string;
|
|
175
|
+
scope: 'user' | 'project' | 'managed' | 'command_line';
|
|
176
|
+
sourcePath: string;
|
|
177
|
+
configuredValue: string | null;
|
|
178
|
+
effectiveValue: string | null;
|
|
179
|
+
effectiveKnown: boolean;
|
|
180
|
+
effectiveNote: string;
|
|
181
|
+
choices: HarnessSettingChoiceModel[];
|
|
182
|
+
writable: boolean;
|
|
183
|
+
resettable: boolean;
|
|
184
|
+
requiresRestart: boolean;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface HarnessSettingChangeModel {
|
|
188
|
+
key: string;
|
|
189
|
+
value: string | null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface HarnessInteropAdvisoryModel {
|
|
193
|
+
code: string;
|
|
194
|
+
severity: 'info' | 'warning' | 'error';
|
|
195
|
+
title: string;
|
|
196
|
+
message: string;
|
|
197
|
+
setting: string;
|
|
198
|
+
recommendation: {
|
|
199
|
+
label: string;
|
|
200
|
+
description: string;
|
|
201
|
+
consequence: string;
|
|
202
|
+
change: HarnessSettingChangeModel;
|
|
203
|
+
command: string;
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface HarnessInteropSettingsModel {
|
|
208
|
+
schema: 'supercode.harness-interop-settings.v1';
|
|
209
|
+
harness: HarnessId;
|
|
210
|
+
revision: string;
|
|
211
|
+
controls: HarnessInteropControlModel[];
|
|
212
|
+
advisories: HarnessInteropAdvisoryModel[];
|
|
213
|
+
}
|
|
214
|
+
|
|
161
215
|
export interface SessionAttention {
|
|
162
216
|
key: string;
|
|
163
217
|
kind: 'unseen' | 'finished' | 'failed';
|
|
@@ -188,6 +242,7 @@ export interface SupercodeUiState {
|
|
|
188
242
|
canReduce: boolean;
|
|
189
243
|
canInterrupt: boolean;
|
|
190
244
|
canRespond: boolean;
|
|
245
|
+
canConfigureSettings: boolean;
|
|
191
246
|
messaging: 'live_peer' | null;
|
|
192
247
|
workspace: string;
|
|
193
248
|
taskPlan: TaskPlanModel;
|
|
@@ -202,6 +257,8 @@ export interface SupercodeUiState {
|
|
|
202
257
|
residueCount: number;
|
|
203
258
|
} | null;
|
|
204
259
|
reductionReceipt: ReductionReceiptModel | null;
|
|
260
|
+
interopSettings: HarnessInteropSettingsModel | null;
|
|
261
|
+
interopSettingsError: string | null;
|
|
205
262
|
error: string | null;
|
|
206
263
|
recoverable: boolean;
|
|
207
264
|
harnesses: HarnessOption[];
|
|
@@ -237,6 +294,7 @@ export type SupercodeUiIntent =
|
|
|
237
294
|
| { action: 'export'; targetHarness: HarnessId }
|
|
238
295
|
| { action: 'interrupt' }
|
|
239
296
|
| { action: 'respond'; requestId: unknown; optionId: string | null }
|
|
297
|
+
| { action: 'configureHarness'; harness: HarnessId; changes: HarnessSettingChangeModel[]; expectedRevision: string }
|
|
240
298
|
| { action: 'refresh' }
|
|
241
299
|
| { action: 'release' };
|
|
242
300
|
|
|
@@ -282,6 +340,7 @@ export interface SessionRowProps {
|
|
|
282
340
|
value?: SessionRowModel;
|
|
283
341
|
state: SupercodeUiState;
|
|
284
342
|
adapter: UiAdapter;
|
|
343
|
+
now?: number;
|
|
285
344
|
onOpen(row: SessionRowModel): void;
|
|
286
345
|
}
|
|
287
346
|
|
|
@@ -313,12 +372,29 @@ export interface TaskPlanProps {
|
|
|
313
372
|
adapter: UiAdapter;
|
|
314
373
|
}
|
|
315
374
|
|
|
375
|
+
export interface HarnessAdvisoryProps {
|
|
376
|
+
state: SupercodeUiState;
|
|
377
|
+
adapter?: UiAdapter;
|
|
378
|
+
value?: HarnessInteropAdvisoryModel | null;
|
|
379
|
+
onReview(change: HarnessSettingChangeModel): void;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface HarnessSettingsPanelProps {
|
|
383
|
+
state: SupercodeUiState;
|
|
384
|
+
adapter: UiAdapter;
|
|
385
|
+
value?: HarnessInteropSettingsModel | null;
|
|
386
|
+
recommendedChange?: HarnessSettingChangeModel | null;
|
|
387
|
+
onClose(): void;
|
|
388
|
+
}
|
|
389
|
+
|
|
316
390
|
export interface MessengerComponents {
|
|
317
391
|
SessionRow?: ComponentType<SessionRowProps>;
|
|
318
392
|
TranscriptEntry?: ComponentType<TranscriptEntryProps>;
|
|
319
393
|
ActivityGroup?: ComponentType<ActivityGroupProps>;
|
|
320
394
|
TaskPlan?: ComponentType<TaskPlanProps>;
|
|
321
395
|
HarnessLogo?: ComponentType<{ id: HarnessId; activity?: SessionActivity; size?: number }>;
|
|
396
|
+
HarnessAdvisory?: ComponentType<HarnessAdvisoryProps>;
|
|
397
|
+
HarnessSettingsPanel?: ComponentType<HarnessSettingsPanelProps>;
|
|
322
398
|
}
|
|
323
399
|
|
|
324
400
|
export interface MessengerSlots {
|
|
@@ -345,6 +421,7 @@ export const DEFAULT_LABELS: Readonly<MessengerLabels>;
|
|
|
345
421
|
export function normalizeUiState(value: unknown): SupercodeUiState;
|
|
346
422
|
export function harnessDisplayName(id: string): string;
|
|
347
423
|
export function sessionDisplayName(session: Pick<SessionRowModel, 'name' | 'title'>): string;
|
|
424
|
+
export function relativeAge(updatedAt: number | null | undefined, now?: number): string;
|
|
348
425
|
export function sessionActivity(state: SupercodeUiState, row: SessionRowModel): SessionActivity;
|
|
349
426
|
export function filterSessions(rows: readonly SessionRowModel[], query: string): SessionRowModel[];
|
|
350
427
|
export function groupConversation(entries: readonly TranscriptEntryModel[]): Array<
|
|
@@ -374,9 +451,11 @@ export function TranscriptEntry(props: { entry: TranscriptEntryModel; state: Sup
|
|
|
374
451
|
export function ActivityGroup(props: { entries: TranscriptEntryModel[]; state: SupercodeUiState; adapter: UiAdapter }): VNode;
|
|
375
452
|
export function ToolRow(props: ToolRowProps): VNode;
|
|
376
453
|
export function TaskPlan(props: { plan: TaskPlanModel }): VNode | null;
|
|
454
|
+
export function HarnessAdvisory(props: HarnessAdvisoryProps): VNode | null;
|
|
455
|
+
export function HarnessSettingsPanel(props: HarnessSettingsPanelProps): VNode;
|
|
377
456
|
export function SessionDetails(props: { semantics: SessionSemanticsModel }): VNode | null;
|
|
378
457
|
export function Conversation(props: { state: SupercodeUiState; adapter: UiAdapter; components?: MessengerComponents; slots?: MessengerSlots; memoryKey?: string; pending?: string | PendingMessageModel | null; unreadAfterMessages?: number | null }): VNode;
|
|
379
|
-
export function SessionRow(props: { row: SessionRowModel; state: SupercodeUiState; adapter: UiAdapter; onOpen(row: SessionRowModel): void }): VNode;
|
|
458
|
+
export function SessionRow(props: { row: SessionRowModel; state: SupercodeUiState; adapter: UiAdapter; now?: number; onOpen(row: SessionRowModel): void }): VNode;
|
|
380
459
|
export function SessionList(props: { state: SupercodeUiState; adapter: UiAdapter; onOpen(row: SessionRowModel): void; onNew?(): void; onClose?(): void; components?: MessengerComponents; labels?: MessengerLabels; focusKey?: string | null; memoryKey?: string }): VNode;
|
|
381
460
|
export function ContinuationBar(props: { state: SupercodeUiState; adapter: UiAdapter; labels?: MessengerLabels }): VNode | null;
|
|
382
461
|
export function Composer(props: { state: SupercodeUiState; adapter: UiAdapter; labels?: MessengerLabels; memoryKey?: string; pendingStatus?: PendingMessageModel['status'] | 'editing' | null; restoreDraft?: { id: string | number; text: string; context?: TranscriptContext[]; images?: TranscriptImage[] } | null; onPending?(text: string, context?: TranscriptContext[], images?: TranscriptImage[]): void; onDraftRestored?(id: string | number): void }): VNode;
|