@omercnet/paseo-omp 5.4.0-next.423.1 → 5.4.0-next.424.1

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.
@@ -38,7 +38,11 @@ import { ComposerPillSettingsSection } from "./composer-pill-settings";
38
38
  import { openOmpExternalUrl } from "./external-url";
39
39
  import { ActionButton, OmpAccountsSection } from "./omp-accounts-section";
40
40
  import { type OmpConfigStyles, useConfigStyles } from "./omp-config-styles";
41
- import { type OmpConfigSurfaceView as SurfaceView, surfaceViewsForScope } from "./omp-config-views";
41
+ import {
42
+ resolveSurfaceView,
43
+ type OmpConfigSurfaceView as SurfaceView,
44
+ surfaceViewsForScope,
45
+ } from "./omp-config-views";
42
46
  import {
43
47
  documentationForSettingCategory,
44
48
  documentationForSettingPath,
@@ -67,6 +71,7 @@ import { ToolPolicyCard } from "./omp-tool-policy";
67
71
  import { OmpUpdateRow, UPDATE_QUERY_KEY } from "./omp-update-row";
68
72
  import {
69
73
  type BinaryHealthSummary,
74
+ hasEnabledPluginProvider,
70
75
  loadReadyProviderSnapshot,
71
76
  lspTone,
72
77
  mcpTone,
@@ -187,7 +192,7 @@ function ProviderSetupSection({ styles }: { styles: OmpConfigStyles }) {
187
192
  function PluginConfigurationSection({ styles }: { styles: OmpConfigStyles }) {
188
193
  return (
189
194
  <>
190
- <SectionCard styles={styles} title="OMP Plugin launch options">
195
+ <SectionCard styles={styles} title="Plugin provider launch options">
191
196
  <Text style={styles.muted}>
192
197
  Configure inherited daemon environment names below. Paseo does not expose effective
193
198
  profile options for active launches, so this tab documents profile overrides without
@@ -1204,14 +1209,27 @@ function OmpConfigContent({
1204
1209
  ? { error: "Could not list every OMP agent. Typed names remain available." }
1205
1210
  : {}),
1206
1211
  };
1207
- const [view, setView] = useState<SurfaceView>(focusRule ? "rules" : "overview");
1212
+ const [selectedView, setView] = useState<SurfaceView>(focusRule ? "rules" : "overview");
1208
1213
  const [activeCategory, setActiveCategory] = useState<OmpSettingCategory>("appearance");
1209
1214
  const [search, setSearch] = useState("");
1210
1215
  const [drafts, setDrafts] = useState<Record<string, SettingDraft>>({});
1211
1216
  const [documentationError, setDocumentationError] = useState<string | null>(null);
1212
1217
  const styles = useConfigStyles(theme, layout.compact);
1213
1218
  const normalizedSearch = search.trim().toLocaleLowerCase();
1214
- const surfaceViews = surfaceViewsForScope(cwd !== undefined);
1219
+ const paseo = usePaseo();
1220
+ const providers = useQuery({
1221
+ queryKey: PROVIDERS_QUERY_KEY,
1222
+ queryFn: () => loadReadyProviderSnapshot(paseo.providers),
1223
+ });
1224
+ // Until the snapshot settles, keep the tab the plugin has always shown.
1225
+ const pluginProviderEnabled = providers.data
1226
+ ? hasEnabledPluginProvider(providers.data.entries)
1227
+ : true;
1228
+ const surfaceViews = surfaceViewsForScope({
1229
+ workspaceScoped: cwd !== undefined,
1230
+ pluginProviderEnabled,
1231
+ });
1232
+ const view = resolveSurfaceView(surfaceViews, selectedView);
1215
1233
  const catalog = useMemo(() => {
1216
1234
  const sourceSettings = settingsQuery.data?.available
1217
1235
  ? settingsQuery.data.settings
@@ -17,7 +17,7 @@ const SURFACE_VIEWS: readonly { id: OmpConfigSurfaceView; label: string }[] = [
17
17
  { id: "overview", label: "Overview" },
18
18
  { id: "accounts", label: "Accounts" },
19
19
  { id: "mcps", label: "MCPs" },
20
- { id: "plugin", label: "Plugin" },
20
+ { id: "plugin", label: "Plugin provider" },
21
21
  { id: "plugins", label: "OMP plugins" },
22
22
  { id: "rules", label: "Rules" },
23
23
  { id: "skills", label: "Skills" },
@@ -35,7 +35,24 @@ const STORE_ONLY_VIEWS: readonly OmpConfigSurfaceView[] = ["composer", "accounts
35
35
  /** Views about one project, which the global OMP screen has no project for. */
36
36
  const WORKSPACE_ONLY_VIEWS: readonly OmpConfigSurfaceView[] = ["security"];
37
37
 
38
- export function surfaceViewsForScope(workspaceScoped: boolean) {
38
+ interface SurfaceScope {
39
+ workspaceScoped: boolean;
40
+ /** The plugin's own `omp-plugin` providers; the Plugin provider view only applies to them. */
41
+ pluginProviderEnabled: boolean;
42
+ }
43
+
44
+ export function surfaceViewsForScope({ workspaceScoped, pluginProviderEnabled }: SurfaceScope) {
39
45
  const hidden = workspaceScoped ? STORE_ONLY_VIEWS : WORKSPACE_ONLY_VIEWS;
40
- return SURFACE_VIEWS.filter((candidate) => !hidden.includes(candidate.id));
46
+ return SURFACE_VIEWS.filter(
47
+ (candidate) =>
48
+ !hidden.includes(candidate.id) && (pluginProviderEnabled || candidate.id !== "plugin"),
49
+ );
50
+ }
51
+
52
+ /** A view the current scope or provider state hides falls back to Overview, never a blank screen. */
53
+ export function resolveSurfaceView(
54
+ views: readonly { id: OmpConfigSurfaceView }[],
55
+ selected: OmpConfigSurfaceView,
56
+ ): OmpConfigSurfaceView {
57
+ return views.some((candidate) => candidate.id === selected) ? selected : "overview";
41
58
  }
@@ -8,7 +8,7 @@ import type {
8
8
  OmpVersionStatus,
9
9
  PathState,
10
10
  } from "../shared/provider-diagnostics";
11
- import { isOmpProvider } from "./omp-store-state";
11
+ import { isOmpPluginProvider, isOmpProvider } from "./omp-store-state";
12
12
  import type { PaseoApi, PaseoProviderSnapshotResult } from "./paseo-types";
13
13
 
14
14
  export type ProviderHealthTone = "ok" | "warning" | "danger" | "muted";
@@ -261,6 +261,15 @@ export function selectKnownOmpProviders(
261
261
  );
262
262
  }
263
263
 
264
+ /** True while any provider this plugin registers (`omp-plugin`, `omp-plugin-<profile>`) is enabled. */
265
+ export function hasEnabledPluginProvider(
266
+ entries: readonly PaseoProviderSnapshotResult["entries"][number][],
267
+ ): boolean {
268
+ return selectKnownOmpProviders(entries).some(
269
+ (provider) => provider.enabled && isOmpPluginProvider(provider.id),
270
+ );
271
+ }
272
+
264
273
  export interface PromptFileNotice {
265
274
  file: "APPEND_SYSTEM.md" | "SYSTEM.md";
266
275
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omercnet/paseo-omp",
3
- "version": "5.4.0-next.423.1",
3
+ "version": "5.4.0-next.424.1",
4
4
  "type": "module",
5
5
  "description": "Paseo integration for OMP, including its direct provider and workspace tooling.",
6
6
  "license": "MIT",
@@ -1,2 +1,2 @@
1
1
  /** Release Please keeps this bundle-safe constant aligned with package.json. */
2
- export const PASEO_OMP_PACKAGE_VERSION = "5.4.0-next.423.1"; // x-release-please-version
2
+ export const PASEO_OMP_PACKAGE_VERSION = "5.4.0-next.424.1"; // x-release-please-version
@@ -925,7 +925,7 @@ export function createOmpConnection(
925
925
  requestFailure(
926
926
  input.requestId,
927
927
  new OmpPublicError(
928
- `OMP session limit reached (${sessionLimit.maxSessions} open sessions). Archive idle agents or raise the session limit in OMP → Plugin.`,
928
+ `OMP session limit reached (${sessionLimit.maxSessions} open sessions). Archive idle agents or raise the session limit in OMP → Plugin provider.`,
929
929
  ),
930
930
  );
931
931
  return;