Add checked workspace-interface query roots

Implement scoped interface extents across QX, generated bindings, SDK,
Orch, Camino and browser queries. Preserve native projection, aggregation,
pagination and watch invalidation without synthetic persisted objects.
Validate exact query grants and scope freshness on execution and replay.
Add local PostgreSQL, transport, browser and code-generation coverage.

C1 implementation slice only: full-text indexes and Studio search adoption
(C2/C3) remain tracked in the implementation handoff. No publication or deployment.
This commit is contained in:
Timothy J. Aveni
2026-09-19 10:18:47 -07:00
parent 0810775c07
commit 5634d3ee78
27 changed files with 1371 additions and 945 deletions
+13 -3
View File
@@ -1244,7 +1244,7 @@ const lowerPackage = (
const declaration: QueryDeclaration = {
id: stringValue(query.stringLiteral(0)),
displayName: identifier(query.identifier()),
root: close(query.interfaceType()),
root: { kind: query.WORKSPACE() ? "workspace-interface" : "object", interface: close(query.interfaceType()) },
document: stringValue(query.stringLiteral(1)),
operation: stringValue(query.stringLiteral(2)),
fragments: [],
@@ -1372,7 +1372,7 @@ const lowerPackage = (
queryTemplates.push({
declaration: common,
parameters,
root: expressions.get(root)!,
root: { kind: root.kind, interface: expressions.get(root.interface)! },
views: templateViews,
allowances: templateAllowances,
});
@@ -1579,7 +1579,17 @@ const lowerBoundDependencies = (
const query = lowerQueryReference(state, identifier(entry.identifier(1)), identifier(entry.identifier(2)), entry);
const via = entry.VIA() ? traversal(identifier(entry.identifier(3)), identifier(entry.identifier(4))) : undefined;
return query && (!entry.VIA() || via)
? [{ portId, binding: { kind: "query", ...query, ...(via ? { via } : {}) } }]
? [
{
portId,
binding: {
kind: "query",
...query,
scope: entry.WORKSPACE() ? "workspace" : "object",
...(via ? { via } : {}),
},
},
]
: [];
}
if (entry.STATE()) {