@tristan2828/ui-foundation 4.22.0 → 4.23.0
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.
|
@@ -642,3 +642,26 @@ soft one; copy it.
|
|
|
642
642
|
- **Hard-deleted:** `DELETE` removes the row. Give the entity no `delete`
|
|
643
643
|
in `mcp_entities.py`: a chat that read planted instructions would
|
|
644
644
|
destroy data that only a backup returns.
|
|
645
|
+
|
|
646
|
+
## Fields only a script writes
|
|
647
|
+
|
|
648
|
+
Some fields the API takes on create and update are for a script, not for
|
|
649
|
+
the people or chats using the app: an importer that runs again and again
|
|
650
|
+
stores each record's id in the source it came from, so a re-run finds the
|
|
651
|
+
record even after it's renamed. The API has to accept that id, for the
|
|
652
|
+
importer. A chat that changed or cleared it would break the matching, and
|
|
653
|
+
the next run would create the record a second time.
|
|
654
|
+
|
|
655
|
+
- *MCP:* list the field's wire name in the entity's `McpEntity`
|
|
656
|
+
`script_only` (`script_only=("sourceId",)`). Chats still read it
|
|
657
|
+
(`fetch` shows it), but `create` and `update` refuse a call that names
|
|
658
|
+
it, by its wire name or its snake_case one, before the entity's own
|
|
659
|
+
function runs: `Nothing was saved.` and `- sourceId: set by a script,
|
|
660
|
+
not through MCP`, with no audit row. It's left out of the two tools'
|
|
661
|
+
descriptions, so a chat isn't invited to send it. The backend refuses
|
|
662
|
+
to start if a name isn't a field of the create or update schema, or if
|
|
663
|
+
create requires it (a chat could then never create one).
|
|
664
|
+
- *Screens:* the form leaves the field out, for the same reason.
|
|
665
|
+
- Don't use it for a field the server works out itself (`computed`) or
|
|
666
|
+
one that's never on the request: those aren't in the create or update
|
|
667
|
+
schema to begin with.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tristan2828/ui-foundation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|