dreamteamer 0.13.1 → 0.13.2
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/package.json +1 -1
- package/src/compile.js +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dreamteamer",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "A workspace compiler for coding agents — schema-validated records as plain files over git, compiled into every harness",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Gilad Khen <giladkhen@gmail.com>",
|
package/src/compile.js
CHANGED
|
@@ -849,6 +849,9 @@ export function compile({ root, pkg }) {
|
|
|
849
849
|
// The descriptor already documented the correct behaviour — ui-views.collection.yaml: "An
|
|
850
850
|
// unregistered id degrades visibly rather than erroring" — and the surface already implements
|
|
851
851
|
// it (presets.ts#resolveRendererEntry falls back to table). Decision 195.
|
|
852
|
+
// ui-views' own field names, read from the descriptor that was just merged rather than hardcoded —
|
|
853
|
+
// a list in here would silently stop covering a field the moment ui-views grew one.
|
|
854
|
+
const ownFields = load(entries.get(path.join('collections', 'ui-views.collection.yaml'))?.bytes?.toString('utf8') ?? '')?.schema?.properties ?? {};
|
|
852
855
|
for (const [rt, e] of entries) {
|
|
853
856
|
if (!rt.startsWith('ui-views/')) continue;
|
|
854
857
|
const view = load(e.bytes.toString('utf8'));
|
|
@@ -862,6 +865,23 @@ export function compile({ root, pkg }) {
|
|
|
862
865
|
if (view?.filter && JSON.stringify(view.filter).includes('"@me"')) {
|
|
863
866
|
fail(`${rt}: filter uses "@me", which was removed with the \`users\` collection in 0.8.0 — it would now match nothing.\n filter on a field this workspace owns instead (e.g. { status: { _eq: "todo" } }).`);
|
|
864
867
|
}
|
|
868
|
+
// ⚠ `options` is a deliberately OPEN object — every key it does not own rides through untouched
|
|
869
|
+
// to whichever surface renders the layout. That openness is right, and it has one sharp edge: a
|
|
870
|
+
// field that belongs ONE LEVEL UP, written inside it, is accepted, saved, round-tripped and read
|
|
871
|
+
// by nobody. `options.filter` cost a real afternoon — the view drew all 429 rows of a collection
|
|
872
|
+
// it was supposed to narrow to 90, and neither compile nor check nor the surface said a word.
|
|
873
|
+
//
|
|
874
|
+
// This is the same rule the block above states, not an exception to it: the engine DOES interpret
|
|
875
|
+
// `filter`, so a `filter` it will never be handed is a value it can catch. A warning rather than a
|
|
876
|
+
// failure because `options` is open by contract and a surface may legitimately want a key that
|
|
877
|
+
// collides — but the operator has to be told, because the symptom is a view that looks like it
|
|
878
|
+
// works.
|
|
879
|
+
const shadowed = view?.options && typeof view.options === 'object' && !Array.isArray(view.options)
|
|
880
|
+
? Object.keys(view.options).filter((k) => k in ownFields)
|
|
881
|
+
: [];
|
|
882
|
+
for (const k of shadowed) {
|
|
883
|
+
console.warn(`⚠ ${rt}: options.${k} is read by nothing — \`${k}\` is a field of ui-views itself, one level up. move it out of \`options\`.`);
|
|
884
|
+
}
|
|
865
885
|
}
|
|
866
886
|
|
|
867
887
|
// ---- command-binding validation --------------------------------------------------
|