Make local graph execution optional across composed packages
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import type { Binding } from "../capability-model/types.js";
|
||||
|
||||
/** Nominal library identity. Backends implement primitives; target names carry no
|
||||
* built-in semantics in the graph planner. The JS backend is installed by the
|
||||
* current toolchain, alongside the authoritative server executor. */
|
||||
export const javascriptTarget = "target:org.quixos.execution.javascript@1";
|
||||
export interface NativeExecutionBackend {
|
||||
readonly target: string;
|
||||
readonly supports: (binding: Exclude<Binding, { kind: "interface" }>) => boolean;
|
||||
}
|
||||
export const standardNativeBackends: readonly NativeExecutionBackend[] = [
|
||||
{ target: "server", supports: () => true },
|
||||
{
|
||||
target: javascriptTarget,
|
||||
supports: (binding) =>
|
||||
binding.kind === "state" ||
|
||||
binding.kind === "edge" ||
|
||||
binding.kind === "journal" ||
|
||||
(binding.kind === "subscription" && binding.primitive === "status"),
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user