@volter-ai-dev/supercode-ui 0.1.60 → 0.1.62
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 +5 -1
- package/components.mjs +2 -2
- package/controller.d.ts +4 -0
- package/controller.mjs +6 -0
- package/core.mjs +5 -0
- package/embed.mjs +2 -2
- package/index.d.ts +2 -1
- package/messenger.mjs +2 -2
- package/package.json +1 -1
- package/react/components.mjs +2 -2
- package/react/messenger.mjs +2 -2
- package/react/settings.mjs +2 -2
- package/settings.mjs +2 -2
package/README.md
CHANGED
|
@@ -159,7 +159,11 @@ join, branch, reduction, or export so a host can explain ownership and destinati
|
|
|
159
159
|
|
|
160
160
|
Harness inventory also retains normalized auth, runtime, protocol, repair, and action-capability
|
|
161
161
|
evidence. The new-chat view renders unavailable harnesses in a compact `HarnessReadiness` section;
|
|
162
|
-
hosts can replace that component while continuing to consume the same readiness contract.
|
|
162
|
+
hosts can replace that component while continuing to consume the same readiness contract. For an
|
|
163
|
+
installed Claude Code or Codex that needs authentication, the default component emits the single
|
|
164
|
+
`authenticateHarness` intent. A trusted host handles it through `onAuthenticateHarness`, launches
|
|
165
|
+
the plan returned by the harness SDK in a visible terminal, and refreshes inventory after native
|
|
166
|
+
verification. The browser-only UI never spawns a local process or handles credentials itself.
|
|
163
167
|
|
|
164
168
|
When a controlled runtime truthfully advertises native steering, the composer sends a plain-text
|
|
165
169
|
message into the active turn and keeps a separate secondary action for queueing a follow-up. With
|
package/components.mjs
CHANGED
|
@@ -2662,7 +2662,7 @@ function HarnessReadiness({ harnesses, adapter }) {
|
|
|
2662
2662
|
item.runtime
|
|
2663
2663
|
] }) : null
|
|
2664
2664
|
] }),
|
|
2665
|
-
item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2665
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2666
2666
|
] }, item.id)) })
|
|
2667
2667
|
] });
|
|
2668
2668
|
}
|
|
@@ -2733,7 +2733,7 @@ function HarnessPicker({ harnesses, value, disabled = false, adapter, onChange,
|
|
|
2733
2733
|
/* @__PURE__ */ jsx10("strong", { children: item.label }),
|
|
2734
2734
|
/* @__PURE__ */ jsx10("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") })
|
|
2735
2735
|
] }),
|
|
2736
|
-
item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2736
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter?.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2737
2737
|
] }, item.id)) })
|
|
2738
2738
|
] }) : null
|
|
2739
2739
|
] }) : null
|
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;
|
|
@@ -126,6 +128,8 @@ export interface ControllerBindingOptions {
|
|
|
126
128
|
onCloseSubagents?: () => void | Promise<void>;
|
|
127
129
|
onStartTerminal?: (intent: Extract<SupercodeUiIntent, { action: 'new' }>) => void | Promise<void>;
|
|
128
130
|
onResumeTerminal?: (intent: Extract<SupercodeUiIntent, { action: 'resume' }>) => void | Promise<void>;
|
|
131
|
+
/** Launch the native harness-owned sign-in flow. The host owns the process and terminal. */
|
|
132
|
+
onAuthenticateHarness?: (intent: Extract<SupercodeUiIntent, { action: 'authenticateHarness' }>) => void | Promise<void>;
|
|
129
133
|
copyText?: UiAdapter['copyText'];
|
|
130
134
|
resolveImage?: UiAdapter['resolveImage'];
|
|
131
135
|
confirmIntent?: UiAdapter['confirmIntent'];
|
package/controller.mjs
CHANGED
|
@@ -609,6 +609,7 @@ function projectClientSnapshotInternal(snapshot, options, imageRegistry) {
|
|
|
609
609
|
savedDraft: options.savedDraft ?? '',
|
|
610
610
|
attention: options.attention ?? [],
|
|
611
611
|
sessions,
|
|
612
|
+
subagentInspector: options.subagentInspector ?? null,
|
|
612
613
|
attached: active,
|
|
613
614
|
owned,
|
|
614
615
|
attachError: options.attachError ?? null,
|
|
@@ -668,6 +669,11 @@ export async function dispatchControllerIntent(controller, intent, options = {})
|
|
|
668
669
|
if (intent.action === 'terminal') return controller.dispatch({ type: 'openTerminal' });
|
|
669
670
|
if (intent.action === 'interrupt') return controller.dispatch({ type: 'interrupt' });
|
|
670
671
|
if (intent.action === 'respond') return controller.dispatch({ type: 'respond', requestId: intent.requestId, optionId: intent.optionId });
|
|
672
|
+
if (intent.action === 'authenticateHarness') {
|
|
673
|
+
return options.onAuthenticateHarness
|
|
674
|
+
? options.onAuthenticateHarness(intent)
|
|
675
|
+
: options.onUnsupported?.(intent);
|
|
676
|
+
}
|
|
671
677
|
if (intent.action === 'configureHarness') return controller.dispatch({
|
|
672
678
|
type: 'configureHarness',
|
|
673
679
|
harness: intent.harness,
|
package/core.mjs
CHANGED
|
@@ -1165,6 +1165,11 @@ export function parseSupercodeUiIntent(value) {
|
|
|
1165
1165
|
? { action: 'respond', requestId: intent.requestId, optionId: intent.optionId }
|
|
1166
1166
|
: null;
|
|
1167
1167
|
}
|
|
1168
|
+
if (intent.action === 'authenticateHarness') {
|
|
1169
|
+
return exact('harness') && typeof intent.harness === 'string' && intent.harness.trim() && intent.harness.length <= 100
|
|
1170
|
+
? { action: 'authenticateHarness', harness: intent.harness.trim() }
|
|
1171
|
+
: null;
|
|
1172
|
+
}
|
|
1168
1173
|
if (intent.action === 'configureHarness') {
|
|
1169
1174
|
if (!exact('harness', 'changes', 'expectedRevision')) return null;
|
|
1170
1175
|
if (typeof intent.harness !== 'string' || !intent.harness || intent.harness.length > 100) return null;
|
package/embed.mjs
CHANGED
|
@@ -2579,7 +2579,7 @@ function HarnessReadiness({ harnesses, adapter }) {
|
|
|
2579
2579
|
item.runtime
|
|
2580
2580
|
] }) : null
|
|
2581
2581
|
] }),
|
|
2582
|
-
item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2582
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2583
2583
|
] }, item.id)) })
|
|
2584
2584
|
] });
|
|
2585
2585
|
}
|
|
@@ -2650,7 +2650,7 @@ function HarnessPicker({ harnesses, value, disabled = false, adapter, onChange,
|
|
|
2650
2650
|
/* @__PURE__ */ jsx9("strong", { children: item.label }),
|
|
2651
2651
|
/* @__PURE__ */ jsx9("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") })
|
|
2652
2652
|
] }),
|
|
2653
|
-
item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2653
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2654
2654
|
] }, item.id)) })
|
|
2655
2655
|
] }) : null
|
|
2656
2656
|
] }) : null
|
package/index.d.ts
CHANGED
|
@@ -355,6 +355,7 @@ export type SupercodeUiIntent =
|
|
|
355
355
|
| { action: 'export'; targetHarness: HarnessId }
|
|
356
356
|
| { action: 'interrupt' }
|
|
357
357
|
| { action: 'respond'; requestId: unknown; optionId: string | null }
|
|
358
|
+
| { action: 'authenticateHarness'; harness: HarnessId }
|
|
358
359
|
| { action: 'configureHarness'; harness: HarnessId; changes: HarnessSettingChangeModel[]; expectedRevision: string }
|
|
359
360
|
| { action: 'refresh' }
|
|
360
361
|
| { action: 'release' };
|
|
@@ -469,7 +470,7 @@ export interface HarnessPickerProps {
|
|
|
469
470
|
harnesses: HarnessOption[];
|
|
470
471
|
value: HarnessId;
|
|
471
472
|
disabled?: boolean;
|
|
472
|
-
adapter?: Pick<UiAdapter, 'copyText'>;
|
|
473
|
+
adapter?: Pick<UiAdapter, 'copyText' | 'onIntent'>;
|
|
473
474
|
onChange(harness: HarnessId): void;
|
|
474
475
|
logo?: ComponentType<{ id: HarnessId; activity?: SessionActivity; size?: number }>;
|
|
475
476
|
}
|
package/messenger.mjs
CHANGED
|
@@ -2576,7 +2576,7 @@ function HarnessReadiness({ harnesses, adapter }) {
|
|
|
2576
2576
|
item.runtime
|
|
2577
2577
|
] }) : null
|
|
2578
2578
|
] }),
|
|
2579
|
-
item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2579
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2580
2580
|
] }, item.id)) })
|
|
2581
2581
|
] });
|
|
2582
2582
|
}
|
|
@@ -2647,7 +2647,7 @@ function HarnessPicker({ harnesses, value, disabled = false, adapter, onChange,
|
|
|
2647
2647
|
/* @__PURE__ */ jsx9("strong", { children: item.label }),
|
|
2648
2648
|
/* @__PURE__ */ jsx9("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") })
|
|
2649
2649
|
] }),
|
|
2650
|
-
item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2650
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2651
2651
|
] }, item.id)) })
|
|
2652
2652
|
] }) : null
|
|
2653
2653
|
] }) : null
|
package/package.json
CHANGED
package/react/components.mjs
CHANGED
|
@@ -2662,7 +2662,7 @@ function HarnessReadiness({ harnesses, adapter }) {
|
|
|
2662
2662
|
item.runtime
|
|
2663
2663
|
] }) : null
|
|
2664
2664
|
] }),
|
|
2665
|
-
item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2665
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2666
2666
|
] }, item.id)) })
|
|
2667
2667
|
] });
|
|
2668
2668
|
}
|
|
@@ -2733,7 +2733,7 @@ function HarnessPicker({ harnesses, value, disabled = false, adapter, onChange,
|
|
|
2733
2733
|
/* @__PURE__ */ jsx10("strong", { children: item.label }),
|
|
2734
2734
|
/* @__PURE__ */ jsx10("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") })
|
|
2735
2735
|
] }),
|
|
2736
|
-
item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2736
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter?.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2737
2737
|
] }, item.id)) })
|
|
2738
2738
|
] }) : null
|
|
2739
2739
|
] }) : null
|
package/react/messenger.mjs
CHANGED
|
@@ -2576,7 +2576,7 @@ function HarnessReadiness({ harnesses, adapter }) {
|
|
|
2576
2576
|
item.runtime
|
|
2577
2577
|
] }) : null
|
|
2578
2578
|
] }),
|
|
2579
|
-
item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2579
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2580
2580
|
] }, item.id)) })
|
|
2581
2581
|
] });
|
|
2582
2582
|
}
|
|
@@ -2647,7 +2647,7 @@ function HarnessPicker({ harnesses, value, disabled = false, adapter, onChange,
|
|
|
2647
2647
|
/* @__PURE__ */ jsx9("strong", { children: item.label }),
|
|
2648
2648
|
/* @__PURE__ */ jsx9("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") })
|
|
2649
2649
|
] }),
|
|
2650
|
-
item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2650
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx9("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
2651
2651
|
] }, item.id)) })
|
|
2652
2652
|
] }) : null
|
|
2653
2653
|
] }) : null
|
package/react/settings.mjs
CHANGED
|
@@ -318,7 +318,7 @@ function HarnessReadiness({ harnesses, adapter }) {
|
|
|
318
318
|
item.runtime
|
|
319
319
|
] }) : null
|
|
320
320
|
] }),
|
|
321
|
-
item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
321
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
322
322
|
] }, item.id)) })
|
|
323
323
|
] });
|
|
324
324
|
}
|
|
@@ -389,7 +389,7 @@ function HarnessPicker({ harnesses, value, disabled = false, adapter, onChange,
|
|
|
389
389
|
/* @__PURE__ */ jsx3("strong", { children: item.label }),
|
|
390
390
|
/* @__PURE__ */ jsx3("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") })
|
|
391
391
|
] }),
|
|
392
|
-
item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
392
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter?.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
393
393
|
] }, item.id)) })
|
|
394
394
|
] }) : null
|
|
395
395
|
] }) : null
|
package/settings.mjs
CHANGED
|
@@ -318,7 +318,7 @@ function HarnessReadiness({ harnesses, adapter }) {
|
|
|
318
318
|
item.runtime
|
|
319
319
|
] }) : null
|
|
320
320
|
] }),
|
|
321
|
-
item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
321
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
322
322
|
] }, item.id)) })
|
|
323
323
|
] });
|
|
324
324
|
}
|
|
@@ -389,7 +389,7 @@ function HarnessPicker({ harnesses, value, disabled = false, adapter, onChange,
|
|
|
389
389
|
/* @__PURE__ */ jsx3("strong", { children: item.label }),
|
|
390
390
|
/* @__PURE__ */ jsx3("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") })
|
|
391
391
|
] }),
|
|
392
|
-
item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
392
|
+
item.installed && ["claude-code", "codex"].includes(item.id) && !["ready", "configured"].includes(item.auth) ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter?.onIntent({ action: "authenticateHarness", harness: item.id }), children: "Sign in" }) : item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter?.copyText?.(item.repair), children: "Copy fix" }) : null
|
|
393
393
|
] }, item.id)) })
|
|
394
394
|
] }) : null
|
|
395
395
|
] }) : null
|