@aintela/chat 0.3.7 → 0.4.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
@@ -77,6 +77,22 @@ manifest export and the generation:
77
77
  "gen:uitools": "dotnet run --project ../path/to/Server.UiToolsManifest -- src/agent/generated/uitools.manifest.json && aia-gen-uitools src/agent/generated/uitools.manifest.json src/agent/generated"
78
78
  ```
79
79
 
80
+ **Every C# contract becomes ONE interface, under its own name.** The manifest carries each object's C#
81
+ type name as a JSON-Schema `title` (`UiToolsManifest` stamps it), and the generator lifts each titled
82
+ type into `$defs` and references it from every payload that embeds it — so `RescheduleQuoteCardArgs`
83
+ gets `replacing?: RescheduleQuoteFlight[]`, and `RescheduleQuoteFlight` is declared once however many
84
+ tools carry one.
85
+
86
+ That matters because of what it replaced. JSON Schema keeps no record of the type a sub-object came
87
+ from, so a nested type could only be named after its POSITION — and the position of every array element
88
+ is the key `items`. Every nested list in every tool therefore emitted as one interface called `Items`,
89
+ and the second shape to claim the name was dropped in favour of the first with only a warning: a
90
+ reschedule-quote flight typechecked as an expense-report line, `tsc` accepted `expenseId` on a flight,
91
+ and nothing failed. Two different shapes claiming one name now **stops the run** and writes nothing,
92
+ naming both. A manifest published by an older server carries no titles; the generator then names a
93
+ hoisted element after its owner (`RescheduleQuoteCardArgsReplacingItem`) rather than after `items` —
94
+ correct, ugly, and a prompt to republish the manifest.
95
+
80
96
  ### `TurnAwareButton` — controls drawn inside a chat message
81
97
 
82
98
  A UI-tool component is rendered **while the agent is still streaming its turn** (a