@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
|
-
|
|
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
|
-
|
|
9
|
-
|
|
8
|
+
cyrano-contracts (wire SSOT) → CyranoServer / Cyrano → dashboard-components-lib (UI)
|
|
9
|
+
Blackbox (Python stubs) ↗
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
This library
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
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
|
-
|
|
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
|
-
|
|
18
|
+
## Canonical Types
|
|
32
19
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
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
|
|
72
|
-
2. **
|
|
73
|
-
3. **Cyrano** imports
|
|
74
|
-
4. **Blackbox** mirrors via Python
|
|
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
|
|
79
|
-
2.
|
|
80
|
-
3.
|
|
81
|
-
4.
|
|
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
|
-
|
|
88
|
-
|
|
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
|
-
- `
|
|
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
|