@m6d/cortex-client 1.7.0 → 1.8.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.
package/README.md CHANGED
@@ -16,7 +16,7 @@ export class MyComponent {
16
16
  locale: signal('en'),
17
17
  transport: {
18
18
  baseUrl: '/api/agents/assistant',
19
- getAuthHeaders: () => ({ Authorization: `Bearer ${token}` }),
19
+ getHeaders: () => ({ Authorization: `Bearer ${token}` }),
20
20
  },
21
21
  wsUrl: 'ws://localhost:3331/api/ws',
22
22
  };
@@ -27,16 +27,18 @@ No root-level providers needed — each widget instance is fully self-contained.
27
27
 
28
28
  ### Configuration
29
29
 
30
- | Property | Type | Description |
31
- | -------------------------- | ------------------------------- | ------------------------------------------------------- |
32
- | `locale` | `Signal<string>` | Active locale (`"en"`, `"ar"`) |
33
- | `transport.baseUrl` | `string \| Signal<string>` | Agent API base URL |
34
- | `transport.getAuthHeaders` | `() => Record<string, string>` | Auth header provider |
35
- | `wsUrl` | `string` | WebSocket URL for real-time events (optional) |
36
- | `theme` | `CortexClientTheme` | Custom colors and styling (optional) |
37
- | `showDebugButton` | `boolean` | Show/hide the debug toggle button (default: `false`) |
38
- | `toolComponents` | `Record<string, Type<unknown>>` | Custom Angular components for tool rendering (optional) |
39
- | `onToolCall` | `(toolCall) => unknown` | Client-side tool call handler (optional) |
30
+ | Property | Type | Description |
31
+ | ---------------------- | ------------------------------- | ------------------------------------------------------- |
32
+ | `locale` | `Signal<string>` | Active locale (`"en"`, `"ar"`) |
33
+ | `transport.baseUrl` | `string \| Signal<string>` | Agent API base URL |
34
+ | `transport.getHeaders` | `() => Record<string, string>` | Request headers provider |
35
+ | `wsUrl` | `string` | WebSocket URL for real-time events (optional) |
36
+ | `theme` | `CortexClientTheme` | Custom colors and styling (optional) |
37
+ | `showDebugButton` | `boolean` | Show/hide the debug toggle button (default: `false`) |
38
+ | `toolComponents` | `Record<string, Type<unknown>>` | Custom Angular components for tool rendering (optional) |
39
+ | `onToolCall` | `(toolCall) => unknown` | Client-side tool call handler (optional) |
40
+
41
+ `transport.getHeaders` can return any request headers needed by the host app. WebSocket auth continues to derive the `token` query param from a bearer `Authorization` header when present.
40
42
 
41
43
  ## Requirements
42
44