Implement query execution, scoped RPC enrichment, live collections, and scaffold integration
This commit is contained in:
+20
-1
@@ -1,4 +1,10 @@
|
||||
import type { AtomId, InterfaceRevisionId, MemberId, ValueType } from "../capability-model/types.js";
|
||||
import type {
|
||||
TypeParameter,
|
||||
InterfaceApplicationExpression,
|
||||
ObjectTypeExpression,
|
||||
ClosedTypeArgument,
|
||||
} from "../capability-model/generics.js";
|
||||
|
||||
export type QueryUse = "select" | "predicate" | "order";
|
||||
export interface QueryAllowance {
|
||||
@@ -37,6 +43,19 @@ export interface QueryDeclaration {
|
||||
budgets: QueryBudgets;
|
||||
watch: boolean;
|
||||
polling?: { intervalMs: number; reason: string };
|
||||
application?: { templateId: string; arguments: ClosedTypeArgument[] };
|
||||
argumentRequirements?: {
|
||||
target: import("../capability-model/types.js").ObjectExpectation;
|
||||
required: InterfaceRevisionId;
|
||||
}[];
|
||||
}
|
||||
/** Source-only template; neither parameters nor synthetic bound witnesses are installed. */
|
||||
export interface QueryTemplate {
|
||||
declaration: Omit<QueryDeclaration, "root" | "views" | "allowances">;
|
||||
parameters: TypeParameter[];
|
||||
root: InterfaceApplicationExpression;
|
||||
views: { target: ObjectTypeExpression; interface: InterfaceApplicationExpression }[];
|
||||
allowances: { interface: InterfaceApplicationExpression; memberName: string; uses: QueryUse[]; reason: string }[];
|
||||
}
|
||||
export interface QueryFieldEffect {
|
||||
interfaceRevisionId: InterfaceRevisionId;
|
||||
@@ -55,7 +74,7 @@ export class QueryCompileError extends Error {
|
||||
message: string,
|
||||
readonly location?: QuerySourceLocation,
|
||||
) {
|
||||
super(message);
|
||||
super(`${code}${location ? ` ${location.file}:${location.line}:${location.column}` : ""}: ${message}`);
|
||||
this.name = "QueryCompileError";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user