@tutti-os/agent-gui 0.0.72 → 0.0.73

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
@@ -102,3 +102,8 @@ or sent as session creation authority.
102
102
  Hosts that need to brand the aggregate provider rail entry may pass
103
103
  `providerRailAllPresentation.iconUrl`. This only changes the `All` filter icon;
104
104
  single agent or target icons continue to come from `providerTargets[].iconUrl`.
105
+
106
+ Hosts that need custom main-pane presentation for a disabled selected target may
107
+ pass `renderProviderUnavailableState`. AgentGUI calls this renderer only when
108
+ the selected `providerTargets[]` entry has `disabled: true`; install, login,
109
+ checking, and retry readiness gates keep the built-in AgentGUI flows.
package/dist/index.d.ts CHANGED
@@ -888,6 +888,19 @@ type AgentGUISidebarFooterRenderer = (ctx: AgentGUISidebarFooterContext) => Reac
888
888
  * instead of the library falling back to the static local catalog.
889
889
  */
890
890
  type AgentGUIProviderRailEmptyRenderer = () => ReactNode;
891
+ interface AgentGUIProviderUnavailableStateContext {
892
+ provider: AgentGUIProvider;
893
+ providerLabel: string;
894
+ target: AgentGUIProviderTarget;
895
+ iconUrl: string;
896
+ unavailableReason: string | null;
897
+ }
898
+ /**
899
+ * Renders the main-pane unavailable state for a selected provider target that
900
+ * the host explicitly marks as disabled. This does not replace install,
901
+ * login, checking, or retry readiness gates.
902
+ */
903
+ type AgentGUIProviderUnavailableStateRenderer = (ctx: AgentGUIProviderUnavailableStateContext) => ReactNode;
891
904
 
892
905
  interface AgentGUINodeProps {
893
906
  nodeId: string;
@@ -933,6 +946,11 @@ interface AgentGUINodeProps {
933
946
  providerRailMode?: AgentGUIProviderRailMode;
934
947
  /** Host-owned empty state for the provider rail in "exact" mode. */
935
948
  renderProviderRailEmpty?: AgentGUIProviderRailEmptyRenderer;
949
+ /**
950
+ * Host-owned main-pane state for a selected provider target that is explicitly
951
+ * disabled. This does not replace install, login, checking, or retry gates.
952
+ */
953
+ renderProviderUnavailableState?: AgentGUIProviderUnavailableStateRenderer;
936
954
  renderSidebarFooter?: (ctx: AgentGUISidebarFooterContext) => ReactNode;
937
955
  comingSoonProviders?: readonly AgentGUIProvider[];
938
956
  providerReadinessGates?: Partial<Record<AgentGUIProvider, AgentGUIProviderReadinessGate | null>> | null;
@@ -1063,4 +1081,4 @@ interface AgentActivityHostProviderProps extends PropsWithChildren {
1063
1081
  }
1064
1082
  declare function AgentActivityHostProvider({ agentActivityRuntime, agentHostApi, children }: AgentActivityHostProviderProps): JSX.Element;
1065
1083
 
1066
- export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, type AgentCustomMentionChipContext, type AgentCustomMentionIdentity, type AgentCustomMentionKindDefinition, type AgentCustomMentionPresentation, AgentGUI, type AgentGUIAccountMenuState, type AgentGUIProps, AgentGUIProvider, AgentGUIProviderRailAllPresentation, type AgentGUIProviderRailEmptyRenderer, AgentGUIProviderRailMode, AgentGUIProviderReadinessGate, AgentGUIProviderTarget, AgentGUIProviderTargetBadge, type AgentGUISidebarFooterContext, type AgentGUISidebarFooterRenderer, AgentGuiI18nLocale, AgentHostInputApi, AgentProbeSnapshot, AgentQueuedPromptQueueSnapshot, AgentQueuedPromptRuntime, AgentQueuedPromptRuntimeProvider, type AgentQueuedPromptRuntimeProviderProps, agentGUIDefaultTargetProviders, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, createLocalAgentGUIProviderTarget, createLocalAgentGUIProviderTargets, createSharedAgentGUIProviderTarget, getAgentActivityRuntime, getAgentCustomMentionKind, getOptionalAgentActivityRuntime, localAgentGUIAgentTargetId, localAgentGUIProviderTargetId, normalizeAgentGUIProviderTargets, projectCoreSessionStatus, registerAgentCustomMentionKind, resetAgentActivityRuntimeForTests, resetAgentCustomMentionKindsForTests, resetAgentQueuedPromptRuntimeForTests, resolveAgentGUIExpandedWindowFrame, resolveAgentGUIProviderTarget, setAgentActivityRuntimeForTests, setAgentQueuedPromptRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useAgentQueuedPromptRuntime, useAgentQueuedPromptSessionSnapshot, useOptionalAgentActivityRuntime };
1084
+ export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, type AgentCustomMentionChipContext, type AgentCustomMentionIdentity, type AgentCustomMentionKindDefinition, type AgentCustomMentionPresentation, AgentGUI, type AgentGUIAccountMenuState, type AgentGUIProps, AgentGUIProvider, AgentGUIProviderRailAllPresentation, type AgentGUIProviderRailEmptyRenderer, AgentGUIProviderRailMode, AgentGUIProviderReadinessGate, AgentGUIProviderTarget, AgentGUIProviderTargetBadge, type AgentGUIProviderUnavailableStateContext, type AgentGUIProviderUnavailableStateRenderer, type AgentGUISidebarFooterContext, type AgentGUISidebarFooterRenderer, AgentGuiI18nLocale, AgentHostInputApi, AgentProbeSnapshot, AgentQueuedPromptQueueSnapshot, AgentQueuedPromptRuntime, AgentQueuedPromptRuntimeProvider, type AgentQueuedPromptRuntimeProviderProps, agentGUIDefaultTargetProviders, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, createLocalAgentGUIProviderTarget, createLocalAgentGUIProviderTargets, createSharedAgentGUIProviderTarget, getAgentActivityRuntime, getAgentCustomMentionKind, getOptionalAgentActivityRuntime, localAgentGUIAgentTargetId, localAgentGUIProviderTargetId, normalizeAgentGUIProviderTargets, projectCoreSessionStatus, registerAgentCustomMentionKind, resetAgentActivityRuntimeForTests, resetAgentCustomMentionKindsForTests, resetAgentQueuedPromptRuntimeForTests, resolveAgentGUIExpandedWindowFrame, resolveAgentGUIProviderTarget, setAgentActivityRuntimeForTests, setAgentQueuedPromptRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useAgentQueuedPromptRuntime, useAgentQueuedPromptSessionSnapshot, useOptionalAgentActivityRuntime };
package/dist/index.js CHANGED
@@ -26,7 +26,9 @@ import {
26
26
  } from "./chunk-2I2WRI4F.js";
27
27
  import "./chunk-UAAXRSW2.js";
28
28
  import "./chunk-ATEZXUHK.js";
29
- import "./chunk-BHNJN2TR.js";
29
+ import {
30
+ resolveAgentGuiWorkbenchProviderLabel
31
+ } from "./chunk-BHNJN2TR.js";
30
32
  import {
31
33
  AgentInteractivePromptSurface,
32
34
  approvalOptionDisplayLabel
@@ -25660,6 +25662,7 @@ function AgentGUINodeView({
25660
25662
  viewModel,
25661
25663
  renderSidebarFooter,
25662
25664
  renderProviderRailEmpty,
25665
+ renderProviderUnavailableState,
25663
25666
  providerRailAllPresentation,
25664
25667
  onLinkAction,
25665
25668
  onHandoffConversation,
@@ -26341,6 +26344,7 @@ function AgentGUINodeView({
26341
26344
  contextMentionProviders,
26342
26345
  workspaceAppIcons: effectiveWorkspaceAppIcons,
26343
26346
  workspaceUserProjectI18n,
26347
+ renderProviderUnavailableState,
26344
26348
  previewMode
26345
26349
  }
26346
26350
  ) })
@@ -26591,7 +26595,8 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
26591
26595
  onRequestGitBranches,
26592
26596
  onRequestComposerFocus,
26593
26597
  contextMentionProviders,
26594
- workspaceAppIcons = EMPTY_WORKSPACE_APP_ICONS3
26598
+ workspaceAppIcons = EMPTY_WORKSPACE_APP_ICONS3,
26599
+ renderProviderUnavailableState
26595
26600
  }) {
26596
26601
  "use memo";
26597
26602
  const timelineRef = useRef12(null);
@@ -27353,6 +27358,8 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
27353
27358
  () => viewModel.conversationFilter.kind === "all" ? agentGUILaunchpadIconPresentations() : [agentGUIProviderIconPresentation(emptyHeroProvider)],
27354
27359
  [emptyHeroProvider, viewModel.conversationFilter]
27355
27360
  );
27361
+ const disabledProviderTarget = selectedProviderTargetComingSoon ? viewModel.selectedProviderTarget ?? null : null;
27362
+ const shouldRenderProviderUnavailableState = !hasActiveConversation && disabledProviderTarget !== null && renderProviderUnavailableState !== void 0;
27356
27363
  const bottomDockStoreState = useMemo9(
27357
27364
  () => ({
27358
27365
  // The lifted prompt is rendered from props on the pane; the store still
@@ -27709,7 +27716,19 @@ var AgentGUIDetailPane = memo2(function AgentGUIDetailPane2({
27709
27716
  viewportTestId: "agent-gui-timeline",
27710
27717
  viewportClassName: `${AgentGUINode_styles_default.timeline} ${hasActiveConversation ? AgentGUINode_styles_default.timelineWithComposer : AgentGUINode_styles_default.timelineCentered} ${!isTimelineScrolledToTop ? AgentGUINode_styles_default.timelineScrolledFromTop : ""} ${showUnavailableChatEmpty ? AgentGUINode_styles_default.timelineUnavailableChatEmpty : ""}`.trim(),
27711
27718
  viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
27712
- children: !hasActiveConversation ? emptyProviderReadinessGate ? /* @__PURE__ */ jsx34(
27719
+ children: !hasActiveConversation ? shouldRenderProviderUnavailableState && disabledProviderTarget ? /* @__PURE__ */ jsx34(Fragment9, { children: renderProviderUnavailableState?.({
27720
+ provider: disabledProviderTarget.provider,
27721
+ providerLabel: labels.emptyProviderForProvider?.(
27722
+ disabledProviderTarget.provider
27723
+ ) ?? resolveAgentGuiWorkbenchProviderLabel(
27724
+ disabledProviderTarget.provider
27725
+ ),
27726
+ target: disabledProviderTarget,
27727
+ iconUrl: resolveAgentGUIHeroIconUrl(
27728
+ disabledProviderTarget.provider
27729
+ ),
27730
+ unavailableReason: disabledProviderTarget.unavailableReason ?? null
27731
+ }) }) : emptyProviderReadinessGate ? /* @__PURE__ */ jsx34(
27713
27732
  AgentGUIProviderReadinessGatePane,
27714
27733
  {
27715
27734
  provider: emptyHeroProvider,
@@ -31846,7 +31865,7 @@ function composerOverridesByAgentTargetIdEqual(left, right) {
31846
31865
  return true;
31847
31866
  }
31848
31867
  function areAgentGUINodePropsEqual(previous, next) {
31849
- return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.resolveDroppedFileReferences === next.resolveDroppedFileReferences && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveWorkspaceReferenceEntryIconUrl === next.resolveWorkspaceReferenceEntryIconUrl && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onHandoffConversation === next.onHandoffConversation && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.accountMenuState === next.accountMenuState && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.providerRailAllPresentation?.iconUrl === next.providerRailAllPresentation?.iconUrl && previous.renderSidebarFooter === next.renderSidebarFooter && previous.providerRailMode === next.providerRailMode && previous.renderProviderRailEmpty === next.renderProviderRailEmpty && previous.comingSoonProviders === next.comingSoonProviders && previous.providerReadinessGates === next.providerReadinessGates && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && previous.workspaceAgentProbes === next.workspaceAgentProbes && previous.onAgentProbeDemandChange === next.onAgentProbeDemandChange && previous.onAgentProbeRefreshRequest === next.onAgentProbeRefreshRequest && previous.providerAuthAccountLabels === next.providerAuthAccountLabels && previous.managedAgentsState === next.managedAgentsState && previous.contextMentionProviders === next.contextMentionProviders && previous.workspaceAppIcons === next.workspaceAppIcons && previous.embedded === next.embedded && previous.previewMode === next.previewMode && previous.isActive === next.isActive && previous.composerFocusRequestSequence === next.composerFocusRequestSequence && previous.newConversationRequestSequence === next.newConversationRequestSequence && previous.openSessionRequest === next.openSessionRequest && previous.prefillPromptRequest === next.prefillPromptRequest;
31868
+ return previous.nodeId === next.nodeId && previous.workspaceId === next.workspaceId && previous.currentUserId === next.currentUserId && previous.workspacePath === next.workspacePath && previous.workspaceFileReferenceAdapter === next.workspaceFileReferenceAdapter && previous.resolveDroppedFileReferences === next.resolveDroppedFileReferences && previous.selectProjectDirectory === next.selectProjectDirectory && previous.referenceSourceAggregator === next.referenceSourceAggregator && previous.resolveWorkspaceReferenceEntryIconUrl === next.resolveWorkspaceReferenceEntryIconUrl && previous.resolveMentionReferenceTarget === next.resolveMentionReferenceTarget && previous.resolveWorkspaceReferenceInitialTarget === next.resolveWorkspaceReferenceInitialTarget && previous.onWorkspaceFileReferencesAdded === next.onWorkspaceFileReferencesAdded && previous.agentSettings.avoidGroupingEdits === next.agentSettings.avoidGroupingEdits && previous.title === next.title && agentGuiStateEquals(previous.state, next.state) && previous.position.x === next.position.x && previous.position.y === next.position.y && previous.width === next.width && previous.height === next.height && previous.desktopSize.width === next.desktopSize.width && previous.desktopSize.height === next.desktopSize.height && previous.onLinkAction === next.onLinkAction && previous.onHandoffConversation === next.onHandoffConversation && previous.onCapabilitySettingsRequest === next.onCapabilitySettingsRequest && previous.onAgentProviderLogin === next.onAgentProviderLogin && previous.accountMenuState === next.accountMenuState && previous.providerTargets === next.providerTargets && previous.providerTargetsLoading === next.providerTargetsLoading && previous.providerRailAllPresentation?.iconUrl === next.providerRailAllPresentation?.iconUrl && previous.renderSidebarFooter === next.renderSidebarFooter && previous.providerRailMode === next.providerRailMode && previous.renderProviderRailEmpty === next.renderProviderRailEmpty && previous.renderProviderUnavailableState === next.renderProviderUnavailableState && previous.comingSoonProviders === next.comingSoonProviders && previous.providerReadinessGates === next.providerReadinessGates && previous.defaultProviderTargetId === next.defaultProviderTargetId && previous.onClose === next.onClose && previous.onResize === next.onResize && previous.onUpdateNode === next.onUpdateNode && previous.onRememberComposerDefaults === next.onRememberComposerDefaults && previous.onOpenConversationWindow === next.onOpenConversationWindow && previous.isMaximized === next.isMaximized && previous.isMuted === next.isMuted && previous.onMinimize === next.onMinimize && previous.onToggleMaximize === next.onToggleMaximize && previous.onShowMessage === next.onShowMessage && previous.workspaceAgentProbes === next.workspaceAgentProbes && previous.onAgentProbeDemandChange === next.onAgentProbeDemandChange && previous.onAgentProbeRefreshRequest === next.onAgentProbeRefreshRequest && previous.providerAuthAccountLabels === next.providerAuthAccountLabels && previous.managedAgentsState === next.managedAgentsState && previous.contextMentionProviders === next.contextMentionProviders && previous.workspaceAppIcons === next.workspaceAppIcons && previous.embedded === next.embedded && previous.previewMode === next.previewMode && previous.isActive === next.isActive && previous.composerFocusRequestSequence === next.composerFocusRequestSequence && previous.newConversationRequestSequence === next.newConversationRequestSequence && previous.openSessionRequest === next.openSessionRequest && previous.prefillPromptRequest === next.prefillPromptRequest;
31850
31869
  }
31851
31870
  var AgentGUINode = memo3(function AgentGUINode2({
31852
31871
  nodeId,
@@ -31879,6 +31898,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
31879
31898
  providerRailAllPresentation = null,
31880
31899
  providerRailMode = "catalog",
31881
31900
  renderProviderRailEmpty,
31901
+ renderProviderUnavailableState,
31882
31902
  renderSidebarFooter,
31883
31903
  comingSoonProviders,
31884
31904
  providerReadinessGates = null,
@@ -32930,6 +32950,7 @@ var AgentGUINode = memo3(function AgentGUINode2({
32930
32950
  viewModel,
32931
32951
  renderSidebarFooter,
32932
32952
  renderProviderRailEmpty,
32953
+ renderProviderUnavailableState,
32933
32954
  providerRailAllPresentation,
32934
32955
  actions: viewActions,
32935
32956
  isActive,