@naniteninja/dashboard-components-lib 2.2.1 → 2.3.4

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
@@ -1,43 +1,44 @@
1
1
  # @naniteninja/dashboard-components-lib
2
2
 
3
- Canonical source of truth for shared TypeScript types, enums, and Angular presentational components used across the Cyrano ecosystem.
3
+ Angular presentational components and UI-enriched types for the Cyrano dashboard. **Wire types** (socket payloads, shared enums) live in `@naniteninja/cyrano-contracts`; this library extends them with presentation-only fields.
4
4
 
5
5
  ## Role in the Ecosystem
6
6
 
7
7
  ```
8
- Blackbox (Python) → CyranoServer (NestJS) → Cyrano (Angular) → dashboard-components-lib
9
- wire types wire envelopes host state canonical types + components
8
+ cyrano-contracts (wire SSOT) → CyranoServer / Cyrano → dashboard-components-lib (UI)
9
+ Blackbox (Python stubs) ↗
10
10
  ```
11
11
 
12
- This library owns the **canonical TypeScript definitions** consumed by:
13
- - **CyranoServer** (mirrors types for parity; contract-tested via `contract-alignment.spec.ts`)
14
- - **Cyrano** (imports directly via `@naniteninja/dashboard-components-lib`)
15
- - **Blackbox** (wire equivalence via Python TypedDicts mirroring these interfaces)
12
+ This library provides **dashboard UI components and presentation types** consumed by:
13
+ - **Cyrano** (host app sockets, auth, state)
14
+ - **dashboard-components-lib-test** (local component harness)
16
15
 
17
- ## Canonical Types
18
-
19
- ### Core Messaging
20
-
21
- | Type | File | Purpose |
22
- |------|------|---------|
23
- | `IMessage` | `interfaces/message.interface.ts` | Fundamental message unit |
24
- | `IAttachment` | `interfaces/message-attachment.interface.ts` | Message media |
25
- | `ISendOptionsMessage` | `interfaces/send-options-message.interface.ts` | Send timing preferences |
26
- | `IChatSuggestion` | `interfaces/chat-suggestion.interface.ts` | LLM suggestion entry |
27
- | `SenderTypes` | `enums/sender-types.enum.ts` | `user` / `other` enum |
28
- | `SendMessageType` | `enums/type-send-message.enum.ts` | Send timing enum |
29
- | `MatcherStatuses` | `enums/matcher-statuses.enum.ts` | Pipeline status funnel |
16
+ Canonical wire definitions are in **`@naniteninja/cyrano-contracts`**. CyranoServer validates parity via `contract-alignment.spec.ts`.
30
17
 
31
- ### Dashboard Models
18
+ ## Canonical Types
32
19
 
33
- | Type | File | Purpose |
34
- |------|------|---------|
35
- | `IProspectData` | `interfaces/prospect-data.interface.ts` | Chat/prospect card payload |
36
- | `ILibClientMatchOverview` | `interfaces/client-match-overview.interface.ts` | Client match overview envelope |
37
- | `IDashboardMatchRequest` | `interfaces/dashboard-match-request.interface.ts` | Match request metadata |
38
- | `ISchedulerEvent` | `interfaces/scheduler.event.interface.ts` | Calendar events |
39
- | `IChartData` | `interfaces/chart-data.interface.ts` | Compatibility chart data |
40
- | `IConversationFlag` | `interfaces/conversation-flag.interface.ts` | Unresponsive/redelegation flags |
20
+ ### Core Messaging (from `@naniteninja/cyrano-contracts`)
21
+
22
+ | Type | Purpose |
23
+ |------|---------|
24
+ | `IMessage` | Fundamental message unit |
25
+ | `IAttachment` | Message media |
26
+ | `ISendOptionsMessage` | Send timing preferences |
27
+ | `IChatSuggestion` | LLM suggestion entry |
28
+ | `SenderTypes` | `user` / `other` enum |
29
+ | `SendMessageType` | Send timing enum |
30
+ | `MatcherStatuses` | Pipeline status funnel |
31
+
32
+ ### Dashboard Models (UI extensions)
33
+
34
+ | Type | Purpose |
35
+ |------|---------|
36
+ | `IProspectData` | Chat/prospect card payload (+ UI-only fields like `llmPreferenceLoading$`) |
37
+ | `ILibClientMatchOverview` | Client match overview envelope |
38
+ | `IDashboardMatchRequest` | Match request metadata |
39
+ | `ISchedulerEvent` | Calendar events |
40
+ | `IChartData` | Compatibility chart data |
41
+ | `IConversationFlag` | Unresponsive/redelegation flags |
41
42
 
42
43
  ### Enums
43
44
 
@@ -68,32 +69,27 @@ This library owns the **canonical TypeScript definitions** consumed by:
68
69
 
69
70
  ## Contract Ownership Rules
70
71
 
71
- 1. **New shared types** belong here if consumed by UI components
72
- 2. **CyranoServer** maintains compile-time mirrors validated by `contract-alignment.spec.ts`
73
- 3. **Cyrano** imports directly; never forks a parallel interface
74
- 4. **Blackbox** mirrors via Python TypedDicts in `shared_web_utils/base/typed_payloads.py`
72
+ 1. **New wire types** belong in `@naniteninja/cyrano-contracts`
73
+ 2. **UI-only extensions** belong here (e.g. `llmPreferenceLoading$` on `IProspectData`)
74
+ 3. **Cyrano** imports wire types from contracts; lib types for components
75
+ 4. **Blackbox** mirrors wire types via Python stubs from `cyrano-contracts/scripts/generate-python.ts`
75
76
 
76
77
  ## Adding a New Contract
77
78
 
78
- 1. Define the interface/enum in `src/lib/interfaces/` or `src/lib/enums/`
79
- 2. Export from `src/public-api.ts`
80
- 3. Add a mirror to CyranoServer's `contract-alignment.spec.ts` with compile-time assertion
81
- 4. Update `FIELD_CONSISTENCY_MATRIX.md` in the CyranoServer docs
82
- 5. If the type crosses the Python boundary, add a TypedDict in Blackbox's `typed_payloads.py`
79
+ 1. Define wire interface/enum in `cyrano-contracts`
80
+ 2. Re-export or extend in this library if UI needs extra fields
81
+ 3. Run contract alignment tests in cyranoserver and cyrano
82
+ 4. Regenerate Python stubs for Blackbox if the type crosses the wire boundary
83
83
 
84
84
  ## Development
85
85
 
86
86
  ```bash
87
- # Build the library
88
- ng build dashboard-components-lib
89
-
90
- # Run tests
91
- ng test dashboard-components-lib
87
+ npm run build
88
+ npm test
92
89
  ```
93
90
 
94
91
  ## Related Documentation
95
92
 
93
+ - `cyrano-contracts/README.md` — wire SSOT package
96
94
  - `cyranoserver/docs/CANONICAL_MESSAGING_CONTRACTS.md` — full contract reference
97
- - `cyranoserver/docs/FIELD_CONSISTENCY_MATRIX.md` — cross-repo field comparison
98
- - `cyranoserver/docs/CROSS_REPO_TYPE_OWNERSHIP.md` — ownership map
99
- - `cyranoserver/docs/TESTING_CONTRACTS.md` — test enforcement matrix
95
+ - `cyrano/docs/MESSAGING_ARCHITECTURE.md` — frontend socket integration