@metaobjectsdev/sdk 0.20.15-rc.1 → 0.20.16
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.
|
@@ -50,27 +50,22 @@ LLM tool-call envelope with no renderable text body (the body IS the
|
|
|
50
50
|
`@format` attrs above). The vocabulary exists today; MCP exposure of declared
|
|
51
51
|
prompts/tools is roadmap, not shipped — don't promise it.
|
|
52
52
|
|
|
53
|
-
## The payload is an `object.value`
|
|
54
|
-
|
|
55
|
-
The payload is **not** an entity — it's an `object.value` whose
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
`docs/features/source-kinds.md`, not here: don't reach for them on a payload VO.
|
|
70
|
-
|
|
71
|
-
Declaring the payload as a projection is what makes payload bloat visible: adding a
|
|
72
|
-
field to the prompt is a diff on the `object.value`, and a renamed source field
|
|
73
|
-
breaks the build instead of silently degrading the prompt.
|
|
53
|
+
## The payload is an `object.value` you declare
|
|
54
|
+
|
|
55
|
+
The payload is **not** an entity — it's an `object.value` whose DECLARED fields ARE
|
|
56
|
+
the prompt's typed shape. Every port's payload codegen is
|
|
57
|
+
**declared-type-authoritative (#270)**: a field's generated type comes only from its
|
|
58
|
+
declared `field.<subType>` + `isArray` + `@objectRef`, and a nested payload is a
|
|
59
|
+
declared `field.object @objectRef` to another `object.value` (`isArray: true` for a
|
|
60
|
+
list). The caller supplies the field values at render time. An `origin.*` child on a
|
|
61
|
+
payload field is IGNORED for typing — never author assembly origins (`aggregate` /
|
|
62
|
+
`collection` / `computed` / `first`) on a payload VO. Derivation belongs to
|
|
63
|
+
**projection** read models (`object.projection` over an entity), covered by the
|
|
64
|
+
`metaobjects-authoring` skill and `docs/features/source-kinds.md`, not here.
|
|
65
|
+
|
|
66
|
+
Declaring the payload shape is what makes payload bloat visible: adding a field to
|
|
67
|
+
the prompt is a diff on the `object.value`, and `verify` catches template/payload
|
|
68
|
+
drift at build time instead of letting a prompt silently degrade.
|
|
74
69
|
|
|
75
70
|
```json
|
|
76
71
|
{
|
|
@@ -81,12 +76,10 @@ breaks the build instead of silently degrading the prompt.
|
|
|
81
76
|
"object.value": {
|
|
82
77
|
"name": "WelcomePayload",
|
|
83
78
|
"children": [
|
|
84
|
-
{ "field.string": { "name": "displayName",
|
|
85
|
-
|
|
86
|
-
{ "field.long": { "name": "postCount",
|
|
87
|
-
"children": [ { "origin.aggregate": { "@agg": "count", "@of": "Post.id", "@via": "Author.posts" } } ] } },
|
|
79
|
+
{ "field.string": { "name": "displayName" } },
|
|
80
|
+
{ "field.long": { "name": "postCount" } },
|
|
88
81
|
{ "field.object": { "name": "posts", "@objectRef": "PostSummary",
|
|
89
|
-
"
|
|
82
|
+
"isArray": true } }
|
|
90
83
|
]
|
|
91
84
|
}
|
|
92
85
|
},
|
|
@@ -94,8 +87,7 @@ breaks the build instead of silently degrading the prompt.
|
|
|
94
87
|
"object.value": {
|
|
95
88
|
"name": "PostSummary",
|
|
96
89
|
"children": [
|
|
97
|
-
{ "field.string": { "name": "title"
|
|
98
|
-
"children": [ { "origin.passthrough": { "@from": "Post.title" } } ] } }
|
|
90
|
+
{ "field.string": { "name": "title" } }
|
|
99
91
|
]
|
|
100
92
|
}
|
|
101
93
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metaobjectsdev/sdk",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.16",
|
|
4
4
|
"description": "Workspace helpers and agent-docs utilities for MetaObjects projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@metaobjectsdev/metadata": "0.20.
|
|
59
|
+
"@metaobjectsdev/metadata": "0.20.16",
|
|
60
60
|
"zod": "^3.23.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|