Add interface-oriented client sessions and headless capability access (WI-07)
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
type PublicOperationContract,
|
||||
type PublicQueryContract,
|
||||
} from "./client-contracts.js";
|
||||
import { resultInterfaces } from "./projections.js";
|
||||
|
||||
/** Activation is assigned by graph authority, never by a package artifact. */
|
||||
export interface ActiveExecutionIdentity {
|
||||
@@ -23,6 +24,7 @@ export interface ExecutionGroupIdentity {
|
||||
readonly executionDigest: string;
|
||||
}
|
||||
export interface ClientContractCatalog {
|
||||
readonly resultInterfaces: Readonly<Record<string, readonly string[]>>;
|
||||
readonly operations: readonly PublicOperationContract[];
|
||||
readonly queries: readonly PublicQueryContract[];
|
||||
readonly components: readonly InstalledComponent[];
|
||||
@@ -58,6 +60,9 @@ export function clientContractCatalog(
|
||||
),
|
||||
);
|
||||
return {
|
||||
resultInterfaces: Object.fromEntries(
|
||||
plan.definition.operations.map((operation) => [operation.key, resultInterfaces(plan, operation.key)]),
|
||||
),
|
||||
operations,
|
||||
queries: packages.flatMap((pkg) =>
|
||||
(pkg.checkedQueries ?? []).map((q) => publicQueryContract(pkg, q.declaration.id)),
|
||||
|
||||
Reference in New Issue
Block a user