<!-- source-hash: 9d75df8f934797fae402329b05b9e8c2 -->
Provides a React context for sharing API endpoint URLs across the component tree, enabling host applications (including reverse-proxy deployments) to override canonical paths consumed by `oss-lib` components.

## Key Components

| Export | Type | Description |
|--------|------|-------------|
| `EndpointsRuntime` | `interface` | Shape of the runtime value: `announcementsUrl`, `accessCode.validateUrl`, `accessCode.consumeUrl`, `contactUrl` |
| `EndpointsRuntimeContext` | `Context<EndpointsRuntime \| null>` | Raw React context — use directly only when mounting a `Provider` |
| `useEndpointsRuntime()` | hook | Returns `null` when no provider is mounted; safe for optional consumers |
| `useRequiredEndpointsRuntime()` | hook | Throws a descriptive error when no provider is mounted; use for form submissions and code validation |

## Usage Example

```typescript
// Hub root — canonical paths
<EndpointsRuntimeContext.Provider
  value={React.useMemo(() => ({
    announcementsUrl: '/api/announcements/active',
    accessCode: {
      validateUrl: '/api/access-codes/validate',
      consumeUrl:  '/api/access-codes/consume',
    },
    contactUrl: '/api/contact',
  }), [])}
>
  <App />
</EndpointsRuntimeContext.Provider>

// Embedded app — proxied paths (e.g. user1.openframe.ai)
<EndpointsRuntimeContext.Provider
  value={React.useMemo(() => ({
    announcementsUrl: '/api/mingo-guide/announcements/active',
    accessCode: {
      validateUrl: '/api/mingo-guide/access-codes/validate',
      consumeUrl:  '/api/mingo-guide/access-codes/consume',
    },
    contactUrl: '/api/mingo-guide/contact',
  }), [])}
>
  <EmbeddedApp />
</EndpointsRuntimeContext.Provider>

// Optional consumer (silently skips when outside provider)
const endpoints = useEndpointsRuntime()
if (endpoints) poll(endpoints.announcementsUrl)

// Required consumer (throws outside provider)
const { contactUrl } = useRequiredEndpointsRuntime()
await fetch(contactUrl, { method: 'POST', body })

// Tests / Storybook
<EndpointsRuntimeContext.Provider value={mockedEndpoints}>
  <ComponentUnderTest />
</EndpointsRuntimeContext.Provider>
```

> **Embedders:** always `useMemo` the value object passed to the provider. A new object reference on every render invalidates downstream `useEffect` dependency arrays and triggers unnecessary re-fetches.