@ossy/package-catalog 3.6.0 → 3.11.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ossy/package-catalog",
3
3
  "description": "Capability catalog UI — browse manifest packages, actions, and integration examples",
4
- "version": "3.6.0",
4
+ "version": "3.11.0",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "module": "./src/index.js",
@@ -29,5 +29,5 @@
29
29
  "@ossy/workspaces": ">=1.0.0",
30
30
  "react": ">=19.0.0 <20.0.0"
31
31
  },
32
- "gitHead": "d1fd144986b0e819d46926aeb11f7815ac52a784"
32
+ "gitHead": "53ff8456920e09151c9d88df4a6c3ee958d811eb"
33
33
  }
@@ -2,28 +2,33 @@ import React, { useState } from 'react'
2
2
  import { Button } from '@ossy/design-system'
3
3
  import { useApp } from '@ossy/app/shell'
4
4
  import { GetWorkspace, EnableService, DisableService } from '@ossy/workspaces'
5
- import { useSdk, cacheKey } from '@ossy/sdk-react'
5
+ import { useSdk, cacheKey, AsyncStatus } from '@ossy/sdk-react'
6
6
  import { isServiceEntitled, isToggleablePackage } from '@ossy/workspaces/entitlements'
7
- import { resolveWorkspaceServices } from '@ossy/app/shell'
8
7
 
9
8
  /**
10
9
  * Enable or disable a workspace service from the package detail page.
10
+ *
11
+ * Toggle state must reflect the **live workspace** entitlement — not
12
+ * `devEntitlements` / `resolveWorkspaceServices` overlays used by the sidebar.
13
+ * Otherwise Disable appears to no-op in app-test when a package is pre-enabled
14
+ * for local sidebar verification.
15
+ *
16
+ * Do not mount the toggle until GetWorkspace has settled. Rendering Enable
17
+ * while services are still undefined, then remounting when Success lands,
18
+ * detaches the control under Playwright's scroll/stability wait (catalog
19
+ * enable e2e flake).
11
20
  */
12
21
  export function PackageServiceToggle ({ packageName, entitlementRequired = true }) {
13
22
  const app = useApp()
14
23
  const sdk = useSdk()
15
- const { data: workspace, refetch: refetchWorkspace } = sdk.read(GetWorkspace)
24
+ const { data: workspace, status, refetch: refetchWorkspace } = sdk.read(GetWorkspace)
16
25
  const [busy, setBusy] = useState(false)
17
26
 
18
27
  if (!app?.isAuthenticated || !app?.workspaceId) return null
19
28
  if (!packageName || !isToggleablePackage(packageName, { entitlementRequired })) return null
29
+ if (status !== AsyncStatus.Success && status !== AsyncStatus.Error) return null
20
30
 
21
- const services = resolveWorkspaceServices({
22
- devMode: app.devMode,
23
- devEntitlements: app.devEntitlements,
24
- workspaceServices: workspace?.services,
25
- })
26
- const enabled = isServiceEntitled(services, packageName)
31
+ const enabled = isServiceEntitled(workspace?.services, packageName)
27
32
 
28
33
  const toggleService = async (enable) => {
29
34
  setBusy(true)
@@ -3,7 +3,7 @@
3
3
  "package-catalog.home.hero.title": "A digital toolbox for your business",
4
4
  "package-catalog.browser.title": "Capabilities",
5
5
  "package-catalog.browser.description": "Browse documented, invokable capabilities for your workspace.",
6
- "package-catalog.home.hero.text": "Ossy ships documented, invokable capabilities — booking, auth, resources, and more. Every feature is callable from the SDK, API, or MCP. UI is a projection, not the product.",
6
+ "package-catalog.home.hero.text": "We ship documented, invokable capabilities — booking, auth, resources, and more. Every feature is callable from the SDK, API, or MCP. UI is a projection, not the product.",
7
7
  "package-catalog.home.hero.meta": "{count} capabilities · ready to use in apps and agents",
8
8
  "package-catalog.home.belief.title": "What we believe",
9
9
  "package-catalog.home.belief.body": "People want a new way to interact with technology. AI is becoming the primary layer — agents should run your business operations, not just answer questions. We build compact, composable tools that plug into MCP-compatible hosts — Cursor, Claude Desktop, GitHub Copilot in VS Code, and other MCP agents — as well as your own apps and the web.",
@@ -3,7 +3,7 @@
3
3
  "package-catalog.home.hero.title": "En digital verktygslåda för ditt företag",
4
4
  "package-catalog.browser.title": "Funktioner",
5
5
  "package-catalog.browser.description": "Bläddra bland dokumenterade, anropbara capabilities för din workspace.",
6
- "package-catalog.home.hero.text": "Ossy levererar dokumenterade, anropbara capabilities — bokning, auth, resurser med mera. Varje funktion går att anropa via SDK, API eller MCP. UI är en projektion, inte produkten.",
6
+ "package-catalog.home.hero.text": "Vi levererar dokumenterade, anropbara capabilities — bokning, auth, resurser med mera. Varje funktion går att anropa via SDK, API eller MCP. UI är en projektion, inte produkten.",
7
7
  "package-catalog.home.hero.meta": "{count} funktioner · redo att användas i appar och agenter",
8
8
  "package-catalog.home.belief.title": "Vad vi tror på",
9
9
  "package-catalog.home.belief.body": "Människor vill interagera med teknik på ett nytt sätt. AI blir det primära lagret — agenter ska driva verksamheten, inte bara svara på frågor. Vi bygger kompakta, sammansatta verktyg som fungerar i MCP-kompatibla miljöer — Cursor, Claude Desktop, GitHub Copilot i VS Code och andra MCP-agenter — samt i dina egna appar och på webben.",