@tutti-os/agent-gui 0.0.177 → 0.0.178

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.
@@ -885,6 +885,7 @@ interface AgentComposerProps {
885
885
  permissionModeId?: string | null;
886
886
  }) => void;
887
887
  capabilityMenuState?: AgentComposerCapabilityMenuState;
888
+ capabilityControlsReadOnly?: boolean;
888
889
  onCapabilitySettingsRequest?: (capability: AgentComposerCapabilitySettingsTarget) => void;
889
890
  onSlashStatusOpen?: () => void;
890
891
  onSlashStatusClose?: () => void;
@@ -1162,6 +1163,11 @@ interface AgentGUINodeHostCapabilities {
1162
1163
  /** Legacy Tutti Agent-only opt-in. Prefer an explicit catalog in new hosts. */
1163
1164
  referenceProvenanceFilterEnabled?: boolean;
1164
1165
  capabilityMenuState?: AgentComposerCapabilityMenuState;
1166
+ /**
1167
+ * Keeps owner-supported Browser/Computer capability entries visible while
1168
+ * preventing this host from mutating device-owned capability settings.
1169
+ */
1170
+ capabilityControlsReadOnly?: boolean;
1165
1171
  accountMenuState?: AgentGUIAccountMenuState | null;
1166
1172
  agentTargets?: readonly AgentGUIAgentTarget[];
1167
1173
  agentTargetsLoading?: boolean;
package/dist/agent-gui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentGUI
3
- } from "./chunk-XQV7VV2N.js";
3
+ } from "./chunk-WPV23OY7.js";
4
4
  import "./chunk-A4WCTHWS.js";
5
5
  import "./chunk-GZXOFYCW.js";
6
6
  import "./chunk-6II57C72.js";
@@ -18125,6 +18125,7 @@ function useComposerPaletteCatalog({
18125
18125
  compactSupported,
18126
18126
  composerSettings,
18127
18127
  capabilityMenuState,
18128
+ capabilityControlsReadOnly,
18128
18129
  labels,
18129
18130
  uiLanguage,
18130
18131
  editorHandleRef
@@ -18172,6 +18173,9 @@ function useComposerPaletteCatalog({
18172
18173
  [availableSkills, skillQueryMatch]
18173
18174
  );
18174
18175
  const availableCapabilities = useMemo22(() => {
18176
+ if (capabilityControlsReadOnly) {
18177
+ return [];
18178
+ }
18175
18179
  const entries = [];
18176
18180
  if (composerSettings.supportsBrowser) {
18177
18181
  entries.push({
@@ -18191,6 +18195,7 @@ function useComposerPaletteCatalog({
18191
18195
  }
18192
18196
  return entries;
18193
18197
  }, [
18198
+ capabilityControlsReadOnly,
18194
18199
  composerSettings.supportsBrowser,
18195
18200
  composerSettings.supportsComputerUse,
18196
18201
  labels.browserUseCapabilityLabel,
@@ -18212,6 +18217,7 @@ function useComposerPaletteCatalog({
18212
18217
  description: capDescription,
18213
18218
  settingsAriaLabel: capSettingsLabel,
18214
18219
  settingsLabel: labels.capabilityInlineSettingsLabel,
18220
+ disabled: capabilityControlsReadOnly,
18215
18221
  selectAction: command.capability === "computerUse" && (computerUseInstalled === false || computerUseInstalled === true && (computerUseAuthorization === "needs-authorization" || computerUseAuthorization === "unknown")) ? "settings" : "capability",
18216
18222
  capability: command
18217
18223
  };
@@ -18248,6 +18254,7 @@ function useComposerPaletteCatalog({
18248
18254
  capabilityMenuState?.browserUse?.connectionMode,
18249
18255
  capabilityMenuState?.computerUse?.authorization,
18250
18256
  capabilityMenuState?.computerUse?.installed,
18257
+ capabilityControlsReadOnly,
18251
18258
  filteredCommands,
18252
18259
  filteredSkills,
18253
18260
  labels.browserUseCapabilityDescription,
@@ -18766,6 +18773,7 @@ function useComposerSlashActions(input) {
18766
18773
  promptImagesSupported,
18767
18774
  availableSkills = [],
18768
18775
  composerSettings,
18776
+ capabilityControlsReadOnly = false,
18769
18777
  onDraftContentChange,
18770
18778
  onSettingsChange,
18771
18779
  onSubmit,
@@ -18988,6 +18996,9 @@ function useComposerSlashActions(input) {
18988
18996
  );
18989
18997
  const selectCapability = useCallback35(
18990
18998
  (capability) => {
18999
+ if (capabilityControlsReadOnly) {
19000
+ return;
19001
+ }
18991
19002
  const selectionEffect = resolveSlashCommandSelectionEffect({
18992
19003
  provider,
18993
19004
  policy: slashCommandPolicy,
@@ -18998,14 +19009,22 @@ function useComposerSlashActions(input) {
18998
19009
  executeSlashCommandEffect(selectionEffect);
18999
19010
  }
19000
19011
  },
19001
- [executeSlashCommandEffect, provider, slashCommandPolicy]
19012
+ [
19013
+ capabilityControlsReadOnly,
19014
+ executeSlashCommandEffect,
19015
+ provider,
19016
+ slashCommandPolicy
19017
+ ]
19002
19018
  );
19003
19019
  const selectCapabilitySettings = useCallback35(
19004
19020
  (capability) => {
19021
+ if (capabilityControlsReadOnly) {
19022
+ return;
19023
+ }
19005
19024
  onCapabilitySettingsRequest?.(capability.capability);
19006
19025
  setIsPaletteOpen(false);
19007
19026
  },
19008
- [onCapabilitySettingsRequest]
19027
+ [capabilityControlsReadOnly, onCapabilitySettingsRequest]
19009
19028
  );
19010
19029
  const selectSkill = useCallback35(
19011
19030
  (skill) => {
@@ -19077,6 +19096,9 @@ function useComposerSlashActions(input) {
19077
19096
  policy: slashCommandPolicy
19078
19097
  });
19079
19098
  if (slashCommandEffect) {
19099
+ if (capabilityControlsReadOnly && slashCommandEffect.kind === "submitPrompt" && (slashCommandEffect.requiredSettingsPatch?.browserUse !== void 0 || slashCommandEffect.requiredSettingsPatch?.computerUse !== void 0)) {
19100
+ return;
19101
+ }
19080
19102
  executeSlashCommandEffect(slashCommandEffect);
19081
19103
  return;
19082
19104
  }
@@ -19164,6 +19186,9 @@ function useComposerSlashActions(input) {
19164
19186
  if (event.key === "Tab" || event.key === "Enter") {
19165
19187
  event.preventDefault();
19166
19188
  const activeEntry = slashPaletteEntries[activeHighlight];
19189
+ if (activeEntry?.type === "capability" && activeEntry.disabled) {
19190
+ return true;
19191
+ }
19167
19192
  if (activeEntry?.type === "command") {
19168
19193
  selectCommand(activeEntry.command);
19169
19194
  } else if (activeEntry?.type === "capability") {
@@ -23823,6 +23848,7 @@ function AgentSlashCommandPalette({
23823
23848
  return /* @__PURE__ */ jsxs23("div", { className: paletteStyles.palette, role: "listbox", "aria-label": label, children: [
23824
23849
  entries.map((entry, index) => {
23825
23850
  const isHighlighted = index === highlightedIndex;
23851
+ const isDisabled = entry.type === "capability" && entry.disabled === true;
23826
23852
  const groupType = entryGroupType(entry);
23827
23853
  const entryIcon = slashPaletteEntryIcon(entry);
23828
23854
  const groupHeader = showGroupHeaders && firstEntryIndexByType.get(groupType) === index ? /* @__PURE__ */ jsx32(
@@ -23852,14 +23878,19 @@ function AgentSlashCommandPalette({
23852
23878
  ref: isHighlighted ? highlightedOptionRef : null,
23853
23879
  className: cn(
23854
23880
  paletteStyles.option,
23855
- isHighlighted && "bg-[var(--transparency-block)]"
23881
+ isHighlighted && "bg-[var(--transparency-block)]",
23882
+ isDisabled && "cursor-not-allowed text-[var(--agent-gui-text-tertiary)] opacity-60 hover:bg-transparent active:bg-transparent"
23856
23883
  ),
23857
23884
  role: "option",
23858
23885
  "aria-selected": isHighlighted,
23886
+ "aria-disabled": isDisabled || void 0,
23859
23887
  "data-highlighted": isHighlighted ? "" : void 0,
23860
23888
  onMouseEnter: () => onHighlightChange(index),
23861
23889
  onMouseDown: (event) => event.preventDefault(),
23862
23890
  onClick: () => {
23891
+ if (isDisabled) {
23892
+ return;
23893
+ }
23863
23894
  if (entry.type === "command") {
23864
23895
  onSelect(entry.command);
23865
23896
  return;
@@ -23888,6 +23919,7 @@ function AgentSlashCommandPalette({
23888
23919
  {
23889
23920
  "aria-label": entry.settingsAriaLabel ?? entry.settingsLabel,
23890
23921
  className: paletteStyles.settingsButton,
23922
+ disabled: isDisabled,
23891
23923
  title: entry.settingsAriaLabel ?? entry.settingsLabel,
23892
23924
  type: "button",
23893
23925
  onClick: (event) => {
@@ -27313,6 +27345,7 @@ function AgentComposer(props) {
27313
27345
  onDraftContentChange,
27314
27346
  onSettingsChange,
27315
27347
  capabilityMenuState,
27348
+ capabilityControlsReadOnly = false,
27316
27349
  onSubmit,
27317
27350
  onSubmitGuidance,
27318
27351
  onInterruptCurrentTurn,
@@ -27414,6 +27447,7 @@ function AgentComposer(props) {
27414
27447
  compactSupported,
27415
27448
  composerSettings,
27416
27449
  capabilityMenuState,
27450
+ capabilityControlsReadOnly,
27417
27451
  labels,
27418
27452
  uiLanguage,
27419
27453
  editorHandleRef
@@ -27511,6 +27545,7 @@ function AgentComposer(props) {
27511
27545
  promptImagesSupported: canUploadAttachment && promptImagesSupported,
27512
27546
  availableSkills,
27513
27547
  composerSettings,
27548
+ capabilityControlsReadOnly,
27514
27549
  onDraftContentChange,
27515
27550
  onSettingsChange,
27516
27551
  onSubmit,
@@ -36628,6 +36663,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36628
36663
  onLinkAction,
36629
36664
  onHandoffConversation,
36630
36665
  capabilityMenuState,
36666
+ capabilityControlsReadOnly = false,
36631
36667
  onCapabilitySettingsRequest,
36632
36668
  onAgentProviderLogin,
36633
36669
  onRequestWorkspaceReferences,
@@ -36882,6 +36918,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36882
36918
  labels: composerLabels,
36883
36919
  workspaceUserProjectI18n,
36884
36920
  capabilityMenuState,
36921
+ capabilityControlsReadOnly,
36885
36922
  onDraftContentChange: updateDraftContent,
36886
36923
  onProjectPathChange: updateSelectedProjectPath,
36887
36924
  onSettingsChange: updateComposerSettings,
@@ -36906,6 +36943,7 @@ var AgentGUIDetailPane = memo12(function AgentGUIDetailPane2({
36906
36943
  [
36907
36944
  canQueueWhileBusy,
36908
36945
  capabilityMenuState,
36946
+ capabilityControlsReadOnly,
36909
36947
  canSwitchComposerProvider,
36910
36948
  composerDisabled,
36911
36949
  composerDisabledReason,
@@ -37994,6 +38032,7 @@ function AgentGUINodeView({
37994
38032
  onLinkAction,
37995
38033
  onHandoffConversation,
37996
38034
  capabilityMenuState,
38035
+ capabilityControlsReadOnly = false,
37997
38036
  onCapabilitySettingsRequest,
37998
38037
  isActive = true,
37999
38038
  isVisible = true,
@@ -38582,6 +38621,7 @@ function AgentGUINodeView({
38582
38621
  onLinkAction,
38583
38622
  onHandoffConversation,
38584
38623
  capabilityMenuState,
38624
+ capabilityControlsReadOnly,
38585
38625
  onCapabilitySettingsRequest,
38586
38626
  onAgentProviderLogin,
38587
38627
  onRequestWorkspaceReferences: requestWorkspaceReferences,
@@ -38900,7 +38940,7 @@ function areAgentGUINodePropsEqual(previous, next) {
38900
38940
  const pc = previous.hostCapabilities, nc = next.hostCapabilities;
38901
38941
  const pa = previous.hostActions, na = next.hostActions;
38902
38942
  const ps = previous.renderSlots, ns = next.renderSlots;
38903
- return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.resolveExternalPromptEntries === nw.resolveExternalPromptEntries && pw.prepareExternalPromptFiles === nw.prepareExternalPromptFiles && pw.promptAssetLimit === nw.promptAssetLimit && pw.projectDirectorySourceAggregator === nw.projectDirectorySourceAggregator && pw.referenceSourceAggregator === nw.referenceSourceAggregator && pw.resolveReferenceEntryIconUrl === nw.resolveReferenceEntryIconUrl && pw.resolveMentionReferenceTarget === nw.resolveMentionReferenceTarget && pw.resolveReferenceInitialTarget === nw.resolveReferenceInitialTarget && pw.onFileReferencesAdded === nw.onFileReferencesAdded && pw.agentSettings.avoidGroupingEdits === nw.agentSettings.avoidGroupingEdits && pc.referenceProvenanceFilterCatalog === nc.referenceProvenanceFilterCatalog && pc.referenceProvenanceFilterEnabled === nc.referenceProvenanceFilterEnabled && agentGuiStateEquals(previous.state, next.state) && pf.position.x === nf.position.x && pf.position.y === nf.position.y && pf.width === nf.width && pf.height === nf.height && pf.desktopSize.width === nf.desktopSize.width && pf.desktopSize.height === nf.desktopSize.height && pf.isMaximized === nf.isMaximized && pf.isActive === nf.isActive && pf.isVisible === nf.isVisible && pf.embedded === nf.embedded && pf.previewMode === nf.previewMode && pf.conversationRailAutoCollapseWidthPx === nf.conversationRailAutoCollapseWidthPx && pr.composerFocusSequence === nr.composerFocusSequence && pr.composerAppend === nr.composerAppend && pr.newConversationSequence === nr.newConversationSequence && pr.sessionAction === nr.sessionAction && pr.openSession === nr.openSession && pr.prefillPrompt === nr.prefillPrompt && pr.agentStatusController === nr.agentStatusController && pc.capabilityMenuState === nc.capabilityMenuState && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && pa.onConversationRailLayoutChange === na.onConversationRailLayoutChange && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
38943
+ return pi.nodeId === ni.nodeId && pi.workspaceId === ni.workspaceId && pi.currentUserId === ni.currentUserId && pi.title === ni.title && pw.path === nw.path && pw.fileReferenceAdapter === nw.fileReferenceAdapter && pw.onRequestGitBranches === nw.onRequestGitBranches && pw.selectProjectDirectory === nw.selectProjectDirectory && pw.resolveExternalPromptEntries === nw.resolveExternalPromptEntries && pw.prepareExternalPromptFiles === nw.prepareExternalPromptFiles && pw.promptAssetLimit === nw.promptAssetLimit && pw.projectDirectorySourceAggregator === nw.projectDirectorySourceAggregator && pw.referenceSourceAggregator === nw.referenceSourceAggregator && pw.resolveReferenceEntryIconUrl === nw.resolveReferenceEntryIconUrl && pw.resolveMentionReferenceTarget === nw.resolveMentionReferenceTarget && pw.resolveReferenceInitialTarget === nw.resolveReferenceInitialTarget && pw.onFileReferencesAdded === nw.onFileReferencesAdded && pw.agentSettings.avoidGroupingEdits === nw.agentSettings.avoidGroupingEdits && pc.referenceProvenanceFilterCatalog === nc.referenceProvenanceFilterCatalog && pc.referenceProvenanceFilterEnabled === nc.referenceProvenanceFilterEnabled && agentGuiStateEquals(previous.state, next.state) && pf.position.x === nf.position.x && pf.position.y === nf.position.y && pf.width === nf.width && pf.height === nf.height && pf.desktopSize.width === nf.desktopSize.width && pf.desktopSize.height === nf.desktopSize.height && pf.isMaximized === nf.isMaximized && pf.isActive === nf.isActive && pf.isVisible === nf.isVisible && pf.embedded === nf.embedded && pf.previewMode === nf.previewMode && pf.conversationRailAutoCollapseWidthPx === nf.conversationRailAutoCollapseWidthPx && pr.composerFocusSequence === nr.composerFocusSequence && pr.composerAppend === nr.composerAppend && pr.newConversationSequence === nr.newConversationSequence && pr.sessionAction === nr.sessionAction && pr.openSession === nr.openSession && pr.prefillPrompt === nr.prefillPrompt && pr.agentStatusController === nr.agentStatusController && pc.capabilityMenuState === nc.capabilityMenuState && pc.capabilityControlsReadOnly === nc.capabilityControlsReadOnly && pc.accountMenuState === nc.accountMenuState && pc.agentTargets === nc.agentTargets && pc.agentTargetsLoading === nc.agentTargetsLoading && pc.handoffAgentTargets === nc.handoffAgentTargets && pc.handoffAgentTargetsLoading === nc.handoffAgentTargetsLoading && pc.providerRailAllPresentation?.iconUrl === nc.providerRailAllPresentation?.iconUrl && pc.providerRailMode === nc.providerRailMode && pc.comingSoonProviders === nc.comingSoonProviders && pc.providerReadinessGates === nc.providerReadinessGates && pc.defaultAgentTargetId === nc.defaultAgentTargetId && pc.providerAuthAccountLabels === nc.providerAuthAccountLabels && pc.mentionService === nc.mentionService && pc.workspaceAppIcons === nc.workspaceAppIcons && pc.disabledHomeSuggestions === nc.disabledHomeSuggestions && pa.onLinkAction === na.onLinkAction && pa.onHandoffConversation === na.onHandoffConversation && pa.onCapabilitySettingsRequest === na.onCapabilitySettingsRequest && pa.onAgentProviderLogin === na.onAgentProviderLogin && pa.onAgentEnvPanelOpen === na.onAgentEnvPanelOpen && pa.onOpenConversationWindow === na.onOpenConversationWindow && pa.onClose === na.onClose && pa.onResize === na.onResize && pa.onUpdateNode === na.onUpdateNode && pa.onRememberComposerDefaults === na.onRememberComposerDefaults && pa.isMuted === na.isMuted && pa.onMinimize === na.onMinimize && pa.onToggleMaximize === na.onToggleMaximize && pa.onShowMessage === na.onShowMessage && pa.onEngagementEvent === na.onEngagementEvent && pa.onConversationRailLayoutChange === na.onConversationRailLayoutChange && ps.providerRailEmpty === ns.providerRailEmpty && ps.providerUnavailableState === ns.providerUnavailableState && ps.sidebarFooter === ns.sidebarFooter;
38904
38944
  }
38905
38945
 
38906
38946
  // agent-gui/agentGuiNode/AgentGUIMentionServiceBoundary.tsx
@@ -40047,6 +40087,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40047
40087
  } = runtimeRequests;
40048
40088
  const {
40049
40089
  capabilityMenuState,
40090
+ capabilityControlsReadOnly = false,
40050
40091
  accountMenuState = null,
40051
40092
  agentTargets,
40052
40093
  agentTargetsLoading = false,
@@ -40397,6 +40438,7 @@ var AgentGUINode = memo14(function AgentGUINode2({
40397
40438
  onLinkAction: handleLinkAction,
40398
40439
  onHandoffConversation,
40399
40440
  capabilityMenuState,
40441
+ capabilityControlsReadOnly,
40400
40442
  onCapabilitySettingsRequest,
40401
40443
  onAgentProviderLogin: onAgentProviderLogin ? handleAgentProviderLogin : void 0,
40402
40444
  onAgentEnvPanelOpen,
@@ -40537,4 +40579,4 @@ export {
40537
40579
  AgentHandoffMenu,
40538
40580
  AgentGUI
40539
40581
  };
40540
- //# sourceMappingURL=chunk-XQV7VV2N.js.map
40582
+ //# sourceMappingURL=chunk-WPV23OY7.js.map